A<x,y> := PolynomialRing(GF(2),2);
P,homogenize := Homogenization(A);
print("f := The polynomial from math.mit.edu/~drew/FFFc25.txt reduced mod 2:");
f := x^3*(x+1)*y^8+x^2*(x^3+x^2+1)*y^7+x^3*(x+1)^3*y^6+(x^4+x+1)*x^2*(x+1)*y^5+(x+1)*y^4+x^3*(x+1)*y^3+(x^6+x^5+x^2+x+1)*x^2*y^2+x^3*y+1+x^2+x^4+x^3+x ;

f := homogenize(f);
XF2 := Scheme(ProjectiveSpace(P),f);
FF := FunctionField(XF2);
AFF := AlgorithmicFunctionField(FF);
plc1 := Places(AFF,1);
divgrp := DivisorGroup(AFF);
div1 := [divgrp ! i : i in plc1];
cuspsum := &+ div1;
load "function_degrees.m";

print("The number of places of degrees 1-4:");
[#Places(AFF,i) : i in [1..4]];

// Our goal is to show that X1(25) has no non-constant functions of degree <5
// over F2 and hence over Q.

// Say f is a function of degree < 5, since f^(-1)({0,1,infinity}) contains
// all 10 rational points, by the pigeon hole principle we may assume that
// f^(-1)({infinity} contains at least 4 distinct rational points, and so
// it should be found with the following computation:

print("Searching for degrees:");
FunctionDegrees( cuspsum );

