diff --git a/src/sage/doctest/fixtures.py b/src/sage/doctest/fixtures.py index d656dadf1c8..b04316151eb 100644 --- a/src/sage/doctest/fixtures.py +++ b/src/sage/doctest/fixtures.py @@ -87,7 +87,7 @@ def reproducible_repr(val): frozenset(['a', 'b', 'c', 'd']) sage: print(reproducible_repr([1, frozenset("cab"), set("bar"), 0])) [1, frozenset(['a', 'b', 'c']), set(['a', 'b', 'r']), 0] - sage: print(reproducible_repr({3.0: "three", "2": "two", 1: "one"})) # optional - sage.rings.real_mpfr + sage: print(reproducible_repr({3.0: "three", "2": "two", 1: "one"})) # needs sage.rings.real_mpfr {'2': 'two', 1: 'one', 3.00000000000000: 'three'} sage: print(reproducible_repr("foo\nbar")) # demonstrate default case 'foo\nbar' diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal.py b/src/sage/rings/polynomial/multi_polynomial_ideal.py index b8e8b8af501..e7d985ccb22 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal.py +++ b/src/sage/rings/polynomial/multi_polynomial_ideal.py @@ -5501,9 +5501,21 @@ def weil_restriction(self): z0, z1, z2, z3, z4 over Finite Field of size 3 sage: J += sage.rings.ideal.FieldIdeal(J.ring()) # ensure radical ideal sage: J.variety() - [{x0: 1, x1: 0, x2: 0, x3: 0, x4: 0, - y0: 0, y1: 0, y2: 0, y3: 0, y4: 0, - z0: 0, z1: 0, z2: 0, z3: 0, z4: 0}] + [{z4: 0, + z3: 0, + z2: 0, + z1: 0, + z0: 0, + y4: 0, + y3: 0, + y2: 0, + y1: 0, + y0: 0, + x4: 0, + x3: 0, + x2: 0, + x1: 0, + x0: 1}] Weil restrictions are often used to study elliptic curves over diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/rings/polynomial/multi_polynomial_sequence.py index d04958664fb..c68911d468b 100644 --- a/src/sage/rings/polynomial/multi_polynomial_sequence.py +++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py @@ -31,7 +31,7 @@ pair and study it:: sage: set_random_seed(1) - sage: while True: # workaround (see :issue:`31891`) # needs sage.rings.polynomial.pbori + sage: while True: # workaround (see :issue:`31891`) # needs sage.rings.polynomial.pbori ....: try: ....: F, s = sr.polynomial_system() ....: break @@ -122,7 +122,7 @@ easily:: sage: sr = mq.SR(1,1,1,4, gf2=True, polybori=True, order='lex') # needs sage.rings.polynomial.pbori - sage: while True: # workaround (see :issue:`31891`) # needs sage.rings.polynomial.pbori + sage: while True: # workaround (see :issue:`31891`) # needs sage.rings.polynomial.pbori ....: try: ....: F, s = sr.polynomial_system() ....: break @@ -1556,7 +1556,7 @@ def solve(self, algorithm='polybori', n=1, sage: S = Sequence([x*y + z, y*z + x, x + y + z + 1]) sage: sol = S.solve() sage: sol - [{x: 0, y: 1, z: 0}] + [{z: 0, y: 1, x: 0}] We check that it is actually a solution:: @@ -1567,7 +1567,7 @@ def solve(self, algorithm='polybori', n=1, sage: sols = S.solve(n=Infinity) # needs sage.rings.polynomial.pbori sage: sols # needs sage.rings.polynomial.pbori - [{x: 0, y: 1, z: 0}, {x: 1, y: 1, z: 1}] + [{z: 0, y: 1, x: 0}, {z: 1, y: 1, x: 1}] sage: [S.subs(x) for x in sols] # needs sage.rings.polynomial.pbori [[0, 0, 0], [0, 0, 0]] diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx index 5745ec219fc..45a8fd1a82d 100644 --- a/src/sage/rings/polynomial/pbori/pbori.pyx +++ b/src/sage/rings/polynomial/pbori/pbori.pyx @@ -5034,7 +5034,7 @@ class BooleanPolynomialIdeal(MPolynomialIdeal): sage: R. = BooleanPolynomialRing() sage: I = ideal( [ x*y*z + x*z + y + 1, x+y+z+1 ] ) sage: I.variety() - [{x: 0, y: 1, z: 0}, {x: 1, y: 1, z: 1}] + [{z: 0, y: 1, x: 0}, {z: 1, y: 1, x: 1}] TESTS: @@ -5052,13 +5052,15 @@ class BooleanPolynomialIdeal(MPolynomialIdeal): ....: x1*x2 + x1*x6 + x2*x4 + x2*x5 + x2*x6 + x3*x6 + x4*x6 + x5*x6 + x5] sage: I = R.ideal( polys ) sage: I.variety() - [{x1: 0, x2: 0, x3: 0, x4: 0, x5: 0, x6: 0}, {x1: 1, x2: 1, x3: 1, x4: 0, x5: 0, x6: 1}] + [{x6: 0, x5: 0, x4: 0, x3: 0, x2: 0, x1: 0}, + {x6: 1, x5: 0, x4: 0, x3: 1, x2: 1, x1: 1}] sage: R = PolynomialRing(GF(2), 6, ['x%d'%(i+1) for i in range(6)], order='lex') sage: I = R.ideal( polys ) sage: v = (I + sage.rings.ideal.FieldIdeal(R)).variety() sage: v - [{x1: 0, x2: 0, x3: 0, x4: 0, x5: 0, x6: 0}, {x1: 1, x2: 1, x3: 1, x4: 0, x5: 0, x6: 1}] + [{x6: 0, x5: 0, x4: 0, x3: 0, x2: 0, x1: 0}, + {x6: 1, x5: 0, x4: 0, x3: 1, x2: 1, x1: 1}] Check that :issue:`13976` is fixed::