Documentation

We can define a right Kan extension in several ways. The definition here is obtained by reading off
the definition in of a right Kan extension in terms of an End, but we can derive an equivalent definition
from the universal property.

In some sense this is trying to approximate the inverse of g by using one of
its adjoints, because if the adjoint and the inverse both exist, they match!

Hask -h-> Hask
| +
g /
| Ran g h
v /
Hask -'

The Right Kan extension is unique (up to isomorphism) by taking this as its universal property.

That is to say given any K : C' -> C such that we have a natural transformation from k.g to h(forall x. k (g x) -> h x) there exists a canonical natural transformation from k to Ran g h.
(forall x. k x -> Ran g h x).

We could literally read this off as a valid Rank-3 definition for Ran: