Skip to content

Representable (Lan f g)Β #80

@Icelandjack

Description

@Icelandjack

I spotted this on ncatlab

Proposition 4.1. For F:Cβ†’D a 𝒱-enriched functor between small 𝒱-enriched categories we have

  1. the left Kan extension along F takes representable presheaves C(c,βˆ’):C→𝒱 to their image under F:
Lan FC(c,βˆ’)≃D(F(c),βˆ’)

for all c ∈ C.

An in Haskell this translates (roughly) to a Representableinstance for Lan:

instance (Functor f, Representable g) => Distributive (Lan f g) where
  distribute :: Functor h => h (Lan f g a) -> Lan f g (h a)
  distribute = distributeRep

instance (Functor f, Representable g) => Representable (Lan f g) where
  type Rep (Lan f g) = f (Rep g)

  index :: Lan f g a -> (f (Rep g) -> a)
  index (Lan f g) = f . fmap (index g)

  tabulate :: (f (Rep g) -> a) -> Lan f g a
  tabulate = (`Lan` tabulate id)

I noticed it was missing from the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions