# FiniteAbelianMonoidRing(R, E)¶

polycat.spad line 54 [edit on github]

R: Join(SemiRng, AbelianMonoid)

This category is similar to AbelianMonoidRing, except that the sum is assumed to be finite. It is a useful model for polynomials, but is somewhat more general.

- 0: %
from AbelianMonoid

- 1: % if R has SemiRing
from MagmaWithUnit

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

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

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

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

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

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

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

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

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

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

- -: (%, %) -> % if R has AbelianGroup or % 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
`binomThmExpt(p, q, n)`

returns`(p+q)^n`

by means of the binomial theorem trick.

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

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

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

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

- coerce: % -> % if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients
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 Ring or R has RetractableTo Integer
from NonAssociativeRing

- coerce: R -> %
from Algebra R

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

- 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
`content(p)`

gives the`gcd`

of the coefficients of polynomial`p`

.

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

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

- exquo: (%, R) -> Union(%, failed) if R has EntireRing
`exquo(p,r)`

returns the exact quotient of polynomial`p`

by`r`

, or “failed” if none exists.

- fmecg: (%, E, R, %) -> % if R has Ring
`fmecg(p1, e, r, p2)`

returns`p1 - monomial(r, e) * p2`

.

- ground?: % -> Boolean
`ground?(p)`

tests if polynomial`p`

is a member of the coefficient ring.

- ground: % -> R
`ground(p)`

retracts polynomial`p`

to the coefficient ring.

- latex: % -> String
from SetCategory

- 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)

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

- mapExponents: (E -> E, %) -> %
`mapExponents(fn, u)`

maps function`fn`

onto the exponents of the non-zero monomials of polynomial`u`

.

- minimumDegree: % -> E
`minimumDegree(p)`

gives the least exponent of a non-zero term of polynomial`p`

. Error: if applied to 0.

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

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

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

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

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

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

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

- pomopo!: (%, R, E, %) -> %
`pomopo!(p1, r, e, p2)`

returns`p1 + monomial(r, e) * p2`

and may use`p1`

as workspace. The constant`r`

is assumed to be nonzero.

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

returns the unit normalized form of polynomial`p`

divided by the content of`p`

.

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

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

- 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

- 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

- 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

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

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

- 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

- zero?: % -> Boolean
from AbelianMonoid

AbelianGroup if R has AbelianGroup

AbelianMonoidRing(R, E)

Algebra % if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients

Algebra Fraction Integer if R has Algebra Fraction Integer

Algebra R if R has CommutativeRing and % has VariablesCommuteWithCoefficients

BiModule(%, %)

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

BiModule(R, R)

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

CommutativeRing if R has CommutativeRing and % has VariablesCommuteWithCoefficients or R has IntegralDomain and % has VariablesCommuteWithCoefficients

CommutativeStar if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients

Comparable if R has Comparable

EntireRing if R has EntireRing

FreeModuleCategory(R, E)

IndexedDirectProductCategory(R, E)

IndexedProductCategory(R, E)

IntegralDomain if R has IntegralDomain and % has VariablesCommuteWithCoefficients

LeftModule Fraction Integer if R has Algebra Fraction Integer

MagmaWithUnit if R has SemiRing

Module % if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients

Module Fraction Integer if R has Algebra Fraction Integer

Module R if R has CommutativeRing

NonAssociativeAlgebra % if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients

NonAssociativeAlgebra Fraction Integer if R has Algebra Fraction Integer

NonAssociativeAlgebra R if R has CommutativeRing and % has VariablesCommuteWithCoefficients

NonAssociativeRing if R has Ring

NonAssociativeRng if R has Ring

NonAssociativeSemiRing if R has SemiRing

noZeroDivisors if R has EntireRing

RetractableTo Fraction Integer if R has RetractableTo Fraction Integer

RetractableTo Integer if R has RetractableTo Integer

RightModule Fraction Integer if R has Algebra Fraction Integer

TwoSidedRecip if R has IntegralDomain and % has VariablesCommuteWithCoefficients or R has CommutativeRing and % has VariablesCommuteWithCoefficients

unitsKnown if R has Ring