######################################################### # Groebner cone computations Coefficients xz-projection # ######################################################### # In order to find all possible combinatorial types of resulting modified 3D-tropical curves with Theta graphs as minimal skeletons, we must compute the Groebner fans of all the coefficients. Afterwards, we intersect the fan with the TypeIICone, check for subdivisions (in "ComputingSubdivisionsCoefficientsxz.sage"), and compute the leading terms for each piece in the subdivision. # This script computes the Grobner Cones for each of the polynomials. # Our calculations are valid when the residue field has characteristic 0. # The necessary date (including the polynomials) is obtained by loading the following file: load("macroslocalJInvariantComputationsAndPrimesWithBadReduction.sage") As = [var("b5"),var("b4"),var("b34"), var("b2")] R = PolynomialRing(QQ,As) K = FractionField(R); oldAs = [var("b5"),var("b4"),var("b3"),var("b34"), var("b2")] oldR = PolynomialRing(QQ,oldAs) oldK = FractionField(oldR); load("coefficientsProjectionMxz.sage") # We turn the expressions into polynomials and perform the substitution b3 = b3+b4 Mx4 = R(expand(oldR(Mx4).substitute(b3=b34+b4))) Mx3 = R(expand(oldR(Mx3).substitute(b3=b34+b4))) Mx2 = R(expand(oldR(Mx2).substitute(b3=b34+b4))) # We take the product of all the above fans to compute the common refinement of all Grobner cones: allM = Mx4*Mx3*Mx2 ################################# # Calculations of Grobner cones # ################################# ####### # Mx4 # ####### # gfm = GrobnerFanComputations(fromPolynomialsToExtremalMonomials(Mx4,R)) # We save it: # save(gfm, "Coefficientsxz/GroebnerFanMx4.sobj") gfm = load("Coefficientsxz/GroebnerFanMx4.sobj") # We record the f-vector: # print gfm.f_vector() # [1, 3, 3] # We confirm the dimension of the fan is the expected one: # print gfm.dim() # 4 # We record the coordinates of the rays of the Grobner fan: RaysGFm = gfm.rays() # print RaysGFm # [[0, -2, 1, 1], [0, 1, -2, 1], [0, 1, 1, -2]] # print gfm.lineality_dim() # 2 # f = fromPolynomialsToExtremalMonomials(Mx4,R) # ideal(f).groebner_fan().homogeneity_space() # '_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n4\n\nDIM\n2\n\nIMPLIED_EQUATIONS\n0 1 0 -1\n0 0 1 -1\n\nLINEALITY_DIM\n2\n\nLINEALITY_SPACE\n1 0 0 0\n0 1 1 1\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0 0\n' gfmLines = [[1, 0, 0, 0],[0, 1, 1, 1]] # We record the maximal cones of the fan. Each cone is described by the indices of the extremal rays spanning these cones. Such indices refer to the list of 76 rays: MaximalConesgfm = gfm.maximal_cones().values()[0] # print MaximalConesgfm # [[0, 1], [0, 2], [1, 2]] # We record the maximal cones in the Groebner Fan as a dictionary of polyhedral objects. The keys coincide with the indices of the maximal cones in the output of the Gfan computation. PolyMaximalConesgfmDict = MaximalConesLines(gfm,gfmLines) # save(PolyMaximalConesgfmDict, "Coefficientsxz/PolyMaximalConesgfMx4Dict.sobj") # set([dim(x) for x in PolyMaximalConesgfmDict.values()]) # {4} ####### # Mx3 # ####### # gfm = GrobnerFanComputations(fromPolynomialsToExtremalMonomials(Mx3,R)) # We save it: # save(gfm, "Coefficientsxz/GroebnerFanMx3.sobj") gfm = load("Coefficientsxz/GroebnerFanMx3.sobj") # We record the f-vector: # print gfm.f_vector() # [1, 7, 11, 6] # We confirm the dimension of the fan is the expected one: # print gfm.dim() # 4 # We record the coordinates of the rays of the Grobner fan: RaysGFm = gfm.rays() # print RaysGFm # [[-3, 1, 1, 1], [-1, -1, -1, 3], [-1, -1, 3, -1], [1, -3, 1, 1], [1, 1, -3, 1], [1, 1, 1, -3], [5, 1, -3, -3]] # print gfm.lineality_dim() # 1 # We record the maximal cones of the fan. Each cone is described by the indices of the extremal rays spanning these cones. Such indices refer to the list of 76 rays: MaximalConesgfm = gfm.maximal_cones().values()[0] # print MaximalConesgfm # [[0, 1, 2, 3], [0, 1, 4], [0, 2, 5], [0, 4, 5, 6], [1, 3, 4, 6], [2, 3, 5, 6]] # We record the maximal cones in the Groebner Fan as a dictionary of polyhedral objects. The keys coincide with the indices of the maximal cones in the output of the Gfan computation. PolyMaximalConesgfmDict = MaximalCones(gfm) # save(PolyMaximalConesgfmDict, "Coefficientsxz/PolyMaximalConesgfMx3Dict.sobj") # set([dim(x) for x in PolyMaximalConesgfmDict.values()]) # {4} ####### # Mx2 # ####### # gfm = GrobnerFanComputations(fromPolynomialsToExtremalMonomials(Mx2,R)) # We save it: # save(gfm, "Coefficientsxz/GroebnerFanMx2.sobj") gfm = load("Coefficientsxz/GroebnerFanMx2.sobj") # We record the f-vector: # print gfm.f_vector() # [1, 4, 4] # We confirm the dimension of the fan is the expected one: # print gfm.dim() # 4 # We record the coordinates of the rays of the Grobner fan: RaysGFm = gfm.rays() # print RaysGFm # [[-2, 1, 1, 0], [-1, -1, 2, 0], [1, 1, -2, 0], [2, -1, -1, 0]] # print gfm.lineality_dim() # 2 # f = fromPolynomialsToExtremalMonomials(Mx2,R) # ideal(f).groebner_fan().homogeneity_space() # '_application PolyhedralCone\n_version 2.2\n_type PolyhedralCone\n\nAMBIENT_DIM\n4\n\nDIM\n2\n\nIMPLIED_EQUATIONS\n1 0 -1 0\n0 1 -1 0\n\nLINEALITY_DIM\n2\n\nLINEALITY_SPACE\n1 1 1 0\n0 0 0 1\n\nFACETS\n\nRELATIVE_INTERIOR_POINT\n0 0 0 0\n' gfmLines = [[1, 0, 0, 0],[0, 1, 1, 1]] # We record the maximal cones of the fan. Each cone is described by the indices of the extremal rays spanning these cones. Such indices refer to the list of 76 rays: MaximalConesgfm = gfm.maximal_cones().values()[0] # print MaximalConesgfm # [[0, 1], [0, 2], [1, 3], [2, 3]] # We record the maximal cones in the Groebner Fan as a dictionary of polyhedral objects. The keys coincide with the indices of the maximal cones in the output of the Gfan computation. PolyMaximalConesgfmDict = MaximalConesLines(gfm,gfmLines) # save(PolyMaximalConesgfmDict, "Coefficientsxz/PolyMaximalConesgfMx2Dict.sobj") # set([dim(x) for x in PolyMaximalConesgfmDict.values()]) # {4} ##################### # Common refinement # ##################### # gfm = GrobnerFanComputations(fromPolynomialsToExtremalMonomials(allM,R)) # We save it: # save(gfm, "Coefficientsxz/GroebnerFansCommonRefinementMxz.sobj") gfm = load("Coefficientsxz/GroebnerFansCommonRefinementMxz.sobj") # We record the f-vector: # print gfm.f_vector() # [1, 9, 20, 13] # We confirm the dimension of the fan is the expected one: # print gfm.dim() # 4 # We record the coordinates of the rays of the Grobner fan: RaysGFm = gfm.rays() # print RaysGFm # [[-3, 1, 1, 1], [-1, -1, -1, 3], [-1, -1, 1, 1], [-1, -1, 3, -1], [1, -3, 1, 1], [1, 1, -3, 1], [1, 1, 1, -3], [3, -1, -1, -1], [5, 1, -3, -3]] # print gfm.lineality_dim() # 1 # We record the maximal cones of the fan. Each cone is described by the indices of the extremal rays spanning these cones. Such indices refer to the list of 76 rays: MaximalConesgfm = gfm.maximal_cones().values()[0] # print MaximalConesgfm # [[0, 1, 2], [0, 2, 3], [0, 1, 5], [0, 3, 6], [1, 2, 4], [2, 3, 4], [0, 5, 6], [1, 4, 7], [1, 5, 7], [3, 4, 6, 7], [5, 6, 8], [5, 7, 8], [6, 7, 8]] # We record the maximal cones in the Groebner Fan as a dictionary of polyhedral objects. The keys coincide with the indices of the maximal cones in the output of the Gfan computation. PolyMaximalConesgfmDict = MaximalCones(gfm) # save(PolyMaximalConesgfmDict, "Coefficientsxz/PolyMaximalConesgfCommonRefinementDictMxz.sobj") # set([dim(x) for x in PolyMaximalConesgfmDict.values()]) # {4}