#11902: Fan subdivision should check rays
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |          Owner:  AlexGhitza
       Type:  defect              |         Status:  new       
   Priority:  major               |      Milestone:  sage-4.7.3
  Component:  algebraic geometry  |       Keywords:            
Work_issues:                      |       Upstream:  N/A       
   Reviewer:                      |         Author:            
     Merged:                      |   Dependencies:            
----------------------------------+-----------------------------------------
 The following should raise an error:
 {{{
 sage: fan = toric_varieties.P2().fan()
 sage: fan.subdivide(new_rays=[(0,0)])
 Rational polyhedral fan in 2-d lattice N
 }}}
 Right now, you only fall on your face once you try to do something with
 this "subdivided" fan:
 {{{
 sage: _.cones()
 ---------------------------------------------------------------------------
 KeyError                                  Traceback (most recent call
 last)

 /home/vbraun/Sage/EllipticFibration/<ipython console> in <module>()

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in cones(self, dim, codim)
    1744         if "_cones" not in self.__dict__:
    1745             levels = [(e.element for e in level) # Generators
 -> 1746                       for level in
 self.cone_lattice().level_sets()]
    1747             levels.pop() # The very last level is this FAN, not
 cone.
    1748             # It seems that there is no reason to believe that the
 order of

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in cone_lattice(self)
    1682         """
    1683         if "_cone_lattice" not in self.__dict__:
 -> 1684             self._compute_cone_lattice()
    1685         return self._cone_lattice
    1686

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in _compute_cone_lattice(self)
    1099             # Make sure that rays are in the beginning in proper
 order
    1100             head = [rays_to_index[()]] # Empty face
 -> 1101             head.extend(rays_to_index[(n,)] for n in
 range(self.nrays()))
    1102             new_order = head + [n for n in new_order if n not in
 head]
    1103             # "Invert" this list to a dictionary

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in <genexpr>((n,))
    1099             # Make sure that rays are in the beginning in proper
 order
    1100             head = [rays_to_index[()]] # Empty face
 -> 1101             head.extend(rays_to_index[(n,)] for n in
 range(self.nrays()))
    1102             new_order = head + [n for n in new_order if n not in
 head]
    1103             # "Invert" this list to a dictionary

 KeyError: (3,)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11902>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to