Ticket #11130: 11130_reviewer32.patch
File 11130_reviewer32.patch, 33.6 KB (added by , 11 years ago) |
---|
-
sage/rings/number_field/number_field_ideal.py
# HG changeset patch # User Jeroen Demeyer <jdemeyer@cage.ugent.be> # Date 1306309961 -7200 # Node ID 7699ace8be6dfb76e3d88164b4d581b90bb314f1 # Parent 35cda75bc998e963b5a76e791a50a50326a8b113 Fix additional 32-bit doctest failures diff --git a/sage/rings/number_field/number_field_ideal.py b/sage/rings/number_field/number_field_ideal.py
a b 1083 1083 [1] 1084 1084 sage: I._S_ideal_class_log([]) 1085 1085 [3] 1086 1087 TESTS:: 1088 1086 1089 sage: K.<a> = QuadraticField(-974) 1087 1090 sage: S = K.primes_above(2) 1088 sage: [P._S_ideal_class_log(S) for P in K.primes_above(11)] 1089 [[5, 2], [1, 1]] 1091 sage: G = K.S_class_group(S) 1092 sage: I0 = G.0.ideal(); I1 = G.1.ideal() 1093 sage: for p in prime_range(100): 1094 ... for P in K.primes_above(p): 1095 ... v = P._S_ideal_class_log(S) 1096 ... assert(G(P) == G(I0^v[0] * I1^v[1])) 1090 1097 """ 1091 1098 from sage.modules.free_module_element import vector 1092 1099 from sage.rings.finite_rings.integer_mod_ring import Zmod … … 1105 1112 """ 1106 1113 Return True iff self is the zero ideal 1107 1114 1115 Note that `(0)` is a ``NumberFieldIdeal``, not a 1116 ``NumberFieldFractionalIdeal``. 1117 1108 1118 EXAMPLES:: 1109 1119 1110 1120 sage: K.<a> = NumberField(x^2 + 2); K … … 1115 1125 True 1116 1126 sage: I 1117 1127 Ideal (0) of Number Field in a with defining polynomial x^2 + 2 1118 1119 (0 is a NumberFieldIdeal, not a NumberFieldFractionIdeal)1120 1128 """ 1121 1129 return self == self.number_field().ideal(0) 1122 1130 -
sage/schemes/elliptic_curves/ell_number_field.py
diff --git a/sage/schemes/elliptic_curves/ell_number_field.py b/sage/schemes/elliptic_curves/ell_number_field.py
a b 2 2 r""" 3 3 Elliptic curves over number fields 4 4 5 An elliptic curve `E` over a number field `K` can be given 5 An elliptic curve `E` over a number field `K` can be given 6 6 by a Weierstrass equation whose coefficients lie in `K` or by 7 7 using ``base_extend`` on an elliptic curve defined over a subfield. 8 8 9 9 One major difference to elliptic curves over `\QQ` is that there 10 10 might not exist a global minimal equation over `K`, when `K` does 11 11 not have class number one. 12 Another difference is the lack of understanding of modularity for 12 Another difference is the lack of understanding of modularity for 13 13 general elliptic curves over general number fields. 14 14 15 15 Currently Sage can obtain local information about `E/K_v` for finite places … … 67 67 68 68 REFERENCE: 69 69 70 - [Sil] Silverman, Joseph H. The arithmetic of elliptic curves. Second edition. Graduate Texts in 70 - [Sil] Silverman, Joseph H. The arithmetic of elliptic curves. Second edition. Graduate Texts in 71 71 Mathematics, 106. Springer, 2009. 72 72 73 - [Sil2] Silverman, Joseph H. Advanced topics in the arithmetic of elliptic curves. Graduate Texts in 74 Mathematics, 151. Springer, 1994. 73 - [Sil2] Silverman, Joseph H. Advanced topics in the arithmetic of elliptic curves. Graduate Texts in 74 Mathematics, 151. Springer, 1994. 75 75 """ 76 76 77 77 #***************************************************************************** … … 163 163 self._point_class = ell_point.EllipticCurvePoint_number_field 164 164 165 165 def simon_two_descent(self, verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): 166 r""" 166 r""" 167 167 Computes lower and upper bounds on the rank of the Mordell-Weil group, 168 168 and a list of independent points. Used internally by the :meth:`~rank`, 169 169 :meth:`~rank_bounds` and :meth:`~gens` methods. … … 297 297 298 298 - points - either a list of points, which must be on this 299 299 curve, or (default) None, in which case self.gens() will be 300 used. 300 used. 301 301 302 302 - precision - number of bits of precision of result 303 303 (default: None, for default RealField precision) … … 362 362 for j in range(r): 363 363 mat[j,j] = points[j].height(precision=precision) 364 364 for j in range(r): 365 for k in range(j+1,r): 365 for k in range(j+1,r): 366 366 mat[j,k]=((points[j]+points[k]).height(precision=precision) - mat[j,j] - mat[k,k])/2 367 367 mat[k,j]=mat[j,k] 368 368 return mat … … 380 380 381 381 EXAMPLES:: 382 382 383 sage: E = EllipticCurve('37a1') 383 sage: E = EllipticCurve('37a1') 384 384 sage: P = E(0,0) 385 385 sage: Q = E(1,0) 386 386 sage: E.regulator_of_points([P,Q]) … … 392 392 393 393 sage: E = EllipticCurve('5077a1') 394 394 sage: points = [E.lift_x(x) for x in [-2,-7/4,1]] 395 sage: E.regulator_of_points(points) 395 sage: E.regulator_of_points(points) 396 396 0.417143558758384 397 397 sage: E.regulator_of_points(points,precision=100) 398 398 0.41714355875838396981711954462 399 399 400 400 :: 401 401 402 sage: E = EllipticCurve('389a') 403 sage: E.regulator_of_points() 402 sage: E = EllipticCurve('389a') 403 sage: E.regulator_of_points() 404 404 1.00000000000000 405 sage: points = [P,Q] = [E(-1,1),E(0,-1)] 406 sage: E.regulator_of_points(points) 405 sage: points = [P,Q] = [E(-1,1),E(0,-1)] 406 sage: E.regulator_of_points(points) 407 407 0.152460177943144 408 408 sage: E.regulator_of_points(points, precision=100) 409 409 0.15246017794314375162432475705 410 sage: E.regulator_of_points(points, precision=200) 410 sage: E.regulator_of_points(points, precision=200) 411 411 0.15246017794314375162432475704945582324372707748663081784028 412 412 sage: E.regulator_of_points(points, precision=300) 413 413 0.152460177943143751624324757049455823243727077486630817840280980046053225683562463604114816 … … 495 495 return forall(self.ainvs(), lambda x : x.valuation(P) >= 0)[0] 496 496 497 497 def local_integral_model(self,*P): 498 r""" 498 r""" 499 499 Return a model of self which is integral at the prime ideal 500 500 `P`. 501 501 … … 584 584 integral_model = global_integral_model 585 585 586 586 def _reduce_model(self): 587 r""" 587 r""" 588 588 589 589 Transforms the elliptic curve to a model in which `a_1`, 590 590 `a_2`, `a_3` are reduced modulo 2, 3, 2 respectively. … … 688 688 Minimal discriminant valuation: 1 689 689 Conductor exponent: 1 690 690 Kodaira Symbol: I1 691 Tamagawa Number: 1, 691 Tamagawa Number: 1, 692 692 Local data at Fractional ideal (-3*i - 2): 693 693 Reduction type: bad split multiplicative 694 694 Local minimal model: Elliptic Curve defined by y^2 + (i+1)*x*y + y = x^3 over Number Field in i with defining polynomial x^2 + 1 … … 729 729 from sage.schemes.elliptic_curves.ell_local_data import check_prime 730 730 P = check_prime(self.base_field(),P) 731 731 732 return self._get_local_data(P,proof,algorithm) 732 return self._get_local_data(P,proof,algorithm) 733 733 734 734 def _get_local_data(self, P, proof, algorithm="pari"): 735 735 r""" … … 782 782 self._local_data = {} 783 783 except KeyError: 784 784 pass 785 from sage.schemes.elliptic_curves.ell_local_data import EllipticCurveLocalData 785 from sage.schemes.elliptic_curves.ell_local_data import EllipticCurveLocalData 786 786 self._local_data[P, proof, algorithm] = EllipticCurveLocalData(self, P, proof, algorithm) 787 return self._local_data[P, proof, algorithm] 787 return self._local_data[P, proof, algorithm] 788 788 789 789 def local_minimal_model(self, P, proof = None, algorithm="pari"): 790 790 r""" … … 862 862 sage: K.<a>=NumberField(x^3-2) 863 863 sage: P17a, P17b = [P for P,e in K.factor(17)] 864 864 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 865 sage: [(p,E.has_good_reduction(p)) for p in [P17a,P17b]] 865 sage: [(p,E.has_good_reduction(p)) for p in [P17a,P17b]] 866 866 [(Fractional ideal (4*a^2 - 2*a + 1), True), 867 867 (Fractional ideal (2*a + 1), False)] 868 """ 868 """ 869 869 return self.local_data(P).has_good_reduction() 870 870 871 871 def has_bad_reduction(self, P): … … 896 896 sage: K.<a>=NumberField(x^3-2) 897 897 sage: P17a, P17b = [P for P,e in K.factor(17)] 898 898 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 899 sage: [(p,E.has_bad_reduction(p)) for p in [P17a,P17b]] 899 sage: [(p,E.has_bad_reduction(p)) for p in [P17a,P17b]] 900 900 [(Fractional ideal (4*a^2 - 2*a + 1), False), 901 901 (Fractional ideal (2*a + 1), True)] 902 902 """ … … 930 930 sage: K.<a>=NumberField(x^3-2) 931 931 sage: P17a, P17b = [P for P,e in K.factor(17)] 932 932 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 933 sage: [(p,E.has_multiplicative_reduction(p)) for p in [P17a,P17b]] 933 sage: [(p,E.has_multiplicative_reduction(p)) for p in [P17a,P17b]] 934 934 [(Fractional ideal (4*a^2 - 2*a + 1), False), (Fractional ideal (2*a + 1), False)] 935 935 """ 936 936 return self.local_data(P).has_multiplicative_reduction() … … 958 958 sage: K.<a>=NumberField(x^3-2) 959 959 sage: P17a, P17b = [P for P,e in K.factor(17)] 960 960 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 961 sage: [(p,E.has_split_multiplicative_reduction(p)) for p in [P17a,P17b]] 961 sage: [(p,E.has_split_multiplicative_reduction(p)) for p in [P17a,P17b]] 962 962 [(Fractional ideal (4*a^2 - 2*a + 1), False), (Fractional ideal (2*a + 1), False)] 963 963 """ 964 964 return self.local_data(P).has_split_multiplicative_reduction() … … 986 986 sage: K.<a>=NumberField(x^3-2) 987 987 sage: P17a, P17b = [P for P,e in K.factor(17)] 988 988 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 989 sage: [(p,E.has_nonsplit_multiplicative_reduction(p)) for p in [P17a,P17b]] 989 sage: [(p,E.has_nonsplit_multiplicative_reduction(p)) for p in [P17a,P17b]] 990 990 [(Fractional ideal (4*a^2 - 2*a + 1), False), (Fractional ideal (2*a + 1), False)] 991 991 """ 992 992 return self.local_data(P).has_nonsplit_multiplicative_reduction() … … 1013 1013 sage: K.<a>=NumberField(x^3-2) 1014 1014 sage: P17a, P17b = [P for P,e in K.factor(17)] 1015 1015 sage: E = EllipticCurve([0,0,0,0,2*a+1]) 1016 sage: [(p,E.has_additive_reduction(p)) for p in [P17a,P17b]] 1016 sage: [(p,E.has_additive_reduction(p)) for p in [P17a,P17b]] 1017 1017 [(Fractional ideal (4*a^2 - 2*a + 1), False), 1018 1018 (Fractional ideal (2*a + 1), True)] 1019 1019 """ … … 1111 1111 def tamagawa_product_bsd(self): 1112 1112 r""" 1113 1113 Given an elliptic curve `E` over a number field `K`, this function returns the 1114 integer `C(E/K)` that appears in the Birch and Swinnerton-Dyer conjecture accounting 1114 integer `C(E/K)` that appears in the Birch and Swinnerton-Dyer conjecture accounting 1115 1115 for the local information at finite places. If the model is a global minimal model then `C(E/K)` is 1116 simply the product of the Tamagawa numbers `c_v` where `v` runs over all prime ideals of `K`. Otherwise, if the model has to be changed at a place `v` a correction factor appears. 1116 simply the product of the Tamagawa numbers `c_v` where `v` runs over all prime ideals of `K`. Otherwise, if the model has to be changed at a place `v` a correction factor appears. 1117 1117 The definition is such that `C(E/K)` times the periods at the infinite places is invariant 1118 1118 under change of the Weierstrass model. See [Ta2] and [Do] for details. 1119 1119 … … 1162 1162 1163 1163 """ 1164 1164 da = self.local_data() 1165 pr = 1 1165 pr = 1 1166 1166 for dav in da: 1167 1167 pp = dav.prime() 1168 1168 cv = dav.tamagawa_number() … … 1203 1203 sage: K.<a>=NumberField(x^2-5) 1204 1204 sage: E=EllipticCurve([20, 225, 750, 625*a + 6875, 31250*a + 46875]) 1205 1205 sage: bad_primes = E.discriminant().support(); bad_primes 1206 [Fractional ideal (a), Fractional ideal (7/2*a - 81/2), Fractional ideal (-a - 52), Fractional ideal (2)] # 32-bit 1207 [Fractional ideal (-a), Fractional ideal (7/2*a - 81/2), Fractional ideal (-a - 52), Fractional ideal (2)] # 64-bit 1206 [Fractional ideal (-a), Fractional ideal (7/2*a - 81/2), Fractional ideal (-a - 52), Fractional ideal (2)] 1208 1207 sage: [E.kodaira_symbol(P) for P in bad_primes] 1209 1208 [I0, I1, I1, II] 1210 1209 sage: K.<a> = QuadraticField(-11) … … 1348 1347 sage: v = K.fractional_ideal(2*i+3) 1349 1348 sage: EK.reduction(v) 1350 1349 Elliptic Curve defined by y^2 = x^3 + 5*x + 8 over Residue field of Fractional ideal (2*i + 3) 1351 sage: EK.reduction(K.ideal(1+i)) 1350 sage: EK.reduction(K.ideal(1+i)) 1352 1351 Traceback (most recent call last): 1353 ... 1352 ... 1354 1353 ValueError: The curve must have good reduction at the place. 1355 sage: EK.reduction(K.ideal(2)) 1354 sage: EK.reduction(K.ideal(2)) 1356 1355 Traceback (most recent call last): 1357 ... 1356 ... 1358 1357 ValueError: The ideal must be prime. 1359 1358 sage: K=QQ.extension(x^2+x+1,"a") 1360 sage: E=EllipticCurve([1024*K.0,1024*K.0]) 1359 sage: E=EllipticCurve([1024*K.0,1024*K.0]) 1361 1360 sage: E.reduction(2*K) 1362 1361 Elliptic Curve defined by y^2 + (abar+1)*y = x^3 over Residue field in abar of Fractional ideal (2) 1363 1362 """ … … 1375 1374 if local_data.has_good_reduction(): 1376 1375 Fv = OK.residue_field(place) 1377 1376 return local_data.minimal_model().change_ring(Fv) 1378 raise ValueError, "The curve must have good reduction at the place." 1377 raise ValueError, "The curve must have good reduction at the place." 1379 1378 Fv = OK.residue_field(place) 1380 1379 return self.change_ring(Fv) 1381 1380 … … 1402 1401 1403 1402 EXAMPLES:: 1404 1403 1405 sage: CDB=CremonaDatabase() 1404 sage: CDB=CremonaDatabase() 1406 1405 sage: [E._torsion_bound() for E in CDB.iter([14])] 1407 1406 [6, 6, 6, 6, 6, 6] 1408 sage: [E.torsion_order() for E in CDB.iter([14])] 1409 [6, 6, 2, 6, 2, 6] 1407 sage: [E.torsion_order() for E in CDB.iter([14])] 1408 [6, 6, 2, 6, 2, 6] 1410 1409 """ 1411 E = self 1410 E = self 1412 1411 bound = 0 1413 1412 k = 0 1414 1413 K = E.base_field() … … 1551 1550 sage: K.<t> = NumberField(x^4 + x^3 + 11*x^2 + 41*x + 101) 1552 1551 sage: EK = E.base_extend(K) 1553 1552 sage: EK.torsion_points() 1554 [(5 : 5 : 1), 1555 (5 : -6 : 1), 1556 (16 : -61 : 1), 1557 (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : 6/55*t^3 + 3/55*t^2 + 25/11*t + 156/55 : 1), 1558 (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : -7/121*t^3 + 24/121*t^2 + 197/121*t + 16/121 : 1), 1559 (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : -49/121*t^3 - 129/121*t^2 - 315/121*t - 207/121 : 1), 1560 (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : 32/121*t^3 + 60/121*t^2 - 261/121*t - 807/121 : 1), 1561 (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : -6/11*t^3 - 3/11*t^2 - 26/11*t - 321/11 : 1), 1562 (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : 16/121*t^3 - 69/121*t^2 + 293/121*t - 46/121 : 1), 1563 (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : 7/55*t^3 - 24/55*t^2 + 9/11*t + 17/55 : 1), 1564 (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : 34/121*t^3 - 27/121*t^2 + 305/121*t + 708/121 : 1), 1565 (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : 15/121*t^3 + 156/121*t^2 - 232/121*t + 2766/121 : 1), 1566 (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : 6/11*t^3 + 3/11*t^2 + 26/11*t + 310/11 : 1), 1567 (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : -15/121*t^3 - 156/121*t^2 + 232/121*t - 2887/121 : 1), 1568 (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : -34/121*t^3 + 27/121*t^2 - 305/121*t - 829/121 : 1), 1569 (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : -7/55*t^3 + 24/55*t^2 - 9/11*t - 72/55 : 1), 1570 (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : -16/121*t^3 + 69/121*t^2 - 293/121*t - 75/121 : 1), 1571 (t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1), 1572 (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : -32/121*t^3 - 60/121*t^2 + 261/121*t + 686/121 : 1), 1573 (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : 49/121*t^3 + 129/121*t^2 + 315/121*t + 86/121 : 1), 1574 (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : 7/121*t^3 - 24/121*t^2 - 197/121*t - 137/121 : 1), 1575 (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : -6/55*t^3 - 3/55*t^2 - 25/11*t - 211/55 : 1), 1576 (0 : 1 : 0), 1577 (16 : 60 : 1), 1553 [(5 : 5 : 1), 1554 (5 : -6 : 1), 1555 (16 : -61 : 1), 1556 (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : 6/55*t^3 + 3/55*t^2 + 25/11*t + 156/55 : 1), 1557 (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : -7/121*t^3 + 24/121*t^2 + 197/121*t + 16/121 : 1), 1558 (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : -49/121*t^3 - 129/121*t^2 - 315/121*t - 207/121 : 1), 1559 (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : 32/121*t^3 + 60/121*t^2 - 261/121*t - 807/121 : 1), 1560 (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : -6/11*t^3 - 3/11*t^2 - 26/11*t - 321/11 : 1), 1561 (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : 16/121*t^3 - 69/121*t^2 + 293/121*t - 46/121 : 1), 1562 (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : 7/55*t^3 - 24/55*t^2 + 9/11*t + 17/55 : 1), 1563 (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : 34/121*t^3 - 27/121*t^2 + 305/121*t + 708/121 : 1), 1564 (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : 15/121*t^3 + 156/121*t^2 - 232/121*t + 2766/121 : 1), 1565 (1/11*t^3 - 5/11*t^2 + 19/11*t - 40/11 : 6/11*t^3 + 3/11*t^2 + 26/11*t + 310/11 : 1), 1566 (-26/121*t^3 + 20/121*t^2 - 219/121*t - 995/121 : -15/121*t^3 - 156/121*t^2 + 232/121*t - 2887/121 : 1), 1567 (-5/121*t^3 + 36/121*t^2 - 84/121*t + 24/121 : -34/121*t^3 + 27/121*t^2 - 305/121*t - 829/121 : 1), 1568 (3/55*t^3 + 7/55*t^2 + 2/55*t + 78/55 : -7/55*t^3 + 24/55*t^2 - 9/11*t - 72/55 : 1), 1569 (14/121*t^3 - 15/121*t^2 + 90/121*t + 232/121 : -16/121*t^3 + 69/121*t^2 - 293/121*t - 75/121 : 1), 1570 (t : -1/11*t^3 - 6/11*t^2 - 19/11*t - 59/11 : 1), 1571 (10/121*t^3 + 49/121*t^2 + 168/121*t + 73/121 : -32/121*t^3 - 60/121*t^2 + 261/121*t + 686/121 : 1), 1572 (5/121*t^3 - 14/121*t^2 - 158/121*t - 453/121 : 49/121*t^3 + 129/121*t^2 + 315/121*t + 86/121 : 1), 1573 (-9/121*t^3 - 21/121*t^2 - 127/121*t - 377/121 : 7/121*t^3 - 24/121*t^2 - 197/121*t - 137/121 : 1), 1574 (-3/55*t^3 - 7/55*t^2 - 2/55*t - 133/55 : -6/55*t^3 - 3/55*t^2 - 25/11*t - 211/55 : 1), 1575 (0 : 1 : 0), 1576 (16 : 60 : 1), 1578 1577 (t : 1/11*t^3 + 6/11*t^2 + 19/11*t + 48/11 : 1)] 1579 1578 1580 1579 :: … … 1583 1582 sage: K.<t> = NumberField(x^2 + 2*x + 10) 1584 1583 sage: EK = E.base_extend(K) 1585 1584 sage: EK.torsion_points() 1586 [(3 : -2 : 1), 1587 (8 : -27 : 1), 1588 (1/2 : 5/4*t + 1/2 : 1), 1589 (-t - 2 : 2*t + 8 : 1), 1590 (-7 : -5*t - 2 : 1), 1591 (-1 : 0 : 1), 1592 (-2 : 3 : 1), 1593 (-13/4 : 9/8 : 1), 1594 (-2 : -2 : 1), 1595 (t : -2*t + 4 : 1), 1596 (-7 : 5*t + 8 : 1), 1597 (-t - 2 : -t - 7 : 1), 1598 (1/2 : -5/4*t - 2 : 1), 1599 (0 : 1 : 0), 1600 (8 : 18 : 1), 1585 [(3 : -2 : 1), 1586 (8 : -27 : 1), 1587 (1/2 : 5/4*t + 1/2 : 1), 1588 (-t - 2 : 2*t + 8 : 1), 1589 (-7 : -5*t - 2 : 1), 1590 (-1 : 0 : 1), 1591 (-2 : 3 : 1), 1592 (-13/4 : 9/8 : 1), 1593 (-2 : -2 : 1), 1594 (t : -2*t + 4 : 1), 1595 (-7 : 5*t + 8 : 1), 1596 (-t - 2 : -t - 7 : 1), 1597 (1/2 : -5/4*t - 2 : 1), 1598 (0 : 1 : 0), 1599 (8 : 18 : 1), 1601 1600 (t : t - 5 : 1)] 1602 1601 1603 1602 :: 1604 1603 1605 1604 sage: K.<i> = QuadraticField(-1) 1606 sage: EK = EllipticCurve(K,[0,0,0,0,-1]) 1607 sage: EK.torsion_points () 1605 sage: EK = EllipticCurve(K,[0,0,0,0,-1]) 1606 sage: EK.torsion_points () 1608 1607 [(0 : -i : 1), (1 : 0 : 1), (0 : i : 1), (-2 : 3*i : 1), (0 : 1 : 0), (-2 : -3*i : 1)] 1609 1608 """ 1610 1609 T = self.torsion_subgroup() # make sure it is cached … … 1615 1614 Returns the lower and upper bounds using :meth:`~simon_two_descent`. 1616 1615 The results of :meth:`~simon_two_descent` are cached. 1617 1616 1618 .. NOTE:: 1617 .. NOTE:: 1619 1618 1620 1619 The optional parameters control the Simon two descent algorithm; 1621 1620 see the documentation of :meth:`~simon_two_descent` for more 1622 1621 details. 1623 1622 1624 INPUT: 1623 INPUT: 1625 1624 1626 1625 - ``verbose`` -- 0, 1, 2, or 3 (default: 0), the verbosity level 1627 1626 … … 1660 1659 bounds on the rank:: 1661 1660 1662 1661 sage: Qrt5.<rt5>=NumberField(x^2-5) 1663 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1662 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1664 1663 sage: E.rank_bounds() 1665 1664 (1, 2) 1666 1665 … … 1678 1677 r""" 1679 1678 Return the rank of this elliptic curve, if it can be determined. 1680 1679 1681 .. NOTE:: 1680 .. NOTE:: 1682 1681 1683 1682 The optional parameters control the Simon two descent algorithm; 1684 1683 see the documentation of :meth:`~simon_two_descent` for more 1685 1684 details. 1686 1685 1687 INPUT: 1686 INPUT: 1688 1687 1689 1688 - ``verbose`` -- 0, 1, 2, or 3 (default: 0), the verbosity level 1690 1689 … … 1704 1703 1705 1704 If the upper and lower bounds given by Simon two-descent are 1706 1705 the same, then the rank has been uniquely identified and we 1707 return this. Otherwise, we raise a ValueError with an error 1708 message specifying the upper and lower bounds. 1706 return this. Otherwise, we raise a ValueError with an error 1707 message specifying the upper and lower bounds. 1709 1708 1710 1709 .. NOTE:: 1711 1710 … … 1725 1724 algorithm do not uniquely determine the rank:: 1726 1725 1727 1726 sage: Qrt5.<rt5>=NumberField(x^2-5) 1728 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1727 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1729 1728 sage: E.rank() 1730 1729 Traceback (most recent call last): 1731 ... 1730 ... 1732 1731 ValueError: There is insufficient data to determine the rank - 1733 1732 2-descent gave lower bound 1 and upper bound 2 1734 1733 … … 1742 1741 lower,upper = self.rank_bounds(verbose=verbose,lim1=lim1,lim3=lim3,limtriv=limtriv,maxprob=maxprob,limbigprime=limbigprime) 1743 1742 if lower == upper: 1744 1743 return lower 1745 else: 1744 else: 1746 1745 raise ValueError, 'There is insufficient data to determine the rank - 2-descent gave lower bound %s and upper bound %s' % (lower, upper) 1747 1746 1748 1747 def gens(self,verbose=0, lim1=5, lim3=50, limtriv=10, maxprob=20, limbigprime=30): … … 1750 1749 Returns some generators of this elliptic curve. Check :meth:`~rank` or 1751 1750 :meth:`~rank_bounds` to verify the number of generators. 1752 1751 1753 .. NOTE:: 1752 .. NOTE:: 1754 1753 1755 1754 The optional parameters control the Simon two descent algorithm; 1756 1755 see the documentation of :meth:`~simon_two_descent` for more 1757 1756 details. 1758 1757 1759 INPUT: 1758 INPUT: 1760 1759 1761 1760 - ``verbose`` -- 0, 1, 2, or 3 (default: 0), the verbosity level 1762 1761 … … 1795 1794 uniquely determine the rank:: 1796 1795 1797 1796 sage: Qrt5.<rt5>=NumberField(x^2-5) 1798 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1797 sage: E=EllipticCurve([0,5-rt5,0,rt5,0]) 1799 1798 sage: E.gens() 1800 1799 [(3/2*rt5 + 5/2 : -9/2*rt5 - 15/2 : 1), (-1/2*rt5 + 3/2 : 3/2*rt5 - 9/2 : 1), (0 : 0 : 1)] 1801 1800 … … 1817 1816 1818 1817 - ``embedding`` - an embedding of the base number field into `\RR` or `\CC`. 1819 1818 1820 .. note:: 1819 .. note:: 1821 1820 1822 1821 The precision of the embedding is ignored: we only use the 1823 1822 given embedding to determine which embedding into ``QQbar`` … … 1830 1829 First define a field with two real embeddings:: 1831 1830 1832 1831 sage: K.<a> = NumberField(x^3-2) 1833 sage: E=EllipticCurve([0,0,0,a,2]) 1832 sage: E=EllipticCurve([0,0,0,a,2]) 1834 1833 sage: embs=K.embeddings(CC); len(embs) 1835 1834 3 1836 1835 … … 1902 1901 sage: E1 = EllipticCurve(F, [7,8]) 1903 1902 sage: E2 = EllipticCurve(F, [0,5,0,1,0]) 1904 1903 sage: E3 = EllipticCurve(F, [0,-10,0,21,0]) 1905 sage: E1.is_isogenous(E2) 1904 sage: E1.is_isogenous(E2) 1906 1905 False 1907 sage: E1.is_isogenous(E1) 1906 sage: E1.is_isogenous(E1) 1908 1907 True 1909 1908 sage: E2.is_isogenous(E2) 1910 1909 True 1911 sage: E2.is_isogenous(E1) 1910 sage: E2.is_isogenous(E1) 1912 1911 False 1913 sage: E2.is_isogenous(E3) 1912 sage: E2.is_isogenous(E3) 1914 1913 True 1915 1914 1916 :: 1915 :: 1917 1916 1918 1917 sage: x = polygen(QQ, 'x') 1919 1918 sage: F = NumberField(x^2 -2, 's'); F … … 1962 1961 True 1963 1962 sage: E3.is_isogenous(E2) 1964 1963 True 1965 sage: E1.isogeny_degree(E2) 1964 sage: E1.isogeny_degree(E2) 1966 1965 9 1967 1966 1968 1967 """ … … 2041 2040 sage: x = QQ['x'].0 2042 2041 sage: F = NumberField(x^2 -2, 's'); F 2043 2042 Number Field in s with defining polynomial x^2 - 2 2044 sage: E = EllipticCurve('14a1') 2043 sage: E = EllipticCurve('14a1') 2045 2044 sage: EE = EllipticCurve('14a2') 2046 2045 sage: E1 = E.change_ring(F) 2047 2046 sage: E2 = EE.change_ring(F) 2048 2047 sage: E1.isogeny_degree(E2) 2049 2048 2 2050 sage: E2.isogeny_degree(E2) 2049 sage: E2.isogeny_degree(E2) 2051 2050 1 2052 sage: E5 = EllipticCurve('14a5').change_ring(F) 2051 sage: E5 = EllipticCurve('14a5').change_ring(F) 2053 2052 sage: E1.isogeny_degree(E5) 2054 2053 6 2055 2054 """ -
sage/schemes/elliptic_curves/ell_rational_field.py
diff --git a/sage/schemes/elliptic_curves/ell_rational_field.py b/sage/schemes/elliptic_curves/ell_rational_field.py
a b 1462 1462 1463 1463 :: 1464 1464 1465 sage: E = EllipticCurve([1, -1, 0, -751055859, -7922219731979]) # long time (0.6 seconds)1466 sage: set_random_seed(0) # long time1467 sage: E.simon_two_descent () # long time1465 sage: E = EllipticCurve([1, -1, 0, -751055859, -7922219731979]) 1466 sage: set_random_seed(0) 1467 sage: E.simon_two_descent() 1468 1468 (1, 1, []) 1469 1469 1470 1470 The rest of these entries were taken from Tom Womack's page … … 1494 1494 (8, 8) 1495 1495 1496 1496 Example from trac 10832:: 1497 1497 1498 sage: E = EllipticCurve([1,0,0,-6664,86543]) 1498 1499 sage: E.simon_two_descent() 1499 1500 (2, 3, [(173 : 1943 : 1), (-73 : -394 : 1), (323/4 : 1891/8 : 1)]) … … 1622 1623 2 1623 1624 sage: EllipticCurve('5077a').rank() 1624 1625 3 1625 sage: EllipticCurve([1, -1, 0, -79, 289]).rank() # long time. This will use the default proof behavior of True.1626 sage: EllipticCurve([1, -1, 0, -79, 289]).rank() # This will use the default proof behavior of True 1626 1627 4 1627 sage: EllipticCurve([0, 0, 1, -79, 342]).rank(proof=False) # long time -- but under a minute1628 sage: EllipticCurve([0, 0, 1, -79, 342]).rank(proof=False) 1628 1629 5 1629 sage: EllipticCurve([0, 0, 1, -79, 342]).simon_two_descent()[0] # much faster -- almost instant.1630 sage: EllipticCurve([0, 0, 1, -79, 342]).simon_two_descent()[0] 1630 1631 5 1631 1632 1632 1633 Examples with denominators in defining equations:: 1633 1634 1634 sage: E = EllipticCurve( 1635 sage: E = EllipticCurve([0, 0, 0, 0, -675/4]) 1635 1636 sage: E.rank() 1636 1637 0 1637 sage: E = EllipticCurve( 1638 sage: E = EllipticCurve([0, 0, 1/2, 0, -1/5]) 1638 1639 sage: E.rank() 1639 1640 1 1640 1641 sage: E.minimal_model().rank() … … 2014 2015 EXAMPLES:: 2015 2016 2016 2017 sage: E = EllipticCurve([0, 0, 1, -1, 0]) 2017 sage: E.regulator() # long time (1 second)2018 sage: E.regulator() 2018 2019 0.0511114082399688 2019 2020 sage: EllipticCurve('11a').regulator() 2020 2021 1.00000000000000 … … 2024 2025 0.152460177943144 2025 2026 sage: EllipticCurve('5077a').regulator() 2026 2027 0.41714355875838... 2027 sage: EllipticCurve([1, -1, 0, -79, 289]).regulator() # long time (seconds)2028 sage: EllipticCurve([1, -1, 0, -79, 289]).regulator() 2028 2029 1.50434488827528 2029 sage: EllipticCurve([0, 0, 1, -79, 342]).regulator(proof=False) # long time ( seconds)2030 sage: EllipticCurve([0, 0, 1, -79, 342]).regulator(proof=False) # long time (6s on sage.math, 2011) 2030 2031 14.790527570131... 2031 2032 """ 2032 2033 if precision is None: … … 2101 2102 regulator of saturated points. 2102 2103 2103 2104 2104 IMPLEMENTATION: Uses Cremona's mwrank package. With max_prime=0,2105 we call mwrankwith successively larger prime bounds until the full2105 ALGORITHM: Uses Cremona's ``mwrank`` package. With ``max_prime=0``, 2106 we call ``mwrank`` with successively larger prime bounds until the full 2106 2107 saturation is provably found. The results of saturation at the 2107 2108 previous primes is stored in each case, so this should be 2108 2109 reasonably fast. … … 2118 2119 2119 2120 TESTS: 2120 2121 2121 See #10590. 2122 See #10590. This example would loop for ever at default precision:: 2122 2123 2123 2124 sage: E = EllipticCurve([1, 0, 1, -977842, -372252745]) 2124 2125 sage: P = E([-192128125858676194585718821667542660822323528626273/336995568430319276695106602174283479617040716649, 70208213492933395764907328787228427430477177498927549075405076353624188436/195630373799784831667835900062564586429333568841391304129067339731164107, 1]) … … 2129 2130 sage: E.saturation([2*P]) ## needs higher precision 2130 2131 ... 2131 2132 ([(1755450733726721618440965414535034458701302721700399/970334851896750960577261378321772998240802013604 : -59636173615502879504846810677646864329901430096139563516090202443694810309127/955833935771565601591243078845907133814963790187832340692216425242529192 : 1)], 2, 113.302910926080) 2132 2133 2134 See #10840. This cause eclib to crash since the curve is 2133 2134 See #10840. This causes eclib to crash since the curve is 2135 2135 non-minimal at 2:: 2136 2136 2137 2137 sage: E = EllipticCurve([0,0,0,-13711473216,0]) … … 2141 2141 sage: S = E([-113288,-9969344]) 2142 2142 sage: E.saturation([P,Q,R,S]) 2143 2143 ([(-19992 : 16313472 : 1), (-24108 : -17791704 : 1), (-97104 : -20391840 : 1), (-113288 : -9969344 : 1)], 1, 172.792031341679) 2144 2145 2144 2146 2145 """ 2147 2146 if not isinstance(points, list): … … 3278 3277 sage: E = EllipticCurve('242a1') 3279 3278 sage: E.modular_degree() 3280 3279 16 3281 sage: E.congruence_number() # long time 3280 sage: E.congruence_number() # long time (4s on sage.math, 2011) 3282 3281 176 3283 3282 3284 3283 … … 5710 5709 5711 5710 Output checked with Magma (corrected in 3 cases):: 5712 5711 5713 sage: [len(e.S_integral_points([2], both_signs=False)) for e in cremona_curves([11..100])] # long time 5712 sage: [len(e.S_integral_points([2], both_signs=False)) for e in cremona_curves([11..100])] # long time (19s on sage.math, 2011) 5714 5713 [2, 0, 2, 3, 3, 1, 3, 1, 3, 5, 3, 5, 4, 1, 1, 2, 2, 2, 3, 1, 2, 1, 0, 1, 3, 3, 1, 1, 5, 3, 4, 2, 1, 1, 5, 3, 2, 2, 1, 1, 1, 0, 1, 3, 0, 1, 0, 1, 1, 3, 7, 1, 3, 3, 3, 1, 1, 2, 3, 1, 2, 3, 1, 2, 1, 3, 3, 1, 1, 1, 0, 1, 3, 3, 1, 1, 7, 1, 0, 1, 1, 0, 1, 2, 0, 3, 1, 2, 1, 3, 1, 2, 2, 4, 5, 3, 2, 1, 1, 6, 1, 0, 1, 3, 1, 3, 3, 1, 1, 1, 1, 1, 3, 1, 5, 1, 2, 4, 1, 1, 1, 1, 1, 0, 1, 0, 2, 2, 0, 0, 1, 0, 1, 1, 6, 1, 0, 1, 1, 0, 4, 3, 1, 2, 1, 2, 3, 1, 1, 1, 1, 8, 3, 1, 2, 1, 2, 0, 8, 2, 0, 6, 2, 3, 1, 1, 1, 3, 1, 3, 2, 1, 3, 1, 2, 1, 6, 9, 3, 3, 1, 1, 2, 3, 1, 1, 5, 5, 1, 1, 0, 1, 1, 2, 3, 1, 1, 2, 3, 1, 3, 1, 1, 1, 1, 0, 0, 1, 3, 3, 1, 3, 1, 1, 2, 2, 0, 0, 6, 1, 0, 1, 1, 1, 1, 3, 1, 2, 6, 3, 1, 2, 2, 1, 1, 1, 1, 7, 5, 4, 3, 3, 1, 1, 1, 1, 1, 1, 8, 5, 1, 1, 3, 3, 1, 1, 3, 3, 1, 1, 2, 3, 6, 1, 1, 7, 3, 3, 4, 5, 9, 6, 1, 0, 7, 1, 1, 3, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 7, 8, 2, 3, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1] 5715 5714 5716 5715 An example from [PZGH]:: 5717 5716 5718 5717 sage: E = EllipticCurve([0,0,0,-172,505]) 5719 sage: E.rank(), len(E.S_integral_points([3,5,7])) # long time ( ~7s)5718 sage: E.rank(), len(E.S_integral_points([3,5,7])) # long time (5s on sage.math, 2011) 5720 5719 (4, 72) 5721 5720 5722 5721 This is curve "7690e1" which failed until \#4805 was fixed::