Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sage/rings/polynomial/msolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def variety(ideal, ring, *, proof=True):
sage: p = 536870909
sage: R.<x, y> = PolynomialRing(GF(p), 2, order='lex')
sage: I = Ideal([ x*y - 1, (x-2)^2 + (y-1)^2 - 1])
sage: sorted(variety(I, GF(p^2), proof=False), key=str) # optional - msolve
sage: sorted(variety(I, GF(p^2), proof=False), key=lambda d: str(sorted(d.items()))) # optional - msolve
[{x: 1, y: 1},
{x: 254228855*z2 + 114981228, y: 232449571*z2 + 402714189},
{x: 267525699, y: 473946006},
Expand All @@ -139,11 +139,11 @@ def variety(ideal, ring, *, proof=True):
sage: R.<x, y> = PolynomialRing(GF(p), 2, order='lex')
sage: I = Ideal([ x*y - 1, (x-2)^2 + (y-1)^2 - 1])

sage: sorted(I.variety(algorithm='msolve', proof=False), key=str) # optional - msolve
sage: sorted(I.variety(algorithm='msolve', proof=False), key=lambda d: str(sorted(d.items()))) # optional - msolve
[{x: 1, y: 1}, {x: 267525699, y: 473946006}]

sage: K.<a> = GF(p^2)
sage: sorted(I.variety(K, algorithm='msolve', proof=False), key=str) # optional - msolve
sage: sorted(I.variety(K, algorithm='msolve', proof=False), key=lambda d: str(sorted(d.items()))) # optional - msolve
[{x: 1, y: 1},
{x: 118750849*a + 194048031, y: 510295713*a + 18174854},
{x: 267525699, y: 473946006},
Expand Down Expand Up @@ -188,7 +188,7 @@ def variety(ideal, ring, *, proof=True):
sage: Ideal(x^2 + y^2 - 1, x - y).variety(RBF, algorithm='msolve', proof=False) # optional - msolve
[{x: [-0.707106781186547 +/- 6.29e-16], y: [-0.707106781186547 +/- 6.29e-16]},
{x: [0.707106781186547 +/- 6.29e-16], y: [0.707106781186547 +/- 6.29e-16]}]
sage: sorted(Ideal(x^2 - 1, y^2 - 1).variety(QQ, algorithm='msolve', proof=False), key=str) # optional - msolve
sage: sorted(Ideal(x^2 - 1, y^2 - 1).variety(QQ, algorithm='msolve', proof=False), key=lambda d: str(sorted(d.items()))) # optional - msolve
[{x: -1, y: -1}, {x: -1, y: 1}, {x: 1, y: -1}, {x: 1, y: 1}]
sage: Ideal(x^2-1, y^2-2).variety(CC, algorithm='msolve', proof=False) # optional - msolve
[{x: 1.00000000000000, y: 1.41421356237310},
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/multi_polynomial_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ def variety(self, ring=None, *, algorithm='triangular_decomposition', proof=True
sage: I = Ideal([x^2 - 1, y^2 - 1]) # needs sage.rings.finite_rings
sage: sorted(I.variety(algorithm='msolve', # optional - msolve, needs sage.rings.finite_rings
....: proof=False),
....: key=str)
....: key=lambda d: str(sorted(d.items()))
[{y: 1, x: 1},
{y: 1, x: 536870908},
{y: 536870908, x: 1},
Expand Down
Loading