// The number field K P:=PolynomialRing(Rationals()); K:=NumberField(x^3 - x^2 - 2*x + 1); OK:=Integers(K); I2:=Factorisation(2*OK)[1,1]; I3:=Factorisation(3*OK)[1,1]; I7:=Factorisation(7*OK)[1,1]; // The Frey elliptic curve F. alfa:=z^2 + z - 2; beta:=-z^2 + 4; gamma:=-z - 2; assert alfa + beta + gamma eq 0; function FreyF(a,b,d); A:=alfa*(a+b)^2; B:=beta*(a^2 + -z*a*b + b^2); min:=MinimalModel(EllipticCurve([0,d*(B-A),0,-d^2*A*B,0])); return min; end function; // Compututation of the conductor of F at 2. for a, b in [1..32] do if [a mod 2, b mod 2] ne [0,0] and a le b then F:=FreyF(a,b,1); if Valuation(a+b,2) eq 2 then assert Valuation(Conductor(F),I2) eq 0; end if; if Valuation(a+b,2) gt 2 then assert Valuation(Conductor(F),I2) eq 1; end if; if Valuation(a+b,2) eq 1 then assert Valuation(Conductor(F),I2) eq 4; end if; if Valuation(a+b,2) eq 0 then if Valuation(a*b,2) gt 1 then assert Valuation(Conductor(F),I2) eq 3; end if; if Valuation(a*b,2) eq 1 then assert Valuation(Conductor(F),I2) eq 4; end if; end if; end if; end for; // Computation of the conductor of F at 7. for a, b in [1..7] do if [a mod 7, b mod 7] ne [0,0] and a le b then F:=FreyF(a,b,1); if Valuation(a+b,7) gt 0 then assert Valuation(Conductor(F),I7) eq 1; else assert Valuation(Conductor(F),I7) eq 2; end if; end if; end for; // Given a form f, this function computes a possible bound for P using the NORM OF THE DIFFERENCE between the a_Q coefficients for Q|q function BoundOverK(q,f,curve); F:=CoefficientField(f); factQ:=Factorisation(q*OK); B:=1; for x,y in [0..q-1] do if [x,y] ne [0,0] then Bxy:=0; C:=curve(x,y,1); for i in [1..#factQ] do Q:=factQ[i,1]; if LocalInformation(C,Q)[3] eq 0 then diffQ:=Norm(TraceOfFrobenius(C,Q)-HeckeEigenvalue(f,Q)); else diffQ:=Norm((Norm(Q)+1)^2-HeckeEigenvalue(f,Q)^2); end if; Bxy:=Gcd(Integers()!Bxy,Integers()!diffQ); end for; if Bxy eq 0 then return []; // Here p is unbounded else B:=B*Bxy; end if; end if; end for; return [q*B]; end function; // For the forms in "forms", this function returns the possible ideals P|p with p\ge5 using the "good" primes q in AuxiliaryPrimes using refined elimination function Bound(forms,AuxiliaryPrimes); print "Performing standard elimination for",#forms,"form(s) with set of auxiliary primes",AuxiliaryPrimes; for i in [1..#forms] do f:=forms[i]; print ""; print "Checking form no",i; print ""; Sf:={}; bool:=0; for q in AuxiliaryPrimes do if bool eq 0 or Sf ne {} then print "Dealing with q =",q; if BoundOverK(q,f,FreyF) ne [] then // Here f can be discarded for large enough p Sq:=Set([I[1] : I in Factorisation(BoundOverK(q,f,FreyF)[1])]); if bool eq 0 then print "This form can be eliminated for large enough p !"; Sf:=Sq; bool:=1; end if; Sf:=Sf meet Sq; Sf:={p : p in Sf | p gt 3}; end if; end if; end for; if bool eq 0 then print "Form no",i," not eliminated for large enough p"; else if Sf eq {} then print "Form no",i,"is eliminated"; else print "Form no",i; print "with coefficient field :", CoefficientField(f) ; print "is not eliminated for prime(s) :",Sf; end if; end if; print "*************************************************************"; end for; return ""; end function; // Given a form f, this function computes a possible bound for P using the DIFFERENCE between the a_Q coefficients for Q|q function refined_BoundOverK(q,f,curve); F:=CoefficientField(f); if F eq Rationals() then OF:=1; else OF:=Integers(F); end if; factQ:=Factorisation(q*OK); B:=1*OF; for x,y in [0..q-1] do if [x,y] ne [0,0] then Bxy:=0*OF; C:=curve(x,y,1); for i in [1..#factQ] do Q:=factQ[i,1]; if LocalInformation(C,Q)[3] eq 0 then diffQ:=TraceOfFrobenius(C,Q)-HeckeEigenvalue(f,Q); else diffQ:=(Norm(Q)+1)^2-HeckeEigenvalue(f,Q)^2; end if; if F eq Rationals() then Bxy:=Gcd(Integers()!Bxy,Integers()!diffQ); else Bxy:=Gcd(Bxy,diffQ*OF); end if; end for; if Bxy eq 0*OF then return []; // Here p is unbounded else B:=B*Bxy; end if; end if; end for; return [q*B]; end function; // For the forms in "forms", this function returns the possible ideals P|p with p\ge5 using the "good" primes q in AuxiliaryPrimes and refined elimination function refined_Bound(f,AuxiliaryPrimes); print "Performing refined elimination with set of auxiliary primes",AuxiliaryPrimes; print ""; Sf:={}; bool:=0; for q in AuxiliaryPrimes do if bool eq 0 or Sf ne {} then print "Dealing with q =",q; if refined_BoundOverK(q,f,FreyF) ne [] then // Here f can be discarded for large enough p Sq:=Set([I[1] : I in Factorisation(refined_BoundOverK(q,f,FreyF)[1])]); if bool eq 0 then print "This form can be eliminated for large enough p !"; Sf:=Sq; bool:=1; end if; Sf:=Sf meet Sq; Sf:={P : P in Sf | Characteristic(ResidueClassField(P)) gt 3}; end if; end if; end for; if bool eq 0 then print "The form is not eliminated for large enough p"; else if Sf eq {} then print "The form is eliminated"; else print "The form with coefficient field :", CoefficientField(f) ; print "is not eliminated for",#Sf,"prime ideal(s) above :", Set([Norm(P) : P in Sf]); end if; end if; print "*************************************************************"; return ""; end function; // We check assertions in Theorem 3.6 print ""; print "We check assertions in Theorem 3."; print ""; N1:=I2*I3*I7; print "Computing forms at level N1=I2*I3*I7..."; forms1:=Eigenforms(NewSubspace(HilbertCuspForms(K,N1))); print "Done !"; print ""; print "We first perform standard elimination at level N1 = I2*I3*I7 using primes q = 13, 29 and 41 :"; Bound(forms1,[13,29,41]); print ""; print "*************************************************************"; print "The prime p = 11 survives for the form no 4 ; we discard it using refined elimination with q = 5 :"; refined_Bound(forms1[4],[5]); print ""; print "*************************************************************"; print "The primes p = 5, 13 survive for the form no 3 ; we discard p = 5 using refined elimination with q = 29 :"; refined_Bound(forms1[3],[29]); print ""; print "*************************************************************"; print "For each form f at level N1, we compute Norm(a_Q(f)-(Norm(Q)+1)) mod 13 for any of the three prime ideals Q above 29 in K :"; print ""; Q29:=Factorisation(29*OK)[1,1]; for i in [1..#forms1] do f:=forms1[i]; print "Form no",i,": Norm(a_Q(f)-(Norm(Q)+1)) mod 13 =",Integers()!Norm(HeckeEigenvalue(f,Q29)-(Norm(Q29)+1)) mod 13; end for; print ""; print "Hence form no 3 is the unique form with reducible mod 13 representation whose existence is predicted by Martin's result."; F:=CoefficientField(forms1[3]); print "It has exactly",#Factorisation(13*Integers(F)),"prime ideal above 13 in its coefficient field."; print ""; print "*************************************************************"; N2:=I2^3*I3*I7; print ""; print "Computing forms at level N2=I2^3*I3*I7..."; forms2:=Eigenforms(NewSubspace(HilbertCuspForms(K,N2))); print "Done !"; print ""; print ""; print "*************************************************************"; print "We first perform standard elimination at level N2 = I2^3*I3*I7 using primes q = 13, 29, 41 and 43 :"; Bound(forms2,[13,29,41,43]); print ""; print "*************************************************************"; print "The prime p = 17 survives for the form no 121 ; we discard it using refined elimination with q = 5 :"; refined_Bound(forms2[121],[5]); print ""; print "*************************************************************"; print "The prime p = 5 survives for three forms no 56, 84 and 120 ; we discard it using refined elimination with q = 29, 41, 83 :"; refined_Bound(forms2[56],[29,41,83]); refined_Bound(forms2[84],[29,41,83]); refined_Bound(forms2[120],[29,41,83]);