Opened 8 years ago

Last modified 5 years ago

#16012 needs_info defect

Sublattice fan isomorphism bug

Reported by: novoselt Owned by:
Priority: major Milestone: sage-6.4
Component: geometry Keywords: toric
Cc: jakobkroeker Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: u/jkeitel/sub_fan_isomorphism (Commits, GitHub, GitLab) Commit: 656fa89b8d9ab818c31c4b631a011727f340ea92
Dependencies: Stopgaps:

Status badges

Description

Fans living in sublattices are not correctly checked for being isomorphic as demonstrated in a doctest of #12892.

Change History (6)

comment:1 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:2 Changed 8 years ago by jkeitel

Hi Andrey,

there's a simple fix for that. Simply replace

if self.lattice_dim() == 2:

in fan.py by

if self.lattice_dim() == 2 and self.lattice() is self.lattice().ambient_module() and other.lattice() is other.lattice().ambient_module()

because the alternative method of trying to find an isomorphism still works - it's just the echelon forms that 'know' about the sublattice and therefore compare unequal. Alternatively, one could modify the fan_2d_echelon_form() in fan_isomorphism.py such that it removes empty rows.

What do you think?

comment:3 Changed 8 years ago by jkeitel

  • Branch set to u/jkeitel/sub_fan_isomorphism
  • Commit set to 656fa89b8d9ab818c31c4b631a011727f340ea92

Okay, actually it might be smarter to do something else, because although what I suggested above fixes the is_isomorphic method, the isomorphism method still does not work.

I am attaching a branch that changes the output of two auxiliary functions. When computing echelonized forms of 2d fans and when trying to find isomorphisms between fans, the coordinates now used aren't those of the ambient space anymore, but of a basis of the lattice. I'm not sure whether that's a smart thing to do, since there might be some arbitrariness in the choice of basis, but FanMorphism expects a matrix with nrows / ncols equal to the dimension of the lattice itself, not the dimension of the ambient space.

What do you think? In any case, there are still some doctests missing.


New commits:

656fa89Isomorphisms between fans in sublattices

comment:4 Changed 8 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:5 Changed 5 years ago by jakobkroeker

  • Cc jakobkroeker added
  • Status changed from new to needs_info

Does this issue still hold? Could someone provide a failing example?

comment:6 Changed 5 years ago by novoselt

Well, the test from the posted commit fails:

sage: N = ToricLattice(3)
sage: S = N.submodule([(1,-1,0), (1,1,1)])
sage: B = S.basis()
sage: cones = [Cone([B[0], B[1]]), Cone([B[1], -B[0]-B[1]]), Cone([-B[0]-B[1], B[0]])]
sage: f = Fan(cones)
sage: f2 = toric_varieties.P(2).fan()
sage: from sage.geometry.fan_isomorphism import find_isomorphism
sage: find_isomorphism(f, f2)
---------------------------------------------------------------------------
FanNotIsomorphicError                     Traceback (most recent call last)
<ipython-input-9-45f2d7a96da1> in <module>()
----> 1 find_isomorphism(f, f2)

/home/novoselt/sage/local/lib/python2.7/site-packages/sage/geometry/fan_isomorphism.pyc in find_isomorphism(fan1, fan2, check)
    243         m = next(generator)
    244     except StopIteration:
--> 245         raise FanNotIsomorphicError
    246 
    247     from sage.geometry.fan_morphism import FanMorphism

FanNotIsomorphicError: 

while in fact the isomorphism is given by the identity matrix here.

Note: See TracTickets for help on using tickets.