"Source: Text/Geometry/HypGeomMot.text";
"Line: 810";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Geometry/HypGeomMot.text, line: 810
// Example: H138E4 ()
print "Example: H138E4";
ei := GetEchoInput();
SetEchoInput(true);
_<u> := FunctionField(Rationals());
H := HypergeometricData([* -2, 3, 4, -5 *]); // degree 4
C := CanonicalScheme(H);
_<[X]> := Ambient(C); C;
Dimension(C), Genus(Curve(C)); // genus 2 curve
assert IsHyperelliptic(Curve(C));
CC := CanonicalCurve(H); _<x,y> := Ambient(CC); CC;
b, C2 := IsHyperelliptic(CC); assert b;
HyperellipticCurve(H); // in the degree 4 catalogue
assert IsIsomorphic(HyperellipticCurve(H),C2);
// and an example where the curve is reducible
H := HypergeometricData([* 6,6,-8,-4 *]); // weight 1
C := CanonicalCurve(H);
A := AlgorithmicFunctionField(FunctionField(C));
E<s> := ExactConstantField(A);
CE := BaseChange(C,E);
I := IrreducibleComponents(CE); assert #I eq 2;
_<x,y> := Ambient(I[1]); I[1];
b, C2 := IsHyperelliptic(Curve(I[1])); assert b;
SetEchoInput(ei);
