In this module, a commutative monoid is a free algebra over a
signature with two function symbols:

the binary symbol +, the monoid operator,

a constant 0, the identity element, and

The algebra is generated by a set of variables. Syntactically, a
variable is an identifer such as x and y (see isVar).

The axioms associated with the algebra are:

Communtativity

x + y = y + x

Associativity

(x + y) + z = x + (y + z)

Identity Element

x + 0 = x

A substitution maps variables to terms. A substitution s is
applied to a term as follows.

s(0) = 0

s(t + t') = s(t) + s(t')

The unification problem is given the problem statement t =? t',
find a most general substitution s such that s(t) = s(t') modulo
the axioms of the algebra. Substitition s is more general than s'
if there is a substitition s" such that s' = s" o s.

Terms

A term in a commutative monoid is represented by the
identity element, or as the sum of factors. A factor is the
product of a positive integer coefficient and a variable. No
variable occurs twice in a term. For the show and read methods,
zero is the identity element, the plus sign is the monoid operation.

A variable is an alphabetic Unicode character followed by a
sequence of alphabetic or numeric digit Unicode characters. The
show method for a term works correctly when variables satisfy
the isVar predicate.