Example how to compute the mirror sphere as an Complex.
This is work in progress. Many interesting pieces are not yet implemented.
i1 : R=QQ[x_0..x_4] o1 = R o1 : PolynomialRing |
i2 : I=ideal(x_0*x_1,x_2*x_3*x_4) o2 = ideal (x x , x x x ) 0 1 2 3 4 o2 : Ideal of R |
i3 : C=idealToComplex I o3 = 2: x x x x x x x x x x x x x x x x x x 0 2 3 1 2 3 0 2 4 1 2 4 0 3 4 1 3 4 o3 : complex of dim 2 embedded in dim 4 (printing facets) equidimensional, simplicial, F-vector {1, 5, 9, 6, 0, 0}, Euler = 1 |
i4 : PT1C=PT1 C o4 = 4: y y y y y y y y y y 0 1 2 3 4 5 6 7 8 9 o4 : complex of dim 4 embedded in dim 4 (printing facets) equidimensional, non-simplicial, F-vector {1, 10, 24, 25, 11, 1}, Euler = 0 |
i5 : tropDefC=tropDef(C,PT1C) o5 = 1: y y y y y y y y y y 0 4 8 9 3 7 2 6 1 5 o5 : co-complex of dim 1 embedded in dim 4 (printing facets) equidimensional, non-simplicial, F-vector {0, 0, 5, 9, 6, 1}, Euler = -1 |
i6 : tropDefC.grading o6 = | -1 0 0 0 | | 1 0 0 0 | | -1 2 0 0 | | -1 0 2 0 | | 0 -1 -1 -1 | | 3 -1 -1 -1 | | 0 2 -1 -1 | | 0 -1 2 -1 | | -1 0 0 2 | | 0 -1 -1 2 | 10 4 o6 : Matrix ZZ <--- ZZ |
i7 : B=dualize tropDefC o7 = 2: v v v v v v v v v v v v v v v v v v 2 4 7 2 4 8 9 2 5 7 9 4 5 7 8 5 8 9 o7 : complex of dim 2 embedded in dim 4 (printing facets) equidimensional, non-simplicial, F-vector {1, 6, 9, 5, 0, 0}, Euler = 1 |
i8 : B.grading o8 = | 1 0 0 0 | | 0 1 0 0 | | 1 1 0 0 | | 0 0 1 0 | | 1 0 1 0 | | -1 -1 -1 0 | | 0 0 0 1 | | 1 0 0 1 | | -1 -1 0 -1 | | -1 0 -1 -1 | | -1 -1 -1 -1 | 11 4 o8 : Matrix QQ <--- QQ |
i9 : fvector C o9 = {1, 5, 9, 6, 0, 0} o9 : List |
i10 : fvector B o10 = {1, 6, 9, 5, 0, 0} o10 : List |
The implementation of testing whether a face is tropical so far uses a trick to emulate higher order. For very complicated (non-complete intersections and non-Pfaffians) examples this may lead to an incorrect result. Use with care. This will be fixed at some point.
If using OldPolyhedra to compute convex hulls and its faces instead of ConvexInterface you are limited to rather simple examples.
The object mirrorSphere is a symbol.