# IndexedDirectProductCategory(A, S)ΒΆ

- A: SetCategory
- S: Comparable

This category represents the direct product of some set with respect to an ordered indexing set. The ordered set `S`

is considered as the `basis elements\ ``''`

and the elements from `A`

as `coefficients\ ``''`

.

- 0: % if A has AbelianMonoid
- from AbelianMonoid
- *: (Integer, %) -> % if A has AbelianGroup
- from AbelianGroup
- *: (NonNegativeInteger, %) -> % if A has AbelianMonoid
- from AbelianMonoid
- *: (PositiveInteger, %) -> % if A has AbelianMonoid
- from AbelianSemiGroup
- +: (%, %) -> % if A has AbelianMonoid
- from AbelianSemiGroup
- -: % -> % if A has AbelianGroup
- from AbelianGroup
- -: (%, %) -> % if A has AbelianGroup
- from AbelianGroup
- <: (%, %) -> Boolean if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from PartialOrder
- <=: (%, %) -> Boolean if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from PartialOrder
- =: (%, %) -> Boolean if A has AbelianMonoid or A has Comparable
- from BasicType
- >: (%, %) -> Boolean if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from PartialOrder
- >=: (%, %) -> Boolean if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from PartialOrder
- ~=: (%, %) -> Boolean if A has AbelianMonoid or A has Comparable
- from BasicType
- coerce: % -> OutputForm if A has AbelianMonoid or A has Comparable
- from CoercibleTo OutputForm

- construct: List Record(k: S, c: A) -> %
`construct(l)`

takes a list of terms and creates the object with these components.

- constructOrdered: List Record(k: S, c: A) -> %
`constructOrdered(l)`

takes a list of terms and creates the object with these components. The list is assumed to be sorted (in reverse order) with respect to the ordering of`S`

. If`R`

is a monoid, then the list is assumend to contain no zero elements. Caution: No checking is performed, so this should only be used in cases where those conditions are assured. If in doubt use`construct`

.- hash: % -> SingleInteger if A has AbelianMonoid or A has Comparable
- from SetCategory
- hashUpdate!: (HashState, %) -> HashState if A has AbelianMonoid or A has Comparable
- from SetCategory
- latex: % -> String if A has AbelianMonoid or A has Comparable
- from SetCategory

- leadingCoefficient: % -> A
`leadingCoefficient(z)`

returns the coefficient of the leading (with respect to the ordering on the indexing set) monomial of`z`

. Error: if`z`

has no support.

- leadingMonomial: % -> %
`leadingMonomial(x)`

returns the monomial supported by the first element from`S`

. Error: if`x`

has no support.

- leadingSupport: % -> S
`leadingSupport(z)`

returns the index of leading (with respect to the ordering on the indexing set) monomial of`z`

. Error: if`z`

has no support.

- leadingTerm: % -> Record(k: S, c: A)
`leadingTerm(x)`

returns the leading (with respect to the ordering on the indexing set) term of`z`

. Error: if`z`

has no support.

- listOfTerms: % -> List Record(k: S, c: A)
`listOfTerms(x)`

returns a list`lt`

of terms with type`Record(k: S, c: R)`

such that`x`

equals`constructOrdered lt`

.

- map: (A -> A, %) -> %
`map(f, z)`

returns the new element created by applying the function`f`

to each component of the direct product element`z`

.- max: (%, %) -> % if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from OrderedSet
- min: (%, %) -> % if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid
- from OrderedSet

- monomial: (A, S) -> %
`monomial(a, s)`

constructs a direct product element with the`s`

component set to`a`

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

returns`true`

if`x`

is a single monomial, that is support of`x`

consists of a single element.

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

returns the number of monomials of`x`

.- opposite?: (%, %) -> Boolean if A has AbelianMonoid
- from AbelianMonoid

- reductum: % -> %
`reductum(z)`

returns a new element created by removing the leading coefficient/support pair from the element`z`

. Error: if`z`

has no support.- sample: % if A has AbelianMonoid
- from AbelianMonoid
- smaller?: (%, %) -> Boolean if A has Comparable
- from Comparable
- subtractIfCan: (%, %) -> Union(%, failed) if A has CancellationAbelianMonoid
- from CancellationAbelianMonoid
- sup: (%, %) -> % if S has OrderedSet and A has OrderedAbelianMonoidSup
- from OrderedAbelianMonoidSup
- zero?: % -> Boolean if A has AbelianMonoid
- from AbelianMonoid

AbelianGroup if A has AbelianGroup

AbelianMonoid if A has AbelianMonoid

AbelianSemiGroup if A has AbelianMonoid

BasicType if A has AbelianMonoid or A has Comparable

CancellationAbelianMonoid if A has CancellationAbelianMonoid

CoercibleTo OutputForm if A has AbelianMonoid or A has Comparable

Comparable if A has Comparable

OrderedAbelianMonoid if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid

OrderedAbelianMonoidSup if S has OrderedSet and A has OrderedAbelianMonoidSup

OrderedAbelianSemiGroup if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid

OrderedCancellationAbelianMonoid if S has OrderedSet and A has OrderedAbelianMonoidSup

OrderedSet if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid

PartialOrder if S has OrderedSet and A has OrderedAbelianMonoidSup or S has OrderedSet and A has OrderedAbelianMonoid

SetCategory if A has AbelianMonoid or A has Comparable