Skip to content

Commit 110d9bf

Browse files
committed
add .torsion_basis() method to EllipticCurve_finite_field
1 parent 104dde9 commit 110d9bf

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

src/sage/schemes/elliptic_curves/ell_field.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,14 @@ def division_field(self, l, names='t', map=False, **kwds):
910910
sage: K.<v> = E.division_field(7); K
911911
Finite Field in v of size 433^16
912912
913+
.. SEEALSO::
914+
915+
To compute a basis of the `\ell`-torsion once the base field
916+
has been extended, you may use
917+
:meth:`sage.schemes.elliptic_curves.ell_number_field.EllipticCurve_number_field.torsion_subgroup`
918+
or
919+
:meth:`sage.schemes.elliptic_curves.ell_finite_field.EllipticCurve_finite_field.torsion_basis`.
920+
913921
TESTS:
914922
915923
Some random testing::

src/sage/schemes/elliptic_curves/ell_finite_field.py

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,67 @@ def abelian_group(self):
10021002
self.gens.set_cache(gens)
10031003
return AdditiveAbelianGroupWrapper(self.point_homset(), gens, orders)
10041004

1005+
def torsion_basis(self, n):
1006+
r"""
1007+
Return a basis of the `n`-torsion subgroup of this elliptic curve,
1008+
assuming it is fully rational.
1009+
1010+
EXAMPLES::
1011+
1012+
sage: E = EllipticCurve(GF(62207^2), [1,0])
1013+
sage: E.abelian_group()
1014+
Additive abelian group isomorphic to Z/62208 + Z/62208 embedded in Abelian group of points on Elliptic Curve defined by y^2 = x^3 + x over Finite Field in z2 of size 62207^2
1015+
sage: PA,QA = E.torsion_basis(2^8)
1016+
sage: PA.weil_pairing(QA, 2^8).multiplicative_order()
1017+
256
1018+
sage: PB,QB = E.torsion_basis(3^5)
1019+
sage: PB.weil_pairing(QB, 3^5).multiplicative_order()
1020+
243
1021+
1022+
::
1023+
1024+
sage: E = EllipticCurve(GF(101), [4,4])
1025+
sage: E.torsion_basis(23)
1026+
Traceback (most recent call last):
1027+
...
1028+
ValueError: curve does not have full rational 23-torsion
1029+
sage: F = E.division_field(23); F
1030+
Finite Field in t of size 101^11
1031+
sage: EE = E.change_ring(F)
1032+
sage: P, Q = EE.torsion_basis(23)
1033+
sage: P # random
1034+
(89*z11^10 + 51*z11^9 + 96*z11^8 + 8*z11^7 + 67*z11^6
1035+
+ 31*z11^5 + 55*z11^4 + 59*z11^3 + 28*z11^2 + 8*z11 + 88
1036+
: 40*z11^10 + 33*z11^9 + 80*z11^8 + 87*z11^7 + 97*z11^6
1037+
+ 69*z11^5 + 56*z11^4 + 17*z11^3 + 26*z11^2 + 69*z11 + 11
1038+
: 1)
1039+
sage: Q # random
1040+
(25*z11^10 + 61*z11^9 + 49*z11^8 + 17*z11^7 + 80*z11^6
1041+
+ 20*z11^5 + 49*z11^4 + 52*z11^3 + 61*z11^2 + 27*z11 + 61
1042+
: 60*z11^10 + 91*z11^9 + 89*z11^8 + 7*z11^7 + 63*z11^6
1043+
+ 55*z11^5 + 23*z11^4 + 17*z11^3 + 90*z11^2 + 91*z11 + 68
1044+
: 1)
1045+
1046+
.. SEEALSO::
1047+
1048+
Use :meth:`~sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.division_field`
1049+
to determine a field extension containing the full `\ell`-torsion subgroup.
1050+
1051+
ALGORITHM:
1052+
1053+
This method currently uses :meth:`abelian_group` and
1054+
:meth:`AdditiveAbelianGroupWrapper.torsion_subgroup`.
1055+
"""
1056+
# TODO: In many cases this is not the fastest algorithm.
1057+
# Alternatives include factoring division polynomials and
1058+
# random sampling (like PARI's ellgroup, but with a milder
1059+
# termination condition). We should implement these too
1060+
# and figure out when to use which.
1061+
T = self.abelian_group().torsion_subgroup(n)
1062+
if T.invariants() != (n, n):
1063+
raise ValueError(f'curve does not have full rational {n}-torsion')
1064+
return tuple(P.element() for P in T.gens())
1065+
10051066
def is_isogenous(self, other, field=None, proof=True):
10061067
"""
10071068
Return whether or not self is isogenous to other.

src/sage/schemes/elliptic_curves/ell_number_field.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,11 @@ def torsion_subgroup(self):
19611961
sage: EK = EllipticCurve([0,0,0,i,i+3])
19621962
sage: EK.torsion_subgroup ()
19631963
Torsion Subgroup isomorphic to Trivial group associated to the Elliptic Curve defined by y^2 = x^3 + i*x + (i+3) over Number Field in i with defining polynomial x^2 + 1 with i = 1*I
1964+
1965+
.. SEEALSO::
1966+
1967+
Use :meth:`~sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.division_field`
1968+
to determine the field of definition of the `\ell`-torsion subgroup.
19641969
"""
19651970
from .ell_torsion import EllipticCurveTorsionSubgroup
19661971
return EllipticCurveTorsionSubgroup(self)

0 commit comments

Comments
 (0)