ListMonoidOps(S, E, un)ΒΆ
free.spad line 1 [edit on github]
S: SetCategory
un: E
This internal package represents monoid (abelian or not, with or without inverses) as lists and provides some common operations to the various flavors of monoids.
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- coerce: S -> %
from CoercibleFrom S
- latex: % -> String
from SetCategory
- leftMult: (S, %) -> %
leftMult(s, a)returnss * awhere*is the monoid operation, which is assumed non-commutative.
- listOfMonoms: % -> List Record(gen: S, exp: E)
listOfMonoms(l)returns the list of the monomials formingl.
- makeMulti: List Record(gen: S, exp: E) -> %
makeMulti(l)returns the element whose list of monomials isl.
- makeTerm: (S, E) -> %
makeTerm(s, e)returns the monomialsexponentiated bye(e.g. s^e ore*s).
- makeUnit: () -> %
makeUnit()returns the unit element of the monomial.
- mapExpon: (E -> E, %) -> %
mapExpon(f, a1\^e1 ... an\^en)returnsa1\^f(e1) ... an\^f(en).
- mapGen: (S -> S, %) -> %
mapGen(f, a1\^e1 ... an\^en)returnsf(a1)\^e1 ... f(an)\^en.
- nthExpon: (%, Integer) -> E
nthExpon(l, n)returns the exponent of the n^th monomial ofl.
- nthFactor: (%, Integer) -> S
nthFactor(l, n)returns the factor of the n^th monomial ofl.
- outputForm: (%, (OutputForm, OutputForm) -> OutputForm, (OutputForm, OutputForm) -> OutputForm, Integer) -> OutputForm
outputForm(l, fop, fexp, unit)converts the monoid element represented bylto an OutputForm. Argument unit is the output form for the unit of the monoid (e.g. 0 or 1),fop(a, b)is the output form for the monoid operation applied toaandb(e.g.a + b,a * b,ab), andfexp(a, n)is the output form for the exponentiation operation applied toaandn(e.g.n a,n * a,a ^ n,a\^n).
- retract: % -> S
from RetractableTo S
- retractIfCan: % -> Union(S, failed)
from RetractableTo S
- reverse!: % -> %
reverse!(l)reverses the list of monomials formingl, destroying the elementl.
- reverse: % -> %
reverse(l)reverses the list of monomials formingl. This has some effect if the monoid is non-abelian, i.e.reverse(a1\^e1 ... an\^en) = an\^en ... a1\^e1which is different.
- rightMult: (%, S) -> %
rightMult(a, s)returnsa * swhere*is the monoid operation, which is assumed non-commutative.
- size: % -> NonNegativeInteger
size(l)returns the number of monomials formingl.