Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
make EllipticCurveHom_composite available from EllipticCurve_field.is…
Browse files Browse the repository at this point in the history
…ogeny
  • Loading branch information
yyyyx4 committed Oct 23, 2021
1 parent bdce391 commit e9ade97
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions src/sage/schemes/elliptic_curves/ell_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,9 +767,9 @@ def descend_to(self, K, f=None):
Elist = [E.minimal_model() for E in Elist]
return Elist

def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True, algorithm=None):
r"""
Return an elliptic curve isogeny from self.
Return an elliptic-curve isogeny from this elliptic curve.
The isogeny can be determined in two ways, either by a
polynomial or a set of torsion points. The methods used are:
Expand All @@ -785,6 +785,14 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
(little endian)) which will define the kernel of the
isogeny.
- Factored Isogenies (*experimental* --- see
:mod:`sage.schemes.elliptic_curves.hom_composite`):
Given a list of points which generate a composite-order
subgroup, decomposes the isogeny into prime-degree steps.
This can be used to construct isogenies of extremely large,
smooth degree.
This algorithm is selected using ``algorithm="factored"``.
INPUT:
- ``E`` - an elliptic curve, the domain of the isogeny to
Expand Down Expand Up @@ -825,6 +833,11 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
kernel polynomial, meaning that its roots
are the x-coordinates of a finite subgroup.
- ``algorithm`` (optional): When ``algorithm="factored"`` is
passed, decompose the isogeny into prime-degree steps.
The ``degree`` and ``model`` parameters are not supported by
``algorithm="factored"``.
OUTPUT:
An isogeny between elliptic curves. This is a morphism of curves.
Expand All @@ -838,11 +851,15 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
sage: phi.rational_maps()
((x^2 + x + 1)/(x + 1), (x^2*y + x)/(x^2 + 1))
::
sage: E = EllipticCurve('11a1')
sage: P = E.torsion_points()[1]
sage: E.isogeny(P)
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
::
sage: E = EllipticCurve(GF(19),[1,1])
sage: P = E(15,3); Q = E(2,12);
sage: (P.order(), Q.order())
Expand All @@ -852,6 +869,17 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
sage: phi(E.random_point()) # all points defined over GF(19) are in the kernel
(0 : 1 : 0)
::
sage: E = EllipticCurve(GF(2^32-5), [170246996, 2036646110])
sage: P = E.lift_x(2)
sage: E.isogeny(P, algorithm="factored") # experimental
doctest:warning
...
Composite morphism of degree 1073721825 = 3^4*5^2*11*19*43*59:
From: Elliptic Curve defined by y^2 = x^3 + 170246996*x + 2036646110 over Finite Field of size 4294967291
To: Elliptic Curve defined by y^2 = x^3 + 272790262*x + 1903695400 over Finite Field of size 4294967291
Not all polynomials define a finite subgroup (:trac:`6384`)::
sage: E = EllipticCurve(GF(31),[1,0,0,1,2])
Expand All @@ -860,6 +888,8 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
...
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.
TESTS:
Until the checking of kernel polynomials was implemented in
:trac:`23222`, the following raised no error but returned an
invalid morphism. See also :trac:`11578`::
Expand All @@ -873,6 +903,11 @@ def isogeny(self, kernel, codomain=None, degree=None, model=None, check=True):
...
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.
"""
if algorithm == "factored":
if degree is not None: raise TypeError('algorithm="factored" does not support the "degree" parameter')
if model is not None: raise TypeError('algorithm="factored" does not support the "model" parameter')
from sage.schemes.elliptic_curves.hom_composite import EllipticCurveHom_composite
return EllipticCurveHom_composite(self, kernel, codomain=codomain)
try:
return EllipticCurveIsogeny(self, kernel, codomain, degree, model, check=check)
except AttributeError as e:
Expand Down

0 comments on commit e9ade97

Please sign in to comment.