kan-extensions-5.2: Kan extensions, Kan lifts, the Yoneda lemma, and (co)density (co)monads

Data.Functor.Contravariant.Coyoneda

Description

The co-Yoneda lemma for presheafs states that f is naturally isomorphic to Coyoneda f.

Synopsis

# Documentation

data Coyoneda f a where #

A Contravariant functor (aka presheaf) suitable for Yoneda reduction.

http://ncatlab.org/nlab/show/Yoneda+reduction

Constructors

 Coyoneda :: (a -> b) -> f b -> Coyoneda f a
Instances
 # Instance detailsDefined in Data.Functor.Contravariant.Coyoneda Methodscontramap :: (a -> b) -> Coyoneda f b -> Coyoneda f a #(>\$) :: b -> Coyoneda f b -> Coyoneda f a # # Instance detailsDefined in Data.Functor.Contravariant.Coyoneda Associated Typestype Rep (Coyoneda f) :: Type # Methodstabulate :: (a -> Rep (Coyoneda f)) -> Coyoneda f a #index :: Coyoneda f a -> a -> Rep (Coyoneda f) #contramapWithRep :: (b -> Either a (Rep (Coyoneda f))) -> Coyoneda f a -> Coyoneda f b # Adjunction f g => Adjunction (Coyoneda f) (Coyoneda g) # Instance detailsDefined in Data.Functor.Contravariant.Coyoneda Methodsunit :: a -> Coyoneda g (Coyoneda f a) #counit :: a -> Coyoneda f (Coyoneda g a) #leftAdjunct :: (b -> Coyoneda f a) -> a -> Coyoneda g b #rightAdjunct :: (a -> Coyoneda g b) -> b -> Coyoneda f a # type Rep (Coyoneda f) # Instance detailsDefined in Data.Functor.Contravariant.Coyoneda type Rep (Coyoneda f) = Rep f

liftCoyoneda :: f a -> Coyoneda f a #

Coyoneda "expansion" of a presheaf

liftCoyoneda . lowerCoyoneda ≡ id
lowerCoyoneda . liftCoyoneda ≡ id


lowerCoyoneda :: Contravariant f => Coyoneda f a -> f a #

Coyoneda reduction on a presheaf