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

Commit

Permalink
move .is_separable() to child classes
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyx4 committed Jan 21, 2022
1 parent 131930f commit a9b8ecc
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
24 changes: 24 additions & 0 deletions src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
Original file line number Diff line number Diff line change
Expand Up @@ -2795,6 +2795,30 @@ def kernel_polynomial(self):
return self.__kernel_polynomial


def is_separable(self):
r"""
Determine whether or not this isogeny is separable.
Since :class:`EllipticCurveIsogeny` only implements
separable isogenies, this method always returns ``True``.
EXAMPLES::
sage: E = EllipticCurve(GF(17), [0,0,0,3,0])
sage: phi = EllipticCurveIsogeny(E, E((0,0)))
sage: phi.is_separable()
True
::
sage: E = EllipticCurve('11a1')
sage: phi = EllipticCurveIsogeny(E, E.torsion_points())
sage: phi.is_separable()
True
"""
return True


def set_pre_isomorphism(self, preWI):
r"""
Modify this isogeny by precomposing with a Weierstrass isomorphism.
Expand Down
29 changes: 12 additions & 17 deletions src/sage/schemes/elliptic_curves/hom.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,27 +407,22 @@ def is_separable(self):
r"""
Determine whether or not this morphism is separable.
.. NOTE::
This method currently always returns ``True`` as Sage does
not yet implement inseparable isogenies. This will probably
change in the future.
EXAMPLES::
Implemented by child classes. For examples, see:
sage: E = EllipticCurve(GF(17), [0,0,0,3,0])
sage: phi = EllipticCurveIsogeny(E, E((0,0)))
sage: phi.is_separable()
True
- :meth:`EllipticCurveIsogeny.is_separable`
- :meth:`sage.schemes.elliptic_curves.weierstrass_morphism.WeierstrassIsomorphism.is_separable`
- :meth:`sage.schemes.elliptic_curves.hom_composite.EllipticCurveHom_composite.is_separable`
- :meth:`sage.schemes.elliptic_curves.hom_scalar.EllipticCurveHom_scalar.is_separable`
::
TESTS::
sage: E = EllipticCurve('11a1')
sage: phi = EllipticCurveIsogeny(E, E.torsion_points())
sage: phi.is_separable()
True
sage: from sage.schemes.elliptic_curves.hom import EllipticCurveHom
sage: EllipticCurveHom.is_separable(None)
Traceback (most recent call last):
...
NotImplementedError: ...
"""
return True
raise NotImplementedError('children must implement')

def is_surjective(self):
r"""
Expand Down
15 changes: 15 additions & 0 deletions src/sage/schemes/elliptic_curves/weierstrass_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,21 @@ def kernel_polynomial(self):
"""
return self._poly_ring(1)

def is_separable(self):
r"""
Determine whether or not this isogeny is separable.
Since :class:`WeierstrassIsomorphism` only implements
isomorphisms, this method always returns ``True``.
EXAMPLES::
sage: E = EllipticCurve(GF(31337), [0,1])
sage: {f.is_separable() for f in E.automorphisms()}
{True}
"""
return True

def dual(self):
"""
Return the dual isogeny of this isomorphism.
Expand Down

0 comments on commit a9b8ecc

Please sign in to comment.