# PolynomialCategory(R, E, VarSet)ΒΆ

polycat.spad line 271 [edit on github]

R: Join(SemiRng, AbelianMonoid)

VarSet: OrderedSet

The category for general multi-variate polynomials over a ring `R`

, in variables from VarSet, with exponents from the OrderedAbelianMonoidSup. Here variables commute with the coefficients.

- 0: %
from AbelianMonoid

- 1: % if R has SemiRing
from MagmaWithUnit

- *: (%, %) -> %
from LeftModule %

- *: (%, Fraction Integer) -> % if R has Algebra Fraction Integer
from RightModule Fraction Integer

- *: (%, Integer) -> % if R has LinearlyExplicitOver Integer and R has Ring
from RightModule Integer

- *: (%, R) -> %
from RightModule R

- *: (Fraction Integer, %) -> % if R has Algebra Fraction Integer
from LeftModule Fraction Integer

- *: (Integer, %) -> % if % has AbelianGroup or R has AbelianGroup
from AbelianGroup

- *: (NonNegativeInteger, %) -> %
from AbelianMonoid

- *: (PositiveInteger, %) -> %
from AbelianSemiGroup

- *: (R, %) -> %
from LeftModule R

- +: (%, %) -> %
from AbelianSemiGroup

- -: % -> % if % has AbelianGroup or R has AbelianGroup
from AbelianGroup

- -: (%, %) -> % if % has AbelianGroup or R has AbelianGroup
from AbelianGroup

- /: (%, R) -> % if R has Field
from AbelianMonoidRing(R, E)

- ^: (%, NonNegativeInteger) -> % if R has SemiRing
from MagmaWithUnit

- ^: (%, PositiveInteger) -> %
from Magma

- annihilate?: (%, %) -> Boolean if R has Ring
from Rng

- antiCommutator: (%, %) -> %

- associates?: (%, %) -> Boolean if R has EntireRing
from EntireRing

- associator: (%, %, %) -> % if R has Ring
from NonAssociativeRng

- binomThmExpt: (%, %, NonNegativeInteger) -> % if % has CommutativeRing
from FiniteAbelianMonoidRing(R, E)

- characteristic: () -> NonNegativeInteger if R has Ring
from NonAssociativeRing

- charthRoot: % -> Union(%, failed) if % has CharacteristicNonZero and R has PolynomialFactorizationExplicit or R has CharacteristicNonZero

- coefficient: (%, E) -> R
from AbelianMonoidRing(R, E)

- coefficient: (%, List VarSet, List NonNegativeInteger) -> %
from MaybeSkewPolynomialCategory(R, E, VarSet)

- coefficient: (%, VarSet, NonNegativeInteger) -> %
from MaybeSkewPolynomialCategory(R, E, VarSet)

- coefficients: % -> List R
from FreeModuleCategory(R, E)

- coerce: % -> % if R has CommutativeRing
from Algebra %

- coerce: % -> OutputForm
from CoercibleTo OutputForm

- coerce: Fraction Integer -> % if R has RetractableTo Fraction Integer or R has Algebra Fraction Integer
- coerce: Integer -> % if R has RetractableTo Integer or R has Ring
from NonAssociativeRing

- coerce: R -> %
from Algebra R

- coerce: VarSet -> % if R has SemiRing
from CoercibleFrom VarSet

- commutator: (%, %) -> % if R has Ring
from NonAssociativeRng

- conditionP: Matrix % -> Union(Vector %, failed) if % has CharacteristicNonZero and R has PolynomialFactorizationExplicit

- construct: List Record(k: E, c: R) -> %
from IndexedProductCategory(R, E)

- constructOrdered: List Record(k: E, c: R) -> %
from IndexedProductCategory(R, E)

- content: % -> R if R has GcdDomain
from FiniteAbelianMonoidRing(R, E)

- content: (%, VarSet) -> % if R has GcdDomain
`content(p, v)`

is the`gcd`

of the coefficients of the polynomial`p`

when`p`

is viewed as a univariate polynomial with respect to the variable`v`

. Thus, for polynomial 7*x^2*y + 14*x*y^2, the`gcd`

of the coefficients with respect to`x`

is 7*y.

- convert: % -> InputForm if R has ConvertibleTo InputForm and VarSet has ConvertibleTo InputForm
from ConvertibleTo InputForm

- convert: % -> Pattern Float if R has ConvertibleTo Pattern Float and R has Ring and VarSet has ConvertibleTo Pattern Float
from ConvertibleTo Pattern Float

- convert: % -> Pattern Integer if R has ConvertibleTo Pattern Integer and R has Ring and VarSet has ConvertibleTo Pattern Integer
from ConvertibleTo Pattern Integer

- D: (%, List VarSet) -> % if R has Ring
from PartialDifferentialRing VarSet

- D: (%, List VarSet, List NonNegativeInteger) -> % if R has Ring
from PartialDifferentialRing VarSet

- D: (%, VarSet) -> % if R has Ring
from PartialDifferentialRing VarSet

- D: (%, VarSet, NonNegativeInteger) -> % if R has Ring
from PartialDifferentialRing VarSet

- degree: % -> E
from AbelianMonoidRing(R, E)

- degree: (%, List VarSet) -> List NonNegativeInteger
from MaybeSkewPolynomialCategory(R, E, VarSet)

- degree: (%, VarSet) -> NonNegativeInteger
from MaybeSkewPolynomialCategory(R, E, VarSet)

- differentiate: (%, List VarSet) -> % if R has Ring
from PartialDifferentialRing VarSet

- differentiate: (%, List VarSet, List NonNegativeInteger) -> % if R has Ring
from PartialDifferentialRing VarSet

- differentiate: (%, VarSet) -> % if R has Ring
from PartialDifferentialRing VarSet

- differentiate: (%, VarSet, NonNegativeInteger) -> % if R has Ring
from PartialDifferentialRing VarSet

- discriminant: (%, VarSet) -> % if R has CommutativeRing
`discriminant(p, v)`

returns the disriminant of the polynomial`p`

with respect to the variable`v`

.

- eval: (%, %, %) -> % if R has SemiRing
from InnerEvalable(%, %)

- eval: (%, Equation %) -> % if R has SemiRing
from Evalable %

- eval: (%, List %, List %) -> % if R has SemiRing
from InnerEvalable(%, %)

- eval: (%, List Equation %) -> % if R has SemiRing
from Evalable %

- eval: (%, List VarSet, List %) -> %
from InnerEvalable(VarSet, %)

- eval: (%, List VarSet, List R) -> %
from InnerEvalable(VarSet, R)

- eval: (%, VarSet, %) -> %
from InnerEvalable(VarSet, %)

- eval: (%, VarSet, R) -> %
from InnerEvalable(VarSet, R)

- exquo: (%, %) -> Union(%, failed) if R has EntireRing
from EntireRing

- exquo: (%, R) -> Union(%, failed) if R has EntireRing
from FiniteAbelianMonoidRing(R, E)

- factor: % -> Factored % if R has PolynomialFactorizationExplicit

- factorPolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PolynomialFactorizationExplicit

- factorSquareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PolynomialFactorizationExplicit

- fmecg: (%, E, R, %) -> % if R has Ring
from FiniteAbelianMonoidRing(R, E)

- gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial % if R has GcdDomain
from GcdDomain

- ground?: % -> Boolean
from FiniteAbelianMonoidRing(R, E)

- ground: % -> R
from FiniteAbelianMonoidRing(R, E)

- hash: % -> SingleInteger if VarSet has Hashable and R has Hashable
from Hashable

- isExpt: % -> Union(Record(var: VarSet, exponent: NonNegativeInteger), failed) if R has SemiRing
`isExpt(p)`

returns`[x, n]`

if polynomial`p`

has the form`x^n`

and`n > 0`

.

- isPlus: % -> Union(List %, failed)
`isPlus(p)`

returns`[m1, ..., mn]`

if polynomial`p = m1 + ... + mn`

and`n >= 2`

and each`mi`

is a nonzero monomial.

- isTimes: % -> Union(List %, failed) if R has SemiRing
`isTimes(p)`

returns`[a1, ..., an]`

if polynomial`p = a1 ... an`

and`n >= 2`

, and, for each`i`

,`ai`

is either a nontrivial constant in`R`

or else of the form`x^e`

, where`e > 0`

is an integer and`x`

is a member of VarSet.

- latex: % -> String
from SetCategory

- lcmCoef: (%, %) -> Record(llcm_res: %, coeff1: %, coeff2: %) if R has GcdDomain
from LeftOreRing

- leadingCoefficient: % -> R
from IndexedProductCategory(R, E)

- leadingMonomial: % -> %
from IndexedProductCategory(R, E)

- leadingSupport: % -> E
from IndexedProductCategory(R, E)

- leadingTerm: % -> Record(k: E, c: R)
from IndexedProductCategory(R, E)

- leftPower: (%, NonNegativeInteger) -> % if R has SemiRing
from MagmaWithUnit

- leftPower: (%, PositiveInteger) -> %
from Magma

- leftRecip: % -> Union(%, failed) if R has SemiRing
from MagmaWithUnit

- linearExtend: (E -> R, %) -> R if R has CommutativeRing
from FreeModuleCategory(R, E)

- listOfTerms: % -> List Record(k: E, c: R)
from IndexedDirectProductCategory(R, E)

- mainVariable: % -> Union(VarSet, failed)
from MaybeSkewPolynomialCategory(R, E, VarSet)

- map: (R -> R, %) -> %
from IndexedProductCategory(R, E)

- mapExponents: (E -> E, %) -> %
from FiniteAbelianMonoidRing(R, E)

- minimumDegree: % -> E
from FiniteAbelianMonoidRing(R, E)

- minimumDegree: (%, List VarSet) -> List NonNegativeInteger
`minimumDegree(p, lv)`

gives the list of minimum degrees of the polynomial`p`

with respect to each of the variables in the list`lv`

- minimumDegree: (%, VarSet) -> NonNegativeInteger
`minimumDegree(p, v)`

gives the minimum degree of polynomial`p`

with respect to`v`

, i.e. viewed a univariate polynomial in`v`

- monicDivide: (%, %, VarSet) -> Record(quotient: %, remainder: %) if R has Ring
`monicDivide(a, b, v)`

divides the polynomial a by the polynomial`b`

, with each viewed as a univariate polynomial in`v`

returning both the quotient and remainder. Error: if`b`

is not monic with respect to`v`

.

- monomial?: % -> Boolean
from IndexedProductCategory(R, E)

- monomial: (%, List VarSet, List NonNegativeInteger) -> %
from MaybeSkewPolynomialCategory(R, E, VarSet)

- monomial: (%, VarSet, NonNegativeInteger) -> %
from MaybeSkewPolynomialCategory(R, E, VarSet)

- monomial: (R, E) -> %
from IndexedProductCategory(R, E)

- monomials: % -> List %
from MaybeSkewPolynomialCategory(R, E, VarSet)

- multivariate: (SparseUnivariatePolynomial %, VarSet) -> %
`multivariate(sup, v)`

converts an anonymous univariable polynomial`sup`

to a polynomial in the variable`v`

.

- multivariate: (SparseUnivariatePolynomial R, VarSet) -> %
`multivariate(sup, v)`

converts an anonymous univariable polynomial`sup`

to a polynomial in the variable`v`

.

- numberOfMonomials: % -> NonNegativeInteger
from IndexedDirectProductCategory(R, E)

- one?: % -> Boolean if R has SemiRing
from MagmaWithUnit

- opposite?: (%, %) -> Boolean
from AbelianMonoid

- patternMatch: (%, Pattern Float, PatternMatchResult(Float, %)) -> PatternMatchResult(Float, %) if VarSet has PatternMatchable Float and R has PatternMatchable Float and R has Ring
from PatternMatchable Float

- patternMatch: (%, Pattern Integer, PatternMatchResult(Integer, %)) -> PatternMatchResult(Integer, %) if VarSet has PatternMatchable Integer and R has PatternMatchable Integer and R has Ring
from PatternMatchable Integer

- plenaryPower: (%, PositiveInteger) -> % if R has Algebra Fraction Integer or R has CommutativeRing
from NonAssociativeAlgebra %

- pomopo!: (%, R, E, %) -> %
from FiniteAbelianMonoidRing(R, E)

- prime?: % -> Boolean if R has PolynomialFactorizationExplicit

- primitiveMonomials: % -> List % if R has SemiRing
from MaybeSkewPolynomialCategory(R, E, VarSet)

- primitivePart: % -> % if R has GcdDomain
`primitivePart(p)`

returns the unitCanonical associate of the polynomial`p`

with its content divided out.

- primitivePart: (%, VarSet) -> % if R has GcdDomain
`primitivePart(p, v)`

returns the unitCanonical associate of the polynomial`p`

with its content with respect to the variable`v`

divided out.

- recip: % -> Union(%, failed) if R has SemiRing
from MagmaWithUnit

- reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix Integer, vec: Vector Integer) if R has LinearlyExplicitOver Integer and R has Ring
- reducedSystem: (Matrix %, Vector %) -> Record(mat: Matrix R, vec: Vector R) if R has Ring
from LinearlyExplicitOver R

- reducedSystem: Matrix % -> Matrix Integer if R has LinearlyExplicitOver Integer and R has Ring
- reducedSystem: Matrix % -> Matrix R if R has Ring
from LinearlyExplicitOver R

- reductum: % -> %
from IndexedProductCategory(R, E)

- resultant: (%, %, VarSet) -> % if R has CommutativeRing
`resultant(p, q, v)`

returns the resultant of the polynomials`p`

and`q`

with respect to the variable`v`

.

- retract: % -> Fraction Integer if R has RetractableTo Fraction Integer
from RetractableTo Fraction Integer

- retract: % -> Integer if R has RetractableTo Integer
from RetractableTo Integer

- retract: % -> R
from RetractableTo R

- retract: % -> VarSet if R has SemiRing
from RetractableTo VarSet

- retractIfCan: % -> Union(Fraction Integer, failed) if R has RetractableTo Fraction Integer
from RetractableTo Fraction Integer

- retractIfCan: % -> Union(Integer, failed) if R has RetractableTo Integer
from RetractableTo Integer

- retractIfCan: % -> Union(R, failed)
from RetractableTo R

- retractIfCan: % -> Union(VarSet, failed) if R has SemiRing
from RetractableTo VarSet

- rightPower: (%, NonNegativeInteger) -> % if R has SemiRing
from MagmaWithUnit

- rightPower: (%, PositiveInteger) -> %
from Magma

- rightRecip: % -> Union(%, failed) if R has SemiRing
from MagmaWithUnit

- sample: %
from AbelianMonoid

- smaller?: (%, %) -> Boolean if R has Comparable
from Comparable

- solveLinearPolynomialEquation: (List SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> Union(List SparseUnivariatePolynomial %, failed) if R has PolynomialFactorizationExplicit

- squareFree: % -> Factored % if R has GcdDomain
`squareFree(p)`

returns the square free factorization of the polynomial`p`

.

- squareFreePart: % -> % if R has GcdDomain
`squareFreePart(p)`

returns product of all the irreducible factors of polynomial`p`

each taken with multiplicity one.

- squareFreePolynomial: SparseUnivariatePolynomial % -> Factored SparseUnivariatePolynomial % if R has PolynomialFactorizationExplicit

- subtractIfCan: (%, %) -> Union(%, failed)

- support: % -> List E
from FreeModuleCategory(R, E)

- totalDegree: % -> NonNegativeInteger
from MaybeSkewPolynomialCategory(R, E, VarSet)

- totalDegree: (%, List VarSet) -> NonNegativeInteger
from MaybeSkewPolynomialCategory(R, E, VarSet)

- totalDegreeSorted: (%, List VarSet) -> NonNegativeInteger
from MaybeSkewPolynomialCategory(R, E, VarSet)

- unit?: % -> Boolean if R has EntireRing
from EntireRing

- unitCanonical: % -> % if R has EntireRing
from EntireRing

- unitNormal: % -> Record(unit: %, canonical: %, associate: %) if R has EntireRing
from EntireRing

- univariate: % -> SparseUnivariatePolynomial R
`univariate(p)`

converts the multivariate polynomial`p`

, which should actually involve only one variable, into a univariate polynomial in that variable, whose coefficients are in the ground ring. Error: if polynomial is genuinely multivariate

- univariate: (%, VarSet) -> SparseUnivariatePolynomial %
`univariate(p, v)`

converts the multivariate polynomial`p`

into a univariate polynomial in`v`

, whose coefficients are still multivariate polynomials (in all the other variables).

- variables: % -> List VarSet
from MaybeSkewPolynomialCategory(R, E, VarSet)

- zero?: % -> Boolean
from AbelianMonoid

AbelianGroup if R has AbelianGroup

AbelianMonoidRing(R, E)

Algebra % if R has CommutativeRing

Algebra Fraction Integer if R has Algebra Fraction Integer

Algebra R if R has CommutativeRing

BiModule(%, %)

BiModule(Fraction Integer, Fraction Integer) if R has Algebra Fraction Integer

BiModule(R, R)

canonicalUnitNormal if R has canonicalUnitNormal

CharacteristicNonZero if R has CharacteristicNonZero

CharacteristicZero if R has CharacteristicZero

CoercibleFrom Fraction Integer if R has RetractableTo Fraction Integer

CoercibleFrom Integer if R has RetractableTo Integer

CoercibleFrom VarSet if R has SemiRing

CommutativeRing if R has CommutativeRing

CommutativeStar if R has CommutativeRing

Comparable if R has Comparable

ConvertibleTo InputForm if R has ConvertibleTo InputForm and VarSet has ConvertibleTo InputForm

ConvertibleTo Pattern Float if R has ConvertibleTo Pattern Float and R has Ring and VarSet has ConvertibleTo Pattern Float

ConvertibleTo Pattern Integer if R has ConvertibleTo Pattern Integer and R has Ring and VarSet has ConvertibleTo Pattern Integer

EntireRing if R has EntireRing

FiniteAbelianMonoidRing(R, E)

FreeModuleCategory(R, E)

FullyLinearlyExplicitOver R if R has Ring

Hashable if VarSet has Hashable and R has Hashable

IndexedDirectProductCategory(R, E)

IndexedProductCategory(R, E)

InnerEvalable(%, %) if R has SemiRing

InnerEvalable(VarSet, %)

InnerEvalable(VarSet, R)

IntegralDomain if R has IntegralDomain

LeftModule Fraction Integer if R has Algebra Fraction Integer

LeftOreRing if R has GcdDomain

LinearlyExplicitOver Integer if R has LinearlyExplicitOver Integer and R has Ring

LinearlyExplicitOver R if R has Ring

MagmaWithUnit if R has SemiRing

MaybeSkewPolynomialCategory(R, E, VarSet)

Module % if R has CommutativeRing

Module Fraction Integer if R has Algebra Fraction Integer

Module R if R has CommutativeRing

NonAssociativeAlgebra % if R has CommutativeRing

NonAssociativeAlgebra Fraction Integer if R has Algebra Fraction Integer

NonAssociativeAlgebra R if R has CommutativeRing

NonAssociativeRing if R has Ring

NonAssociativeRng if R has Ring

NonAssociativeSemiRing if R has SemiRing

noZeroDivisors if R has EntireRing

PartialDifferentialRing VarSet if R has Ring

PatternMatchable Float if VarSet has PatternMatchable Float and R has PatternMatchable Float and R has Ring

PatternMatchable Integer if VarSet has PatternMatchable Integer and R has PatternMatchable Integer and R has Ring

PolynomialFactorizationExplicit if R has PolynomialFactorizationExplicit

RetractableTo Fraction Integer if R has RetractableTo Fraction Integer

RetractableTo Integer if R has RetractableTo Integer

RetractableTo VarSet if R has SemiRing

RightModule Fraction Integer if R has Algebra Fraction Integer

RightModule Integer if R has LinearlyExplicitOver Integer and R has Ring

TwoSidedRecip if R has CommutativeRing

UniqueFactorizationDomain if R has PolynomialFactorizationExplicit

unitsKnown if R has Ring