################################################## # Calculations of all Newton Subdivisions Cell 8 # ################################################## # We use the calculations of the 8 subdivisions of the TypeIICone done in "ComputingSubdivisionsCoefficientsyz.sage" in order to compute the possible Newton Subdivisions for the yz-projection on each of the 8 cells. This will detect possible subdivisions of the original 8 cells of the TypeIICone. # Once the chambers are computed, we project back to the first 4 coordinates. We compute the pieces and check for overlaps. After turning the collection into a decomposition of Cell0, we find the facets and rays. We only consider lower dimensional faces and sample points if they are in the relative interior of the original Cell, since otherwise these points will be taken care of when analyzing the corresponding cell in the boundary. # The required functions are obtain by loading the following auxiliary file: load("macroslocalJInvariantComputationsAndPrimesWithBadReduction.sage") ######################################### # Generate the ambient ring and Weights # ######################################### AXs = [var("b5"),var("b4"),var("b34"), var("b2"), var("x"), var("y")] RX = PolynomialRing(QQ,AXs) KX = FractionField(R); Rxy = PolynomialRing(QQ, [var("x"), var("y")]) ########################### # Grobner Cones and Cells # ########################### # We load the 9 cells the variables are As = [var("b5"),var("b4"),var("b34"), var("b2")] allPiecesTypeIICone = load("allPiecesTypeIICone.sobj") Cell = allPiecesTypeIICone[8] # Cell.Hrepresentation() # (An equation (1, -2, 0, 1) x + 0 == 0, # An equation (0, 0, 1, -1) x + 0 == 0, # An inequality (1, 0, 0, -1) x + 0 >= 0) # Cell.lines() # (A line in the direction (1, 1, 1, 1),) # We compute the inequalities and equalities by re-embedding in AXS ieqsCell = inequalitiesOfReembeddedPolyhedron(Cell) eqnsCell = equationsOfReembeddedPolyhedron(Cell) # ieqsCell # [(0, 1, 0, 0, -1, 0, 0)] # eqnsCell # [(0, 1, -2, 0, 1, 0, 0), (0, 0, 0, 1, -1, 0, 0)] # We re-embedd the Cell in R^6: newCell = Polyhedron(ieqs=ieqsCell, eqns = eqnsCell) # newCell.Hrepresentation() # (An equation (1, -2, 0, 1, 0, 0) x + 0 == 0, # An equation (1, -2, 1, 0, 0, 0) x + 0 == 0, # An inequality (1, -1, 0, 0, 0, 0) x + 0 >= 0) # We load the Grobner fans and the Maximal Cones for all 9 cells: allGfm =load("allGfmCells0to8.sobj") PolyMaximalConesAllGfmDict = load("PolyMaximalConesAllGfmDict.sobj") # We record the one we need: PolyMaximalConesGfmDict = PolyMaximalConesAllGfmDict[8] ########################################################################### # Compute the intersection of Cell with the Grobner fan of the projection # ########################################################################### SubdivisionsNewCell= computeSubdivisionsOfTypeConeByGrobnerFan(newCell,PolyMaximalConesGfmDict) # We record the output: # SubdivisionsNewCell # ([1, 4, 5, 7, 8, 12, 13, 14], # [A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 4 rays, 1 line, # A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line]) # We compute the pieces of the subdivision and sample points to compute the leading terms: PiecesNewCell = findRaysPiecesSamplePoint(SubdivisionsNewCell[1]) # We record the output: # PiecesNewCell # ({0: [[0, 0, 0, 0, -17, 10], [0, 0, 0, 0, -1, -1], [27, 0, -27, -27, -5, -5]], # 1: [[0, 0, 0, 0, 1, 1], [27, 0, -27, -27, 29, -25], [0, 0, 0, 0, 10, -17]], # 2: [[0, 0, 0, 0, 1, 1], [27, 0, -27, -27, 29, -25], [0, 0, 0, 0, 10, -17]], # 3: [[17, 17, 17, 17, 0, 27], # [32, 5, -22, -22, 0, 0], # [25, -2, -29, -29, 0, 0]], # 4: [[0, 0, 0, 0, 1, 1], [27, 0, -27, -27, 2, 2], [0, 0, 0, 0, -17, 10]], # 5: [[54, 27, 0, 0, 56, 2], [54, 27, 0, 0, 22, 22], [54, 27, 0, 0, 29, 29]], # 6: [[-2, -29, -56, -56, 0, -54], # [-10, -10, -10, -10, 0, -27], # [32, 5, -22, -22, 0, 0], # [1, 1, 1, 1, 0, 0]], # 7: [[-2, -29, -56, -56, 0, -54], # [-1, -1, -1, -1, 0, 0], # [25, -2, -29, -29, 0, 0]]}, # {0: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 1: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 2: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 3: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 4: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 5: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line, # 6: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 4 rays, 1 line, # 7: A 4-dimensional polyhedron in QQ^6 defined as the convex hull of 1 vertex, 3 rays, 1 line}, # {0: [54, 0, -54, -54, -46, 8], # 1: [54, 0, -54, -54, 80, -82], # 2: [54, 0, -54, -54, 80, -82], # 3: [148, 40, -68, -68, 0, 54], # 4: [54, 0, -54, -54, -28, 26], # 5: [324, 162, 0, 0, 214, 106], # 6: [42, -66, -174, -174, 0, -162], # 7: [44, -64, -172, -172, 0, -108]}) # We check the lineality space is always the all ones vector: # set([tuple(PiecesNewCell[-2][k].lines()[0].vector()) for k in PiecesNewCell[-2].keys()]) # {(1, 1, 1, 1, 1, 1)} # We record the sample points to compute the leading terms: allWeightsMxlCell = PiecesNewCell[-1] ########################### # Projection of Polytopes # ########################### # We compute the projection away from x,y for all the chambers. projectedChambers= {k: projectPolyhedra(SubdivisionsNewCell[1][k]) for k in range(len(SubdivisionsNewCell[1]))} noRepetedProjectedChambers = list(set(projectedChambers.values())) projectedSubdivisionsNewCell = (range(len(noRepetedProjectedChambers)), noRepetedProjectedChambers) len(projectedSubdivisionsNewCell[1]) 1 # We check that all polytopes project to the Cell. Therefore, there is only one possible subdivision! # Cell == projectedSubdivisionsNewCell[1][0] # True trueSubdivision = [[0],[Cell]] # We compute the pieces of the subdivision and sample points to compute the leading terms: PiecesprojectedSubdivisionsNewCell = findRaysPiecesSamplePoint(trueSubdivision[1]) # # We record the output # PiecesprojectedSubdivisionsNewCell # ({0: [[2, 1, 0, 0]]}, # {0: A 2-dimensional polyhedron in ZZ^4 defined as the convex hull of 1 vertex, 1 ray, 1 line}, # {0: [4, 2, 0, 0]}) # # We record the sample points to compute the leading terms: # PiecesprojectedSubdivisionsNewCell[-1] # {0: [4, 2, 0, 0]}) allWeightsProjectedChambers = PiecesprojectedSubdivisionsNewCell[-1] ########################### # Lower dimensional Cones # ########################### # There are none. ################################### # Simplify Weight vectors to Test # ################################### allWeights = allWeightsProjectedChambers.values() # We compute primitive vectors with non-positive coefficients equivalent to each one of the sample vectors above, by substracting appropriate multiplies of the all-ones vector and taking a primitive vector thereafter. This is implemented in the function "makeNegativeAndPrimitive" allWeightsSimplified = [] for k in range(len(allWeights)): allWeightsSimplified.append(makeNegativeAndPrimitive(allWeights[k])) # # We record the output vectors: we will use these to compute examples with Singular # allWeightsSimplified # [[0, -1, -2, -2]] ############################# # H-representation of Cells # ############################# # We record the H-representation of all the pieces of the subdivision (for all dimensions) lying in the relative interior of the cell) {k: PiecesprojectedSubdivisionsNewCell[1][k].Hrepresentation() for k in PiecesprojectedSubdivisionsNewCell[1].keys()} # {0: (An equation (2, -3, 1, 0) x + 0 == 0, # An equation (1, 0, 2, -3) x + 0 == 0, # An inequality (1, 0, -1, 0) x + 0 >= 0)}