# This script computes relevant functions on the Yoshida coordinates: # 1) Functions involving the action of W(E6) (computed by WE6_action.sage) and compositions of actions. # 2) the intersection points of suitable pairs of extremal lines. We use this in "CalculationOfAllPds.sage" # 3) Functions to convert from crosses to Yoshidas and from Yoshidas to polynomials in ds. Also, whenever possible, a function that converts a rational function in the ds to a rational function in the Yoshidas. # The calculations of all cross functions and triples of four-factors associated to each Eckardt quintic is done in "four_factors.sage". ########################################################################### # Setting up the ambient rings with the W(E6) action. ########################################################################### # A list of variables d_1, ..., d_6 for the coefficients ds = [var("d%s"%i) for i in range(1,7)] # A list of variables E_1, ..., E_6 Es = [var("E%s"%i) for i in range(1,7)] # A list of variables F_12, ..., F_56 Fs = [var("F%s%s"%(i,j)) for i in range(1,7) for j in range(1,7) if i < j] # A list of variables G_1, ..., G_6 Gs = [var("G%s"%i) for i in range(1,7)] # A list of variables X_12, ..., X_65 Xs = [var("X%s%s"%(i,j)) for i in range(1,7) for j in range(1,7) if i != j] # A list of variables Y_123456, ..., Y_162534 Ys = [var("Y%s%s%s%s%s%s"%(i,j,k,l,m,n)) for i in range(1,7) for j in range(1,7) for k in range(1,7) for l in range(1,7) for m in range(1,7) for n in range(1,7) if i 0: return work[0] print "Nothing worked! Wrong four factors?" return None product_yoshida = expand_product(basering(product)) # Now express the "rest". "rest" is obtained by removing (quintic, e) from the quintics and adding the factors of f with exponent -e to the linears. rest_linear_factors = linear_factors + [(new_linear, -e * new_exp) for (new_linear, new_exp) in f] rest_quintic_factors = quintic_factors[1:] do_the_rest = DtoYHelper(rest_linear_factors, rest_quintic_factors) # If the rest succeeds, then return the answer combined with our quintic factor if do_the_rest != None: return product_yoshida^e*do_the_rest #If we are here, then it means that none of the ffs worked. This is bad print "Nothing worked! Was the expression invariant?" return None # We test that the conversion is correct by evaluating at random integer values of ds. Since we are dividing by the quintics, we have to make sure that the quintic doesn't vanish for this particular choice. Whenever we get an error from this vanishing we have to repeat, so we add the while loop that exits whenever the evaluation was possible (success == True). def DtoY(exp): linear_factors = [] quintic_factors = [] for (f,e) in exp: if f.total_degree() == 1: linear_factors.append((f,e)) elif f.total_degree() == 5: quintic_factors.append((f,e)) answer = DtoYHelper(linear_factors, quintic_factors) success = False while success == False: try: vald = {SR(d): int(random()*100-50) for d in ds} answer_val = SR(answer.substitute(y_to_d)).substitute(vald) exp_val = SR(expand(exp)).substitute(vald) success = True except Exception: print "Division by zero. Retrying." if answer_val == exp_val: return answer elif answer_val == -exp_val: return -1*answer else: print "DtoY helper is wrong! " print "Answer_val = " + str(answer_val) print "exp_val = " + str(exp_val) return None #Tests #DtoY(VectorToYoshida(YM[0], roots).factor()) #DtoY(-1*VectorToYoshida(YM[0], roots).factor() * VectorToYoshida(YM[17], roots).factor()) #DtoY(quintic12.factor() * four_factors(quintic12)[2]) # troubleMakers = [] # for k in range(0,40): # print str(k) # if DtoY(Y[k].factor()) == Yoshidas[k]: # print 'True with plus' # if DtoY(Y[k].factor()) == -1*Yoshidas[k]: # print 'True with minus' # else: # print 'error' # troubleMakers = troubleMakers + [k] # DtoY(Y[40].factor()) # -Yoshida11^2*Yoshida12^2*Yoshida13*Yoshida3*Yoshida7/(Yoshida0*Yoshida10*Yoshida15*Yoshida17*Yoshida4*Yoshida8) # Y[40].factor() # (d5 - d6) * (d3 + d5 + d6) * (-d2 + d4) * (d2 + d4 + d6) * (d2 + d4 + d5) * (-d1 + d3) * (d1 + d5 + d6) * (d1 + d3 + d4) * (d1 + d2 + d3) ########################################################## # 5) Correspondence Yoshida matrix and Yoshida functions # ########################################################## # # As given, the list of 80 Yoshida functions (40 up to sign) does not correspond to the rows of the Yoshida matrix. We therefore need to reorder them in a consisitent way, namely [Y0,..., Y40, -Y0,..., -Y40]. # # The following functions create the approapriate order. # # Y is the ordered list of Yoshida functions we have # # YM is the Yoshida matrix # factoredYoshidas = dict() # for i in range(0,80): # print str(i) # factoredYoshidas[i] = YField(DtoY(basering(Y[i]).factor())) # orderedYoshidas = dict() # for i in range(0,40): # print '\n' # print str(i) # a = DtoY(VectorToYoshida(YM[i], roots).factor()) # b = [x for x in factoredYoshidas.keys() if factoredYoshidas[x] == YField(a)][0] # print str(b) # c = [x for x in factoredYoshidas.keys() if factoredYoshidas[x] == YField(-1*a)][0] # print str(c) # orderedYoshidas[i] = (b, Y[b], +1) # orderedYoshidas[40+i] = (c, Y[c], -1) # orderedYoshidaFunctions = {i: orderedYoshidas[i][1] for i in sorted(orderedYoshidas.keys())} # save(orderedYoshidaFunctions, "Input/orderedYoshidaFunctionsDictionary.sobj")