Skip to content

Commit

Permalink
various small code tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Aug 10, 2024
1 parent 0f34773 commit 20c13a0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/sage/schemes/elliptic_curves/ell_finite_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,23 +684,23 @@ def frobenius_order(self):
sage: E = EllipticCurve(GF(11),[3,3])
sage: E.frobenius_order()
Order of conductor 2 generated by phi
in Number Field in phi with defining polynomial x^2 - 4*x + 11
Order of conductor 2 generated by pi
in Number Field in pi with defining polynomial x^2 - 4*x + 11
For some supersingular curves, Frobenius is in Z and the Frobenius
order is Z::
For some supersingular curves, Frobenius is in `\ZZ` and the Frobenius
order is `\ZZ`::
sage: # needs sage.rings.finite_rings
sage: E = EllipticCurve(GF(25,'a'),[0,0,0,0,1])
sage: R = E.frobenius_order()
sage: R
Order generated by []
in Number Field in phi with defining polynomial x + 5
in Number Field in pi with defining polynomial x + 5
sage: R.degree()
1
"""
f = self.frobenius_polynomial().factor()[0][0]
return ZZ.extension(f,names='phi')
return ZZ.extension(f, names='pi')

def frobenius(self):
r"""
Expand All @@ -717,7 +717,7 @@ def frobenius(self):
sage: E = EllipticCurve(GF(11),[3,3])
sage: E.frobenius()
phi
pi
sage: E.frobenius().minpoly()
x^2 - 4*x + 11
Expand Down Expand Up @@ -1562,28 +1562,28 @@ def height_above_floor(self, ell, e):
"""
if self.is_supersingular():
raise ValueError("{} is not ordinary".format(self))
if e == 0:
return 0
if not e:
return ZZ.zero()
j = self.j_invariant()
if j in [0, 1728]:
return e
F = j.parent()
x = polygen(F)
from sage.rings.polynomial.polynomial_ring import polygens
from sage.schemes.elliptic_curves.mod_poly import classical_modular_polynomial
X, Y = polygens(F, "X, Y", 2)
X, Y = polygens(F, 'X,Y')
phi = classical_modular_polynomial(ell)(X, Y)
j1 = phi([x,j]).roots(multiplicities=False)
nj1 = len(j1)
on_floor = self.two_torsion_rank() < 2 if ell == 2 else nj1 <= ell
if on_floor:
return 0
return ZZ.zero()
if e == 1 or nj1 != ell+1: # double roots can only happen at the surface
return e
if nj1 < 3:
return 0
return ZZ.zero()
j0 = [j,j,j]
h = 1
h = ZZ.one()
while True:
for i in range(3):
r = (phi([x,j1[i]])//(x-j0[i])).roots(multiplicities=False)
Expand Down

0 comments on commit 20c13a0

Please sign in to comment.