"Source: Text/Geometry/CrvHyp.text";
"Line: 2630";
"Date: Fri Sep 26 09:12:34 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Geometry/CrvHyp.text, line: 2630
// Example: H137E16 ()
print "Example: H137E16";
ei := GetEchoInput();
SetEchoInput(true);
PP<x>:=PolynomialRing(GF(2));                                                
h := PP!1;
f := x^5 + x^4 + x^3 + 1;
J := Jacobian(HyperellipticCurve(f,h));  // a supersingular curve
Jext := BaseExtend(J, 41);
Factorization(#Jext);
m := 177722253954175633;                 // some big subgroup order
cofact := 3887047*7;
P := cofact*Random(Jext);
Q := 876213876263897634*P;               // Q in <P>
Jext2 := BaseExtend(Jext, 6);            // go to an ext of deg 6
NJ := #Jext2;
R := Random(Jext2);
R *:= NJ div m^Valuation(NJ, m);
eP := WeilPairing(Jext2!P, R, m);
eQ := WeilPairing(Jext2!Q, R, m);
assert eP^876213876263897634 eq eQ; 
SetEchoInput(ei);
