These are a collection of some notes on category theory collected from various sources. Sometimes I learn something new about category theory this way.
-
Language pragmas are important for extending GHC. So far I've used
PolyKinds
,TypeOperators
,MultiParamTypeClasses
,RankNTypes
. -
Yoneda's lemma could be rephrased as saying the right Kan extension of a functor along the identity is itself.
-
Kan extensions are pretty cool. Given an adjoint pair, we can write each functor as a Kan extension of the other. Precisely, if
F:C->D
andG:D->C
are an adjoint pair (F = left
) thenG
is the left Kan extension ofid:C->C
alongF
, andF
is the right Kan extension ofid:D->D
alongG
,
G = Lan F Identity
and
F = Ran G Identity
This all conspires to leading to the codensity monad. In essence, adjoint pairs give rise to monads. But when we don't have an adjoint pair, but instead just a right Kan extension Ran G Identity
, we can still form the codensity monad. This monad agrees with the monad of an adjunction if the right Kan extension is preserved by the left adjoint F
.