PolynomialReduction[poly,{poly1,poly2,…},{x1,x2,…}]
yields a reduction r of the polynomial poly modulo the polynomials polyi in variables {x1,x2,…}.
PolynomialReduction
PolynomialReduction[poly,{poly1,poly2,…},{x1,x2,…}]
yields a reduction r of the polynomial poly modulo the polynomials polyi in variables {x1,x2,…}.
Details and Options
- PolynomialReduction is used to reduce a polynomial modulo a list of polynomials.
- poly-r belongs to the ideal generated by {poly1,poly2,…}, and no monomial in r is divisible by any of the leading monomials of polyi.
- If the polyi form a Gröbner basis with respect to the xi, then this property uniquely determines the reduction r.
- The result of reducing a polynomial in general depends on the ordering assigned to monomials. This ordering is affected by the ordering of the xi.
- The following options can be given, as for GroebnerBasis:
-
MonomialOrder Lexicographic the criterion used for ordering monomials CoefficientDomain Rationals the types of objects assumed to be coefficients Modulus 0 the modulus for numerical coefficients - PolynomialReduce gives {{a1,a2,…},r}, such that poly=a1 poly1+a2 poly2+…+r, where {a1,a2,…} are polynomials in {x1,x2,…}.
Examples
open all close allBasic Examples (2)
Reduce a polynomial with respect to a list of polynomials:
PolynomialReduction[x ^ 3 + y ^ 3, {x ^ 2 - y ^ 2 - 1, x + 2y - 7}, {x, y}]Test whether polynomials belong to the ideal generated by polys:
polys = {x ^ 2 + y ^ 2 + z ^ 2 - 1, x y - z ^ 2 + 2};
gb = GroebnerBasis[polys, {x, y, z}]A polynomial belongs to the ideal if it reduces to zero modulo gb:
PolynomialReduction[x ^ 4 + y ^ 4 + z ^ 4, gb, {x, y, z}]PolynomialReduction[x ^ 2 + y ^ 2 + x y + 1, gb, {x, y, z}]Scope (1)
Reduce a polynomial modulo a list of polynomials that is not a Gröbner basis:
f = 2x ^ 3 + y ^ 3 + 3y;
polys = {x ^ 2 + y ^ 2 - 1, x y - 2};
gb = GroebnerBasis[polys, {x, y}]f does not reduce to zero, even though f belongs to the ideal generated by polys:
PolynomialReduction[f, polys, {x, y}]When f belongs to the ideal generated by polys, f must reduce to zero modulo gb:
PolynomialReduction[f, gb, {x, y}]Options (4)
CoefficientDomain (1)
By default, PolynomialReduction works over the field of rational functions of parameters:
polys = {a x ^ 2 + 5 y - 1, 2 x + x y - y ^ 2};
poly = a ^ 2 x - x y + y ^ 2 - 3;Compute the Gröbner basis of polys over the field of rational functions
:
gb1 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> RationalFunctions]Reduce poly modulo gb1 over the field of rational functions
:
PolynomialReduction[poly, gb1, {x, y}]Compute the Gröbner basis and reduce poly over the integers:
gb2 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> Integers]PolynomialReduction[poly, gb2, {x, y}, CoefficientDomain -> Integers]Compute the Gröbner basis and reduce poly over the rationals:
gb3 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> Rationals]PolynomialReduction[poly, gb3, {x, y}, CoefficientDomain -> Rationals]Compute the Gröbner basis and reduce poly using approximate arithmetic:
gb4 = GroebnerBasis[polys, {x, y}, CoefficientDomain -> InexactNumbers[20]]The precision used is chosen automatically, based on the precision of the Gröbner basis:
PolynomialReduction[poly, gb4, {x, y}, CoefficientDomain -> InexactNumbers]Modulus (1)
Compute a Gröbner basis and reduce a polynomial over the integers modulo 7:
polys = {3 x ^ 2 + y z - 5 x - 1, 2 x + 3 x y + y ^ 2, x - 3 y + x z - 2 z ^ 2};
poly = z ^ 9 - x ^ 2 y ^ 3 - 3 x y ^ 2 z + 11y z ^ 2 + x ^ 2 z ^ 2 - 5;
gb = GroebnerBasis[polys, {x, y, z}, Modulus -> 7];
PolynomialReduction[poly, gb, Modulus -> 7]MonomialOrder (1)
By default, PolynomialReduction uses the Lexicographic monomial order:
polys = {3 x ^ 2 + y - 5 x - 1, 2 x + 3 x y + y ^ 2};
poly = x y - 3 x y ^ 2 + 11y + x ^ 3;gb1 = GroebnerBasis[polys, {x, y}]PolynomialReduction[poly, gb1, {x, y}]Any MonomialOrder allowed by GroebnerBasis can be used:
gb2 = GroebnerBasis[polys, {x, y}, MonomialOrder -> DegreeReverseLexicographic]PolynomialReduction[poly, gb2, {x, y}, MonomialOrder -> DegreeReverseLexicographic]Tolerance (1)
Compute approximate quotients:
p = x ^ 14 + 3.00001 * x ^ 10 - 7.99998 * x ^ 7 - 25.00002 * x ^ 6 + 3.00001 * x ^ 13 + 9.00006 * x ^ 9 - 3.00001 * x ^ 5 - 2.00001 * x ^ 8 - 6.00005 * x ^ 4 + 16.00004 * x + 2.00001;d = -2.0001465223696937 + 3.0002401628321618 * x ^ 5 + 1. * x ^ 6;With the default zero tolerance, d does not divide p:
PolynomialReduction[p, {d}, x, CoefficientDomain -> InexactNumbers]With increased tolerance, p reduces to zero:
PolynomialReduction[p, {d}, x, CoefficientDomain -> InexactNumbers, Tolerance -> 0.01]Applications (3)
Test whether polynomials belong to the ideal generated by a set of polynomials:
f = x ^ 6 - 14x ^ 3 - y ^ 4 + 49;
g = x ^ 5 - y ^ 5;
polys = {x ^ 2 - y ^ 3 - 5, y ^ 2 - x ^ 3 + 7};
gb = GroebnerBasis[polys, {x, y}]f reduces to zero, hence it belongs to the ideal generated by polys:
PolynomialReduction[f, gb, {x, y}]g does not reduce to zero, hence it does not belong to the ideal generated by polys:
PolynomialReduction[g, gb, {x, y}]Replace variables in a polynomial using equations relating old and new variables:
poly = (x + y) ^ 2;
eqns = {a == x ^ 2 + y ^ 2, b == x y};
gb = GroebnerBasis[eqns, {x, y}]The reduction gives a representation of poly in terms of a and b:
r = PolynomialReduction[(x + y) ^ 2, gb, {x, y}]This proves correctness of the representation:
poly == r /. ToRules[And@@eqns]//ExpandCompute the representation of a polynomial in an algebra
:
{p1, p2} = {x ^ 2 + y ^ 2, x y};Introduce tag variables and order them last in the monomial ordering:
gb = GroebnerBasis[{f1 - p1, f2 - p2}, {x, y}]Since the reduction is in
, this shows that
:
PolynomialReduction[(x + y) ^ 4, gb, {x, y}]% /. {f1 -> p1, f2 -> p2}//FactorProperties & Relations (4)
Reduce a polynomial with respect to a list of polynomials:
f = x ^ 2 - 2x y ^ 2 + y ^ 3 + 7;
polys = {x ^ 2 - y ^ 2 - 3, x y - 5};
PolynomialReduction[f, polys, {x, y}]Use PolynomialReduce to represent f as the linear combination of polys plus the reduction r:
{qs, r} = PolynomialReduce[f, polys, {x, y}]f == qs.polys + r//ExpandA polynomial belongs to the ideal generated by a Gröbner basis iff it reduces to zero:
{p, q} = {x ^ 2 + y ^ 2 + z ^ 2 - 1, x - 2y ^ 3 - 3};gb = GroebnerBasis[{p, q}, {x, y, z}]This shows that p is in the ideal generated by gb:
PolynomialReduction[p, gb, {x, y, z}]Univariate PolynomialReduction is equivalent to PolynomialRemainder:
PolynomialReduction[x ^ 5 - 3x + 7, {2x ^ 3 - 5x + 11}, x]PolynomialRemainder[x ^ 5 - 3x + 7, 2x ^ 3 - 5x + 11, x]Reduce a non-commutative polynomial with respect to a list of non-commutative polynomials:
p = x**x**y**x**y + 2 y**x**y**x + 3 x**y;
qq = {2 x**y**x + 3 x**x + 4 y + 5, 3 y**x**x + 4 y**x - 5 x + 6};NonCommutativePolynomialReduction[p, qq, {x, y}]Possible Issues (1)
PolynomialReduction depends on the ordering of variables:
polys = {x ^ 2 - y ^ 3 - 5, y ^ 3 - x ^ 3 + 7};
f = x ^ 5 + (x + y) ^ 2;
PolynomialReduction[f, polys, {x, y}]PolynomialReduction[f, polys, {y, x}]Tech Notes
Related Guides
History
Text
Wolfram Research (2026), PolynomialReduction, Wolfram Language function, https://reference.wolfram.com/language/ref/PolynomialReduction.html.
CMS
Wolfram Language. 2026. "PolynomialReduction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PolynomialReduction.html.
APA
Wolfram Language. (2026). PolynomialReduction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PolynomialReduction.html
BibTeX
@misc{reference.wolfram_2026_polynomialreduction, author="Wolfram Research", title="{PolynomialReduction}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/PolynomialReduction.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_polynomialreduction, organization={Wolfram Research}, title={PolynomialReduction}, year={2026}, url={https://reference.wolfram.com/language/ref/PolynomialReduction.html}, note=[Accessed: 12-June-2026]}