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

Copyright(C) 2013 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
PortabilityGADTs, TFs, MPTCs
Safe HaskellTrustworthy
LanguageHaskell98

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 Source

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

Contravariant (Coyoneda f) Source 

Methods

contramap :: (a -> b) -> Coyoneda f b -> Coyoneda f a

(>$) :: b -> Coyoneda f b -> Coyoneda f a

Representable f => Representable (Coyoneda f) Source 

Associated Types

type Rep (Coyoneda f :: * -> *) :: *

Methods

tabulate :: (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) Source 

Methods

unit :: 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) = Rep f Source 

liftCoyoneda :: f a -> Coyoneda f a Source

Coyoneda "expansion" of a presheaf

liftCoyoneda . lowerCoyonedaid
lowerCoyoneda . liftCoyonedaid

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

Coyoneda reduction on a presheaf