Definition (monoid). A monoid consists of:
- a set
M
- a binary operation
· : M × M → M
- an element
e ∈ M
such that
- the binary operation is associative, that is,
x · (y · z) = (x · y) · z, ∀ x, y, z ∈ M
- the element
e
is identity:x · e = x = e · x, ∀ x ∈ M
.