The free monoid on a set S is the monoid of finite products of
the form reduce(*, [si ^ ni])
where the si's are in S, and the ni's
are nonnegative integers. The multiplication is not commutative.
When S is an OrderedSet, then FreeMonoid(S) has order: for two
elements x
and y
the relation x < y
holds if either length(x) < length(y)
holds or if these lengths
are equal and if x
is smaller than y
w.r.t. the
lexicographical ordering induced by S
.
fricas
(1) -> )sh FreeMonoid
FreeMonoid(S: SetCategory) is a domain constructor
Abbreviation for FreeMonoid is FMONOID
This constructor is not exposed in this frame.
------------------------------- Operations --------------------------------
?*? : (%, S) -> % ?*? : (S, %) -> %
?*? : (%, %) -> % ?=? : (%, %) -> Boolean
1 : () -> % ?^? : (%, PositiveInteger) -> %
coerce : S -> % coerce : % -> OutputForm
first : % -> S hclf : (%, %) -> %
hcrf : (%, %) -> % latex : % -> String
length : % -> NonNegativeInteger mapGen : ((S -> S), %) -> %
mirror : % -> % nthFactor : (%, Integer) -> S
one? : % -> Boolean recip : % -> Union(%,"failed")
rest : % -> % retract : % -> S
sample : () -> % size : % -> NonNegativeInteger
?~=? : (%, %) -> Boolean
?<? : (%, %) -> Boolean if S has ORDSET
?<=? : (%, %) -> Boolean if S has ORDSET
?>? : (%, %) -> Boolean if S has ORDSET
?>=? : (%, %) -> Boolean if S has ORDSET
?^? : (S, NonNegativeInteger) -> %
?^? : (%, NonNegativeInteger) -> %
divide : (%, %) -> Union(Record(lm: %,rm: %),"failed")
factors : % -> List(Record(gen: S,exp: NonNegativeInteger))
leftPower : (%, NonNegativeInteger) -> %
leftPower : (%, PositiveInteger) -> %
leftRecip : % -> Union(%,"failed")
lexico : (%, %) -> Boolean if S has ORDSET
lquo : (%, S) -> Union(%,"failed")
lquo : (%, %) -> Union(%,"failed")
mapExpon : ((NonNegativeInteger -> NonNegativeInteger), %) -> %
max : (%, %) -> % if S has ORDSET
min : (%, %) -> % if S has ORDSET
nthExpon : (%, Integer) -> NonNegativeInteger
overlap : (%, %) -> Record(lm: %,mm: %,rm: %)
retractIfCan : % -> Union(S,"failed")
rightPower : (%, NonNegativeInteger) -> %
rightPower : (%, PositiveInteger) -> %
rightRecip : % -> Union(%,"failed")
rquo : (%, S) -> Union(%,"failed")
rquo : (%, %) -> Union(%,"failed")
smaller? : (%, %) -> Boolean if S has COMPAR
varList : % -> List(S) if S has BASTYPE