Ask Your Question

Checking whether a fan is projective: any way to get it faster?

asked 2022-02-10 14:55:45 +0200

Polydarya gravatar image

I need to check whether a certain complete fan in R^3 is projective or not. What I tried was export the fan to macaulay2, and apply isPolytopal. However, while completeness is checked in like 30 sec, the polytopality gets stuck, the program doesn't finish in any reasonable time (we left it running for the night, with no result). My question is: are there any more effective ways of checking whether fans are polytopal or not?

Just in case, attached is my code:

macaulay2('loadPackage "Polyhedra"')

L = ToricLattice(4)
Q = ToricLattice(3)
h = L.hom([[1,0,0],[0,1,0],[0,0,1],[-1,-1,-1]],Q)

#rays in sage:

rays = [h((0,2,0,1)),h((0,3,0,2)),h((0,3,1,2)),h((0,5,2,3)),h((0,4,1,2)),h((0,1,0,1)),h((0,1,1,1)),h((0,3,2,2)),h((0,2,1,1)),h((0,0,0,1)),h((0,0,1,1)),h((0,0,1,0)),h((0,3,1,1)),h((1,0,1,1)),h((0,1,0,0)),h((1,0,0,1)),h((1,0,0,0)),h((1,3,0,1)),h((0,4,0,1)),h((1,1,0,1)),h((2,3,0,2)),h((1,2,0,1)),h((0,3,0,1)),h((1,3,0,2)),h((2,5,0,3)),h((1,4,0,2)),h((0,5,0,2))]

#exporting rays to Macaulay

raylist = []
for i in rays:
    a = i[0]
    b = i[1]
    c = i[2]

newraylist = []

for i in raylist:

#cones in sage:


#creating the fan in macaulay with cones as above

macaulay2('Z = coneFromVData matrix {{0,0,0},{0,0,0},{0,0,0}}')
macaulay2('F = fan Z')

conelist = []
for cone in cones:
    if len(cone) == 3:
        macaulay2(f'v1 = vector {newraylist[cone[0]]}');
        macaulay2(f'v2 = vector {newraylist[cone[1]]}');
        macaulay2(f'v3 = vector {newraylist[cone[2]]}');   
    macaulay2('C = coneFromVData matrix {v1,v2,v3}');
    macaulay2('F = addCone(C,F)')
if len(cone) == 4:
    macaulay2(f'v1 = vector {newraylist[cone[0]]}');
    macaulay2(f'v2 = vector {newraylist[cone[1]]}');
    macaulay2(f'v3 = vector {newraylist[cone[2]]}');
    macaulay2(f'v4 = vector {newraylist[cone[3]]}'); 
    macaulay2('C = coneFromVData matrix {v1,v2,v3,v4}');
    macaulay2('F = addCone(C,F)')

#checking completeness and polytopality 

macaulay2('isComplete F')
macaulay2('isPolytopal F')
edit retag flag offensive close merge delete


You could also try "polymake" : the command REGULAR here :

FrédéricC gravatar imageFrédéricC ( 2022-02-18 09:43:50 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2022-02-10 16:28:41 +0200

FrédéricC gravatar image


maybe using something like this:

sage: A = ClusterAlgebra(['A', 2])
sage: V = A.cluster_fan().toric_variety()
sage: V.Kaehler_cone().is_empty()
edit flag offensive delete link more



or rather check that the open Kaehler cone is not empty by counting the rays

FrédéricC gravatar imageFrédéricC ( 2022-02-10 17:29:13 +0200 )edit

So does Kaehler_cone() produce the open one or not? (I've tried the suggested code, so far it didn't manage the create this Kaehler_cone() though...)

Polydarya gravatar imagePolydarya ( 2022-02-10 17:36:10 +0200 )edit

It produces the closed cone. Then you can use the method ".dimension", or whatever way to check that the interior is not empty.

FrédéricC gravatar imageFrédéricC ( 2022-02-10 18:09:01 +0200 )edit

Note that this a computation in a space whose dimension is the number of rays minus the ambient dimension. This seems to be large in your example.

FrédéricC gravatar imageFrédéricC ( 2022-02-10 18:10:07 +0200 )edit

I think FredericC may be assuming the fan is simplicial, which it is not. For a simplicial fan, the nef cone is full dimensional if and only if the ample cone is non empty, but that need not be the case for non simplicial fans. Edit: If you have a simple polytope, then you may perturb the facets without changing the face lattice, but for general polytopes this is not so.

SpencerB gravatar imageSpencerB ( 2022-02-10 18:39:31 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2022-02-10 14:55:45 +0200

Seen: 163 times

Last updated: Feb 10 '22