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

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]
raylist.append(macaulay2(f'{a},{b},{c}'))

newraylist = []

for i in raylist:
newraylist.append(macaulay2(f'toList{i}'))

#cones in sage:

cones=[(1,2,6),(2,3,6),(3,4,8),(1,5,6),(3,6,7),(3,7,8),(5,6,9),(6,7,11),(7,8,11),(6,9,10),(6,10,11),(8,11,12),(8,12,18),(10,11,13),(11,12,14),(11,13,16),(11,14,16),(13,15,16),(14,16,17),(15,16,19),(16,17,21),(17,18,21),(16,19,20),(16,20,21),(18,21,22),(19,20,24),(20,21,24),(21,22,26),(19,23,24),(21,24,25),(21,25,26),(0,2,3,4),(12,14,17,18),(9,10,13,15),(9,15,19),(8,18,22),(5,9,19),(1,5,19),(1,19,23),(0,1,2,23),(0,23,24,25),(22,26,8),(0,4,25,26),(4,8,26)]

#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}');
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}');

#checking completeness and polytopality

macaulay2('isComplete F')
macaulay2('isPolytopal F')

edit retag close merge delete

You could also try "polymake" : the command REGULAR here : https://www.polymake.org/release_docs...

( 2022-02-18 09:43:50 +0200 )edit

Sort by » oldest newest most voted

Hello,

maybe using something like this:

sage: A = ClusterAlgebra(['A', 2])
sage: V = A.cluster_fan().toric_variety()
sage: V.Kaehler_cone().is_empty()
False

more

1

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

( 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...)

( 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.

( 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.

( 2022-02-10 18:10:07 +0200 )edit
2

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.

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