find quotient of two multivariate polynomials (which are divisible)
I have two multivariate polynomials, num
and denom
such that
denom
divides num
. But I have not been able to get SageMath
to simplify the quotient num/denom
.
The worksheet and the two polynomials are available at
- https://cocalc.com/share/513993d46f58...
- https://cocalc.com/share/6884a274c847...
- https://cocalc.com/share/d8904075cf0e...
Sample code is below.
sage: dR.<d1, d2, d3, d4, d12, d13, d14, d23, d24, d34, d123, d124, d134, d234, d1234> = PolynomialRing(ZZ, 15, order='lex')
sage: denom = load('denom')
sage: num = load('num')
sage: denom.divides(num)
True
sage: num.reduce(Ideal([denom]))
0
sage: F = num/denom
sage: F.denominator()/denom
1
sage: F.reduce()
sage: F.denominator() / denom
1
sage: num.number_of_terms()
3197
sage: denom.number_of_terms()
64
sage: num.degree()
24
As pointed out in the answers, the data was created with one term ordering, while the workbook uses another term ordering.
However, why does the term ordering affect the truth of 'num is contained in the ideal generated by denom' i.e., the value of num.reduce(Ideal[denom]) ? One of the answers refers to "This 'local' term ordering ``. I don't understand how the term ordering affects the structure of the ideals in a polynomial ring over the integers.
This is an unfortunate consequence of the fact that
PolynomialRing
uses Singular'sring
in the background, without restricting the term ordering. Singular'sring
is an ordinary polynomial ring when given a "global" term ordering, but it is rather a localization when given a "local" term ordering. These local orderings should be disallowed on aPolynomialRing
, and the Singular functionality for localizations should be exposed in another way.