Skip to content

Commit 99a6e3b

Browse files
committed
hide internal function
1 parent cf49d57 commit 99a6e3b

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

src/sage/schemes/elliptic_curves/ell_curve_isogeny.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve
9393

9494
from sage.schemes.elliptic_curves.weierstrass_morphism \
95-
import WeierstrassIsomorphism, isomorphisms, baseWI
95+
import WeierstrassIsomorphism, _isomorphisms, baseWI
9696

9797
#
9898
# Private function for parsing input to determine the type of
@@ -3359,9 +3359,9 @@ def compute_intermediate_curves(E1, E2):
33593359
# We cannot even just use pre_iso = E1.isomorphism_to(E1w) since
33603360
# it may have u=-1; similarly for E2
33613361

3362-
urst = [w for w in isomorphisms(E1, E1w) if w[0] == 1][0]
3362+
urst = [w for w in _isomorphisms(E1, E1w) if w[0] == 1][0]
33633363
pre_iso = WeierstrassIsomorphism(E1, urst, E1w)
3364-
urst = [w for w in isomorphisms(E2w, E2) if w[0] == 1][0]
3364+
urst = [w for w in _isomorphisms(E2w, E2) if w[0] == 1][0]
33653365
post_iso = WeierstrassIsomorphism(E2w, urst, E2)
33663366
return E1w, E2w, pre_iso, post_iso
33673367

src/sage/schemes/elliptic_curves/ell_generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,7 @@ def isomorphisms(self, other, field=None):
25032503
self = self.change_ring(field)
25042504
other = other.change_ring(field)
25052505
return sorted(wm.WeierstrassIsomorphism(self, urst, other)
2506-
for urst in wm.isomorphisms(self, other))
2506+
for urst in wm._isomorphisms(self, other))
25072507

25082508
def is_isomorphic(self, other, field=None):
25092509
"""
@@ -2543,7 +2543,7 @@ def is_isomorphic(self, other, field=None):
25432543
if self.j_invariant() != other.j_invariant(): # easy check
25442544
return False
25452545
try:
2546-
next(wm.isomorphisms(self, other))
2546+
next(wm._isomorphisms(self, other))
25472547
except StopIteration:
25482548
return False
25492549
return True

src/sage/schemes/elliptic_curves/weierstrass_morphism.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def __call__(self, EorP):
254254
raise ValueError("baseWI(a) only for a=(x,y), (x:y:z) or (a1,a2,a3,a4,a6)")
255255

256256

257-
def isomorphisms(E, F):
257+
def _isomorphisms(E, F):
258258
r"""
259259
Enumerate all isomorphisms between two elliptic curves,
260260
as a generator object.
@@ -267,21 +267,12 @@ def isomorphisms(E, F):
267267
268268
A generator object producing 4-tuples `(u,r,s,t)` representing an isomorphism.
269269
270-
.. NOTE::
271-
272-
This function is not intended for users, who should use the methods
273-
:meth:`~sage.schemes.elliptic_curves.ell_generic.isomorphisms`
274-
and
275-
:meth:`~sage.schemes.elliptic_curves.ell_generic.isomorphism_to`
276-
and
277-
:meth:`~sage.schemes.elliptic_curves.ell_generic.automorphisms`.
278-
279270
EXAMPLES::
280271
281-
sage: from sage.schemes.elliptic_curves.weierstrass_morphism import *
282-
sage: list(isomorphisms(EllipticCurve_from_j(0), EllipticCurve('27a3')))
272+
sage: from sage.schemes.elliptic_curves.weierstrass_morphism import _isomorphisms
273+
sage: list(_isomorphisms(EllipticCurve_from_j(0), EllipticCurve('27a3')))
283274
[(1, 0, 0, 0), (-1, 0, 0, -1)]
284-
sage: list(isomorphisms(EllipticCurve_from_j(0), EllipticCurve('27a1')))
275+
sage: list(_isomorphisms(EllipticCurve_from_j(0), EllipticCurve('27a1')))
285276
[]
286277
287278
TESTS:
@@ -290,10 +281,10 @@ def isomorphisms(E, F):
290281
291282
sage: z8 = GF(2^8).gen()
292283
sage: E1 = EllipticCurve([z8, z8, z8, z8, z8])
293-
sage: list(isomorphisms(E1, E1))
284+
sage: list(_isomorphisms(E1, E1))
294285
[(1, 0, 0, 0), (1, 0, z8, z8)]
295286
sage: E2 = EllipticCurve([z8^2, 0, 0, 0, z8^7 + z8^4])
296-
sage: list(isomorphisms(E1, E2))
287+
sage: list(_isomorphisms(E1, E2))
297288
[(z8^7 + z8^3 + z8^2 + z8, 1, 1, z8^7 + z8^3 + z8^2 + z8 + 1),
298289
(z8^7 + z8^3 + z8^2 + z8, 1, z8 + 1, z8^7 + z8^3 + z8^2 + z8 + 1)]
299290
@@ -519,7 +510,7 @@ def __init__(self, E=None, urst=None, F=None):
519510

520511
elif urst is None: # try to construct the morphism
521512
try:
522-
urst = next(isomorphisms(E, F))
513+
urst = next(_isomorphisms(E, F))
523514
except StopIteration:
524515
raise ValueError("elliptic curves not isomorphic")
525516
baseWI.__init__(self, *urst)

0 commit comments

Comments
 (0)