LyndonWord VarSetΒΆ
xlpoly.spad line 141 [edit on github]
VarSet: OrderedSet
Lyndon words over arbitrary (ordered) symbols: see Free Lie Algebras by C. Reutenauer (Oxford science publications). A Lyndon word is a word which is smaller than any of its right factors w.r.t. the pure lexicographical ordering. If a and b are two Lyndon words such that a < b holds w.r.t lexicographical ordering then a*b is a Lyndon word. Parenthesized Lyndon words can be generated from symbols by using the following rule: [[a, b], c] is a Lyndon word iff a*b < c <= b holds. Lyndon words are internally represented by binary trees using the FreeMagma domain constructor. Two ordering are provided: lexicographic and length-lexicographic. Author : Michel Petitot (petitot@lifl.fr).
- <=: (%, %) -> Boolean
from PartialOrder
- <: (%, %) -> Boolean
from PartialOrder
- >=: (%, %) -> Boolean
from PartialOrder
- >: (%, %) -> Boolean
from PartialOrder
- coerce: % -> FreeMonoid VarSet
coerce(x)returns the element of FreeMonoid(VarSet) corresponding tox.- coerce: % -> OutputForm
from CoercibleTo OutputForm
- coerce: VarSet -> %
from CoercibleFrom VarSet
- factor: FreeMonoid VarSet -> List %
factor(x)returns the decreasing factorization into Lyndon words.
- latex: % -> String
from SetCategory
- left: % -> %
left(x)returns left subtree ofxor error if retractable?(x) istrue.
- length: % -> PositiveInteger
length(x)returns the number of entries inx.
- lexico: (%, %) -> Boolean
lexico(x, y)returnstrueiffxis smaller thanyw.r.t. the lexicographical ordering induced byVarSet.
- lyndon?: FreeMonoid VarSet -> Boolean
lyndon?(w)test ifwis a Lyndon word.
- lyndon: FreeMonoid VarSet -> %
lyndon(w)convertwinto a Lyndon word, error ifwis not a Lyndon word.
- lyndonIfCan: FreeMonoid VarSet -> Union(%, failed)
lyndonIfCan(w)convertwinto a Lyndon word.
- LyndonWordsList1: (List VarSet, PositiveInteger) -> OneDimensionalArray List %
LyndonWordsList1(vl, n)returns an array of lists of Lyndon words over the alphabetvl, up to ordern.
- LyndonWordsList: (List VarSet, PositiveInteger) -> List %
LyndonWordsList(vl, n)returns the list of Lyndon words over the alphabetvl, up to ordern.
- max: (%, %) -> %
from OrderedSet
- min: (%, %) -> %
from OrderedSet
- retract: % -> VarSet
from RetractableTo VarSet
- retractable?: % -> Boolean
retractable?(x)tests ifxis a tree with only one entry.
- retractIfCan: % -> Union(VarSet, failed)
from RetractableTo VarSet
- right: % -> %
right(x)returns right subtree ofxor error if retractable?(x) istrue.
- smaller?: (%, %) -> Boolean
from Comparable
- varList: % -> List VarSet
varList(x)returns the list of distinct entries ofx.
CoercibleFrom VarSet
RetractableTo VarSet