################################### # Altering the j3-Igusa invariant # ################################### # The following script confirms that by changing the j3-Igusa invariant from A^3*B/D to A^2*(A*B-4*C)/D we recover two out of the three lengths of the Theta graph and does not alter the situation for the Dumbbell graph. # We also certify that a potential cancellation on the Dumbbell graph will not recover any new length data. # We use auxiliary scripts, available on the following sage file: load("macroslocalJInvariantComputationsAndPrimesWithBadReduction.sage") ############################ # Type (I): Dumbbell Graph # ############################ # The following script confirms that by changing the j3-Igusa invariant from A^3*B/D to A^2*(A*B-4*C)/D we recover two out of the three lengths of the dumbbell graph and that the only potential cancellation is produced for $(AB-3C)A^2/D$. Hhowever, this does not give any new length data. # For this we construct the polynomial Q = A*B-3C in 6 variables a6, a5, a4, a3, a2, a1. # We compute the values of the initial forms of A, B, C and certify that the initial form for Q does not give any new length data. ################################################# # Building blocks for Igusa Invariants Dumbbell # ################################################# S = QQ['a6','a5','a4','a3', 'a2', 'a1'] a6,a5,a4,a3,a2,a1 = S.gens() # 1) xij = difference of root i and rootj x12=a1-a2 x13=a1-a3 x14=a1-a4 x15=a1-a5 x23=a2-a3 x24=a2-a4 x25=a2-a5 x34=a4-a3 # to agree with our convention for the theta graph x35=a3-a5 x45=a4-a5 x16=a1-a6 x26=a2-a6 x36=a3-a6 x46=a4-a6 x56=a5-a6 # 2) yij = xij^2 y12=x12^2 y13=x13^2 y14=x14^2 y15=x15^2 y23=x23^2 y24=x24^2 y25=x25^2 y34=x34^2 y35=x35^2 y45=x45^2 y16=x16^2 y26=x26^2 y36=x36^2 y46=x46^2 y56=x56^2 ############################# #Absolute Igusa Invariants: # ############################# # We record the relevant absolute Igusa invariants. A = y12*y34*y56 + y12*y35*y46 + y12*y36*y45 + y13*y24*y56 + y13*y25*y46 + y13*y26*y45 + y14*y23*y56 + y14*y25*y36 + y14*y26*y35 + y15*y23*y46 + y15*y24*y36 + y15*y26*y34 + y16*y23*y45 + y16*y24*y35 + y16*y25*y34 # print len(A.monomials()) # 141 B = y12*y23*y13*y45*y56*y46 + y12*y24*y14*y35*y56*y36 + y12*y25*y15*y34*y46*y36 + y12*y26*y16*y34*y45*y35 + y13*y34*y14*y25*y56*y26 + y13*y35*y15*y24*y46*y26 + y13*y36*y16*y24*y45*y25 + y14*y45*y15*y23*y36*y26 + y14*y46*y16*y23*y35*y25 + y15*y56*y16*y23*y34*y24 # print len(B.monomials()) # 1531 C = y12*y23*y13*y45*y56*y46*( y14*(y25*y36 + y26*y35) + y15*(y24*y36 + y26*y34) + y16*(y25*y34+y24*y35)) + y12*y24*y14*y35*y56*y36*( y13*(y25*y46 + y26*y45) + y15*(y23*y46 + y26*y34) + y16*(y25*y34+y23*y45)) + y12*y25*y15*y34*y46*y36*( y13*(y24*y56 + y26*y45) + y14*(y23*y56 + y26*y35) + y16*(y23*y45+y24*y35)) + y12*y26*y16*y34*y45*y35* ( y13*(y24*y56 + y25*y46) + y14*(y23*y56 + y25*y36) + y15*(y23*y46+y24*y36)) + y13*y34*y14*y25*y56*y26*( y12*(y35*y46 + y36*y45) + y15*(y23*y46 + y36*y24) + y16*(y23*y45+y24*y35)) + y13*y35*y15*y24*y46*y26*( y12*(y34*y56 + y36*y45) + y14*(y23*y56 + y25*y36) + y16*(y23*y45+y25*y34)) + y13*y36*y16*y24*y45*y25*( y12*(y34*y56 + y35*y46) + y14*(y23*y56 + y26*y35) + y15*(y23*y46+y26*y34)) + y14*y45*y15*y23*y36*y26*( y12*(y34*y56 + y35*y46) + y13*(y24*y56 + y25*y46) + y16*(y24*y35+y25*y34)) + y14*y46*y16*y23*y35*y25*( y12*(y34*y56 + y36*y45) + y13*(y24*y56 + y26*y45) + y15*(y24*y36+y26*y34)) + y15*y56*y16*y23*y34*y24*( y12*(y35*y46 + y36*y45) + y13*(y25*y46 + y26*y45) + y14*(y25*y36+y26*y35)) # print len(C.monomials()) # 8531 # We create the M2 scripts to check that the leading terms of A, B, and C are the expected ones: # # File for A # f = file('ADumbbell.m2', 'w') # f.write('-- Dumbbell graph calculations' + '\n') # f.write('-- polynomial A'+'\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n') # f.write('A = '+str(A)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.close() # # File for B # f = file('BDumbbell.m2', 'w') # f.write('-- Dumbbell graph calculations' + '\n') # f.write('-- polynomial B'+'\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n') # f.write('B = '+str(B)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.close() # # File for C # f = file('CDumbbell.m2', 'w') # f.write('-- Dumbbell graph calculations' + '\n') # f.write('-- polynomial C'+'\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n') # f.write('C = '+str(C)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,C))'+'\n') # f.close() ############################ # Initial terms and lambda # ############################ # We run the previous files in M2 and confirm that the leading terms are: # For A: # o3 = 6*a6^2*a5^2*a4^2 # For B: # o3 = 4*a6^4*a5^4*a4^2*a3^2 # For C: # o3 = 8*a6^6*a5^6*a4^4*a3^2 # This allows us to conclude that we will only cancel the leading terms of AB and C if we pick lambda = 24/8 = 3 # We compare the m2 computations with our own implementation of LT: weightsAs = [36,25,20,16,9,1] LTA = LTFromWeights(A,weightsAs, S) # LTA # 6*a6^2*a5^2*a4^2 LTB = LTFromWeights(B,weightsAs, S) # LTB # 4*a6^4*a5^4*a4^2*a3^2 LTC = LTFromWeights(C,weightsAs, S) # LTC # 8*a6^6*a5^6*a4^4*a3^2 # The computation shows that we will get the same result for any characteristic other than 3, since the weights with a 3-adic valuation of all other monomials will be at most the weight with trivial valuation on Q. The only case we must treat separately is the case p = 3. We do it on a separate file: Qrefinementwithx34Noa4BadPrimes.sage". ############################## # Calculation for lambda = 3 # ############################## Q3 = A*B - 3*C # print len(Q3.monomials()) # 7691 # We create the M2 scripts to check that the leading terms of A, B, and C are the expected ones: # # File for Q3 # f = file('Q3Dumbbell.m2', 'w') # f.write('-- Dumbbell graph calculations' + '\n') # f.write('-- polynomial Q3'+'\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n') # f.write('Q3 = '+str(Q3)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,Q3))'+'\n') # f.close() # We run the previous file in M2 and get the leading term: # o3 = 8*a6^6*a5^6*a4^3*a3^3 # # We compare the M2 output with our own implementation: LTQ3 = LTFromWeights(Q3,weightsAs, S) # LTQ3 # 8*a6^6*a5^6*a4^3*a3^3 ###################################### # Number of terms for generic lambda # ###################################### # For generic choices of lambda, we get a polynomial with 9131 terms Q8720234 = A*B - 8720234*C # print len(Q8720234.monomials()) # 9131 Q872023426 = A*B - 872023426*C # print len(Q872023426.monomials()) # 9131 ############################## # Calculation for lambda = 4 # ############################## # Following the calculations of Theta Graph, we check that the initial form of Q4 is the same as for j3. Q4 = A*B - 4*C # print len(Q4.monomials()) # 8801 # We create the M2 scripts to check that the leading terms of A, B, and C are the expected ones: # # File for Q4 # f = file('Q4Dumbbell.m2', 'w') # f.write('-- Dumbbell graph calculations' + '\n') # f.write('-- polynomial Q4'+'\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n') # f.write('Q4 = '+str(Q4)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,Q4))'+'\n') # f.close() # We run the previous file in M2 and get the leading term: # o3 = -8*a6^6*a5^6*a4^4*a3^2 # # We compare the M2 output with our own implementation: LTQ4 = LTFromWeights(Q4,weightsAs, S) # LTQ4 # -8*a6^6*a5^6*a4^4*a3^2 ########################## # M2 Script for Dumbbell # ########################## # #We record all our findings in M2 script # f = file('ABCDQ3Q8Dumbbell.m2','w') # f.write('-- Dumbbell graph calculations' + '\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n'+'\n') # f.write('-- polynomial A'+'\n') # f.write('A = '+str(A) +';'+'\n'+'\n') # f.write('-- polynomial B'+'\n') # f.write('B = '+str(B) +';'+'\n'+'\n') # f.write('-- polynomial C'+'\n') # f.write('C = '+str(C) +';'+'\n'+'\n') # f.write('-- polynomial Q3'+'\n') # f.write('Q3 = '+str(Q3) +';'+'\n'+'\n') # f.write('-- polynomial Q8'+'\n') # f.write('Q8 = '+str(Q8) +';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n') # f.write('-- polynomial A'+'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.write('-- polynomial B'+'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.write('-- polynomial C'+'\n') # f.write('toString(leadTerm(1,C))'+'\n'+'\n') # f.write('-- polynomial Q3'+'\n') # f.write('toString(leadTerm(1,Q3))'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('toString(leadTerm(1,Q4))'+'\n'+'\n') # f.close() ########################## # Type (II): Theta Graph # ########################## # The following script confirms that by changing the j3-Igusa invariant from A^3*B/D to A^2*(A*B-4*C)/D we recover two out of the three lengths of the Theta graph. # Since we are in the Theta graph, we need to work with the alternative polynomials AA, BB, and CC, in 6 variables a6, a5, x34, a3, a2, a1, where we replace a4 by x34 +a3. The valuation of x34 is unknown by it is larger than the valuation of a3. # We propose to use the polynomial Q = AA*BB-8*CC # This change allows us to recovers the length of the shortest edge in the graph. This is determined by a subdivision of the Theta cone into three cones. Such subdivision is induced by the Grobner fan of Q. Each such cone yields a different initial form (with respect to any weight in the cone). The total weight of such form will determine such minimal edge length. ############################################## # Building blocks for Igusa Invariants Theta # ############################################## SS = QQ['a6','a5','x34','a3', 'a2', 'a1'] a6,a5,x34,a3,a2,a1 = SS.gens() # 0) we introduce the polynomial a4 (it was a variable for the Dumbbell graph) a4 = a3 + x34 # 1) xij = difference of root i and rootj x12=a1-a2 x13=a1-a3 x14=a1-a4 x15=a1-a5 x23=a2-a3 x24=a2-a4 x25=a2-a5 x35=a3-a5 x45=a4-a5 x16=a1-a6 x26=a2-a6 x36=a3-a6 x46=a4-a6 x56=a5-a6 # 2) yij = xij^2 y12=x12^2 y13=x13^2 y14=x14^2 y15=x15^2 y23=x23^2 y24=x24^2 y25=x25^2 y34=x34^2 y35=x35^2 y45=x45^2 y16=x16^2 y26=x26^2 y36=x36^2 y46=x46^2 y56=x56^2 ############################# #Absolute Igusa Invariants: # ############################# # We record the relevant absolute Igusa invariants. AT = y12*y34*y56 + y12*y35*y46 + y12*y36*y45 + y13*y24*y56 + y13*y25*y46 + y13*y26*y45 + y14*y23*y56 + y14*y25*y36 + y14*y26*y35 + y15*y23*y46 + y15*y24*y36 + y15*y26*y34 + y16*y23*y45 + y16*y24*y35 + y16*y25*y34 # print len(AT.monomials()) # 177 BT = y12*y23*y13*y45*y56*y46 + y12*y24*y14*y35*y56*y36 + y12*y25*y15*y34*y46*y36 + y12*y26*y16*y34*y45*y35 + y13*y34*y14*y25*y56*y26 + y13*y35*y15*y24*y46*y26 + y13*y36*y16*y24*y45*y25 + y14*y45*y15*y23*y36*y26 + y14*y46*y16*y23*y35*y25 + y15*y56*y16*y23*y34*y24 # print len(BT.monomials()) # 1911 CT = y12*y23*y13*y45*y56*y46*( y14*(y25*y36 + y26*y35) + y15*(y24*y36 + y26*y34) + y16*(y25*y34+y24*y35)) + y12*y24*y14*y35*y56*y36*( y13*(y25*y46 + y26*y45) + y15*(y23*y46 + y26*y34) + y16*(y25*y34+y23*y45)) + y12*y25*y15*y34*y46*y36*( y13*(y24*y56 + y26*y45) + y14*(y23*y56 + y26*y35) + y16*(y23*y45+y24*y35)) + y12*y26*y16*y34*y45*y35* ( y13*(y24*y56 + y25*y46) + y14*(y23*y56 + y25*y36) + y15*(y23*y46+y24*y36)) + y13*y34*y14*y25*y56*y26*( y12*(y35*y46 + y36*y45) + y15*(y23*y46 + y36*y24) + y16*(y23*y45+y24*y35)) + y13*y35*y15*y24*y46*y26*( y12*(y34*y56 + y36*y45) + y14*(y23*y56 + y25*y36) + y16*(y23*y45+y25*y34)) + y13*y36*y16*y24*y45*y25*( y12*(y34*y56 + y35*y46) + y14*(y23*y56 + y26*y35) + y15*(y23*y46+y26*y34)) + y14*y45*y15*y23*y36*y26*( y12*(y34*y56 + y35*y46) + y13*(y24*y56 + y25*y46) + y16*(y24*y35+y25*y34)) + y14*y46*y16*y23*y35*y25*( y12*(y34*y56 + y36*y45) + y13*(y24*y56 + y26*y45) + y15*(y24*y36+y26*y34)) + y15*y56*y16*y23*y34*y24*( y12*(y35*y46 + y36*y45) + y13*(y25*y46 + y26*y45) + y14*(y25*y36+y26*y35)) # print len(CT.monomials()) # 11745 # We choose the weights of ['a6','a5','x34','a3', 'a2', 'a1'] to be {36,25,10,16,9,1}. The weight of x34 must be lower than the weight of a3, but it can be bigger than the ones of a2 or a1. This will induce a subdivision of Q8 when computing its possible initial form. # We create the M2 scripts to check that the leading terms of A, B, and C are the expected ones: # # File for AT # f = file('ATheta.m2', 'w') # f.write('-- Theta graph calculations' + '\n'+'\n') # f.write('-- polynomial A'+'\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {36,25,10,16,9,1}},Global=>false];'+'\n'+'\n') # f.write('A = '+str(AT)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.close() # # File for BT # f = file('BTheta.m2', 'w') # f.write('-- Theta graph calculations' + '\n') # f.write('-- polynomial B'+'\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {36,25,10,16,9,1}},Global=>false];'+'\n') # f.write('B = '+str(BT)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.close() # # File for CT # f = file('CTheta.m2', 'w') # f.write('-- Theta graph calculations' + '\n') # f.write('-- polynomial C'+'\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {36,25,10,16,9,1}},Global=>false];'+'\n') # f.write('C = '+str(CT)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,C))'+'\n') # f.close() # We check which of the 10 summands of C contributes to the leading term. This predicts which indices in the definition of C must be considered. CT1 = y12*y23*y13*y45*y56*y46*( y14*(y25*y36 + y26*y35) + y15*(y24*y36 + y26*y34) + y16*(y25*y34+y24*y35)) CT2 = y12*y24*y14*y35*y56*y36*( y13*(y25*y46 + y26*y45) + y15*(y23*y46 + y26*y34) + y16*(y25*y34+y23*y45)) CT3 = y12*y25*y15*y34*y46*y36*( y13*(y24*y56 + y26*y45) + y14*(y23*y56 + y26*y35) + y16*(y23*y45+y24*y35)) CT4 = y12*y26*y16*y34*y45*y35* ( y13*(y24*y56 + y25*y46) + y14*(y23*y56 + y25*y36) + y15*(y23*y46+y24*y36)) CT5 = y13*y34*y14*y25*y56*y26*( y12*(y35*y46 + y36*y45) + y15*(y23*y46 + y36*y24) + y16*(y23*y45+y24*y35)) CT6 = y13*y35*y15*y24*y46*y26*( y12*(y34*y56 + y36*y45) + y14*(y23*y56 + y25*y36) + y16*(y23*y45+y25*y34)) CT7 = y13*y36*y16*y24*y45*y25*( y12*(y34*y56 + y35*y46) + y14*(y23*y56 + y26*y35) + y15*(y23*y46+y26*y34)) CT8 = y14*y45*y15*y23*y36*y26*( y12*(y34*y56 + y35*y46) + y13*(y24*y56 + y25*y46) + y16*(y24*y35+y25*y34)) CT9 = y14*y46*y16*y23*y35*y25*( y12*(y34*y56 + y36*y45) + y13*(y24*y56 + y26*y45) + y15*(y24*y36+y26*y34)) CT10 = y15*y56*y16*y23*y34*y24*( y12*(y35*y46 + y36*y45) + y13*(y25*y46 + y26*y45) + y14*(y25*y36+y26*y35)) # # File for CT # f = file('CPiecesTheta.m2', 'w') # f.write('-- Theta graph calculations' + '\n') # f.write('-- polynomial C'+'\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {36,25,10,16,9,1}},Global=>false];'+'\n') # f.write('C1 = '+str(CT1)+';'+'\n'+'\n') # f.write('C2 = '+str(CT2)+';'+'\n'+'\n') # f.write('C3 = '+str(CT3)+';'+'\n'+'\n') # f.write('C4 = '+str(CT4)+';'+'\n'+'\n') # f.write('C5 = '+str(CT5)+';'+'\n'+'\n') # f.write('C6 = '+str(CT6)+';'+'\n'+'\n') # f.write('C7 = '+str(CT7)+';'+'\n'+'\n') # f.write('C8 = '+str(CT8)+';'+'\n'+'\n') # f.write('C9 = '+str(CT9)+';'+'\n'+'\n') # f.write('C10 = '+str(CT10)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('-- polynomial C1'+'\n') # f.write('toString(leadTerm(1,C1))'+'\n'+'\n') # f.write('-- polynomial C2'+'\n') # f.write('toString(leadTerm(1,C2))'+'\n'+'\n') # f.write('-- polynomial C3'+'\n') # f.write('toString(leadTerm(1,C3))'+'\n'+'\n') # f.write('-- polynomial C4'+'\n') # f.write('toString(leadTerm(1,C4))'+'\n'+'\n') # f.write('-- polynomial C5'+'\n') # f.write('toString(leadTerm(1,C5))'+'\n'+'\n') # f.write('-- polynomial C6'+'\n') # f.write('toString(leadTerm(1,C6))'+'\n'+'\n') # f.write('-- polynomial C7'+'\n') # f.write('toString(leadTerm(1,C7))'+'\n'+'\n') # f.write('-- polynomial C8'+'\n') # f.write('toString(leadTerm(1,C8))'+'\n'+'\n') # f.write('-- polynomial C9'+'\n') # f.write('toString(leadTerm(1,C9))'+'\n'+'\n') # f.write('-- polynomial C10'+'\n') # f.write('toString(leadTerm(1,C10))'+'\n') # f.close() # We compute the initial terms of each Ci and verify that the maximum value is attained at C6, C7, C8, C10, with coefficient two each. Each of them contributes a term with coefficient 2. # # We contrast the M2 output with our own implementation of leading terms: weightsAsT = [36,25,10,16,9,1] # LTCT1 = LTFromWeights(CT1,weightsAsT, SS) # LTCT2 = LTFromWeights(CT2,weightsAsT, SS) # LTCT3 = LTFromWeights(CT3,weightsAsT, SS) # LTCT4 = LTFromWeights(CT4,weightsAsT, SS) # LTCT5 = LTFromWeights(CT5,weightsAsT, SS) # LTCT6 = LTFromWeights(CT6,weightsAsT, SS) # LTCT7 = LTFromWeights(CT7,weightsAsT, SS) # LTCT8 = LTFromWeights(CT8,weightsAsT, SS) # LTCT9 = LTFromWeights(CT9,weightsAsT, SS) # LTCT10 = LTFromWeights(CT10,weightsAsT, SS) # LTCT1 # 4*a6^6*a5^4*a3^6*a2^2 # LTCT2 # 4*a6^6*a5^4*a3^6*a2^2 # LTCT3 # 4*a6^6*a5^6*x34^2*a3^2*a2^2 # LTCT4 # 4*a6^6*a5^6*x34^2*a3^2*a2^2 # LTCT5 # 4*a6^6*a5^4*x34^2*a3^6 # LTCT6 # 2*a6^6*a5^6*a3^6 # LTCT7 # 2*a6^6*a5^6*a3^6 # LTCT8 # 2*a6^6*a5^6*a3^6 # LTCT9 # 2*a6^6*a5^6*a3^6 # LTCT10 # 4*a6^6*a5^4*x34^2*a3^6 # L = set([LTCT1, LTCT2,LTCT3,LTCT4,LTCT5,LTCT6,LTCT7,LTCT8,LTCT9,LTCT10]) # {4*a6^6*a5^4*a3^6*a2^2, # 4*a6^6*a5^6*x34^2*a3^2*a2^2, # 4*a6^6*a5^4*x34^2*a3^6, # 2*a6^6*a5^6*a3^6} # MaxValue = LTFromWeights(sum([SS(x) for x in L]),weightsAsT, SS) # MaxValue # 2*a6^6*a5^6*a3^6 # The maximal value is attahed at LTCT7, LTCT8, LTCT9, LTCT10. ############################ # Initial terms and lambda # ############################ # We run the previous files in M2 and confirm that the leading terms are: # For A: # o3 = 8*a6^2*a5^2*a3^2 # For B: # o3 = 4*a6^4*a5^4*a3^4 # For C: # o3 = 8*a6^6*a5^6*a3^6 # We double check the computation of M2 with our own implemented functions: LTAT = LTFromWeights(AT,weightsAsT, SS) LTBT = LTFromWeights(BT,weightsAsT, SS) LTCT = LTFromWeights(CT,weightsAsT, SS) # LTAT # 8*a6^2*a5^2*a3^2 # LTBT # 4*a6^4*a5^4*a3^4 # LTCT # 8*a6^6*a5^6*a3^6 # This allows us to conclude that we will only cancell the leading terms of AB and C if we pick lambda = 32/8 = 4 ###################################### # Number of terms for generic lambda # ###################################### # For generic choices of lambda, we get a polynomial with 9131 terms QT8720234 = AT*BT - 8720234*CT # print len(QT8720234.monomials()) # 11891 ############################## # Calculation for lambda = 4 # ############################## QT4 = AT*BT - 4*CT # print len(QT4.monomials()) # 11379 # We create the M2 scripts to check that the leading terms of A, B, and C are the expected ones: # # File for QT4 # f = file('Q4Theta.m2', 'w') # f.write('-- Theta graph calculations' + '\n') # f.write('-- polynomial Q4'+'\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {36,25,10,16,9,1}},Global=>false];'+'\n') # f.write('Q4 = '+str(QT4)+';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n' +'\n') # f.write('toString(leadTerm(1,Q4))'+'\n') # f.close() # We run the previous file in M2 and get the leading term for one choice of valuation of x34. In order to get the other possible valuations, we must compute the Grobner cone of QT4 # o3 = -8*a6^6*a5^6*x34^2*a3^4 ####################### # M2 Script for Theta # ####################### # We record all our findings in M2 script # f = file('ABCDQ8Theta.m2','w') # f.write('-- Theta graph calculations' + '\n'+'\n') # f. write('S=QQ[a6,a5,a4,a3,a2,a1, MonomialOrder=>{Weights => {36,25,20,16,9,1}},Global=>false];'+'\n'+'\n') # f.write('-- polynomial A'+'\n') # f.write('A = '+str(AT) +';'+'\n'+'\n') # f.write('-- polynomial B'+'\n') # f.write('B = '+str(BT) +';'+'\n'+'\n') # f.write('-- polynomial C'+'\n') # f.write('C = '+str(CT) +';'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('Q4 = '+str(QT4) +';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n') # f.write('-- polynomial A'+'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.write('-- polynomial B'+'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.write('-- polynomial C'+'\n') # f.write('toString(leadTerm(1,C))'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('toString(leadTerm(1,Q4))'+'\n'+'\n') # f.close() ######################################## # Groebner complex computation for QT4 # ######################################## # Recall: the variables of SS are ordered a6,a5,x34,a3,a2,a1 # We record the monomials and coefficients of Q, as well about the exponent vectors. monQ = QT4.monomials() coeffQ = QT4.coefficients() exponentVectorsQ = [x.exponents() for x in monQ] # We convert each the tuple of each entry (a list) into a list of integers. exponentVectorsQInZZ = [] m = len(exponentVectorsQ[0][0]) for x in exponentVectorsQ: v = [ZZ(x[0][j]) for j in range(0,m)] exponentVectorsQInZZ.append(v) ######################################## # Construct the Newton Polytope of QT4 # ######################################## # The calculations of Grobner fans only require the vertices of the Newton polytope of Q. The number of vertices of this polytope is 366 compared to the 14111 monomials in Q. The computation of the Grobner fan of the full Q does not terminate, as opposed to that of the alternative polynomial AltQ. NPQ = Polyhedron(vertices= exponentVectorsQInZZ) # NPQ # A 5-dimensional polyhedron in ZZ^6 defined as the convex hull of 168 vertices # we record the extremal monomials of Q. extremalExponents = [tuple(list(x)) for x in NPQ.vertices()] # print len(extremalExponents) # 168 # We construct AltQ, a polynomial obtained as the sum of the terms of Q involving extremal monomials. AltQMonomials = [exponentVectorsQInZZ.index(list(x)) for x in extremalExponents] # len(AltQMonomials) # 168 AltQ = SS(0) for j in AltQMonomials: AltQ = AltQ + SS(coeffQ[j]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*a6^2*a3^10*a1^6 - 8*a5^2*a3^10*a1^6 - 8*a6^6*a5^4*a2^2*a1^6 - 8*a6^4*a5^6*a2^2*a1^6 - 8*a6^6*x34^4*a2^2*a1^6 - 8*a5^6*x34^4*a2^2*a1^6 - 8*a6^4*x34^6*a2^2*a1^6 - 8*a5^4*x34^6*a2^2*a1^6 - 8*a6^6*a3^4*a2^2*a1^6 - 8*a5^6*a3^4*a2^2*a1^6 - 8*x34^6*a3^4*a2^2*a1^6 - 8*a3^10*a2^2*a1^6 - 8*a6^6*a5^2*a2^4*a1^6 - 8*a6^2*a5^6*a2^4*a1^6 - 8*a6^6*x34^2*a2^4*a1^6 - 8*a5^6*x34^2*a2^4*a1^6 - 8*a6^2*x34^6*a2^4*a1^6 - 8*a5^2*x34^6*a2^4*a1^6 - 8*a6^6*a3^2*a2^4*a1^6 - 8*a5^6*a3^2*a2^4*a1^6 - 8*x34^6*a3^2*a2^4*a1^6 - 8*a3^8*a2^4*a1^6 - 8*a6^4*a5^2*a2^6*a1^6 - 8*a6^2*a5^4*a2^6*a1^6 - 8*a6^4*x34^2*a2^6*a1^6 - 8*a5^4*x34^2*a2^6*a1^6 - 8*a6^2*x34^4*a2^6*a1^6 - 8*a5^2*x34^4*a2^6*a1^6 - 8*a6^4*a3^2*a2^6*a1^6 - 8*a5^4*a3^2*a2^6*a1^6 - 8*x34^4*a3^2*a2^6*a1^6 - 8*a6^2*a3^4*a2^6*a1^6 - 8*a5^2*a3^4*a2^6*a1^6 - 8*x34^2*a3^4*a2^6*a1^6 ######################################## # Calculation of the Groebner fan of Q # ######################################## # We use AltQ to compute the Grobner fan of Q: # Iq = ideal(AltQ) # GFq = Iq.groebner_fan() # We pre-compute the Grobner fan: # GFqFan = GFq.polyhedralfan() # save(GFqFan,"GrobnerFanAltQ4x34.sobj") # We convert the data to Rational Polyhedral fan: # newGF = GFqFan.to_RationalPolyhedralFan() # save(newGF, "GFq4Fan_as_RationalPolyhedra.sobj") # newGF=load("GFq4Fan_as_RationalPolyhedra.sobj") # We load the pre-computed the Grober fan. GFqFan = load("GrobnerFanAltQ4x34.sobj") # We record the f-vector: # print GFqFan.f_vector() # [1, 32, 174, 396, 420, 168] # We confirm the dimension of the fan is the expected one: # print GFqFan.dim() # 6 # We record the coordinates of the rays of the Grobner fan: RaysGFqfan = GFqFan.rays() # print RaysGFqfan # [[-5, -5, -5, 1, 7, 7], [-5, 1, 1, 1, 1, 1], [-5, 7, -5, 1, -5, 7], [-5, 7, -5, 1, 7, -5], [-1, -1, -1, -1, -1, 5], [-1, -1, -1, -1, 5, -1], [-1, -1, 1, -1, 1, 1], [-1, -1, 1, 1, -1, 1], [-1, -1, 1, 1, 1, -1], [-1, -1, 2, 2, -1, -1], [-1, -1, 5, -1, -1, -1], [-1, 1, -1, -1, 1, 1], [-1, 1, 1, -1, -1, 1], [-1, 1, 1, -1, 1, -1], [-1, 1, 1, 1, -1, -1], [-1, 5, -1, -1, -1, -1], [1, -5, 1, 1, 1, 1], [1, -1, -1, -1, 1, 1], [1, -1, 1, -1, -1, 1], [1, -1, 1, -1, 1, -1], [1, -1, 1, 1, -1, -1], [1, 1, -5, 1, 1, 1], [1, 1, -1, -1, -1, 1], [1, 1, -1, -1, 1, -1], [1, 1, 1, -5, 1, 1], [1, 1, 1, -1, -1, -1], [1, 1, 1, 1, -5, 1], [1, 1, 1, 1, 1, -5], [5, -1, -1, -1, -1, -1], [7, -5, -5, 1, -5, 7], [7, -5, -5, 1, 7, -5], [7, 7, -5, 1, -5, -5]] # 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: MaximalConesQAlt = GFqFan.maximal_cones().values()[0] # print MaximalConesQAlt # [[0, 1, 4, 5, 16], [0, 1, 4, 5, 21], [1, 2, 4, 15, 21], [1, 3, 5, 15, 21], [1, 2, 4, 15, 26], [1, 3, 5, 15, 27], [0, 1, 4, 16, 21], [0, 1, 5, 16, 21], [1, 2, 4, 21, 26], [1, 3, 5, 21, 27], [1, 2, 15, 21, 26], [1, 3, 15, 21, 27], [1, 4, 5, 6, 16], [1, 4, 6, 10, 16], [1, 5, 6, 10, 16], [1, 4, 7, 10, 16], [1, 5, 8, 10, 16], [1, 7, 9, 10, 16], [1, 8, 9, 10, 16], [1, 4, 5, 6, 24], [1, 4, 6, 10, 24], [1, 5, 6, 10, 24], [1, 4, 7, 10, 26], [1, 5, 8, 10, 27], [1, 7, 9, 10, 26], [1, 8, 9, 10, 27], [1, 4, 5, 11, 21], [1, 4, 5, 11, 24], [1, 4, 10, 12, 24], [1, 5, 10, 13, 24], [1, 4, 10, 12, 26], [1, 5, 10, 13, 27], [1, 9, 10, 14, 26], [1, 9, 10, 14, 27], [1, 4, 11, 15, 21], [1, 5, 11, 15, 21], [1, 4, 11, 15, 24], [1, 5, 11, 15, 24], [1, 4, 12, 15, 24], [1, 5, 13, 15, 24], [1, 4, 12, 15, 26], [1, 5, 13, 15, 27], [1, 10, 12, 15, 24], [1, 10, 13, 15, 24], [1, 10, 12, 15, 26], [1, 10, 13, 15, 27], [1, 10, 14, 15, 26], [1, 10, 14, 15, 27], [0, 4, 5, 16, 21], [1, 4, 7, 16, 21], [1, 5, 8, 16, 21], [1, 7, 9, 16, 21], [1, 8, 9, 16, 21], [1, 4, 7, 21, 26], [1, 5, 8, 21, 27], [1, 7, 9, 21, 26], [1, 8, 9, 21, 27], [1, 9, 14, 21, 26], [1, 9, 14, 21, 27], [1, 14, 15, 21, 26], [1, 14, 15, 21, 27], [2, 4, 15, 21, 26], [3, 5, 15, 21, 27], [4, 5, 6, 16, 24], [4, 6, 10, 16, 24], [5, 6, 10, 16, 24], [4, 7, 10, 16, 26], [5, 8, 10, 16, 27], [7, 9, 10, 16, 26], [8, 9, 10, 16, 27], [4, 5, 11, 21, 24], [4, 10, 12, 24, 26], [5, 10, 13, 24, 27], [9, 10, 14, 26, 27], [4, 11, 15, 21, 24], [5, 11, 15, 21, 24], [4, 12, 15, 24, 26], [5, 13, 15, 24, 27], [10, 12, 15, 24, 26], [10, 13, 15, 24, 27], [10, 14, 15, 26, 27], [4, 5, 16, 17, 21], [4, 5, 16, 17, 24], [4, 10, 16, 18, 24], [5, 10, 16, 19, 24], [4, 10, 16, 18, 26], [5, 10, 16, 19, 27], [9, 10, 16, 20, 26], [9, 10, 16, 20, 27], [4, 7, 16, 21, 26], [5, 8, 16, 21, 27], [7, 9, 16, 21, 26], [8, 9, 16, 21, 27], [4, 5, 17, 21, 24], [4, 10, 18, 24, 26], [5, 10, 19, 24, 27], [9, 10, 20, 26, 27], [9, 14, 21, 26, 27], [4, 15, 21, 22, 24], [5, 15, 21, 23, 24], [4, 15, 21, 22, 26], [5, 15, 21, 23, 27], [4, 15, 22, 24, 26], [5, 15, 23, 24, 27], [10, 15, 24, 25, 26], [10, 15, 24, 25, 27], [10, 15, 25, 26, 27], [14, 15, 21, 26, 27], [9, 16, 20, 21, 26], [9, 16, 20, 21, 27], [9, 20, 21, 26, 27], [4, 16, 17, 21, 28], [5, 16, 17, 21, 28], [4, 16, 17, 24, 28], [5, 16, 17, 24, 28], [4, 16, 18, 24, 28], [5, 16, 19, 24, 28], [4, 16, 18, 26, 28], [5, 16, 19, 27, 28], [10, 16, 18, 24, 28], [10, 16, 19, 24, 28], [10, 16, 18, 26, 28], [10, 16, 19, 27, 28], [10, 16, 20, 26, 28], [10, 16, 20, 27, 28], [4, 17, 21, 24, 28], [5, 17, 21, 24, 28], [4, 18, 24, 26, 28], [5, 19, 24, 27, 28], [10, 18, 24, 26, 28], [10, 19, 24, 27, 28], [10, 20, 26, 27, 28], [4, 21, 22, 24, 28], [5, 21, 23, 24, 28], [4, 21, 22, 26, 28], [5, 21, 23, 27, 28], [4, 22, 24, 26, 28], [5, 23, 24, 27, 28], [10, 24, 25, 26, 28], [10, 24, 25, 27, 28], [10, 25, 26, 27, 28], [15, 21, 22, 24, 28], [15, 21, 23, 24, 28], [15, 21, 22, 26, 28], [15, 21, 23, 27, 28], [15, 22, 24, 26, 28], [15, 23, 24, 27, 28], [15, 24, 25, 26, 28], [15, 24, 25, 27, 28], [15, 25, 26, 27, 28], [4, 16, 21, 26, 29], [5, 16, 21, 27, 30], [16, 20, 21, 26, 28], [16, 20, 21, 27, 28], [20, 21, 26, 27, 28], [15, 21, 26, 27, 31], [4, 16, 21, 28, 29], [5, 16, 21, 28, 30], [4, 16, 26, 28, 29], [5, 16, 27, 28, 30], [4, 21, 26, 28, 29], [5, 21, 27, 28, 30], [15, 21, 26, 28, 31], [15, 21, 27, 28, 31], [15, 26, 27, 28, 31], [16, 21, 26, 28, 29], [16, 21, 27, 28, 30], [21, 26, 27, 28, 31]] # We record the maximal cones in the Grobner Fan of Q as a dictionary of polyhedral objects. The keys coincide with the indices of the maximal cones in the output of the Gfan computation. PolyMaximalCones = MaximalCones(GFqFan) # We check that they have the expected dimension: # set([dim(x) for x in PolyMaximalCones.values()]) # {6} ############## # Theta Cone # ############## # Recall: the variables of SS are ordered a6,a5,x34,a3,a2,a1 # The following script constructs the Theta cone, with respect to the variables a6,a5,x34,a3,a2,a1: # Its defining inequalities are: # a6 - a5 >= 0 # a5 - a3 >= 0 # a3 - a2 >= 0 # a2 - a1 >= 0 # a3 - x34 >= 0 ThetaCone = Polyhedron(ieqs=[(0,1,-1,0,0,0,0),(0,0,1,0,-1,0,0), (0,0,0,0,1,-1,0),(0,0,0,0,0,1,-1), (0,0,0,-1,1,0,0)]) # ThetaCone.Hrepresentation() # (An inequality (0, 0, -1, 1, 0, 0) x + 0 >= 0, # An inequality (0, 0, 0, 0, 1, -1) x + 0 >= 0, # An inequality (0, 0, 0, 1, -1, 0) x + 0 >= 0, # An inequality (0, 1, 0, -1, 0, 0) x + 0 >= 0, # An inequality (1, -1, 0, 0, 0, 0) x + 0 >= 0) # ThetaCone.rays() # (A ray in the direction (0, -1, -1, -1, -1, -1), # A ray in the direction (0, 0, -1, -1, -1, -1), # A ray in the direction (0, 0, 0, 0, -1, -1), # A ray in the direction (0, 0, 0, 0, 0, -1), # A ray in the direction (0, 0, -1, 0, 0, 0)) # ThetaCone.lines() # (A line in the direction (1, 1, 1, 1, 1, 1),) # print dim(ThetaCone) # 6 ######################################################## # Subdivision of Theta induced by the Grobner fan of Q # ######################################################## # The following script computes the intersection of the Theta cone with all maximal cells in the Grobner fan of Q. IntersectionsQThetaCone = {} for i in range(0,len(PolyMaximalCones.keys())): # print str(i) polyCone =PolyMaximalCones[i] IntersectionQPolyCone = ThetaCone.intersection(polyCone) IntersectionsQThetaCone[i] = IntersectionQPolyCone set([dim(x) for x in IntersectionsQThetaCone.values()]) # {1, 2, 3, 4, 5, 6} # We record those intersection of maximal dimension, i.e. the dimension of the Theta Cone. maxIntersections = [i for i in IntersectionsQThetaCone.keys() if dim(IntersectionsQThetaCone[i])==6] # print maxIntersections # [163, 164, 167] SubdivisionsOfThetaByQ = [IntersectionsQThetaCone[i] for i in maxIntersections] # print [len(SubdivisionsOfThetaByQ[i].rays()) for i in range(0,len(SubdivisionsOfThetaByQ))] # [5, 5, 5] # print [dim(SubdivisionsOfThetaByQ[i]) for i in range(0,len(SubdivisionsOfThetaByQ))] # [6, 6, 6] # We check that these 3 intersections are distinct. We know there are no containments by construction since they are maximal dimension and the maximal cells of Q have disjoint relative interiors. Thus, there are precisely 3 cells in the subdivision of Theta induced by the Grobner fan of Q. # SubdivisionsOfThetaByQ[0] == SubdivisionsOfThetaByQ[1] # # False # SubdivisionsOfThetaByQ[0] == SubdivisionsOfThetaByQ[2] # # False # SubdivisionsOfThetaByQ[1] == SubdivisionsOfThetaByQ[2] # # False ######################################## # Subdivision pieces and sample points # ######################################## # We record the list of rays of each of the 3 cells of the Theta cone, the polyhedron they generate, and a point in the relative interior of each cone. The latter will allow us to compute the initial form of Q induced by the weight given by each of these points. raysOfThetaGfan = {} ThetaSubdividedGfan = {} pointThetaGfan = {} CellIndices = [0,1,2] for i in CellIndices: raysOfThetaGfan[i] = [list(x) for x in SubdivisionsOfThetaByQ[i].rays()] ThetaSubdividedGfan[i] = Polyhedron(rays=raysOfThetaGfan[i]) pointThetaGfan[i]= list(2*sum([vector(r) for r in raysOfThetaGfan[i]])) # We record the Rays of the Subdivisions: # for i in CellIndices: # print 'Cell ' + str(i) # for j in SubdivisionsOfThetaByQ[i].rays(): # print j # print SubdivisionsOfThetaByQ[i].lines() # print '' # Cell 0 -- Theta 2 # A ray in the direction (0, 0, 0, 0, 0, -1) # A ray in the direction (0, 0, -1, 0, 0, 0) # A ray in the direction (0, 0, -2, -1, -2, -2) # A ray in the direction (0, -1, -1, -1, -1, -1) # A ray in the direction (0, 0, -1, -1, -1, -1) # (A line in the direction (1, 1, 1, 1, 1, 1),) # Cell 1 -- Theta 0 # A ray in the direction (0, 0, 0, 0, 0, -1) # A ray in the direction (0, 0, 0, 0, -1, -1) # A ray in the direction (0, 0, -2, -1, -2, -2) # A ray in the direction (0, 0, -1, -1, -1, -1) # A ray in the direction (0, -1, -1, -1, -1, -1) # (A line in the direction (1, 1, 1, 1, 1, 1),) # Cell 2 -- Theta 1 # A ray in the direction (0, -1, -1, -1, -1, -1) # A ray in the direction (0, 0, 0, 0, 0, -1) # A ray in the direction (0, 0, 0, 0, -1, -1) # A ray in the direction (0, 0, -1, 0, 0, 0) # A ray in the direction (0, 0, -2, -1, -2, -2) # (A line in the direction (1, 1, 1, 1, 1, 1),) # We record the H-representation of each piece: this gives us the inequalities satisfied by the three edges of the Theta graph. ThetaCellPiecesHRep = {} for i in CellIndices: ThetaCellPiecesHRep[i] = SubdivisionsOfThetaByQ[i].Hrepresentation() # for i in CellIndices: # print 'Cell ' + str(i) # ThetaCellPiecesHRep[i] # Cell 0 -- Theta 2 # (An inequality (0, 0, -1, 0, 1, 0) x + 0 >= 0, # An inequality (1, -1, 0, 0, 0, 0) x + 0 >= 0, # An inequality (0, 0, 0, 0, 1, -1) x + 0 >= 0, # An inequality (0, 0, 0, 1, -1, 0) x + 0 >= 0, # An inequality (0, 1, 0, -2, 1, 0) x + 0 >= 0) # Cell 1 -- Theta 0 # (An inequality (0, 0, -1, 1, 0, 0) x + 0 >= 0, # An inequality (0, 0, 0, 0, 1, -1) x + 0 >= 0, # An inequality (1, -1, 0, 0, 0, 0) x + 0 >= 0, # An inequality (0, 0, 1, 0, -1, 0) x + 0 >= 0, # An inequality (0, 1, 1, -2, 0, 0) x + 0 >= 0) # Cell 2 -- Theta 1 # (An inequality (0, -1, -1, 2, 0, 0) x + 0 >= 0, # An inequality (0, -1, 0, 2, -1, 0) x + 0 >= 0, # An inequality (1, -1, 0, 0, 0, 0) x + 0 >= 0, # An inequality (0, 1, 0, -1, 0, 0) x + 0 >= 0, # An inequality (0, 0, 0, 0, 1, -1) x + 0 >= 0) findingCones = {} for i in CellIndices: testPoint = pointThetaGfan[i] findingCones[i]=[] for j in range(0,len(PolyMaximalCones.keys())): # print str(j) polyCone =PolyMaximalCones[j] if testPoint in polyCone: findingCones[i].append(j) # findingCones # {0: [163], 1: [164], 2: [167]} # As sample points to compute the initial forms, we take the sum of the rays on each piece. pointThetaGfan = {i: sum([vector(raysOfThetaGfan[i][j]) for j in range(0, len(raysOfThetaGfan[i]))]) for i in CellIndices} # We record the sample points: # pointThetaGfan # {0: (0, -1, -5, -3, -4, -5), # 1: (0, -1, -4, -3, -5, -6), # 2: (0, -1, -4, -2, -4, -5)} # We take appropriate shifts by the all-ones vector to ensure that the entries of the points are positive. shiftedPointThetaGfan = {} for k in pointThetaGfan.keys(): shiftedPointThetaGfan[k] = [pointThetaGfan[k][j]+6 for j in range(0,6)] shiftedPointThetaGfan # {0: [6, 5, 1, 3, 2, 1], # 1: [6, 5, 2, 3, 1, 0], # 2: [6, 5, 2, 4, 2, 1]} ################################# # Construction of initial forms # ################################# # The following script computes the initial form of Q with respect to 3 points in the relative interior of each cell in the subdivision of the Theta cone. For this, # 1) We compute the inner product between each point and all the exponent vectors in the polynomial Q. # 2) We record the maximal value for each list of inner products. # 3) We record the indices of the monomials yielding these maximal values # 4) We take the sum of the corresponding monomials with their coefficients in Q. InnerProducts={} for j in pointThetaGfan.keys(): print str(j) InnerProducts[j] = [vector(ZZ,x)*vector(ZZ,pointThetaGfan[j]) for x in exponentVectorsQInZZ] print [len(list(set(InnerProducts[j]))) for j in InnerProducts.keys()] # [57, 63, 55] MaxInnerProducts = [max(set(InnerProducts[i])) for i in InnerProducts.keys()] # print MaxInnerProducts # [-26, -26, -20] # We compute the indices of elements in InnerProducts[i] where the max value is achieved. From this and the list of monomial and coefficients of Q we can reconstruct the initial form: MaxIndices = {} for i in InnerProducts.keys(): MaxIndices[i] = [j for j in range(0,len(InnerProducts[i])) if InnerProducts[i][j]==MaxInnerProducts[InnerProducts.keys().index(i)]] # print [len(MaxIndices[i]) for i in InnerProducts.keys()] # [1, 1, 1] InitialFormsQ = {} for i in MaxIndices.keys(): informQ = SS(0) for j in MaxIndices[i]: informQ = informQ + SS(coeffQ[j]*monQ[j]) InitialFormsQ[i] = informQ # InitialFormsQ # {0: -8*a6^6*a5^6*a3^4*a2^2, # 1: -8*a6^6*a5^6*x34^2*a3^4, # 2: -8*a6^6*a5^4*a3^8} ############## # M2 Scripts # ############## # shiftedPointThetaGfan # {0: [6, 5, 1, 3, 2, 1], # 1: [6, 5, 2, 3, 1, 0], # 2: [6, 5, 2, 4, 2, 1]} # We construct M2 scripts to verify that the leading terms of Q4 for each of the 3 sample points are the expected ones: ################# # Subdivision 0 # ################# # shiftedPointThetaGfan[0] # [6, 5, 1, 3, 2, 1] # f = file('ABCDQ4ThetaPiece2.m2','w') # f.write('-- Theta graph calculations Cell 0 (from the Grobner Fan), corresponding to the Theta_2 Cell' + '\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {6,5,1,3,2,1}},Global=>false];'+'\n'+'\n') # f.write('-- polynomial A'+'\n') # f.write('A = '+str(AT) +';'+'\n'+'\n') # f.write('-- polynomial B'+'\n') # f.write('B = '+str(BT) +';'+'\n'+'\n') # f.write('-- polynomial C'+'\n') # f.write('C = '+str(CT) +';'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('Q4 =' + str(QT4) +';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n') # f.write('-- polynomial A'+'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.write('-- polynomial B'+'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.write('-- polynomial C'+'\n') # f.write('toString(leadTerm(1,C))'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('toString(leadTerm(1,Q4))'+'\n'+'\n') # f.close() ################# # Subdivision 1 # ################# # shiftedPointThetaGfan[1] # [6, 5, 2, 3, 1, 0] # f = file('ABCDQ4ThetaPiece0.m2','w') # f.write('-- Theta graph calculations Cell 1 (from the Grobner Fan), corresponding to the Theta_0 Cell' + '\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {6,5,2,3,1,0}},Global=>false];'+'\n'+'\n') # f.write('-- polynomial A'+'\n') # f.write('A = '+str(AT) +';'+'\n'+'\n') # f.write('-- polynomial B'+'\n') # f.write('B = '+str(BT) +';'+'\n'+'\n') # f.write('-- polynomial C'+'\n') # f.write('C = '+str(CT) +';'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('Q4 = '+str(QT4) +';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n') # f.write('-- polynomial A'+'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.write('-- polynomial B'+'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.write('-- polynomial C'+'\n') # f.write('toString(leadTerm(1,C))'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('toString(leadTerm(1,Q4))'+'\n'+'\n') # f.close() ################# # Subdivision 2 # ################# # shiftedPointThetaGfan[2] # [6, 5, 2, 4, 2, 1] # f = file('ABCDQ4ThetaPiece2.m2','w') # f.write('-- Theta graph calculations Cell 2 (from the Grobner Fan), corresponding to the Theta_1 Cell' + '\n'+'\n') # f. write('S=QQ[a6,a5,x34,a3,a2,a1, MonomialOrder=>{Weights => {6,5,2,4,2,1}},Global=>false];'+'\n'+'\n') # f.write('-- polynomial A'+'\n') # f.write('A = '+str(AT) +';'+'\n'+'\n') # f.write('-- polynomial B'+'\n') # f.write('B = '+str(BT) +';'+'\n'+'\n') # f.write('-- polynomial C'+'\n') # f.write('C = '+str(CT) +';'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('Q4 = '+str(QT4) +';'+'\n'+'\n') # f.write('-- We compute the leadingTerms' +'\n') # f.write('-- polynomial A'+'\n') # f.write('toString(leadTerm(1,A))'+'\n') # f.write('-- polynomial B'+'\n') # f.write('toString(leadTerm(1,B))'+'\n') # f.write('-- polynomial C'+'\n') # f.write('toString(leadTerm(1,C))'+'\n'+'\n') # f.write('-- polynomial Q4'+'\n') # f.write('toString(leadTerm(1,Q4))'+'\n'+'\n') # f.close() ########## # Output # ########## # We run the previous files on M2 and get the leading terms for A, B, C, and QT4 for our choice of weights. ########## # Cell 0 # ########## # For A: # o6 = 8*a6^2*a5^2*a3^2 # For B: # o7 = 4*a6^4*a5^4*a3^4 # For C: # o8 = 8*a6^6*a5^6*a3^6 # For Q4: # o9 = -8*a6^6*a5^6*a3^4*a2^2 ########## # Cell 1 # ########## # For A: # o6 = 8*a6^2*a5^2*a3^2 # For B: # o7 = 4*a6^4*a5^4*a3^4 # For C: # o8 = 8*a6^6*a5^6*a3^6 # For Q4: # o9 = -8*a6^6*a5^6*x34^2*a3^4 ########## # Cell 2 # ########## # For A: # o6 = 8*a6^2*a5^2*a3^2 # For B: # o7 = 4*a6^4*a5^4*a3^4 # For C: # o8 = 8*a6^6*a5^6*a3^6 # For Q4: # o9 = -8*a6^6*a5^4*a3^8