Skip to content

Commit 9218517

Browse files
committed
convenience method to construct elliptic-curve isomorphisms from u,r,s,t
1 parent 439065e commit 9218517

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

src/sage/schemes/elliptic_curves/ell_generic.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,93 @@ def scale_curve(self, u):
15551555
u = self.base_ring()(u) # because otherwise 1/u would round!
15561556
return self.change_weierstrass_model(1/u, 0, 0, 0)
15571557

1558+
def isomorphism(self, u, r=0, s=0, t=0, *, is_codomain=False):
1559+
r"""
1560+
Given four values `u,r,s,t` in the base ring of this curve, return
1561+
the :class:`WeierstrassIsomorphism` defined by `u,r,s,t` with this
1562+
curve as its codomain. (The value `u` must be a unit.)
1563+
1564+
Optionally, if the keyword argument ``is_codomain`` is set to ``True``,
1565+
return the isomorphism defined by `u,r,s,t` with this curve as its
1566+
**co**\domain.
1567+
1568+
EXAMPLES::
1569+
1570+
sage: E = EllipticCurve([1, 2, 3, 4, 5])
1571+
sage: iso = E.isomorphism(6); iso
1572+
Elliptic-curve morphism:
1573+
From: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1574+
To: Elliptic Curve defined by y^2 + 1/6*x*y + 1/72*y = x^3 + 1/18*x^2 + 1/324*x + 5/46656 over Rational Field
1575+
Via: (u,r,s,t) = (6, 0, 0, 0)
1576+
sage: iso.domain() == E
1577+
True
1578+
sage: iso.codomain() == E.scale_curve(1 / 6)
1579+
True
1580+
1581+
sage: iso = E.isomorphism(1, 7, 8, 9); iso
1582+
Elliptic-curve morphism:
1583+
From: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1584+
To: Elliptic Curve defined by y^2 + 17*x*y + 28*y = x^3 - 49*x^2 - 54*x + 303 over Rational Field
1585+
Via: (u,r,s,t) = (1, 7, 8, 9)
1586+
sage: iso.domain() == E
1587+
True
1588+
sage: iso.codomain() == E.rst_transform(7, 8, 9)
1589+
True
1590+
1591+
sage: iso = E.isomorphism(6, 7, 8, 9); iso
1592+
Elliptic-curve morphism:
1593+
From: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1594+
To: Elliptic Curve defined by y^2 + 17/6*x*y + 7/54*y = x^3 - 49/36*x^2 - 1/24*x + 101/15552 over Rational Field
1595+
Via: (u,r,s,t) = (6, 7, 8, 9)
1596+
sage: iso.domain() == E
1597+
True
1598+
sage: iso.codomain() == E.rst_transform(7, 8, 9).scale_curve(1 / 6)
1599+
True
1600+
1601+
The ``is_codomain`` argument reverses the role of domain and codomain::
1602+
1603+
sage: E = EllipticCurve([1, 2, 3, 4, 5])
1604+
sage: iso = E.isomorphism(6, is_codomain=True); iso
1605+
Elliptic-curve morphism:
1606+
From: Elliptic Curve defined by y^2 + 6*x*y + 648*y = x^3 + 72*x^2 + 5184*x + 233280 over Rational Field
1607+
To: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1608+
Via: (u,r,s,t) = (6, 0, 0, 0)
1609+
sage: iso.domain() == E.scale_curve(6)
1610+
True
1611+
sage: iso.codomain() == E
1612+
True
1613+
1614+
sage: iso = E.isomorphism(1, 7, 8, 9, is_codomain=True); iso
1615+
Elliptic-curve morphism:
1616+
From: Elliptic Curve defined by y^2 - 15*x*y + 90*y = x^3 - 75*x^2 + 796*x - 2289 over Rational Field
1617+
To: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1618+
Via: (u,r,s,t) = (1, 7, 8, 9)
1619+
sage: iso.domain().rst_transform(7, 8, 9) == E
1620+
True
1621+
sage: iso.codomain() == E
1622+
True
1623+
1624+
sage: iso = E.isomorphism(6, 7, 8, 9, is_codomain=True); iso
1625+
Elliptic-curve morphism:
1626+
From: Elliptic Curve defined by y^2 - 10*x*y + 700*y = x^3 + 35*x^2 + 9641*x + 169486 over Rational Field
1627+
To: Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
1628+
Via: (u,r,s,t) = (6, 7, 8, 9)
1629+
sage: iso.domain().rst_transform(7, 8, 9) == E.scale_curve(6)
1630+
True
1631+
sage: iso.codomain() == E
1632+
True
1633+
1634+
.. SEEALSO::
1635+
1636+
- :class:`~sage.schemes.elliptic_curves.weierstrass_morphism.WeierstrassIsomorphism`
1637+
- :meth:`rst_transform`
1638+
- :meth:`scale_curve`
1639+
"""
1640+
from sage.schemes.elliptic_curves.weierstrass_morphism import WeierstrassIsomorphism
1641+
if is_codomain:
1642+
return WeierstrassIsomorphism(None, (u,r,s,t), self)
1643+
return WeierstrassIsomorphism(self, (u,r,s,t))
1644+
15581645
# ###########################################################
15591646
#
15601647
# Explanation of the division (also known as torsion) polynomial

0 commit comments

Comments
 (0)