Skip to content

Commit 44549f6

Browse files
author
Matthias Koeppe
committed
Merge branch 'fix-doctests-elliptic-curves' into feature_definitions
2 parents 0c42086 + 6b5b82c commit 44549f6

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

src/sage/schemes/elliptic_curves/heegner.py

+15-13
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
sage: E = EllipticCurve('43a'); P = E.heegner_point(-7)
4848
sage: P.x_poly_exact()
4949
x
50-
sage: P.point_exact()
51-
(0 : 0 : 1)
50+
sage: z = P.point_exact(); z == E(0,0,1) or -z == E(0,0,1)
51+
True
5252
5353
sage: E = EllipticCurve('997a')
5454
sage: E.rank()
@@ -58,16 +58,17 @@
5858
sage: P = E.heegner_point(-19)
5959
sage: P.x_poly_exact()
6060
x - 141/49
61-
sage: P.point_exact()
62-
(141/49 : -162/343 : 1)
61+
sage: z = P.point_exact(); z == E(141/49, -162/343, 1) or -z == E(141/49, -162/343, 1)
62+
True
6363
6464
Here we find that the Heegner point generates a subgroup of index 3::
6565
6666
sage: E = EllipticCurve('92b1')
6767
sage: E.heegner_discriminants_list(1)
6868
[-7]
69-
sage: P = E.heegner_point(-7); z = P.point_exact(); z
70-
(0 : 1 : 1)
69+
sage: P = E.heegner_point(-7)
70+
sage: z = P.point_exact(); z == E(0, 1, 1) or -z == E(0, 1, 1)
71+
True
7172
sage: E.regulator()
7273
0.0498083972980648
7374
sage: z.height()
@@ -6421,8 +6422,8 @@ def ell_heegner_point(self, D, c=ZZ(1), f=None, check=True):
64216422
[-7, -11, -40, -47, -67, -71, -83, -84, -95, -104]
64226423
sage: P = E.heegner_point(-7); P # indirect doctest
64236424
Heegner point of discriminant -7 on elliptic curve of conductor 37
6424-
sage: P.point_exact()
6425-
(0 : 0 : 1)
6425+
sage: z = P.point_exact(); z == E(0, 0, 1) or -z == E(0, 0, 1)
6426+
True
64266427
sage: P.curve()
64276428
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
64286429
sage: P = E.heegner_point(-40).point_exact(); P
@@ -7139,14 +7140,15 @@ def heegner_sha_an(self, D, prec=53):
71397140
2.3 in [GZ1986]_ page 311, then that conjecture is
71407141
false, as the following example shows::
71417142
7142-
sage: E = EllipticCurve('65a') # long time
7143-
sage: E.heegner_sha_an(-56) # long time
7143+
sage: # long time
7144+
sage: E = EllipticCurve('65a')
7145+
sage: E.heegner_sha_an(-56)
71447146
1.00000000000000
7145-
sage: E.torsion_order() # long time
7147+
sage: E.torsion_order()
71467148
2
7147-
sage: E.tamagawa_product() # long time
7149+
sage: E.tamagawa_product()
71487150
1
7149-
sage: E.quadratic_twist(-56).rank() # long time
7151+
sage: E.quadratic_twist(-56).rank()
71507152
2
71517153
"""
71527154
# check conditions, then return from cache if possible.

src/sage/schemes/elliptic_curves/hom_frobenius.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,14 @@ def _eval(self, P):
269269
sage: from sage.schemes.elliptic_curves.hom_frobenius import EllipticCurveHom_frobenius
270270
sage: E = EllipticCurve(GF(11), [1,1])
271271
sage: pi = EllipticCurveHom_frobenius(E)
272-
sage: P = E.change_ring(GF(11^6)).lift_x(GF(11^3).gen()); P
273-
(6*z6^5 + 8*z6^4 + 8*z6^3 + 6*z6^2 + 10*z6 + 5 : 2*z6^5 + 2*z6^4 + 2*z6^3 + 4*z6 + 6 : 1)
274-
sage: pi._eval(P)
275-
(z6^5 + 3*z6^4 + 3*z6^3 + 6*z6^2 + 9 : z6^5 + 10*z6^4 + 10*z6^3 + 5*z6^2 + 4*z6 + 8 : 1)
272+
sage: Ebar = E.change_ring(GF(11^6))
273+
sage: z6 = GF(11^6).gen()
274+
sage: P = Ebar.lift_x(GF(11^3).gen())
275+
sage: p = Ebar(6*z6^5 + 8*z6^4 + 8*z6^3 + 6*z6^2 + 10*z6 + 5, 2*z6^5 + 2*z6^4 + 2*z6^3 + 4*z6 + 6, 1)
276+
sage: Q = pi._eval(P)
277+
sage: q = Ebar(z6^5 + 3*z6^4 + 3*z6^3 + 6*z6^2 + 9, z6^5 + 10*z6^4 + 10*z6^3 + 5*z6^2 + 4*z6 + 8, 1)
278+
sage: (P == p and Q == q) or (P == -p and Q == -q)
279+
True
276280
"""
277281
if self._domain.defining_polynomial()(*P):
278282
raise ValueError(f'{P} not on {self._domain}')

0 commit comments

Comments
 (0)