kan-extensions-4.2.3: Kan extensions, Kan lifts, various forms of the Yoneda lemma, and (co)density (co)monads

Copyright2013 Edward Kmett and Dan Doel
LicenseBSD
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilityrank N types
Safe HaskellTrustworthy
LanguageHaskell98

Data.Functor.Kan.Lift

Contents

Description

Left Kan lifts for functors over Hask, wherever they exist.

http://ncatlab.org/nlab/show/Kan+lift

Synopsis

Left Kan lifts

newtype Lift g f a Source

f => g . Lift g f
(forall z. f => g . z) -> Lift g f => z -- couniversal

Here we use the universal property directly as how we extract from our definition of Lift.

Constructors

Lift 

Fields

Instances

Functor (Lift g h) Source 

Methods

fmap :: (a -> b) -> Lift g h a -> Lift g h b

(<$) :: a -> Lift g h b -> Lift g h a

toLift :: Functor z => (forall a. f a -> g (z a)) -> Lift g f b -> z b Source

The universal property of Lift

fromLift :: Adjunction l u => (forall a. Lift u f a -> z a) -> f b -> u (z b) Source

When the adjunction exists

fromLift . toLiftid
toLift . fromLiftid

glift :: Adjunction l g => k a -> g (Lift g k a) Source

f => g (Lift g f a)

composeLift :: (Composition compose, Functor f, Functor g) => Lift f (Lift g h) a -> Lift (compose g f) h a Source

decomposeLift :: (Composition compose, Adjunction l g) => Lift (compose g f) h a -> Lift f (Lift g h) a Source

adjointToLift :: Adjunction f u => f a -> Lift u Identity a Source

Lift u Identity a is isomorphic to the left adjoint to u if one exists.

adjointToLift . liftToAdjointid
liftToAdjoint . adjointToLiftid

liftToAdjoint :: Adjunction f u => Lift u Identity a -> f a Source

Lift u Identity a is isomorphic to the left adjoint to u if one exists.

liftToComposedAdjoint :: (Adjunction f u, Functor h) => Lift u h a -> f (h a) Source

Lift u h a is isomorphic to the post-composition of the left adjoint of u onto h if such a left adjoint exists.

liftToComposedAdjoint . composedAdjointToLiftid
composedAdjointToLift . liftToComposedAdjointid

composedAdjointToLift :: Adjunction f u => f (h a) -> Lift u h a Source

Lift u h a is isomorphic to the post-composition of the left adjoint of u onto h if such a left adjoint exists.

composedRepToLift :: Representable u => Rep u -> h a -> Lift u h a Source