Opened 10 years ago

Closed 10 years ago

#10731 closed defect (fixed)

IndexError in toric sheaf cohomology

Reported by: vbraun Owned by: AlexGhitza
Priority: major Milestone: sage-4.6.2
Component: algebraic geometry Keywords:
Cc: novoselt Merged in: sage-4.6.2.alpha4
Authors: Volker Braun Reviewers: Andrey Novoseltsev
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

This computation dies unnecessarily:

sage: cell24 = Polyhedron(vertices=[   
...    (1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1),(1,-1,-1,1),(0,0,-1,1),          
...    (0,-1,0,1),(-1,0,0,1),(1,0,0,-1),(0,1,0,-1),(0,0,1,-1),(-1,1,1,-1),
...    (1,-1,-1,0),(0,0,-1,0),(0,-1,0,0),(-1,0,0,0),(1,-1,0,0),(1,0,-1,0),
...    (0,1,1,-1),(-1,1,1,0),(-1,1,0,0),(-1,0,1,0),(0,-1,-1,1),(0,0,0,-1)])
sage: X = ToricVariety(FaceFan(cell24.lattice_polytope()))
sage: D = -X.divisor(0)
sage: D.cohomology()
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)

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

/home/vbraun/Sage/sage/local/lib/python2.6/site-packages/sage/schemes/generic/toric_divisor.pyc in _sheaf_cohomology(self, cplx)
   1544                 assert(h[1].dimension()==0)
   1545                 continue
-> 1546             HH_list[ h[0]+1 ] = h[1].dimension()
   1547 
   1548         return vector(ZZ, HH_list)

IndexError: list assignment index out of range

Inside, the homology of an auxiliary simplicial complex is computed. For sufficiently complicated cases, vector spaces of dimension 0 are sometimes returned even if all higher-dimensional homology groups vanish. My sheaf cohomology code wrongly assumed that this would not be the case.

Attachments (1)

trac_10731_fix_toric_sheaf_cohomology.patch (1.9 KB) - added by vbraun 10 years ago.
Updated patch

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by vbraun

  • Authors set to Volker Braun
  • Cc novoselt added
  • Status changed from new to needs_review

comment:2 Changed 10 years ago by novoselt

  • Reviewers set to Andrey Novoseltsev
  • Status changed from needs_review to needs_work
  • Work issues set to add reference to the ticket in the doctest

Looks good, but misses the reference to this ticket.

Is it possible to get these 0-dimensional spaces even in negative degree? In general, is it how homology of this associated complex should behave? I.e. was it really a defect of toric code or there should be a follow-up ticket open for homology computation?

Changed 10 years ago by vbraun

Updated patch

comment:3 Changed 10 years ago by vbraun

I've added a reference to this trac ticket.

I don't think that the homology every returns negative degrees, but even if that were the case it would be mathematically correct as long as the homology group is zero-dimensional. As is, the auxiliary simplicial complex is higher-dimensional (but of course has no homology in degrees larger) than the dimension of the variety. So we can't blame the homology code...

comment:4 Changed 10 years ago by vbraun

  • Status changed from needs_work to needs_review

comment:5 Changed 10 years ago by novoselt

  • Status changed from needs_review to positive_review

comment:6 Changed 10 years ago by novoselt

  • Work issues add reference to the ticket in the doctest deleted

comment:7 Changed 10 years ago by jdemeyer

  • Merged in set to sage-4.6.2.alpha4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.