# MonoidRingCategory(R, M)ΒΆ

MonoidRingCategory(`R`

, `M`

) defines the algebra of all maps from the monoid `M`

to the commutative ring `R`

with finite support.

- 0: %
- from AbelianMonoid
- 1: %
- from MagmaWithUnit
- *: (%, %) -> %
- from Magma
- *: (%, R) -> % if M has Comparable or R has CommutativeRing
- from RightModule R
- *: (Integer, %) -> %
- from AbelianGroup
- *: (M, R) -> % if M has Comparable
- from FreeModuleCategory(R, M)
- *: (NonNegativeInteger, %) -> %
- from AbelianMonoid
- *: (PositiveInteger, %) -> %
- from AbelianSemiGroup
- *: (R, %) -> % if M has Comparable or R has CommutativeRing
- from LeftModule R
- *: (R, M) -> % if M has Comparable
- from FreeModuleCategory(R, M)
- +: (%, %) -> %
- from AbelianSemiGroup
- -: % -> %
- from AbelianGroup
- -: (%, %) -> %
- from AbelianGroup
- <: (%, %) -> Boolean if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from PartialOrder
- <=: (%, %) -> Boolean if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from PartialOrder
- =: (%, %) -> Boolean
- from BasicType
- >: (%, %) -> Boolean if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from PartialOrder
- >=: (%, %) -> Boolean if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from PartialOrder
- ^: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- ^: (%, PositiveInteger) -> %
- from Magma
- ~=: (%, %) -> Boolean
- from BasicType
- annihilate?: (%, %) -> Boolean
- from Rng
- antiCommutator: (%, %) -> %
- from NonAssociativeSemiRng
- associator: (%, %, %) -> %
- from NonAssociativeRng
- characteristic: () -> NonNegativeInteger
- from NonAssociativeRing
- charthRoot: % -> Union(%, failed) if R has CharacteristicNonZero
- from CharacteristicNonZero

- coefficient: (%, M) -> R
`coefficient(f, m)`

extracts the coefficient of`m`

in`f`

with respect to the canonical basis`M`

.

- coefficients: % -> List R
`coefficients(f)`

lists all non-zero coefficients.- coerce: % -> % if R has CommutativeRing and M has CommutativeStar
- from Algebra %
- coerce: % -> OutputForm
- from CoercibleTo OutputForm
- coerce: Integer -> %
- from NonAssociativeRing

- coerce: List Record(k: M, c: R) -> %
`coerce(lt)`

converts a list of terms and coefficients to a member of the domain.- coerce: M -> %
- from RetractableTo M
- coerce: R -> %
- from RetractableTo R
- commutator: (%, %) -> %
- from NonAssociativeRng
- construct: List Record(k: M, c: R) -> % if M has Comparable
- from IndexedDirectProductCategory(R, M)
- constructOrdered: List Record(k: M, c: R) -> % if M has Comparable
- from IndexedDirectProductCategory(R, M)
- convert: % -> InputForm if R has Finite and M has Finite
- from ConvertibleTo InputForm
- enumerate: () -> List % if R has Finite and M has Finite
- from Finite
- hash: % -> SingleInteger
- from SetCategory
- hashUpdate!: (HashState, %) -> HashState
- from SetCategory
- index: PositiveInteger -> % if R has Finite and M has Finite
- from Finite
- latex: % -> String
- from SetCategory
- leadingCoefficient: % -> R if M has Comparable
- from IndexedDirectProductCategory(R, M)
- leadingMonomial: % -> % if M has Comparable
- from IndexedDirectProductCategory(R, M)
- leadingSupport: % -> M if M has Comparable
- from IndexedDirectProductCategory(R, M)
- leadingTerm: % -> Record(k: M, c: R) if M has Comparable
- from IndexedDirectProductCategory(R, M)
- leftPower: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- leftPower: (%, PositiveInteger) -> %
- from Magma
- leftRecip: % -> Union(%, failed)
- from MagmaWithUnit
- linearExtend: (M -> R, %) -> R if R has CommutativeRing and M has Comparable
- from FreeModuleCategory(R, M)
- listOfTerms: % -> List Record(k: M, c: R) if M has Comparable
- from IndexedDirectProductCategory(R, M)
- lookup: % -> PositiveInteger if R has Finite and M has Finite
- from Finite

- map: (R -> R, %) -> %
`map(fn, u)`

maps function`fn`

onto the coefficients of the non-zero monomials of`u`

.- max: (%, %) -> % if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from OrderedSet
- min: (%, %) -> % if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable
- from OrderedSet

- monomial: (R, M) -> %
`monomial(r, m)`

creates a scalar multiple of the basis element`m`

.

- monomial?: % -> Boolean
`monomial?(f)`

tests if`f`

is a single monomial.

- monomials: % -> List %
`monomials(f)`

gives the list of all monomials whose sum is`f`

.

- numberOfMonomials: % -> NonNegativeInteger
`numberOfMonomials(f)`

is the number of non-zero coefficients with respect to the canonical basis.- one?: % -> Boolean
- from MagmaWithUnit
- opposite?: (%, %) -> Boolean
- from AbelianMonoid
- random: () -> % if R has Finite and M has Finite
- from Finite
- recip: % -> Union(%, failed)
- from MagmaWithUnit
- reductum: % -> % if M has Comparable
- from IndexedDirectProductCategory(R, M)
- retract: % -> M
- from RetractableTo M
- retract: % -> R
- from RetractableTo R
- retractIfCan: % -> Union(M, failed)
- from RetractableTo M
- retractIfCan: % -> Union(R, failed)
- from RetractableTo R
- rightPower: (%, NonNegativeInteger) -> %
- from MagmaWithUnit
- rightPower: (%, PositiveInteger) -> %
- from Magma
- rightRecip: % -> Union(%, failed)
- from MagmaWithUnit
- sample: %
- from AbelianMonoid
- size: () -> NonNegativeInteger if R has Finite and M has Finite
- from Finite
- smaller?: (%, %) -> Boolean if R has Comparable and M has Comparable or R has Finite and M has Finite
- from Comparable
- subtractIfCan: (%, %) -> Union(%, failed)
- from CancellationAbelianMonoid
- sup: (%, %) -> % if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup
- from OrderedAbelianMonoidSup
- support: % -> List M if M has Comparable
- from FreeModuleCategory(R, M)

- terms: % -> List Record(k: M, c: R)
`terms(f)`

gives the list of non-zero coefficients combined with their corresponding basis element as records. This is the internal representation.- totalDegree: % -> NonNegativeInteger if M has coerce: M -> Vector NonNegativeInteger and M has Comparable
- from FreeModuleCategory(R, M)
- zero?: % -> Boolean
- from AbelianMonoid

AbelianProductCategory R if M has Comparable

Algebra % if R has CommutativeRing and M has CommutativeStar

Algebra R if R has CommutativeRing

BiModule(%, %)

BiModule(R, R) if M has Comparable or R has CommutativeRing

CharacteristicNonZero if R has CharacteristicNonZero

CharacteristicZero if R has CharacteristicZero

CommutativeRing if R has CommutativeRing and M has CommutativeStar

CommutativeStar if R has CommutativeRing and M has CommutativeStar

Comparable if R has Comparable and M has Comparable or R has Finite and M has Finite

ConvertibleTo InputForm if R has Finite and M has Finite

Finite if R has Finite and M has Finite

FreeModuleCategory(R, M) if M has Comparable

IndexedDirectProductCategory(R, M) if M has Comparable

LeftModule R if M has Comparable or R has CommutativeRing

Module % if R has CommutativeRing and M has CommutativeStar

Module R if R has CommutativeRing

OrderedAbelianMonoid if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable

OrderedAbelianMonoidSup if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup

OrderedAbelianSemiGroup if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable

OrderedCancellationAbelianMonoid if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup

OrderedSet if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable

PartialOrder if M has Comparable and M has OrderedSet and R has OrderedAbelianMonoidSup or R has OrderedAbelianMonoid and M has OrderedSet and M has Comparable

RightModule R if M has Comparable or R has CommutativeRing

TwoSidedRecip if R has CommutativeRing and M has CommutativeStar