On Tue, Mar 04, 2008 at 11:58:38AM -0600, Derek Elkins wrote: > On Tue, 2008-03-04 at 17:16 +0000, Edsko de Vries wrote: > > Hi, > > > > Is there an intuition that can be used to explain adjunctions to > > functional programmers, even if the match isn't necessary 100% perfect > > (like natural transformations and polymorphic functions?). > > Well when you pretend Hask is Set, many things can be discussed fairly > directly. > > F is left adjoint to U, F -| U, if Hom(FA,B) is naturally isomorphic to > Hom(A,UB), natural in A and B. A natural transformation over Set is > just a polymorphic function. So we have an adjunction if we have two > functions: > > phi :: (F a -> b) -> (a -> U b) > and > phiInv :: (a -> U b) -> (F a -> b) > > such that phi . phiInv = id and phiInv . phi = id and F and U are > instances of Functor. > > The unit and counit respectively is then just phi id and phiInv id.
Sure, but that doesn't really explain what an adjunction *is*. For me, it helps to think of a natural transformation as a polymorphic function: it gives me an intuition about what a natural transformation is. Specializing the definition of an adjunction for Hask (or Set) helps understanding the *definitions*, but not the *intention*, if that makes any sense.. Edsko _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe