Skip to content

Instantly share code, notes, and snippets.

@alexjbest
Created October 17, 2019 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexjbest/38c9075cf0050eafb0e6ce80a8e41d8f to your computer and use it in GitHub Desktop.
Save alexjbest/38c9075cf0050eafb0e6ce80a8e41d8f to your computer and use it in GitHub Desktop.
some sage code to compute L-functions of elliptic curves over function field of genus 0
p=7
L.<t> = FunctionField(GF(p))
S.<x,y> = L[]
E = EllipticCurve(y^2 - x*(x-1)*(x-t^2))
deg = 3 # what degree correct up till
R.<T>= PowerSeriesRing(QQ)
lpol = ((1 + T) * (1 - T))^(-2) # bad factors computed by hand for now
ll = []
for N in range(deg + 1):
for pp in L.places(N):
try:
Epp = E.base_extend(lambda x: x.evaluate(pp))
except:
print "bad", pp
pass
else:
lpol *= (1 - ((p^N + 1) - Epp.cardinality()) * T^N + p^N * T^(2*N))^(-1)
print lpol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment