Skip to content

Commit

Permalink
Fix doctest for optional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
user202729 committed Feb 7, 2025
1 parent f490f6d commit ed56b05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/sage/rings/polynomial/multi_polynomial_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2617,8 +2617,8 @@ def variety(self, ring=None, *, algorithm='triangular_decomposition', proof=True
See :mod:`~sage.rings.polynomial.msolve` for more information. ::
sage: I.variety(RBF, algorithm='msolve', proof=False) # optional - msolve
[{x: [2.76929235423863 +/- 2.08e-15], y: [0.361103080528647 +/- 4.53e-16]},
{x: 1.000000000000000, y: 1.000000000000000}]
[{y: [0.361103080528647 +/- 4.53e-16], x: [2.76929235423863 +/- 2.08e-15]},
{y: 1.000000000000000, x: 1.000000000000000}]
Computation over floating point numbers may compute only a partial solution,
or even none at all. Notice that x values are missing from the following variety::
Expand Down Expand Up @@ -2672,10 +2672,10 @@ def variety(self, ring=None, *, algorithm='triangular_decomposition', proof=True
sage: sorted(I.variety(algorithm='msolve', # optional - msolve, needs sage.rings.finite_rings
....: proof=False),
....: key=str)
[{x: 1, y: 1},
{x: 1, y: 536870908},
{x: 536870908, y: 1},
{x: 536870908, y: 536870908}]
[{y: 1, x: 1},
{y: 1, x: 536870908},
{y: 536870908, x: 1},
{y: 536870908, x: 536870908}]
but may fail in small characteristic, especially with ideals of high
degree with respect to the characteristic::
Expand Down Expand Up @@ -3482,7 +3482,7 @@ def _reduce_using_macaulay2(self, f):
sage: R.<x,y,z,w> = PolynomialRing(ZZ, 4)
sage: I = ideal(x*y-z^2, y^2-w^2)
sage: I._reduce_using_macaulay2(x*y-z^2 + y^2) # optional - macaulay2
sage: I._reduce_using_macaulay2(x*y-z^2 + y^2) # optional - macaulay2
w^2
"""
I = self._macaulay2_()
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/polynomial/multi_polynomial_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,15 +1576,15 @@ def solve(self, algorithm='polybori', n=1,
sage: sol = S.solve(algorithm='exhaustive_search') # optional - fes # needs sage.rings.polynomial.pbori
sage: sol # optional - fes # needs sage.rings.polynomial.pbori
[{x: 1, y: 1, z: 1}]
[{z: 1, y: 1, x: 1}]
sage: S.subs(sol[0]) # optional - fes # needs sage.rings.polynomial.pbori
[0, 0, 0]
And we may use SAT-solvers if they are available::
sage: sol = S.solve(algorithm='sat') # optional - pycryptosat # needs sage.rings.polynomial.pbori
sage: sol # optional - pycryptosat # needs sage.rings.polynomial.pbori
[{x: 0, y: 1, z: 0}]
[{z: 0, y: 1, x: 0}]
sage: S.subs(sol[0]) # needs sage.rings.polynomial.pbori
[0, 0, 0]
Expand Down

0 comments on commit ed56b05

Please sign in to comment.