E := EllipticCurve([0, 0, 0, 2^32 + 1, 0]); assert IsPrime(641) and IsPrime(6700417); assert 641 * 6700417 eq aInvariants(E)[4]; assert #TorsionSubgroup(E) eq 2; print ; assert #TwoDescent(E) eq 31; print "Nonzero classes in the 2-Selmer group: 31"; R := PolynomialRing(Rationals()); coefficients := [ [587797, -151276, 3846, -28204, -27415], [-117823, 428384, 84000, 144224, 19708], [142777, 408648, 217848, 198528, -5972], [-31132, -20449, 0, -20449, 31132] ]; polynomials := [R!row : row in coefficients]; badPrimes := [2, 641, 6700417]; // The sentinel -1 denotes the projective point at infinity. witnesses := [ [0, -1, 1, 0], [-1, 0, 0, 2], [0, 0, 2, 0], [-1, 0, 0, 0] ]; for i in [1..4] do f := polynomials[i]; e,d,c,b,a := Explode(coefficients[i]); I := 12*a*e - 3*b*d + c^2; J := 72*a*c*e + 9*b*c*d - 27*a*d^2 - 27*b^2*e - 2*c^3; expectedI := (i eq 4 select -3 else -48) * 641 * 6700417; assert I eq expectedI and J eq 0; assert {t[1] : t in Factorization(Abs(Integers()!Discriminant(f)))} eq Seqset(badPrimes); t := witnesses[i][1]; assert (t eq -1 select a else Evaluate(f,t)) gt 0; for j in [1..3] do p := badPrimes[j]; t := witnesses[i][j+1]; value := Integers()!(t eq -1 select a else Evaluate(f,t)); v := Valuation(value,p); assert v mod 2 eq 0; unit := value div p^v; if p eq 2 then assert unit mod 8 eq 1; else assert Modexp(unit mod p, (p-1) div 2, p) eq 1; end if; end for; end for; // Scaling the fourth quartic by the square 4 gives common invariants. polynomials[4] *:= 4; coverings := [HyperellipticCurve(f) : f in polynomials]; pairing := ZeroMatrix(GF(2), 4, 4); for i in [1..3] do for j in [i+1..4] do pairing[i,j] := CasselsTatePairing(coverings[i], coverings[j]); pairing[j,i] := pairing[i,j]; end for; end for; print pairing; assert Determinant(pairing) eq 1;