Skip to content

Commit a89cc3c

Browse files
committed
lift documentation from .__init__() to class and tweak
1 parent 6493ad1 commit a89cc3c

File tree

1 file changed

+44
-43
lines changed

1 file changed

+44
-43
lines changed

src/sage/schemes/elliptic_curves/weierstrass_morphism.py

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,30 @@ class WeierstrassIsomorphism(EllipticCurveHom, baseWI):
373373
r"""
374374
Class representing a Weierstrass isomorphism between two elliptic curves.
375375
376+
INPUT:
377+
378+
- ``E`` -- an ``EllipticCurve``, or ``None`` (see below).
379+
380+
- ``urst`` -- a 4-tuple `(u,r,s,t)`, a :class:`baseWI` object,
381+
or ``None`` (see below).
382+
383+
- ``F`` -- an ``EllipticCurve``, or ``None`` (see below).
384+
385+
Given two Elliptic Curves ``E`` and ``F`` (represented by Weierstrass
386+
models as usual), and a transformation ``urst`` from ``E`` to ``F``,
387+
construct an isomorphism from ``E`` to ``F``.
388+
An exception is raised if ``urst(E) != F``. At most one of ``E``,
389+
``F``, ``urst`` can be ``None``. In this case, the missing input is
390+
constructed from the others in such a way that ``urst(E) == F`` holds,
391+
and an exception is raised if this is impossible (typically because
392+
``E`` and ``F`` are not isomorphic).
393+
394+
Users will not usually need to use this class directly, but instead use
395+
methods such as
396+
:meth:`~sage.schemes.elliptic_curves.ell_generic.EllipticCurve_generic.isomorphism_to`
397+
or
398+
:meth:`~sage.schemes.elliptic_curves.ell_generic.EllipticCurve_generic.isomorphisms`.
399+
376400
Explicitly, the isomorphism defined by `(u,r,s,t)` maps a point `(x,y)`
377401
to the point
378402
@@ -390,52 +414,29 @@ class WeierstrassIsomorphism(EllipticCurveHom, baseWI):
390414
a_3' &= (a_3 + a_1r + 2t) / u^3 \\
391415
a_4' &= (a_4 + 2a_2r - a_1(rs+t) - a_3s + 3r^2 - 2st) / u^4 \\
392416
a_6' &= (a_6 - a_1rt + a_2r^2 - a_3t + a_4r + r^3 - t^2) / u^6 .
417+
418+
EXAMPLES::
419+
420+
sage: from sage.schemes.elliptic_curves.weierstrass_morphism import *
421+
sage: WeierstrassIsomorphism(EllipticCurve([0,1,2,3,4]), (-1,2,3,4))
422+
Elliptic-curve morphism:
423+
From: Elliptic Curve defined by y^2 + 2*y = x^3 + x^2 + 3*x + 4 over Rational Field
424+
To: Elliptic Curve defined by y^2 - 6*x*y - 10*y = x^3 - 2*x^2 - 11*x - 2 over Rational Field
425+
Via: (u,r,s,t) = (-1, 2, 3, 4)
426+
sage: E = EllipticCurve([0,1,2,3,4])
427+
sage: F = EllipticCurve(E.cremona_label())
428+
sage: WeierstrassIsomorphism(E, None, F)
429+
Elliptic-curve morphism:
430+
From: Elliptic Curve defined by y^2 + 2*y = x^3 + x^2 + 3*x + 4 over Rational Field
431+
To: Elliptic Curve defined by y^2 = x^3 + x^2 + 3*x + 5 over Rational Field
432+
Via: (u,r,s,t) = (1, 0, 0, -1)
433+
sage: w = WeierstrassIsomorphism(None, (1,0,0,-1), F)
434+
sage: w._domain == E
435+
True
393436
"""
394437
def __init__(self, E=None, urst=None, F=None):
395438
r"""
396-
Constructor for WeierstrassIsomorphism class,
397-
398-
INPUT:
399-
400-
- ``E`` -- an EllipticCurve, or None (see below).
401-
402-
- ``urst`` -- a 4-tuple `(u,r,s,t)`, or None (see below).
403-
404-
- ``F`` -- an EllipticCurve, or None (see below).
405-
406-
Given two Elliptic Curves ``E`` and ``F`` (represented by
407-
Weierstrass models as usual), and a transformation ``urst``
408-
from ``E`` to ``F``, construct an isomorphism from ``E`` to
409-
``F``. An exception is raised if ``urst(E)!=F``. At most one
410-
of ``E``, ``F``, ``urst`` can be None. If ``F==None`` then
411-
``F`` is constructed as ``urst(E)``. If ``E==None`` then
412-
``E`` is constructed as ``urst^-1(F)``. If ``urst==None``
413-
then an isomorphism from ``E`` to ``F`` is constructed if
414-
possible, and an exception is raised if they are not
415-
isomorphic. Otherwise ``urst`` can be a tuple of length 4 or
416-
a object of type ``baseWI``.
417-
418-
Users will not usually need to use this class directly, but instead use
419-
methods such as ``isomorphism`` of elliptic curves.
420-
421-
EXAMPLES::
422-
423-
sage: from sage.schemes.elliptic_curves.weierstrass_morphism import *
424-
sage: WeierstrassIsomorphism(EllipticCurve([0,1,2,3,4]),(-1,2,3,4))
425-
Elliptic-curve morphism:
426-
From: Elliptic Curve defined by y^2 + 2*y = x^3 + x^2 + 3*x + 4 over Rational Field
427-
To: Elliptic Curve defined by y^2 - 6*x*y - 10*y = x^3 - 2*x^2 - 11*x - 2 over Rational Field
428-
Via: (u,r,s,t) = (-1, 2, 3, 4)
429-
sage: E = EllipticCurve([0,1,2,3,4])
430-
sage: F = EllipticCurve(E.cremona_label())
431-
sage: WeierstrassIsomorphism(E,None,F)
432-
Elliptic-curve morphism:
433-
From: Elliptic Curve defined by y^2 + 2*y = x^3 + x^2 + 3*x + 4 over Rational Field
434-
To: Elliptic Curve defined by y^2 = x^3 + x^2 + 3*x + 5 over Rational Field
435-
Via: (u,r,s,t) = (1, 0, 0, -1)
436-
sage: w = WeierstrassIsomorphism(None,(1,0,0,-1),F)
437-
sage: w._domain==E
438-
True
439+
Constructor for the ``WeierstrassIsomorphism`` class.
439440
440441
TESTS:
441442

0 commit comments

Comments
 (0)