Open AndrewMathas opened 6 years ago
Changed keywords from none to Multivariate polynomials
Description changed:
---
+++
@@ -1 +1,6 @@
+Multivariate polynomials do not currently have a `_sage_input_` method. This ticket rectifies this:
+```
+sage: sage_input(ZZ['u','q'])
+ZZ['u,q']
+```
Author: Andrew Mathas
Commit: a309ff6
Reviewer: Thierry Monteil
The current implementation does not handle the sparsity nor the monomial order of the polynomial ring:
sage: R.<x,y> = PolynomialRing(QQ, order='neglex', sparse=True)
sage: R
Multivariate Polynomial Ring in x, y over Rational Field
sage: sage_input(R)
QQ['x,y']
sage: sage_eval(sage_input(R)) is R
False
sage: sage_input(R, verify=True)
AssertionError: Expected Multivariate Polynomial Ring in x, y over Rational Field == Multivariate Polynomial Ring in x, y over Rational Field
You need to check all those cases with the verify=True
option.
See also #22565 and #25762 for similar issues.
Changed keywords from Multivariate polynomials to Multivariate polynomials, days94
Replying to @sagetrac-tmonteil:
The current implementation does not handle the sparsity nor the monomial order of the polynomial ring:
sage: R.<x,y> = PolynomialRing(QQ, order='neglex', sparse=True) sage: R Multivariate Polynomial Ring in x, y over Rational Field sage: sage_input(R) QQ['x,y'] sage: sage_eval(sage_input(R)) is R False sage: sage_input(R, verify=True) AssertionError: Expected Multivariate Polynomial Ring in x, y over Rational Field == Multivariate Polynomial Ring in x, y over Rational Field
You need to check all those cases with the
verify=True
option.See also #22565 and #25762 for similar issues.
I agree that the (term) order should be taken into account but looking at both the documentation and the code sparse
is not an option for multivariate polynomial rings. (I agree that it is an option for polynomial rings.) Am I missing something?
Multivariate polynomials do not currently have a
_sage_input_
method. This ticket rectifies this:Component: basic arithmetic
Keywords: Multivariate polynomials, days94
Author: Andrew Mathas
Branch/Commit: u/andrew.mathas/sage_input_for_multivariate_polynomials @
a309ff6
Reviewer: Thierry Monteil
Issue created by migration from https://trac.sagemath.org/ticket/25723