Opened 6 years ago

#21897 new defect

Fix __div__ for multivariate polynomials in K[X][Y]

Reported by: nborie Owned by:
Priority: major Milestone: sage-7.5
Component: commutative algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Polynomial Rings in any number of variables are able to symplify fraction in which the denominator divides the numerator. The following example shows e Newton divided difference (which contains a division but is always a polynomial, it works)

sage: K.<x1,x2,x3,x4> = PolynomialRing(QQ, 4)
sage: P = x1^3*x2 - 8*x2*x3*x4^2; P
x1^3*x2 - 8*x2*x3*x4^2
sage: Q = P.parent((P - P(x1,x3,x2,x4))/(x2-x3)); Q
sage: Q.parent()
Multivariate Polynomial Ring in x1, x2, x3, x4 over Rational Field

Such symplification are not possible in K[X][Y] (it stay ok in K[X,Y]).

sage: K.<x> = PolynomialRing(QQ, 1)
sage: L.<y> = PolynomialRing(K, 1)
sage: y/y
sage: L(y/y)
Traceback (most recent call last):

TypeError: unable to coerce since the denominator is not 1
sage: y.divides(y)
Traceback (most recent call last):

TypeError: no conversion of this ring to a Singular ring defined
sage: y/y == 1
sage: y/y - 1
sage: (y/y).reduce()
Traceback (most recent call last):

ArithmeticError: unable to reduce because gcd algorithm doesn't work on input

Change History (0)

Note: See TracTickets for help on using tickets.