Mathworks 2023
Lemma 3.10:
> R<x,t>:=PolynomialRing(Rationals(),2);
> a:=-4*t^2;
> b:=4*t^4+2*t^2;
> c:=-4*t^4;
> n:=t;
> G:=x^4-(2*b+12*n)*x^2+(8*c+8*a*n)*x+b^2-4*a*c-4*b*n+4*n^2;
> A<x,t>:=AffineSpace(Rationals(),2);
> B:=Curve(A,G);
> SingularPoints(B); //// so B has two singular pts: (-2,1) and (0,0).
> B<x,t>:=Curve(A,G);
> Genus(B);
> T,C,p:=IsHyperelliptic(B);
> C;
> J:=Jacobian(C);
> RankBound(J);
> Pts:=Points(C: Bound:=1000);
> P:=J![Pts[1],Pts[3]];
> Order(P);
> Chabauty(P);
/// so we have found all of the points of C(Q). Moreover, since we know that the birational map p:B(Q)—>C(Q) is an isomorphism away from the two singular points of B(Q), it follows that the only rational points of B are those singular points and the rational preimages (if they exist) of the four rational points of C. In particular, it suffices to compute preimages of the points of C. We do this with Magma below:
> HasPreimage(p,Pts[1]);
// the answer is given as the zero locus of three polynomials. To find the corresponding points, we compute a Groebner basis of the corresponding ideal:
> R<x,t>:=PolynomialRing(Rationals(),2);
> I1:=ideal<R | -1/8*x^3*t^5 + 1/4*x^3*t^4 - 1/8*x^3*t^3 + 1/4*x^2*t^7 - 1/2*x^2*t^6 +
1/4*x^2*t^5 + 1/2*x*t^9 - x*t^8 + 3/4*x*t^7 + 5/4*x*t^6 - 13/4*x*t^5 +
7/4*x*t^4 - t^11 + 2*t^10 + 3/2*t^9 - 7/2*t^8 - 1/2*t^7 + 3/2*t^6,1/8*x^3 - 1/4*x^2*t^2 - 1/2*x*t^4 - 3/4*x*t^2 - 5/4*x*t + t^6 - 5/2*t^4 - 3/2*t^3,x^4 - 8*x^2*t^4 - 4*x^2*t^2 - 12*x^2*t - 32*x*t^4 - 32*x*t^3 + 16*t^8 - 48*t^6 - 16*t^5 + 4*t^4 - 8*t^3 + 4*t^2>;
> GroebnerBasis(I1);
// we see that t^3(t-1)(t+1)=0, so that any preimage must have t coordinate t=0,1,-1. We now repeat this process for the other points of C.
> HasPreimage(p,Pts[2]);
> I2:=ideal<R | 1/8*x^3 - 1/4*x^2*t^2 - 1/2*x*t^4 - 3/4*x*t^2 - 5/4*x*t + t^6 - 5/2*t^4 -
1/2*t^3 - t^2, 1/256*x^9 - 3/128*x^8*t^2 - 9/128*x^7*t^2 - 15/128*x^7*t + 1/4*x^6*t^6 +
3/64*x^6*t^4 + 21/64*x^6*t^3 - 3/8*x^5*t^8 + 39/32*x^5*t^6 + 33/32*x^5*t^5 +
27/64*x^5*t^4 + 45/32*x^5*t^3 + 75/64*x^5*t^2 - 3/4*x^4*t^10 - 21/16*x^4*t^8
- 51/16*x^4*t^7 + 63/32*x^4*t^6 + 57/16*x^4*t^5 + 15/32*x^4*t^4 + 2*x^3*t^12
- 51/8*x^3*t^10 - 21/8*x^3*t^9 - 21/8*x^3*t^8 - 51/4*x^3*t^7 -
303/32*x^3*t^6 - 139/32*x^3*t^5 - 217/32*x^3*t^4 - 129/32*x^3*t^3 +
33/4*x^2*t^12 + 39/4*x^2*t^11 - 69/4*x^2*t^10 - 51/2*x^2*t^9 -
219/16*x^2*t^8 - 527/16*x^2*t^7 - 653/16*x^2*t^6 - 221/16*x^2*t^5 - 3*x*t^16
+ 21/2*x*t^14 + 3/2*x*t^13 + 15/4*x*t^12 + 57/2*x*t^11 - 99/8*x*t^10 -
641/8*x*t^9 - 539/8*x*t^8 - 129/8*x*t^7 + 5/4*x*t^6 - 13/4*x*t^5 + 7/4*x*t^4
+ 2*t^18 - 15*t^16 - 9*t^15 + 75/2*t^14 + 45*t^13 - 71/4*t^12 - 229/4*t^11 -
127/4*t^10 - 21/4*t^9 - 7/2*t^8 - 1/2*t^7 + 3/2*t^6, x^4 - 8*x^2*t^4 - 4*x^2*t^2 - 12*x^2*t - 32*x*t^4 - 32*x*t^3 + 16*t^8 - 48*t^6 -
16*t^5 + 4*t^4 - 8*t^3 + 4*t^2 >;
> GroebnerBasis(I2);
> Factorization(t^6 - 3*t^5 + 3*t^4 - t^3);
// so again we find that any preimage (of the 2nd point of C) must have t-coordinate 0,1.
> HasPreimage(p,Pts[3]);
> I3:=ideal<R | 1/8*x^3 - 1/4*x^2*t^2 - 1/2*x*t^4 - 3/4*x*t^2 - 5/4*x*t + t^6 - 5/2*t^4 -
1/2*t^3 - t^2,
-1/256*x^9 + 3/128*x^8*t^2 + 9/128*x^7*t^2 + 15/128*x^7*t - 1/4*x^6*t^6 -
3/64*x^6*t^4 - 21/64*x^6*t^3 + 3/8*x^5*t^8 - 39/32*x^5*t^6 - 33/32*x^5*t^5 -
27/64*x^5*t^4 - 45/32*x^5*t^3 - 75/64*x^5*t^2 + 3/4*x^4*t^10 + 21/16*x^4*t^8
+ 51/16*x^4*t^7 - 63/32*x^4*t^6 - 57/16*x^4*t^5 - 15/32*x^4*t^4 - 2*x^3*t^12
+ 51/8*x^3*t^10 + 21/8*x^3*t^9 + 21/8*x^3*t^8 + 51/4*x^3*t^7 +
303/32*x^3*t^6 + 131/32*x^3*t^5 + 233/32*x^3*t^4 + 121/32*x^3*t^3 -
33/4*x^2*t^12 - 39/4*x^2*t^11 + 69/4*x^2*t^10 + 51/2*x^2*t^9 +
219/16*x^2*t^8 + 535/16*x^2*t^7 + 637/16*x^2*t^6 + 229/16*x^2*t^5 + 3*x*t^16
- 21/2*x*t^14 - 3/2*x*t^13 - 15/4*x*t^12 - 57/2*x*t^11 + 99/8*x*t^10 +
649/8*x*t^9 + 523/8*x*t^8 + 141/8*x*t^7 + 5/4*x*t^6 - 13/4*x*t^5 + 7/4*x*t^4
- 2*t^18 + 15*t^16 + 9*t^15 - 75/2*t^14 - 45*t^13 + 71/4*t^12 + 221/4*t^11 +
143/4*t^10 + 33/4*t^9 - 7/2*t^8 - 1/2*t^7 + 3/2*t^6,
x^4 - 8*x^2*t^4 - 4*x^2*t^2 - 12*x^2*t - 32*x*t^4 - 32*x*t^3 + 16*t^8 - 48*t^6 -
16*t^5 + 4*t^4 - 8*t^3 + 4*t^2>;
> GroebnerBasis(I3);
> Factorization(t^6 - 3*t^5 + 3*t^4 - t^3);
// again we find that any preimage (of the 3rd point of C) must have t-coordinate 0,1.
> HasPreimage(p,Pts[4]);
> I4:=ideal<R | -1/8*x^3 + 1/4*x^2*t^2 + 1/2*x*t^4 + 3/4*x*t^2 + 5/4*x*t - t^6 + 5/2*t^4 +
5/2*t^3 - t^2,
-1/8*x^3*t^5 + 1/4*x^3*t^4 - 1/8*x^3*t^3 + 1/4*x^2*t^7 - 1/2*x^2*t^6 +
1/4*x^2*t^5 + 1/2*x*t^9 - x*t^8 + 3/4*x*t^7 + 5/4*x*t^6 - 13/4*x*t^5 +
7/4*x*t^4 - t^11 + 2*t^10 + 3/2*t^9 - 7/2*t^8 - 1/2*t^7 + 3/2*t^6,
x^4 - 8*x^2*t^4 - 4*x^2*t^2 - 12*x^2*t - 32*x*t^4 - 32*x*t^3 + 16*t^8 - 48*t^6 -
16*t^5 + 4*t^4 - 8*t^3 + 4*t^2>;
> GroebnerBasis(I4);
> Factorization(t^6 - 3*t^5 + 3*t^4 - t^3);
// again we find that any preimage (of the 4th point of C) must have t-coordinate 0,1.
// So to summarize: any rational point of B must be singular, i.e., (x,t)=(-2,1) or (0,0), or else have t-coordinate 0,1,-1. In particular, all rational points of B have t-coordinate 0,1,-1 as claimed!
// Lastly, we check that we have found all the rational points of B with these t-coordinates:
> for t in [-1,0,1] do
> R<x>:=PolynomialRing(Rationals());
> a:=-4*t^2;
> b:=4*t^4+2*t^2;
> c:=-4*t^4;
> n:=t;
> G:=x^4-(2*b+12*n)*x^2+(8*c+8*a*n)*x+b^2-4*a*c-4*b*n+4*n^2;
> <Roots(G),t>;
> end for;
// so the rational points on B with t-coordinates 0,-1,1 are:
// (x,t)=(0,-1), (0,0), (-2,1), and (6,1). Hence, we've found all the points on B.
Proposition 4.9:
// We first find a hyperelliptic model for B:
> R<s,t>:=PolynomialRing(Rationals(),2);
> A<s,t>:=AffineSpace(Rationals(),2);
> G:=s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 - 81*t^5 + 27*t^3;
> B<s,t>:=Curve(A,G);
> SingularPoints(B);
> GeometricGenus(B);
> T,C,f:=IsHyperelliptic(B);
> C;
// We now determine the rational points on the hyperelliptic curve C; here we also make a substitution with x and -x for convenience.
> P<x>:=PolynomialRing(Rationals());
> j:=-x^6 + 3*x^5 + 3*x^4 - 11*x^3 + 3*x^2 + 3*x - 1;
> C:=HyperellipticCurve(j);
> Points(C: Bound:=1000); // so known rational points have x'coordinates: -1,2, and 1/2
> K<Z>:=NumberField(x^3 - 3*x^2 + 1);
> ClassNumber(K);
> P<x>:=PolynomialRing(K);
> Roots(x^3 - 3*x^2 + 1);
> Z1:=Z;
> Z2:=-Z^2 + 2*Z + 2;
> Z3:=Z^2 - 3*Z + 1;
> O:=Integers(K);
> F:=(x-Z1)*(x^3 - 3*x + 1);
> G:=-(x-Z2)*(x-Z3);
> F*G-j; // check factorization
> R:=Resultant(F,G);
> I:=R*O;
> Support(I);
> P:=ideal<O|3,Z+1>;
> IsPrime(P);
> T,P:=IsPrincipal(P);
> p:=-1-3*Z;
> P:=p*O;
> IsPrime(P);
> G,phi:=UnitGroup(K);
> Gens:=[ K!phi(G.i) : i in [1..Ngens(G)] ];
> u1:=Gens[1];
> u2:=Gens[2];
> u3:=Gens[3];
> P1:= ProjectiveSpace(Rationals(),1);
> for d in [1,-1,p,-p,u2,-u2,u3,-u3,p*u2,-p*u2,p*u3,-p*u3,u2*u3,-u2*u3,p*u2*u3,-p*u2*u3] do
> C<x,y,z>:=HyperellipticCurve(d*F);
> I1:=C![Z,0,1];
> E<x,y,z>,phi:=EllipticCurve(C,I1);
> psi:=Inverse(phi);
> pi := map< C->P1 | [x,z] >;
> u:=psi*pi;
> success, G, GtoEK :=PseudoMordellWeilGroup(E);
> u := Extend(u);
> V, R:= Chabauty( GtoEK, u: IndexBound:= 1, InitialPrimes:=50);
> <d,success,Rank(E),R,[ u( GtoEK(P) ) : P in V ]>;
> end for;
// If the index of G in E(K) is finite and coprime to the computed value R, then we've found all points in E(K) with Q-rational image. But in
// all case, the computation completes with R=1 (which is coprime to every integer). Therefore we have found all possible
// rational x-coordinates on C: Infinity, -1, 1/2, 0, 2, 1. However, it's easy to check that only x=-1,1/2,2 happen from this list.
// In particular, since the birational map f:B(Q)—>C(Q) is an isomorphism away from the three known singular points on B, it suffices to determine the rational preimages (if there are any) of the six rational points on C to determine the complete set of rational points of B. We compute preimages now.
> R<s,t>:=PolynomialRing(Rationals(),2);
> A<s,t>:=AffineSpace(Rationals(),2);
> G:=s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 - 81*t^5 + 27*t^3;
> B<s,t>:=Curve(A,G);
> SingularPoints(B);
> GeometricGenus(B);
> T,C,f:=IsHyperelliptic(B);
> Pts:=Points(C: Bound:=1000);
> HasPreimage(f,Pts[1]); // the answer is given as the zero locus of three polynomials. To find the corresponding points, we compute a Groebner basis of the corresponding ideal.
> I1:=ideal<R | -1/3*s - t^3 + t,
1/81*s^3 + 2/9*s^2*t^3 - 1/3*s^2*t^2 - 2/9*s^2*t + 4/3*s*t^6 - s*t^5 - 8/3*s*t^4
+ s*t^3 + 4/3*s*t^2 + 8/3*t^9 - 8*t^7 + 8*t^5 - 8/3*t^3,
s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 -
81*t^5 + 27*t^3>;
> GroebnerBasis(I1);
> Factorization(t^9 - 3*t^7 + 3*t^5 - t^3); // so that any preimage must have t coordinate t=0,1,-1. We now repeat this process for the other points of C.
> HasPreimage(f,Pts[2]);
> I2:=ideal<R | t^3 - t,
-1/81*s^3 - 2/9*s^2*t^3 - 1/3*s^2*t^2 + 2/9*s^2*t - 4/3*s*t^6 - s*t^5 +
8/3*s*t^4 + s*t^3 - 4/3*s*t^2 - 8/3*t^9 + 8*t^7 - 8*t^5 + 8/3*t^3,
s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 -
81*t^5 + 27*t^3>;
> GroebnerBasis(I2);// Again, any preimage must have t coordinate t=0,1,-1.
> HasPreimage(f,Pts[3]); // Again, any preimage must have t coordinate t=0,1,-1.
> HasPreimage(f,Pts[4]); // Again, any preimage must have t coordinate t=0,1,-1.
> HasPreimage(f,Pts[5]);
> I5:=ideal<R | s,
1/648*s^3 + 1/36*s^2*t^3 - 1/3*s^2*t^2 - 1/36*s^2*t + 1/6*s*t^6 - s*t^5 -
1/3*s*t^4 + s*t^3 + 1/6*s*t^2 + 1/3*t^9 - t^7 + t^5 - 1/3*t^3,
s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 -
81*t^5 + 27*t^3>;
> GroebnerBasis(I5);
> Factorization(t^9 - 3*t^7 + 3*t^5 - t^3); // Again, any preimage must have t coordinate t=0,1,-1.
> HasPreimage(f,Pts[6]);
> I6:=ideal<R | s,
-1/648*s^3 - 1/36*s^2*t^3 - 1/3*s^2*t^2 + 1/36*s^2*t - 1/6*s*t^6 - s*t^5 +
1/3*s*t^4 + s*t^3 - 1/6*s*t^2 - 1/3*t^9 + t^7 - t^5 + 1/3*t^3,
s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 -
81*t^5 + 27*t^3>;
> GroebnerBasis(I6);
> Factorization(t^9 - 3*t^7 + 3*t^5 - t^3); // so again, any preimage must have t coordinate t=0,1,-1.
// So to summarize: any rational point of B must be singular, i.e., (s,t)=(0,-1) or (0,0) or (0,1), or else have t-coordinate 0,1,-1. In particular, all rational points of B have t-coordinate 0,1,-1 as claimed!
// Lastly, we check that we have found all the rational points of B with these t-coordinates:
> for t in [-1,0,1] do
> R<s>:=PolynomialRing(Rationals());
> G:=s^3 - 9*s^2*t^3 - 18*s^2*t - 54*s*t^6 + 27*s*t^4 + 27*s*t^2 - 27*t^9 + 81*t^7 - 81*t^5 + 27*t^3;
> <Roots(G),t>;
> end for;
// so the rational points on B with t-coordinates 0,-1,1 are (s,t) given by:
// (-27,-1), (0,-1), (0,0), (0,1), (27,1).