summaryrefslogtreecommitdiffstats log msg author committer range
blob: 8cfb4a50b8a9a4ee1faa6ff9f534b7ce165a10f4 (plain)
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 ``` ``````R. = PolynomialRing(QQ,['z4','z3','z2','z1','z0','y4','y3','y2','y1','y0','v1','u1','v0','u0','x','zeta5','sqrtm10m2sqrt5','sqrtm10p2sqrt5','sqrt5','sqrtm2'],order='degrevlex(5),degrevlex(5),degrevlex(4),lex(6)') Izeta = R.ideal(sum([zeta5^i for i in range(5)])) Ifullnum = R.ideal([zeta5 - 1/8*sqrtm10p2sqrt5*sqrt5 - 1/8*sqrtm10p2sqrt5 - 1/4*sqrt5 + 1/4, sqrtm10m2sqrt5 - 1/2*sqrtm10p2sqrt5*sqrt5 - 1/2*sqrtm10p2sqrt5, sqrtm10p2sqrt5^2 - 2*sqrt5 + 10, sqrt5^2 - 5]) f = x^5 - 5*x + 12 elt = SymmetricFunctionAlgebra(QQ, basis='elementary') sigma1 = elt([1]).expand(5).subs(x0=z0,x1=z1,x2=z2,x3=z3,x4=z4) sigma2 = elt([2]).expand(5).subs(x0=z0,x1=z1,x2=z2,x3=z3,x4=z4) sigma3 = elt([3]).expand(5).subs(x0=z0,x1=z1,x2=z2,x3=z3,x4=z4) sigma4 = elt([4]).expand(5).subs(x0=z0,x1=z1,x2=z2,x3=z3,x4=z4) sigma5 = elt([5]).expand(5).subs(x0=z0,x1=z1,x2=z2,x3=z3,x4=z4) sigmas = [1,sigma1,sigma2,sigma3,sigma4,sigma5] rootrels = [sigmas[i] - (-1)^i * f.coefficient({x:f.degree()-i}) for i in range(1,len(sigmas))] Idecomp = R.ideal(rootrels) zs = [z0,z1,z2,z3,z4] ys = [y0,y1,y2,y3,y4] symp = sum([zs[i]^2 * (zs[(i+1)%5]*zs[(i+4)%5] + zs[(i+2)%5]*zs[(i+3)%5]) for i in range(5)]) symq = sum([zs[i] * zs[(i+1)%5] for i in range(5)]) Idecp = (Idecomp + R.ideal(symp-40)) Idecq = (Idecomp + R.ideal(symq+5)) lagrange = [sum([zs[i]*zeta5^((i*j)%5) for i in range(5)]) for j in range(5)] Iresolv0 = Izeta + Idecq + R.ideal([ys[i]-lagrange[i] for i in range(5)]) B0 = Iresolv0.groebner_basis() Iresolv1 = R.ideal(B0) + R.ideal([u0 - (y1^5+y4^5), u1 - (y1^5-y4^5), v0 - (y2^5+y3^5), v1 - (y2^5-y3^5)]) B1 = Iresolv1.groebner_basis() Iresolv = R.ideal(B1) + Ifullnum B = Iresolv.groebner_basis() Iresolv2 = R.ideal(B) + R.ideal(sqrtm2 - (sqrt5*(z0*z2^3 + z1*z3^3 + z2*z4^3 + z3*z0^3 + z4*z1^3 - 5)/50)) B2 = Iresolv2.groebner_basis() ``````