module Cat.Internal.Functor.Outer {o β} {C : Precategory o β} where
Outer functorsπ
The category is not strict, so it is not internal to any category of sets, even setting aside size issues. However, still plays an important role in (strict) category theory, by passing to the copresheaf categories
We wish to relativize this to an arbitrary base category not just Specifically, if is a category internal to we want to define βfunctor from β β which we call an outer functor1. We will employ the fibration/family correspondence: a family of sets is the same as a function β and we know how to relativise functions!
module _ (β : Internal-cat) where open Cat.Internal.Reasoning β record Outer-functor : Type (o β β) where no-eta-equality
The first piece of data we require is some object that will act like the disjoint union of the image of our functor. If the base category were this would be the type The next piece of data, corresponds to the first projection morphism: it assigns (generalised) objects of to objects of
field β«P : Ob Pβ : β {Ξ} β Hom Ξ β«P β Hom Ξ Cβ
The next data captures how morphisms act on the fibres. Since the family-fibration correspondence takes dependency to sectioning, we require an assigment sending maps to maps which satisfy
Pβ : β {Ξ} (px : Hom Ξ β«P) {y : Hom Ξ Cβ} β Homi (Pβ px) y β Hom Ξ β«P Pβ-tgt : β {Ξ} (px : Hom Ξ β«P) {y : Hom Ξ Cβ} β (f : Homi (Pβ px) y) β y β‘ Pβ (Pβ px f)
Next, we have the functoriality conditions, which are straightforward (modulo indexing).
P-id : β {Ξ} (px : Hom Ξ β«P) β Pβ px (idi (Pβ px)) β‘ px P-β : β {Ξ} (px : Hom Ξ β«P) {y z : Hom Ξ Cβ} (f : Homi y z) (g : Homi (Pβ px) y) β Pβ px (f βi g) β‘ Pβ (Pβ px g) (adjusti (Pβ-tgt px g) refl f)
Finally, the naturality conditions that allow us to work using generalized objects.
Pβ-nat : β {Ξ Ξ} β (px : Hom Ξ β«P) β (Ο : Hom Ξ Ξ) β Pβ px β Ο β‘ Pβ (px β Ο) Pβ-nat : β {Ξ Ξ} (px : Hom Ξ β«P) {y : Hom Ξ Cβ} (f : Homi (Pβ px) y) (Ο : Hom Ξ Ξ) β Pβ px f β Ο β‘ Pβ (px β Ο) (adjusti (Pβ-nat px Ο) refl (f [ Ο ])) open Outer-functor
Another perspective on outer functors is that they are the internal discrete opfibrations over The object is the total category, the map is the fibration itself, and captures the lifting into opcartesian maps.
We can obtain internal discrete fibrations by looking at outer functors from the internal opposite category of
Internal Hom functorsπ
The canonical example of an outer functor is the internal analog of the hom functor We require the following data: is finitely complete, is a category internal to and is a global object of β an object of in the empty context.
module _ (pb : has-pullbacks C) (term : Terminal C) (β : Internal-cat) where open Cat.Internal.Reasoning β open Pullbacks C pb open Terminal term Internal-hom-from : (x : Hom top Cβ) β Outer-functor β Internal-hom-from x = outf where
Recall that defining an outer functor on requires choosing an object to play the role of total space. For the outer functor corresponding to a Hom-functor, this ought to be the object of morphisms with domain We can encode this internally with the following pullback:
The projection from the total space to takes a generalized element of to its codomain. The lifting morphism follows from the universal property of the pullback.
open Pullback (pb src x) renaming (apex to Cβ) outf : Outer-functor β outf .β«P = Cβ outf .Pβ fβ = tgt β pβ β fβ outf .Pβ fβ {y = y} g = universal coh module hom-from-action where abstract coh : src β (g βi homi (pβ β fβ)) .ihom β‘ x β ! coh = src β (g βi homi (pβ β fβ)) .ihom β‘β¨ (g βi homi (pβ β fβ)) .has-src β©β‘ src β pβ β fβ β‘β¨ pulll square β©β‘ (x β pβ) β fβ β‘β¨ pullr (sym (!-unique _)) β©β‘ x β ! β
The functoriality constraint is analogous to that for the ordinary though here it is obscured by all the pullbacks. The naturality constraints similarly follow from uniqueness of maps into a limit.
outf .Pβ-tgt fβ {y = y} g = tgt-coh where abstract tgt-coh : y β‘ tgt β pβ β universal (hom-from-action.coh fβ g) tgt-coh = y β‘Λβ¨ (g βi homi (pβ β fβ)) .has-tgt β©β‘Λ tgt β (g βi homi (pβ β fβ)) .ihom β‘Λβ¨ ap (tgt β_) pββuniversal β©β‘Λ tgt β pβ β universal _ β outf .P-id fβ = sym $ unique (sym (ap ihom (idli _))) (sym (!-unique _)) outf .P-β fβ g h = unique (pββuniversal β ap ihom (sym $ associ _ _ _) β βi-ihom (sym (ap (src β_) pββuniversal β (h βi homi (pβ β fβ)) .has-src)) (sym (ap (tgt β_) pββuniversal β (h βi homi (pβ β fβ)) .has-tgt)) refl refl (sym pββuniversal)) pββuniversal outf .Pβ-nat fβ Ο = sym (assoc _ _ _) β ap (tgt β_) (sym (assoc _ _ _)) outf .Pβ-nat fβ g Ο = unique (pulll pββuniversal β ap ihom (βi-nat g (homi (pβ β fβ)) Ο) β βi-ihom (sym (assoc _ _ _) β ap (src β_) (sym (assoc _ _ _))) (sym (assoc _ _ _) β ap (tgt β_) (sym (assoc _ _ _))) refl refl (sym (assoc _ _ _))) (sym (!-unique _))
The contravariant internal functor is defined by duality, which carries βpullback along β to βpullback along β. This outer functor plays the role of the Yoneda embedding.
Internal-hom-into : (x : Hom top Cβ) β Outer-functor (β ^opi) Internal-hom-into x = outf where open Pullback (pb tgt x) renaming (apex to Cβ)
We omit this construction due to its similarity with the covariant construction, performed above.
outf : Outer-functor (β ^opi) outf .β«P = Cβ outf .Pβ fβ = src β pβ β fβ outf .Pβ fβ g = universal coh module hom-into-action where abstract coh : tgt β (homi (pβ β fβ) βi op-ihom g) .ihom β‘ x β ! coh = tgt β (homi (pβ β fβ) βi op-ihom g) .ihom β‘β¨ (homi (pβ β fβ) βi op-ihom g) .has-tgt β©β‘ tgt β pβ β fβ β‘β¨ pulll square β©β‘ (x β pβ) β fβ β‘β¨ pullr (sym (!-unique _)) β©β‘ x β ! β outf .Pβ-tgt fβ {y} g = src-coh where abstract src-coh : y β‘ src β pβ β universal (hom-into-action.coh fβ g) src-coh = sym (ap (src β_) pββuniversal β (homi (pβ β fβ) βi op-ihom g) .has-src) outf .P-id fβ = sym $ unique (sym (ap ihom (idri _))) (sym (!-unique _)) outf .P-β fβ g h = unique (pββuniversal β ap ihom (associ _ _ _) β βi-ihom refl (sym (ap (src β_) pββuniversal β (homi (pβ β fβ) βi op-ihom h) .has-src)) (sym (ap (tgt β_) pββuniversal β (homi (pβ β fβ) βi op-ihom h) .has-tgt)) (sym pββuniversal) refl) pββuniversal outf .Pβ-nat fβ Ο = sym (assoc _ _ _) β ap (src β_) (sym (assoc _ _ _)) outf .Pβ-nat fβ g Ο = unique (pulll pββuniversal β ap ihom (βi-nat _ _ _) β βi-ihom refl (sym (assoc _ _ _) β ap (src β_) (sym (assoc _ _ _))) (sym (assoc _ _ _) β ap (tgt β_) (sym (assoc _ _ _))) (sym (assoc _ _ _)) refl) (sym (!-unique _))
Outer natural transformationsπ
If is a category, is internal to and are two outer functors on we can define the outer natural transformations They are (mostly) given by transformations to together with a bit of naturality data.
module _ {β : Internal-cat} where open Internal-cat β record _=>o_ (P Q : Outer-functor β) : Type (o β β) where no-eta-equality field Ξ·o : β {Ξ} β Hom Ξ (P .β«P) β Hom Ξ (Q .β«P)
The first condition corresponds to indexing: Outer natural transformations map elements of over to elements of over
Ξ·o-fib : β {Ξ} (px : Hom Ξ (P .β«P)) β Q .Pβ (Ξ·o px) β‘ P .Pβ px
Over this coherence, we can state the naturality condition. It should be familiar, since, modulo the aforementioned coherence, it says
is-naturalo : β {Ξ : Ob} (px : Hom Ξ (P .β«P)) (y : Hom Ξ Cβ) β (f : Homi (P .Pβ px) y) β Ξ·o (P .Pβ px f) β‘ Q .Pβ (Ξ·o px) (adjusti (sym (Ξ·o-fib px)) refl f)
The final naturality condition is stability under substitution, allowing us to work in the internal language of
Ξ·o-nat : β {Ξ Ξ} (px : Hom Ξ (P .β«P)) (Ο : Hom Ξ Ξ) β Ξ·o px β Ο β‘ Ξ·o (px β Ο) open _=>o_
Outer-nat-path : β {F G : Outer-functor β} {Ξ± Ξ² : F =>o G} β (β {Ξ} (px : Hom Ξ (F .β«P)) β Ξ± .Ξ·o px β‘ Ξ² .Ξ·o px) β Ξ± β‘ Ξ² Outer-nat-path p i .Ξ·o px = p px i Outer-nat-path {G = G} {Ξ± = Ξ±} {Ξ² = Ξ²} p i .Ξ·o-fib px = is-propβpathp (Ξ» i β Hom-set _ _ (G .Pβ (p px i)) _) (Ξ± .Ξ·o-fib px) (Ξ² .Ξ·o-fib px) i Outer-nat-path {F = F} {G = G} {Ξ± = Ξ±} {Ξ² = Ξ²} p i .is-naturalo px y f j = is-setβsquarep (Ξ» i j β Hom-set _ _) (p (F .Pβ px f)) (Ξ± .is-naturalo px y f) (Ξ² .is-naturalo px y f) (Ξ» i β G .Pβ (p px i) (adjusti (sym (Outer-nat-path {Ξ± = Ξ±} {Ξ² = Ξ²} p i .Ξ·o-fib px)) refl f)) i j Outer-nat-path {Ξ± = Ξ±} {Ξ² = Ξ²} p i .Ξ·o-nat px Ο = is-propβpathp (Ξ» i β Hom-set _ _ (p px i β Ο) (p (px β Ο) i)) (Ξ± .Ξ·o-nat px Ο) (Ξ² .Ξ·o-nat px Ο) i unquoteDecl H-Level-=>o = declare-record-hlevel 2 H-Level-=>o (quote _=>o_)
Some outer functorsπ
One important outer functor is the constant outer functor on an object which can be constructed if has products. This is the internalized version of the chaotic bifibration.
module _ (prods : has-products C) {β : Internal-cat} where open Binary-products C prods open Internal-cat β open _=>o_
The total space of this functor is the product and the projection map is simply the second projection.
ConstO : (X : Ob) β Outer-functor β ConstO X .β«P = X ββ Cβ ConstO X .Pβ f = Οβ β f
Lifting is given by the universal map into the product.
ConstO X .Pβ px {y} f = β¨ Οβ β px , y β© ConstO X .Pβ-tgt px {y = y} f = sym Οβββ¨β©
For once, the naturality constraints are not egregious: In fact, since they are all facts about products, they can all be solved automatically.
ConstO X .P-id px = products! C prods ConstO X .P-β px f g = products! C prods ConstO X .Pβ-nat px Ο = sym (assoc _ _ _) ConstO X .Pβ-nat px f Ο = products! C prods
If is a map in then it defines an outer natural transformation between the associated constant outer functors. Here too we can apply automation to satisfy the coherence constraints.
const-nato : β {X Y : Ob} β Hom X Y β ConstO X =>o ConstO Y const-nato f .Ξ·o g = β¨ f β Οβ β g , Οβ β g β© const-nato f .Ξ·o-fib px = products! C prods const-nato f .is-naturalo px y g = products! C prods const-nato f .Ξ·o-nat px Ο = products! C prods
The terminology here is somewhat inconsistent. (Borceux 1994) calls these functors internal base-valued functors, while in (Mac Lane and Moerdijk 1994) they are referred to as category actions.β©οΈ
References
- Borceux, Francis. 1994. Handbook of Categorical Algebra. Vol. 1. Encyclopedia of Mathematics and Its Applications. Cambridge University Press. https://doi.org/10.1017/CBO9780511525858.
- Mac Lane, Saunders, and Ieke Moerdijk. 1994. Sheaves in Geometry and Logic: A First Introduction to Topos Theory. Universitext. New York, NY: Springer New York. https://doi.org/10.1007/978-1-4612-0927-0.