FreeMagma VarSetΒΆ

xlpoly.spad line 1 [edit on github]

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 BasicType

>=: (%, %) -> Boolean

from PartialOrder

>: (%, %) -> Boolean

from PartialOrder

~=: (%, %) -> Boolean

from BasicType

coerce: % -> FreeMonoid VarSet

coerce(x) returns the element of FreeMonoid(VarSet) corresponding to x by removing parentheses.

coerce: % -> OutputForm

from CoercibleTo OutputForm

coerce: VarSet -> %

from CoercibleFrom VarSet

first: % -> VarSet

first(x) returns the first entry of the tree x.

latex: % -> String

from SetCategory

left: % -> %

left(x) returns left subtree of x or error if retractable?(x) is true.

length: % -> PositiveInteger

length(x) returns the number of entries in x.

lexico: (%, %) -> Boolean

lexico(x, y) returns true iff x is smaller than y w.r.t. the lexicographical ordering induced by VarSet. 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 of x. That is x itself if retractable?(x) is true and mirror(z) * mirror(y) if x is y*z.

rest: % -> %

rest(x) return x without the first entry or error if retractable?(x) is true.

retract: % -> VarSet

from RetractableTo VarSet

retractable?: % -> Boolean

retractable?(x) tests if x is a tree with only one entry.

retractIfCan: % -> Union(VarSet, failed)

from RetractableTo VarSet

right: % -> %

right(x) returns right subtree of x or error if retractable?(x) is true.

smaller?: (%, %) -> Boolean

from Comparable

varList: % -> List VarSet

varList(x) returns the list of distinct entries of x.

BasicType

CoercibleFrom VarSet

CoercibleTo OutputForm

Comparable

OrderedSet

PartialOrder

RetractableTo VarSet

SetCategory