> I just looked at your own counterexample, and it's quite nice! It's interesting to consider that the four-element monoid we've been alluding to is just a particular instance of your function-based construction, since we can model \\(\\{A, B, C, \varepsilon\\}\\) as a _[left action](https://en.wikipedia.org/wiki/Semigroup_action)_ on itself. We get that \\(A\\), \\(B\\) and \\(C\\) are just constant functions; their corresponding right actions are just the identity function, which trivially preserves the order.

So, I suspect you already know this, but you have just illustrated the [Cayley embedding](https://en.wikipedia.org/wiki/Cayley%27s_theorem) for monoids!

Rivas talks about this in his [*Notions of Computation as Monoids* (2014)](https://arxiv.org/pdf/1406.4823.pdf).

That paper is awesome. Did you know you can use Cayley embedding to reduce the complexity of `foldl (<>) mempty` from \\(\mathcal{O}(n^2)\\) for `[[a]]` to \\(\mathcal{O}(n)\\) (for isomorphic input)?

So, I suspect you already know this, but you have just illustrated the [Cayley embedding](https://en.wikipedia.org/wiki/Cayley%27s_theorem) for monoids!

Rivas talks about this in his [*Notions of Computation as Monoids* (2014)](https://arxiv.org/pdf/1406.4823.pdf).

That paper is awesome. Did you know you can use Cayley embedding to reduce the complexity of `foldl (<>) mempty` from \\(\mathcal{O}(n^2)\\) for `[[a]]` to \\(\mathcal{O}(n)\\) (for isomorphic input)?