#9782: Enhanced fans fail for complicated cases
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |       Owner:  novoselt  
       Type:  defect              |      Status:  new       
   Priority:  major               |   Milestone:  sage-4.5.3
  Component:  algebraic geometry  |    Keywords:            
     Author:                      |    Upstream:  N/A       
   Reviewer:                      |      Merged:            
Work_issues:                      |  
----------------------------------+-----------------------------------------
 Fans of toric varieties do not work correctly, for example see the
 following:
 {{{
 sage: f = Fan([(0, 2, 4), (0, 4, 5), (0, 3, 5), (0, 1, 3), (0, 1, 2), (2,
 4, 6), (4, 5, 6), (3, 5, 6), (1, 3, 6), (1, 2, 6)], [(-1, 0, 0), (0, -1,
 0), (0, 0, -1), (0, 0, 1), (0, 1, 2), (0, 1, 3), (1, 0, 4)])
 sage: f.is_complete()
 True
 sage: X = ToricVariety(f)
 sage: X.fan().is_complete()
 ---------------------------------------------------------------------------
 IndexError                                Traceback (most recent call
 last)

 /home/vbraun/opt/sage-4.5.2/devel/sage-main/<ipython console> in
 <module>()

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in is_complete(self)
    1742         # Then boundary cones are (d-1)-dimensional.
    1743         for cone in self(codim=1):
 -> 1744             if len(cone.star_generator_indices()) != 2:
    1745                 self._is_complete = False
    1746                 return False

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in __call__(self, dim, codim)
     816         else:
     817             return self.cones(dim, codim)
 --> 818
     819     def __cmp__(self, right):
     820         r"""

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in cones(self, dim, codim)
    1547                 if len(top_cones) == self.ngenerating_cones():
    1548                     top_cones.sort(key=lambda cone:
 -> 1549
 cone.star_generator_indices()[0])
    1550                 levels[-1] = top_cones
    1551             if len(levels) >= 2: # We have rays

 /home/vbraun/Sage/sage/local/lib/python2.6/site-
 packages/sage/geometry/fan.pyc in <lambda>(cone)
    1548                     top_cones.sort(key=lambda cone:
    1549
 cone.star_generator_indices()[0])
 -> 1550                 levels[-1] = top_cones
    1551             if len(levels) >= 2: # We have rays
    1552                 rays = list(levels[1])

 IndexError: tuple index out of range
 }}}
 I'm pretty sure it is a bug in Andrey's switch to enhanced cones for toric
 varieties (`trac_9470_toric_variety_fans.patch`). If I back out that patch
 it works fine. Unfortunately we didn't catch that in our doctests, we
 should add tests for complicated toric varieties and mark them as `# long
 time`

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9782>
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