FreeMagma VarSetΒΆ
xlpoly.spad line 1 [edit on github]
VarSet: OrderedSet
This type is the basic representation of parenthesized words (binary trees over arbitrary symbols) useful in LiePolynomial. Author: Michel Petitot (petitot@lifl.fr
).
- *: (%, %) -> %
x*y
returns the tree[x, y]
.
- <=: (%, %) -> 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
by removing parentheses.- coerce: % -> OutputForm
from CoercibleTo OutputForm
- coerce: VarSet -> %
from CoercibleFrom VarSet
- first: % -> VarSet
first(x)
returns the first entry of the treex
.
- latex: % -> String
from SetCategory
- left: % -> %
left(x)
returns left subtree ofx
or error if retractable?(x
) istrue
.
- length: % -> PositiveInteger
length(x)
returns the number of entries inx
.
- lexico: (%, %) -> Boolean
lexico(x, y)
returnstrue
iffx
is smaller thany
w
.r
.t
. the lexicographical ordering induced byVarSet
.N
.B
. This operation does not take into account the tree structure of its arguments. Thus this is not a total ordering.
- max: (%, %) -> %
from OrderedSet
- min: (%, %) -> %
from OrderedSet
- mirror: % -> %
mirror(x)
returns the reversed word ofx
. That isx
itself if retractable?(x
) istrue
andmirror(z) * mirror(y)
ifx
isy*z
.
- rest: % -> %
rest(x)
returnx
without the first entry or error if retractable?(x
) istrue
.
- retract: % -> VarSet
from RetractableTo VarSet
- retractable?: % -> Boolean
retractable?(x)
tests ifx
is a tree with only one entry.
- retractIfCan: % -> Union(VarSet, failed)
from RetractableTo VarSet
- right: % -> %
right(x)
returns right subtree ofx
or 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