)cl all

x:Symbol :='x
y:Symbol :='y
z:Symbol :='z
word := OrderedFreeMonoid(Symbol)
tree := Magma(Symbol)
a:tree := x*x
b:tree := y*y
c:tree := a*b
left c
right c
length c
c::word
a < b
a < c
b < c
first c
rest c
rest rest c
ax:tree := a*x
xa:tree := x*a
xa < ax
lexico(xa,ax)
