Proof

Suppose that x, y, z are elements of the monoid with

x * y = x * z,

and suppose that x is invertible with inverse u. Multiply both sides of the equality by u:

u * (x * y) = u * (x * z).

Since * is associative, the definition of inverse gives:

y = e * y = (u * x) * y = u * (x * y) = u * (x * z) = (u * x) * z = e * z = z.

Hence y = z.