Skip to content

Commit 1407385

Browse files
author
Release Manager
committed
gh-37175: search for a pair of pre- and post-isomorphism instead of just a post-isomorphism when computing dual isogeny While computing the dual of an isogeny, the current code only searches for a post-isomorphism which gives the correct scaling factor overall. In some cases, as shown by #37168, such an isomorphism may not exist, and we additionally have to compose with a suitable pre-isomorphism. This resolves #37168. URL: #37175 Reported by: Lorenz Panny Reviewer(s): Giacomo Pope, Lorenz Panny
2 parents 9b131cd + 42a2547 commit 1407385

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

src/sage/schemes/elliptic_curves/ell_curve_isogeny.py

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
847847
848848
TESTS:
849849
850-
Domain and codomain tests (see :trac:`12880`)::
850+
Domain and codomain tests (see :issue:`12880`)::
851851
852852
sage: E = EllipticCurve(QQ, [0,0,0,1,0])
853853
sage: phi = EllipticCurveIsogeny(E, E(0,0))
@@ -863,7 +863,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
863863
sage: phi.codomain()
864864
Elliptic Curve defined by y^2 + x*y = x^3 + 24*x + 6 over Finite Field of size 31
865865
866-
Composition tests (see :trac:`16245`, cf. :trac:`34410`)::
866+
Composition tests (see :issue:`16245`, cf. :issue:`34410`)::
867867
868868
sage: E = EllipticCurve(j=GF(7)(0))
869869
sage: phi = E.isogeny([E(0), E((0,1)), E((0,-1))]); phi
@@ -875,7 +875,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
875875
From: Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
876876
To: Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
877877
878-
Examples over relative number fields used not to work (see :trac:`16779`)::
878+
Examples over relative number fields used not to work (see :issue:`16779`)::
879879
880880
sage: # long time, needs sage.rings.number_field
881881
sage: pol26 = hilbert_class_polynomial(-4*26)
@@ -891,7 +891,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
891891
sage: iso3 = EL.isogenies_prime_degree(3); len(iso3)
892892
2
893893
894-
Examples over function fields used not to work (see :trac:`11327`)::
894+
Examples over function fields used not to work (see :issue:`11327`)::
895895
896896
sage: F.<t> = FunctionField(QQ)
897897
sage: E = EllipticCurve([0,0,0,-t^2,0])
@@ -1189,7 +1189,7 @@ def _call_(self, P):
11891189
11901190
TESTS:
11911191
1192-
Tests for :trac:`10888`::
1192+
Tests for :issue:`10888`::
11931193
11941194
sage: # needs sage.rings.number_field
11951195
sage: x = polygen(ZZ, 'x')
@@ -1204,7 +1204,7 @@ def _call_(self, P):
12041204
sage: phihat(Q)
12051205
(-1/48 : 127/576*th : 1)
12061206
1207-
Call a composed isogeny (added for :trac:`16238`)::
1207+
Call a composed isogeny (added for :issue:`16238`)::
12081208
12091209
sage: E = EllipticCurve(j=GF(7)(0))
12101210
sage: phi = E.isogeny([E(0), E((0,1)), E((0,-1))])
@@ -1214,7 +1214,7 @@ def _call_(self, P):
12141214
sage: phi2(E.points()[0])
12151215
(0 : 1 : 0)
12161216
1217-
Coercion works fine with :meth:`_call_` (added for :trac:`16238`)::
1217+
Coercion works fine with :meth:`_call_` (added for :issue:`16238`)::
12181218
12191219
sage: # needs sage.rings.number_field
12201220
sage: K.<th> = NumberField(x^2 + 3)
@@ -1243,7 +1243,7 @@ def _call_(self, P):
12431243
sage: phi(Q)._order
12441244
27
12451245
1246-
Test for :trac:`35983`::
1246+
Test for :issue:`35983`::
12471247
12481248
sage: E = EllipticCurve([1,0,0,-1,0])
12491249
sage: P = E([1,0])
@@ -2106,7 +2106,7 @@ def __compute_via_velu(self, xP, yP):
21062106
21072107
TESTS:
21082108
2109-
Check for :trac:`33214`::
2109+
Check for :issue:`33214`::
21102110
21112111
sage: # needs sage.rings.finite_rings
21122112
sage: z2 = GF(71^2).gen()
@@ -2120,7 +2120,7 @@ def __compute_via_velu(self, xP, yP):
21202120
(33 : 61*z2 + 10 : 1)
21212121
21222122
The rational maps are also computed via this code path; check
2123-
that they are plausible (this failed prior to :trac:`33214`)::
2123+
that they are plausible (this failed prior to :issue:`33214`)::
21242124
21252125
sage: # needs sage.rings.finite_rings
21262126
sage: fx,fy = phi.rational_maps() # indirect doctest
@@ -2601,7 +2601,7 @@ def __compute_omega_general(self, E, psi, psi_pr, phi, phi_pr):
26012601
sage: phi._EllipticCurveIsogeny__compute_omega_general(E, psi, psi_pr, fi, fi_pr)
26022602
(x^3 + (alpha^2 + 1)*x^2 + (alpha^2 + 1)*x + alpha)*y + (alpha^2 + alpha + 1)*x^2 + (alpha^2 + alpha)*x + alpha
26032603
2604-
A bug fixed in :trac:`7907`::
2604+
A bug fixed in :issue:`7907`::
26052605
26062606
sage: # needs sage.rings.finite_rings
26072607
sage: F = GF(128,'a')
@@ -3151,7 +3151,7 @@ def dual(self):
31513151
31523152
TESTS:
31533153
3154-
Test for :trac:`23928`::
3154+
Test for :issue:`23928`::
31553155
31563156
sage: E = EllipticCurve(j=GF(431**2)(4)) # needs sage.rings.finite_rings
31573157
sage: phi = E.isogeny(E.lift_x(0)) # needs sage.rings.finite_rings
@@ -3160,7 +3160,7 @@ def dual(self):
31603160
from Elliptic Curve defined by y^2 = x^3 + 427*x over Finite Field in z2 of size 431^2
31613161
to Elliptic Curve defined by y^2 = x^3 + x over Finite Field in z2 of size 431^2
31623162
3163-
Test (for :trac:`7096`)::
3163+
Test (for :issue:`7096`)::
31643164
31653165
sage: E = EllipticCurve('11a1')
31663166
sage: phi = E.isogeny(E(5,5))
@@ -3186,7 +3186,7 @@ def dual(self):
31863186
from Elliptic Curve defined by y^2 + x*y = x^3 + 84*x + 34 over Finite Field of size 103
31873187
to Elliptic Curve defined by y^2 + x*y = x^3 + x + 102 over Finite Field of size 103
31883188
3189-
Check that :trac:`17293` is fixed::
3189+
Check that :issue:`17293` is fixed::
31903190
31913191
sage: # needs sage.rings.number_field
31923192
sage: k.<s> = QuadraticField(2)
@@ -3197,6 +3197,18 @@ def dual(self):
31973197
sage: phi._EllipticCurveIsogeny__clear_cached_values() # forget the dual
31983198
sage: -phi.dual() == (-phi).dual()
31993199
True
3200+
3201+
Check that :issue:`37168` is fixed::
3202+
3203+
sage: R.<x> = GF(23)[]
3204+
sage: F.<a> = FiniteField(23^2, modulus=x^2-x+1)
3205+
sage: E0 = EllipticCurve(F, (0, 1))
3206+
sage: E1 = EllipticCurve(F, (8, 1))
3207+
sage: phi = E0.isogeny(kernel=E0((a, 0)), codomain=E1)
3208+
sage: phi.dual()
3209+
Isogeny of degree 2
3210+
from Elliptic Curve defined by y^2 = x^3 + 8*x + 1 over Finite Field in a of size 23^2
3211+
to Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field in a of size 23^2
32003212
"""
32013213
if self.__base_field.characteristic() in (2, 3):
32023214
raise NotImplementedError("computation of dual isogenies not yet implemented in characteristics 2 and 3")
@@ -3260,17 +3272,18 @@ def dual(self):
32603272
E2 = E2pr.change_weierstrass_model(u/F(d), 0, 0, 0)
32613273

32623274
phi_hat = EllipticCurveIsogeny(E1, None, E2, d)
3263-
3264-
pre_iso = self._codomain.isomorphism_to(E1)
3265-
post_iso = E2.isomorphism_to(self._domain)
3266-
32673275
# assert phi_hat.scaling_factor() == 1
3268-
sc = u * pre_iso.scaling_factor() * post_iso.scaling_factor() / F(d)
3269-
if not sc.is_one():
3270-
auts = self._codomain.automorphisms()
3271-
aut = [a for a in auts if a.u == sc]
3272-
assert len(aut) == 1, "bug in dual()"
3273-
pre_iso *= aut[0]
3276+
3277+
for pre_iso in self._codomain.isomorphisms(E1):
3278+
for post_iso in E2.isomorphisms(self._domain):
3279+
sc = u * pre_iso.scaling_factor() * post_iso.scaling_factor()
3280+
if sc == d:
3281+
break
3282+
else:
3283+
continue
3284+
break
3285+
else:
3286+
assert "bug in dual()"
32743287

32753288
phi_hat._set_pre_isomorphism(pre_iso)
32763289
phi_hat._set_post_isomorphism(post_iso)

0 commit comments

Comments
 (0)