# OrdinaryWeightedPolynomials(R, vl, wl, wtlevel)¶

- R: Ring
- vl: List Symbol
- wl: List NonNegativeInteger
- wtlevel: NonNegativeInteger

This domain represents truncated weighted polynomials over the “Polynomial” type. The variables must be specified, as must the weights. The representation is sparse in the sense that only non-zero terms are represented.

- 0: %
- from AbelianMonoid
- 1: %
- from MagmaWithUnit
- *: (%, %) -> %
- from Magma
- *: (%, R) -> % if R has CommutativeRing
- from RightModule R
- *: (Integer, %) -> %
- from AbelianGroup
- *: (NonNegativeInteger, %) -> %
- from AbelianMonoid
- *: (PositiveInteger, %) -> %
- from AbelianSemiGroup
- *: (R, %) -> % if R has CommutativeRing
- from LeftModule R
- +: (%, %) -> %
- from AbelianSemiGroup
- -: % -> %
- from AbelianGroup
- -: (%, %) -> %
- from AbelianGroup

- /: (%, %) -> Union(%, failed) if R has Field
`x/y`

division (only works if minimum weight of divisor is zero, and if`R`

is a Field)- =: (%, %) -> Boolean
- from BasicType
- ^: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- ^: (%, PositiveInteger) -> %
- from Magma
- ~=: (%, %) -> Boolean
- from BasicType
- annihilate?: (%, %) -> Boolean
- from Rng
- antiCommutator: (%, %) -> %
- from NonAssociativeSemiRng
- associator: (%, %, %) -> %
- from NonAssociativeRng

- changeWeightLevel: NonNegativeInteger -> Void
`changeWeightLevel(n)`

This changes the weight level to the new value given:`NB:`

previously calculated terms are not affected- characteristic: () -> NonNegativeInteger
- from NonAssociativeRing
- coerce: % -> OutputForm
- from CoercibleTo OutputForm

- coerce: % -> Polynomial R
`coerce(p)`

converts back into a Polynomial(`R`

), ignoring weights- coerce: Integer -> %
- from NonAssociativeRing

- coerce: Polynomial R -> %
`coerce(p)`

coerces a Polynomial(`R`

) into Weighted form, applying weights and ignoring terms- coerce: R -> % if R has CommutativeRing
- from Algebra R
- commutator: (%, %) -> %
- from NonAssociativeRng
- hash: % -> SingleInteger
- from SetCategory
- hashUpdate!: (HashState, %) -> HashState
- from SetCategory
- latex: % -> String
- from SetCategory
- leftPower: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- leftPower: (%, PositiveInteger) -> %
- from Magma
- leftRecip: % -> Union(%, failed)
- from MagmaWithUnit
- one?: % -> Boolean
- from MagmaWithUnit
- opposite?: (%, %) -> Boolean
- from AbelianMonoid
- recip: % -> Union(%, failed)
- from MagmaWithUnit
- rightPower: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- rightPower: (%, PositiveInteger) -> %
- from Magma
- rightRecip: % -> Union(%, failed)
- from MagmaWithUnit
- sample: %
- from AbelianMonoid
- subtractIfCan: (%, %) -> Union(%, failed)
- from CancellationAbelianMonoid
- zero?: % -> Boolean
- from AbelianMonoid

Algebra R if R has CommutativeRing

BiModule(%, %)

BiModule(R, R) if R has CommutativeRing

LeftModule R if R has CommutativeRing

Module R if R has CommutativeRing

RightModule R if R has CommutativeRing