For a Functor and an object , the comma category (DaoFP: ) has objects pairs and morphisms the arrows with :
It “describes the view of from the narrower perspective defined by the functor ” — think of as a model of inside . Dually has objects . The general comma category of two functors into a common category has objects .
Sources: DaoFP §10.6 (“Comma category”, “Universal arrow”), §10.8 (Freyd’s theorem: the comma category as a cocone in whose base is projected back to ), Exercise 10.3.2; the Slice Category is ; the Category of Elements of a presheaf is a comma category; CTfS Definition 4.6.4.1, Example 4.6.4.2, Exercise 4.6.4.3
- Special cases (CTfS §4.6.4): the Category of Elements of is , because a function is an element of (CTfS Example 4.6.4.2); for two objects the comma category is the discrete category on (CTfS Exercise 4.6.4.3). CTfS: “category theory includes a highly developed and interoperable catalogue of materials and production techniques. One such is the comma category.”
- A Universal Arrow from to is a Terminal Object in ; has a right adjoint iff every has a terminal object, and then is its underlying object and its arrow (Adjunction via universal arrows).
- In the Adjoint Functor Theorem a solution set is a weakly terminal set in ; in Defunctionalization, for the comma category has objects (environment , function ) and morphisms “reduce the environment”.
- In the preorder case (Adjoint Functor Theorem for Preorders), is the set and its “colimit” is the join defining the right adjoint.
#check CategoryTheory.Comma -- Comma L R for L : A ⥤ T, R : B ⥤ T
#check CategoryTheory.CostructuredArrow -- L ↓ c : objects (d, Ld ⟶ c)
#check CategoryTheory.StructuredArrow -- c ↓ R : objects (d, c ⟶ Rd)-- DaoFP §10.8: an object of the comma category (-×a) ↓ b is an environment with a function out of it
data Comma a b e = Comma e ((e, a) -> b)
-- a morphism (Comma e f) -> (Comma e' f') is h :: e -> e' with f' . first h = f (reduces the environment)