@@ -847,7 +847,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
847
847
848
848
TESTS:
849
849
850
- Domain and codomain tests (see :trac :`12880`)::
850
+ Domain and codomain tests (see :issue :`12880`)::
851
851
852
852
sage: E = EllipticCurve(QQ, [0,0,0,1,0])
853
853
sage: phi = EllipticCurveIsogeny(E, E(0,0))
@@ -863,7 +863,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
863
863
sage: phi.codomain()
864
864
Elliptic Curve defined by y^2 + x*y = x^3 + 24*x + 6 over Finite Field of size 31
865
865
866
- Composition tests (see :trac :`16245`, cf. :trac :`34410`)::
866
+ Composition tests (see :issue :`16245`, cf. :issue :`34410`)::
867
867
868
868
sage: E = EllipticCurve(j=GF(7)(0))
869
869
sage: phi = E.isogeny([E(0), E((0,1)), E((0,-1))]); phi
@@ -875,7 +875,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
875
875
From: Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
876
876
To: Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
877
877
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`)::
879
879
880
880
sage: # long time, needs sage.rings.number_field
881
881
sage: pol26 = hilbert_class_polynomial(-4*26)
@@ -891,7 +891,7 @@ class EllipticCurveIsogeny(EllipticCurveHom):
891
891
sage: iso3 = EL.isogenies_prime_degree(3); len(iso3)
892
892
2
893
893
894
- Examples over function fields used not to work (see :trac :`11327`)::
894
+ Examples over function fields used not to work (see :issue :`11327`)::
895
895
896
896
sage: F.<t> = FunctionField(QQ)
897
897
sage: E = EllipticCurve([0,0,0,-t^2,0])
@@ -1189,7 +1189,7 @@ def _call_(self, P):
1189
1189
1190
1190
TESTS:
1191
1191
1192
- Tests for :trac :`10888`::
1192
+ Tests for :issue :`10888`::
1193
1193
1194
1194
sage: # needs sage.rings.number_field
1195
1195
sage: x = polygen(ZZ, 'x')
@@ -1204,7 +1204,7 @@ def _call_(self, P):
1204
1204
sage: phihat(Q)
1205
1205
(-1/48 : 127/576*th : 1)
1206
1206
1207
- Call a composed isogeny (added for :trac :`16238`)::
1207
+ Call a composed isogeny (added for :issue :`16238`)::
1208
1208
1209
1209
sage: E = EllipticCurve(j=GF(7)(0))
1210
1210
sage: phi = E.isogeny([E(0), E((0,1)), E((0,-1))])
@@ -1214,7 +1214,7 @@ def _call_(self, P):
1214
1214
sage: phi2(E.points()[0])
1215
1215
(0 : 1 : 0)
1216
1216
1217
- Coercion works fine with :meth:`_call_` (added for :trac :`16238`)::
1217
+ Coercion works fine with :meth:`_call_` (added for :issue :`16238`)::
1218
1218
1219
1219
sage: # needs sage.rings.number_field
1220
1220
sage: K.<th> = NumberField(x^2 + 3)
@@ -1243,7 +1243,7 @@ def _call_(self, P):
1243
1243
sage: phi(Q)._order
1244
1244
27
1245
1245
1246
- Test for :trac :`35983`::
1246
+ Test for :issue :`35983`::
1247
1247
1248
1248
sage: E = EllipticCurve([1,0,0,-1,0])
1249
1249
sage: P = E([1,0])
@@ -2106,7 +2106,7 @@ def __compute_via_velu(self, xP, yP):
2106
2106
2107
2107
TESTS:
2108
2108
2109
- Check for :trac :`33214`::
2109
+ Check for :issue :`33214`::
2110
2110
2111
2111
sage: # needs sage.rings.finite_rings
2112
2112
sage: z2 = GF(71^2).gen()
@@ -2120,7 +2120,7 @@ def __compute_via_velu(self, xP, yP):
2120
2120
(33 : 61*z2 + 10 : 1)
2121
2121
2122
2122
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`)::
2124
2124
2125
2125
sage: # needs sage.rings.finite_rings
2126
2126
sage: fx,fy = phi.rational_maps() # indirect doctest
@@ -2601,7 +2601,7 @@ def __compute_omega_general(self, E, psi, psi_pr, phi, phi_pr):
2601
2601
sage: phi._EllipticCurveIsogeny__compute_omega_general(E, psi, psi_pr, fi, fi_pr)
2602
2602
(x^3 + (alpha^2 + 1)*x^2 + (alpha^2 + 1)*x + alpha)*y + (alpha^2 + alpha + 1)*x^2 + (alpha^2 + alpha)*x + alpha
2603
2603
2604
- A bug fixed in :trac :`7907`::
2604
+ A bug fixed in :issue :`7907`::
2605
2605
2606
2606
sage: # needs sage.rings.finite_rings
2607
2607
sage: F = GF(128,'a')
@@ -3151,7 +3151,7 @@ def dual(self):
3151
3151
3152
3152
TESTS:
3153
3153
3154
- Test for :trac :`23928`::
3154
+ Test for :issue :`23928`::
3155
3155
3156
3156
sage: E = EllipticCurve(j=GF(431**2)(4)) # needs sage.rings.finite_rings
3157
3157
sage: phi = E.isogeny(E.lift_x(0)) # needs sage.rings.finite_rings
@@ -3160,7 +3160,7 @@ def dual(self):
3160
3160
from Elliptic Curve defined by y^2 = x^3 + 427*x over Finite Field in z2 of size 431^2
3161
3161
to Elliptic Curve defined by y^2 = x^3 + x over Finite Field in z2 of size 431^2
3162
3162
3163
- Test (for :trac :`7096`)::
3163
+ Test (for :issue :`7096`)::
3164
3164
3165
3165
sage: E = EllipticCurve('11a1')
3166
3166
sage: phi = E.isogeny(E(5,5))
@@ -3186,7 +3186,7 @@ def dual(self):
3186
3186
from Elliptic Curve defined by y^2 + x*y = x^3 + 84*x + 34 over Finite Field of size 103
3187
3187
to Elliptic Curve defined by y^2 + x*y = x^3 + x + 102 over Finite Field of size 103
3188
3188
3189
- Check that :trac :`17293` is fixed::
3189
+ Check that :issue :`17293` is fixed::
3190
3190
3191
3191
sage: # needs sage.rings.number_field
3192
3192
sage: k.<s> = QuadraticField(2)
@@ -3197,6 +3197,18 @@ def dual(self):
3197
3197
sage: phi._EllipticCurveIsogeny__clear_cached_values() # forget the dual
3198
3198
sage: -phi.dual() == (-phi).dual()
3199
3199
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
3200
3212
"""
3201
3213
if self .__base_field .characteristic () in (2 , 3 ):
3202
3214
raise NotImplementedError ("computation of dual isogenies not yet implemented in characteristics 2 and 3" )
@@ -3260,17 +3272,18 @@ def dual(self):
3260
3272
E2 = E2pr .change_weierstrass_model (u / F (d ), 0 , 0 , 0 )
3261
3273
3262
3274
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
-
3267
3275
# 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()"
3274
3287
3275
3288
phi_hat ._set_pre_isomorphism (pre_iso )
3276
3289
phi_hat ._set_post_isomorphism (post_iso )
0 commit comments