If an endofunctor has a right adjoint and is a monad, the mate correspondence turns and into a counit and comultiplication . The reversed mate correspondence turns the monad laws into the comonad laws and identifies -algebras with -coalgebras.
An adjunction is equivalently specified by a unit and counit of an adjunction
satisfying the triangle identities
Let have units and counits . The mate correspondence sends to
Conversely, gives
Naturality and the triangle identities show that the two constructions are inverse, yielding the required bijection of natural transformations.
Now let the endofunctor carry a monad and let . Taking right mates turns
into a counit and comultiplication . Since mates reverse composition, the monad unit and associativity laws become the comonad counit and coassociativity laws. Moreover, a map corresponds under the adjunction to a map , and the algebra axioms correspond exactly to the coalgebra axioms. This is the monad on a left adjoint induces a comonad on its right adjoint construction and gives an isomorphism of the two structure categories.
For a monoid , the free--set functor is , and its algebras are precisely left -sets, the objects of . Its right adjoint is . The preceding isomorphism identifies with the Eilenberg-Moore category of coalgebras for the induced comonad on sets, compatibly with the forgetful functor. Therefore