-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Description
Steps To Reproduce
sage: R = LaurentPolynomialRing(QQ, 3, 'x')
sage: x0, x1, x2 = R.gens()
sage: R.zero().degree()
-1
sage: R.zero().degree(x0)
-1
sage: R.zero().degree(x1)
-1
sage: R.zero().degree(x2)
-1
sage: (1/x0).degree(x0)
-1
sage: (1/x0).degree()
-1
Expected Behavior
The degree of 0
should be distinct from polynomials we can construct
Actual Behavior
The degree of 0
is -1
, the same as 1/x0
or other similar polynomials.
Additional Information
For standard univariate and multivariate polynomial rings, the degree being -1
is essentially a nice trick in place of
One idea would be to instead have it return - infinity
.
Environment
- **Sage Version**: SageMath version 10.3.rc0, Release Date: 2024-02-25
Checklist
- I have searched the existing issues for a bug report that matches the one I want to file, without success.
- I have read the documentation and troubleshoot guide