We use constructions in monoid and group theory to exhibit an adjunction between the category of partially ordered monoids and lazy monoid homomorphisms and the category of partially ordered groups and group homomorphisms such that the unit of the adjunction is injective. We also prove a similar result for sets acted on by monoids and groups.
We introduce the new notion of a lazy homomorphism for a function f between partially ordered monoids such that f(m ○ m′) ≤ f(m) ○ f(m′).
Every monoid can be endowed with the discrete partial ordering (m ≤ m′ if and only if m=m′), so our constructions provide a way of embedding monoids into groups. A simple counterexample (the two-element monoid with a non-trivial idempotent) and some calculations show that one can never hope for such an embedding to be a monoid homomorphism, so the price paid for injecting a monoid into a group is that we must weaken the notion of a homomorphism to this new notion of a lazy homomorphism.
The computational significance of this is that a monoid is an abstract model of computation – or at least of ‘operations’ – and, similarly, a group models reversible computations/operations. With this reading, the adjunction with its injective unit gives a systematic high-level way of faithfully translating an irreversible system into a ‘lazy’ reversible one.
Informally, but perhaps informatively, we can describe this work as follows: we give an abstract analysis of how we can sensibly add ‘undo’ (in the sense of ‘control-Z’).