"Source: Text/Geometry/Scheme.text";
"Line: 2626";
"Date: Thu Sep 25 14:47:45 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Geometry/Scheme.text, line: 2626
// Example: H122E16 ()
print "Example: H122E16";
ei := GetEchoInput();
SetEchoInput(true);
A<x,y> := AffineSpace(FiniteField(7),2);
X := Scheme(A,x^2 + y^2 + 1);
X ! [2,3];
L<w> := ext< BaseRing(X) | 2 >;
IsCoercible(X,[w^4,w^4]);
assert not $1;
IsCoercible(X(L),[w^4,w^4]);
RationalPoints(X);
#RationalPoints(X,L);
assert $1 eq 48;
k := GF(7823);
R<x,y,z,w> := PolynomialRing(k, 4);
I := ideal<R | 4*x*z + 2*x*w + y^2 + 4*y*w + 7821*z^2 + 7820*w^2,
 4*x^2 + 4*x*y + 7821*x*w + 7822*y^2 + 7821*y*w + 
 7821*z^2 + 7819*z*w + 7820*w^2>;
C := Curve(Proj(R), I);
// a genus 0 curve with 1 cusp as singularities => 7823+1 points
pts := RationalPointsByFibration(C); // could also just use RationalPoints
#pts;
assert $1 eq 7824;
SetEchoInput(ei);
