# FreeModule(R, S)¶

A bi-module is a free module over a ring with generators indexed by an ordered set. Each element can be expressed as a finite linear combination of generators. Only non-zero terms are stored. old domain FreeModule1 was merged to it in May 2009 The description of the latter: This domain implements linear combinations of elements from the domain S with coefficients in the domain R where S is an ordered set and R is a ring (which may be non-commutative). This domain is used by domains of non-commutative algebra such as: XDistributedPolynomial, XRecursivePolynomial. Author: Michel Petitot (petitot@lifl.fr)

0: %

from AbelianMonoid

*: (%, R) -> %

from RightModule R

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

from AbelianGroup

*: (NonNegativeInteger, %) -> %

from AbelianMonoid

*: (PositiveInteger, %) -> %

from AbelianSemiGroup

*: (R, %) -> %

from LeftModule R

*: (R, S) -> %

r*b returns the product of r by b.

*: (S, R) -> %

s*r returns the product r*s used by XRecursivePolynomial

+: (%, %) -> %

from AbelianSemiGroup

-: % -> % if R has AbelianGroup

from AbelianGroup

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

from AbelianGroup

<=: (%, %) -> Boolean if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from PartialOrder

<: (%, %) -> Boolean if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from PartialOrder

=: (%, %) -> Boolean

from BasicType

>=: (%, %) -> Boolean if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from PartialOrder

>: (%, %) -> Boolean if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from PartialOrder

~=: (%, %) -> Boolean

from BasicType

coefficient: (%, S) -> R

from FreeModuleCategory(R, S)

coefficients: % -> List R

from FreeModuleCategory(R, S)

coerce: % -> OutputForm
coerce: S -> % if R has SemiRing

from CoercibleFrom S

construct: List Record(k: S, c: R) -> %

from IndexedProductCategory(R, S)

constructOrdered: List Record(k: S, c: R) -> % if S has Comparable

from IndexedProductCategory(R, S)

hash: % -> SingleInteger

from SetCategory

hashUpdate!: (HashState, %) -> HashState

from SetCategory

latex: % -> String

from SetCategory

leadingCoefficient: % -> R if S has Comparable

from IndexedProductCategory(R, S)

leadingMonomial: % -> % if S has Comparable

from IndexedProductCategory(R, S)

leadingSupport: % -> S if S has Comparable

from IndexedProductCategory(R, S)

leadingTerm: % -> Record(k: S, c: R) if S has Comparable

from IndexedProductCategory(R, S)

linearExtend: (S -> R, %) -> R if R has CommutativeRing

from FreeModuleCategory(R, S)

listOfTerms: % -> List Record(k: S, c: R)

from IndexedDirectProductCategory(R, S)

map: (R -> R, %) -> %

from IndexedProductCategory(R, S)

max: (%, %) -> % if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from OrderedSet

min: (%, %) -> % if S has OrderedSet and R has OrderedAbelianMonoidSup or S has OrderedSet and R has OrderedAbelianMonoid

from OrderedSet

monomial?: % -> Boolean

from IndexedProductCategory(R, S)

monomial: (R, S) -> %

from IndexedProductCategory(R, S)

monomials: % -> List %

from FreeModuleCategory(R, S)

numberOfMonomials: % -> NonNegativeInteger

from IndexedDirectProductCategory(R, S)

opposite?: (%, %) -> Boolean

from AbelianMonoid

reductum: % -> % if S has Comparable

from IndexedProductCategory(R, S)

retract: % -> S if R has SemiRing

from RetractableTo S

retractIfCan: % -> Union(S, failed) if R has SemiRing

from RetractableTo S

sample: %

from AbelianMonoid

smaller?: (%, %) -> Boolean if S has OrderedSet and R has OrderedAbelianMonoid or S has OrderedSet and R has OrderedAbelianMonoidSup or R has Comparable and S has Comparable

from Comparable

subtractIfCan: (%, %) -> Union(%, failed)
sup: (%, %) -> % if S has OrderedSet and R has OrderedAbelianMonoidSup
support: % -> List S

from FreeModuleCategory(R, S)

zero?: % -> Boolean

from AbelianMonoid

AbelianGroup if R has AbelianGroup

AbelianMonoid

AbelianSemiGroup

BasicType

BiModule(R, R)

CancellationAbelianMonoid

CoercibleFrom S if R has SemiRing

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

FreeModuleCategory(R, S)

IndexedProductCategory(R, S)

Module R if R has CommutativeRing

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

OrderedAbelianMonoidSup if S has OrderedSet and R has OrderedAbelianMonoidSup

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

OrderedCancellationAbelianMonoid if S has OrderedSet and R has OrderedAbelianMonoidSup

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

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

RetractableTo S if R has SemiRing

SetCategory