File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
src/sage/rings/polynomial Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -1571,7 +1571,25 @@ cdef class LaurentPolynomial_univariate(LaurentPolynomial):
1571
1571
"""
1572
1572
return (self .__u, self .__n)
1573
1573
1574
- monomial_reduction = polynomial_construction
1574
+ def monomial_reduction (self ):
1575
+ """
1576
+ Return the decomposition as a polynomial and a power of the variable.
1577
+ Constructed for compatibility with the multivariate case.
1578
+
1579
+ OUTPUT:
1580
+
1581
+ A tuple ``(u, t^n)`` where ``u`` is the underlying polynomial and ``n``
1582
+ is the power of the exponent shift.
1583
+
1584
+ EXAMPLES::
1585
+
1586
+ sage: R.<x> = LaurentPolynomialRing(QQ)
1587
+ sage: f = 1/x + x^2 + 3*x^4
1588
+ sage: f.monomial_reduction()
1589
+ (3*x^5 + x^3 + 1, x^-1)
1590
+ """
1591
+ u, n = self .polynomial_construction()
1592
+ return (u, self .parent().gen(0 ) ** n)
1575
1593
1576
1594
def is_constant (self ):
1577
1595
"""
You can’t perform that action at this time.
0 commit comments