Skip to content

Commit e9ade97

Browse files
committed
make EllipticCurveHom_composite available from EllipticCurve_field.isogeny
1 parent bdce391 commit e9ade97

File tree

1 file changed

+37
-2
lines changed

1 file changed

+37
-2
lines changed

src/sage/schemes/elliptic_curves/ell_field.py

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,9 +767,9 @@ def descend_to(self, K, f=None):
767767
Elist = [E.minimal_model() for E in Elist]
768768
return Elist
769769

770-
def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
770+
def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True, algorithm=None):
771771
r"""
772-
Return an elliptic curve isogeny from self.
772+
Return an elliptic-curve isogeny from this elliptic curve.
773773
774774
The isogeny can be determined in two ways, either by a
775775
polynomial or a set of torsion points. The methods used are:
@@ -785,6 +785,14 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
785785
(little endian)) which will define the kernel of the
786786
isogeny.
787787
788+
- Factored Isogenies (*experimental* --- see
789+
:mod:`sage.schemes.elliptic_curves.hom_composite`):
790+
Given a list of points which generate a composite-order
791+
subgroup, decomposes the isogeny into prime-degree steps.
792+
This can be used to construct isogenies of extremely large,
793+
smooth degree.
794+
This algorithm is selected using ``algorithm="factored"``.
795+
788796
INPUT:
789797
790798
- ``E`` - an elliptic curve, the domain of the isogeny to
@@ -825,6 +833,11 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
825833
kernel polynomial, meaning that its roots
826834
are the x-coordinates of a finite subgroup.
827835
836+
- ``algorithm`` (optional): When ``algorithm="factored"`` is
837+
passed, decompose the isogeny into prime-degree steps.
838+
The ``degree`` and ``model`` parameters are not supported by
839+
``algorithm="factored"``.
840+
828841
OUTPUT:
829842
830843
An isogeny between elliptic curves. This is a morphism of curves.
@@ -838,11 +851,15 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
838851
sage: phi.rational_maps()
839852
((x^2 + x + 1)/(x + 1), (x^2*y + x)/(x^2 + 1))
840853
854+
::
855+
841856
sage: E = EllipticCurve('11a1')
842857
sage: P = E.torsion_points()[1]
843858
sage: E.isogeny(P)
844859
Isogeny of degree 5 from Elliptic Curve defined by y^2 + y = x^3 - x^2 - 10*x - 20 over Rational Field to Elliptic Curve defined by y^2 + y = x^3 - x^2 - 7820*x - 263580 over Rational Field
845860
861+
::
862+
846863
sage: E = EllipticCurve(GF(19),[1,1])
847864
sage: P = E(15,3); Q = E(2,12);
848865
sage: (P.order(), Q.order())
@@ -852,6 +869,17 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
852869
sage: phi(E.random_point()) # all points defined over GF(19) are in the kernel
853870
(0 : 1 : 0)
854871
872+
::
873+
874+
sage: E = EllipticCurve(GF(2^32-5), [170246996, 2036646110])
875+
sage: P = E.lift_x(2)
876+
sage: E.isogeny(P, algorithm="factored") # experimental
877+
doctest:warning
878+
...
879+
Composite morphism of degree 1073721825 = 3^4*5^2*11*19*43*59:
880+
From: Elliptic Curve defined by y^2 = x^3 + 170246996*x + 2036646110 over Finite Field of size 4294967291
881+
To: Elliptic Curve defined by y^2 = x^3 + 272790262*x + 1903695400 over Finite Field of size 4294967291
882+
855883
Not all polynomials define a finite subgroup (:trac:`6384`)::
856884
857885
sage: E = EllipticCurve(GF(31),[1,0,0,1,2])
@@ -860,6 +888,8 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
860888
...
861889
ValueError: The polynomial x^3 + 4*x^2 + 27*x + 14 does not define a finite subgroup of Elliptic Curve defined by y^2 + x*y = x^3 + x + 2 over Finite Field of size 31.
862890
891+
TESTS:
892+
863893
Until the checking of kernel polynomials was implemented in
864894
:trac:`23222`, the following raised no error but returned an
865895
invalid morphism. See also :trac:`11578`::
@@ -873,6 +903,11 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
873903
...
874904
ValueError: The polynomial x^2 + (-396/5*a - 2472/5)*x + 223344/5*a - 196272/5 does not define a finite subgroup of Elliptic Curve defined by y^2 = x^3 + (-13392)*x + (-1080432) over Number Field in a with defining polynomial x^2 - x - 1.
875905
"""
906+
if algorithm == "factored":
907+
if degree is not None: raise TypeError('algorithm="factored" does not support the "degree" parameter')
908+
if model is not None: raise TypeError('algorithm="factored" does not support the "model" parameter')
909+
from sage.schemes.elliptic_curves.hom_composite import EllipticCurveHom_composite
910+
return EllipticCurveHom_composite(self, kernel, codomain=codomain)
876911
try:
877912
return EllipticCurveIsogeny(self, kernel, codomain, degree, model, check=check)
878913
except AttributeError as e:

0 commit comments

Comments
 (0)