From dfcdcb0fab6173ab598745e72706b0efa43f2e86 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 19 Jun 2020 13:59:15 +0200 Subject: [PATCH] Drop test fixes, handled in #29472 --- src/sage/lfunctions/dokchitser.py | 4 +-- src/sage/lfunctions/pari.py | 2 +- src/sage/rings/number_field/number_field.py | 28 +++++++++---------- .../number_field/number_field_element.pyx | 2 +- .../rings/number_field/number_field_ideal.py | 4 +-- src/sage/rings/number_field/unit_group.py | 2 +- .../polynomial/polynomial_quotient_ring.py | 12 ++++---- .../elliptic_curves/ell_number_field.py | 13 ++++----- 8 files changed, 33 insertions(+), 34 deletions(-) diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py index 1bf8953a77b..680ac17dfd4 100644 --- a/src/sage/lfunctions/dokchitser.py +++ b/src/sage/lfunctions/dokchitser.py @@ -111,7 +111,7 @@ class Dokchitser(SageObject): 0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4) sage: L.check_functional_equation() 6.11218974700000e-18 # 32-bit - 6.11218974738703e-18 # 64-bit + 6.04442711160669e-18 # 64-bit RANK 2 ELLIPTIC CURVE: @@ -670,7 +670,7 @@ def check_functional_equation(self, T=1.2): sage: L = Dokchitser(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], init='1') sage: L.check_functional_equation() -1.35525271600000e-20 # 32-bit - -1.35525271560688e-20 # 64-bit + -2.71050543121376e-20 # 64-bit If we choose the sign in functional equation for the `\zeta` function incorrectly, the functional equation diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py index 1daa219c007..c60f944ed4e 100644 --- a/src/sage/lfunctions/pari.py +++ b/src/sage/lfunctions/pari.py @@ -423,7 +423,7 @@ class LFunction(SageObject): sage: L.taylor_series(1,4) 0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4) sage: L.check_functional_equation() - 4.33680868994202e-19 + 1.08420217248550e-19 .. RUBRIC:: Rank 2 elliptic curve diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index 9f4681c4b7d..26e219c1ed1 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -3431,18 +3431,18 @@ def ideals_of_bdd_norm(self, bound): Fractional ideal (2, 1/2*a - 1/2) Fractional ideal (2, 1/2*a + 1/2) 3 - Fractional ideal (3, 1/2*a + 1/2) Fractional ideal (3, 1/2*a - 1/2) + Fractional ideal (3, 1/2*a + 1/2) 4 Fractional ideal (4, 1/2*a + 3/2) Fractional ideal (2) Fractional ideal (4, 1/2*a + 5/2) 5 6 - Fractional ideal (6, 1/2*a + 7/2) - Fractional ideal (1/2*a + 1/2) Fractional ideal (1/2*a - 1/2) Fractional ideal (6, 1/2*a + 5/2) + Fractional ideal (6, 1/2*a + 7/2) + Fractional ideal (1/2*a + 1/2) 7 8 Fractional ideal (1/2*a + 3/2) @@ -3450,9 +3450,9 @@ def ideals_of_bdd_norm(self, bound): Fractional ideal (4, a + 1) Fractional ideal (1/2*a - 3/2) 9 - Fractional ideal (9, 1/2*a + 7/2) - Fractional ideal (3) Fractional ideal (9, 1/2*a + 11/2) + Fractional ideal (3) + Fractional ideal (9, 1/2*a + 7/2) 10 """ hnf_ideals = self.pari_nf().ideallist(bound) @@ -4548,7 +4548,7 @@ def _S_class_group_and_units(self, S, proof=True): -1/13*a^2 + 6/13*a + 345/13, -1, 2/13*a^2 + 1/13*a - 755/13, - 1/13*a^2 + 20/13*a - 7/13], + 1/13*a^2 - 19/13*a - 7/13], [(Fractional ideal (11, a - 2), 2), (Fractional ideal (19, a + 7), 2)]) Number fields defined by non-monic and non-integral @@ -4706,9 +4706,9 @@ def selmer_group(self, S, m, proof=True, orders=False): -1/13*a^2 + 6/13*a + 345/13, -1, 2/13*a^2 + 1/13*a - 755/13, - 1/13*a^2 + 20/13*a - 7/13, - 1/13*a^2 - 45/13*a + 97/13, - -2/13*a^2 - 40/13*a + 27/13] + 1/13*a^2 - 19/13*a - 7/13, + -1/13*a^2 + 45/13*a - 97/13, + 2/13*a^2 + 40/13*a - 27/13] Verify that :trac:`16708` is fixed:: @@ -5353,7 +5353,7 @@ def elements_of_norm(self, n, proof=None): sage: K. = NumberField(7/9*x^3 + 7/3*x^2 - 56*x + 123) sage: K.elements_of_norm(7) - [28/225*a^2 + 77/75*a - 133/25] + [7/225*a^2 - 7/75*a - 42/25] """ proof = proof_flag(proof) B = self.pari_bnf(proof).bnfisintnorm(n) @@ -5456,7 +5456,7 @@ def factor(self, n): sage: pari('setrand(2)') sage: L. = K.extension(x^2 - 7) sage: f = L.factor(a + 1); f - (Fractional ideal (-1/2*b + 1/2*a + 1)) * (Fractional ideal (-1/2*a*b - a + 1/2)) + (Fractional ideal (1/2*a*b - a + 1/2)) * (Fractional ideal (-1/2*a*b - a + 1/2)) sage: f.value() == a+1 True @@ -6533,7 +6533,7 @@ def uniformizer(self, P, others="positive"): sage: [K.uniformizer(P) for P,e in factor(K.ideal(5))] [t^2 - t + 1, t + 2, t - 2] sage: [K.uniformizer(P) for P,e in factor(K.ideal(7))] - [t^2 - 4*t + 1] + [t^2 + 3*t + 1] sage: [K.uniformizer(P) for P,e in factor(K.ideal(67))] [t + 23, t + 26, t - 32, t - 18] @@ -7803,11 +7803,11 @@ def optimized_representation(self, name=None, both_maps=True): Ring morphism: From: Number Field in a1 with defining polynomial x^3 - 7*x - 7 To: Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 - Defn: a1 |--> 28/225*a^2 + 77/75*a - 133/25, + Defn: a1 |--> 7/225*a^2 - 7/75*a - 42/25, Ring morphism: From: Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 To: Number Field in a1 with defining polynomial x^3 - 7*x - 7 - Defn: a |--> -60/7*a1^2 + 15*a1 + 39) + Defn: a |--> -15/7*a1^2 + 9) """ if name is None: name = self.variable_names() diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 079eaaa6a25..59bab07db08 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -1733,7 +1733,7 @@ cdef class NumberFieldElement(FieldElement): sage: P. = K[] sage: L = NumberField(X^2 + a^2 + 2*a + 1, 'b') sage: K(17)._rnfisnorm(L) - ((a^2 - 2)*b + 4, 1) + ((a^2 - 2)*b - 4, 1) sage: K. = NumberField(x^3 + x + 1) sage: Q. = K[] diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py index 95ba0f54840..35ee5a6e4ba 100644 --- a/src/sage/rings/number_field/number_field_ideal.py +++ b/src/sage/rings/number_field/number_field_ideal.py @@ -1823,7 +1823,7 @@ def factor(self): sage: F. = NumberField(2*x^3 + x + 1) sage: fact = F.factor(2); fact - (Fractional ideal (-2*a^2 - 1))^2 * (Fractional ideal (2*a^2)) + (Fractional ideal (2*a^2 + 1))^2 * (Fractional ideal (-2*a^2)) sage: [p[0].norm() for p in fact] [2, 2] """ @@ -2414,7 +2414,7 @@ def idealcoprime(self, J): sage: A.is_coprime(B) False sage: lam = A.idealcoprime(B); lam - 1/6*a - 1/6 + -1/6*a + 1/6 sage: (lam*A).is_coprime(B) True diff --git a/src/sage/rings/number_field/unit_group.py b/src/sage/rings/number_field/unit_group.py index 529e23a5593..6ed0aea16b8 100644 --- a/src/sage/rings/number_field/unit_group.py +++ b/src/sage/rings/number_field/unit_group.py @@ -279,7 +279,7 @@ def __init__(self, number_field, proof=True, S=None): sage: K.unit_group() Unit group with structure C2 x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 sage: UnitGroup(K, S=tuple(K.primes_above(7))) - S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (28/225*a^2 + 77/75*a - 133/25),) + S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (7/225*a^2 - 7/75*a - 42/25),) Conversion from unit group to a number field and back gives the right results (:trac:`25874`):: diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py index e962ad584a5..de62148fd46 100644 --- a/src/sage/rings/polynomial/polynomial_quotient_ring.py +++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py @@ -1291,9 +1291,9 @@ def S_class_group(self, S, proof=True): 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8), 6), ((-5/4*xbar^2 - 115/4, - (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8, - -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16, - 1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8), + 1/4*a*xbar^2 + 23/4*a, + -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16, + 1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a), 2)] By using the ideal `(a)`, we cut the part of the class group coming from @@ -1423,9 +1423,9 @@ def class_group(self, proof=True): 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8), 6), ((-5/4*xbar^2 - 115/4, - (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8, - -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16, - 1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8), + 1/4*a*xbar^2 + 23/4*a, + -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16, + 1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a), 2)] Note that all the returned values live where we expect them to:: diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py index 68cf4e3b63f..46e7af54bc3 100644 --- a/src/sage/schemes/elliptic_curves/ell_number_field.py +++ b/src/sage/schemes/elliptic_curves/ell_number_field.py @@ -301,8 +301,7 @@ def simon_two_descent(self, verbose=0, lim1=2, lim3=4, limtriv=2, (3, 3, [(0 : 0 : 1), - (-1/2*zeta43_0^2 - 1/2*zeta43_0 + 7 : -3/2*zeta43_0^2 - 5/2*zeta43_0 + 18 : 1), - (5/8*zeta43_0^2 + 17/8*zeta43_0 - 9/4 : -27/16*zeta43_0^2 - 103/16*zeta43_0 + 39/8 : 1)]) + (-1/2*zeta43_0^2 - 1/2*zeta43_0 + 7 : -3/2*zeta43_0^2 - 5/2*zeta43_0 + 18 : 1)]) """ verbose = int(verbose) if known_points is None: @@ -810,7 +809,7 @@ def global_integral_model(self): sage: K. = NumberField(x^2 + 161*x - 150) sage: E = EllipticCurve([25105/216*v - 3839/36, 634768555/7776*v - 98002625/1296, 634768555/7776*v - 98002625/1296, 0, 0]) sage: E.global_integral_model() - Elliptic Curve defined by y^2 + (33872485050625*v-31078224284250)*x*y + (2020602604156076340058146664245468750000*v-1871778534673615560803175189398437500000)*y = x^3 + (6933305282258321342920781250*v-6422644400723486559914062500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150 + Elliptic Curve defined by y^2 + (2094779518028859*v-1940492905300351)*x*y + (477997268472544193101178234454165304071127500*v-442791377441346852919930773849502871958097500)*y = x^3 + (26519784690047674853185542622500*v-24566525306469707225840460652500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150 :trac:`14476`:: @@ -920,10 +919,10 @@ def _scale_by_units(self): sage: E1 = E.scale_curve(u^5) sage: E1.ainvs() (0, - 0, - 0, - 193309837823322216*a - 611299381639464252, - -3379649566176127326923323632*a + 10687390322316522207588229536) + 0, + 0, + 28087920796764302856*a + 88821804456186580548, + -77225139016967233228487820912*a - 244207331916752959911655344864) sage: E1._scale_by_units().ainvs() (0, 0, 0, 4536*a + 14148, -163728*a - 474336)