module Cat.Displayed.Functor whereDisplayed and fibred functorsπ
If you have a pair of categories displayed over a common base category it makes immediate sense to talk about functors youβd have an assignment of objects and an assignment of morphisms
which makes sense because lies over just as did, that a morphism is allowed to lie over a morphism But, in the spirit of relativising category theory, it makes more sense to consider functors between categories displayed over different bases, as in
with our displayed functor lying over an ordinary functor to mediate between the bases.
module
_ {oa βa ob βb oe βe of βf}
{A : Precategory oa βa}
{B : Precategory ob βb}
(F : Functor A B)
(β° : Displayed A oe βe)
(β± : Displayed B of βf)
where
private
module F = FR F
module A = CR A
module B = CR B
module β° = DR β°
module β± = DR β± record Displayed-functor : Type (oa β βa β oe β βe β of β βf) where
no-eta-equality
field
Fβ' : β {x} (x' : β°.Ob[ x ]) β β±.Ob[ F.β x ]
Fβ'
: β {a b} {f : A.Hom a b} {a' b'}
β β°.Hom[ f ] a' b' β β±.Hom[ F.β f ] (Fβ' a') (Fβ' b')In order to state the displayed functoriality laws, we require functoriality for our mediating functor Functors between categories displayed over the same base can be recovered as the βvertical displayed functorsβ, i.e., those lying over the identity functor.
F-id'
: β {x} {x' : β°.Ob[ x ]}
β Fβ' (β°.id' {x} {x'}) β±.β‘[ F.F-id ] (β±.id' {F.β x} {Fβ' x'})
F-β'
: β {a b c} {f : A.Hom b c} {g : A.Hom a b} {a' b' c'}
β {f' : β°.Hom[ f ] b' c'} {g' : β°.Hom[ g ] a' b'}
β Fβ' (f' β°.β' g') β±.β‘[ F.F-β f g ] (Fβ' f' β±.β' Fβ' g')
β' = Fβ'
β' = Fβ'module
_ {oa βa ob βb oe βe of βf}
{A : Precategory oa βa}
{B : Precategory ob βb}
{β° : Displayed A oe βe}
{β± : Displayed B of βf}
where
private
module A = Precategory A
module B = Precategory B
module β° = Displayed β°
module β± = Displayed β±
open Functor
open Displayed-functor
private unquoteDecl eqv = declare-record-iso eqv (quote Displayed-functor)
Displayed-functor-pathp
: {F G : Functor A B}
β {F' : Displayed-functor F β° β±} {G' : Displayed-functor G β° β±}
β (p : F β‘ G)
β (q0 : β {x} β (x' : β°.Ob[ x ]) β PathP (Ξ» i β β±.Ob[ p i .Fβ x ]) (F' .Fβ' x') (G' .Fβ' x'))
β (q1 : β {x y x' y'} {f : A.Hom x y} β (f' : β°.Hom[ f ] x' y')
β PathP (Ξ» i β β±.Hom[ p i .Fβ f ] (q0 x' i) (q0 y' i)) (F' .Fβ' f') (G' .Fβ' f'))
β PathP (Ξ» i β Displayed-functor (p i) β° β±) F' G'
Displayed-functor-pathp {F = F} {G = G} {F' = F'} {G' = G'} p q0 q1 =
injectiveP (Ξ» _ β eqv) ((Ξ» i x' β q0 x' i) ,β (Ξ» i f' β q1 f' i) ,β prop!)Note that, if and are fibred categories over their bases (rather than just displayed categories), then the appropriate notion of 1-cell are displayed functors that take cartesian morphisms to cartesian morphisms.
module
_ {oa βa ob βb oe βe of βf}
{A : Precategory oa βa}
{B : Precategory ob βb}
{β° : Displayed A oe βe}
{β± : Displayed B of βf}
{F : Functor A B}
where
private
module F = Functor F
module A = CR A
module B = CR B
module β° where
open Displayed β° public
open Cat.Displayed.Cartesian β° public
module β± where
open Displayed β± public
open Cat.Displayed.Cartesian β± public
lvl : Level
lvl = oa β βa β ob β βb β oe β βe β of β βf record is-fibred-functor (F' : Displayed-functor F β° β±) : Type lvl where
no-eta-equality
open Displayed-functor F'
field
F-cartesian
: β {a b a' b'} {f : A.Hom a b} {f' : β°.Hom[ f ] a' b'}
β β°.is-cartesian f f'
β β±.is-cartesian (F.β f) (Fβ' f') instance
H-Level-is-fibred-functor
: β {F' : Displayed-functor F β° β±}
β {n : Nat}
β H-Level (is-fibred-functor F') (suc n)
H-Level-is-fibred-functor {n = n} =
hlevel-instance (Isoβis-hlevel (suc n) eqv (hlevel (suc n)))
where
unquoteDecl eqv = declare-record-iso eqv (quote is-fibred-functor)
open β± -- Needed for the is-cartesian H-Level instances.Just like with isomorphisms and limits, it makes sense to consider the converse property: displayed functors that reflect cartesian morphisms. An example is given by fully faithful displayed functors.
record reflects-cartesian-maps (F' : Displayed-functor F β° β±) : Type lvl where
no-eta-equality
open Displayed-functor F'
field
reflects
: β {a b a' b'} {f : A.Hom a b} {f' : β°.Hom[ f ] a' b'}
β β±.is-cartesian (F.β f) (Fβ' f')
β β°.is-cartesian f f' instance
H-Level-reflects-cartesian-maps
: β {F' : Displayed-functor F β° β±}
β {n : Nat}
β H-Level (reflects-cartesian-maps F') (suc n)
H-Level-reflects-cartesian-maps {n = n} =
hlevel-instance (Isoβis-hlevel (suc n) eqv (hlevel (suc n)))
where
unquoteDecl eqv = declare-record-iso eqv (quote reflects-cartesian-maps)
open β± -- Needed for the is-cartesian H-Level instances.One can also define the composition of displayed functors, which lies over the composition of the underlying functors.
module
_ {oa βa ob βb oc βc oe βe of βf oh βh}
{A : Precategory oa βa}
{B : Precategory ob βb}
{C : Precategory oc βc}
{β° : Displayed A oe βe}
{β± : Displayed B of βf}
{β : Displayed C oh βh}
{F : Functor B C} {G : Functor A B}
where
private
module A = Precategory A
module B = Precategory B
module β° = Displayed β°
module β± = Displayed β±
module F = Functor F
module G = Functor G
module β = DR β
open DR β
open Displayed-functor
open is-fibred-functor
infixr 30 _Fβ'_ _Fβ'_
: Displayed-functor F β± β
β Displayed-functor G β° β±
β Displayed-functor (F Fβ G) β° β
(F' Fβ' G') .Fβ' x = F' .Fβ' (G' .Fβ' x)
(F' Fβ' G') .Fβ' f = F' .Fβ' (G' .Fβ' f)
(F' Fβ' G') .F-id' =
β.cast[] $
F' .Fβ' (G' .Fβ' β°.id') β.β‘[]β¨ apd (Ξ» i β F' .Fβ') (G' .F-id') β©
F' .Fβ' β±.id' β.β‘[]β¨ F' .F-id' β©
β.id' β
(F' Fβ' G') .F-β' {f = f} {g = g} {f' = f'} {g' = g'} =
β.cast[] $
F' .Fβ' (G' .Fβ' (f' β°.β' g')) β.β‘[]β¨ apd (Ξ» i β F' .Fβ') (G' .F-β') β©
Fβ' F' (G' .Fβ' f' β±.β' G' .Fβ' g') β.β‘[]β¨ F' .F-β' β©
(F' .Fβ' (G' .Fβ' f') β.β' F' .Fβ' (G' .Fβ' g')) βThe composite of two fibred functors is a fibred functor.
Fβ'-fibred
: β {F' : Displayed-functor F β± β} {G' : Displayed-functor G β° β±}
β is-fibred-functor F' β is-fibred-functor G'
β is-fibred-functor (F' Fβ' G')
Fβ'-fibred F'-fibred G'-fibred .F-cartesian f'-cart =
F'-fibred .F-cartesian (G'-fibred .F-cartesian f'-cart)Furthermore, there is a displayed identity functor that lies over the identity functor.
module _
{ob βb oe βe}
{B : Precategory ob βb}
{β° : Displayed B oe βe}
where
open Displayed-functor
open is-fibred-functor Id' : Displayed-functor Id β° β°
Id' .Fβ' x = x
Id' .Fβ' f = f
Id' .F-id' = refl
Id' .F-β' = reflThe identity functor is obviously fibred.
Id'-fibred : is-fibred-functor Id'
Id'-fibred .F-cartesian f'-cart = f'-cartVertical functorsπ
Functors displayed over the identity functor are of particular interest. Such functors are known as vertical functors, and are commonly used to define fibrewise structure. However, they are somewhat difficult to work with if we define them directly as such, as the composite of two identity functors is not definitionally equal to the identity functor! To avoid this problem, we provide the following specialized definition.
module
_ {o β o' β' o'' β''}
{B : Precategory o β}
(β° : Displayed B o' β')
(β± : Displayed B o'' β'')
where
private
module B = Precategory B
module β° = Displayed β°
module β± = Displayed β±
module F = DR β± using (hom[])
module β°β {x} = Precategory (Fibre β° x) using (_β_)
module β±β {x} = Precategory (Fibre β± x) using (_β_) Vertical-functor : Type (o β β β o' β β' β o'' β β'')
Vertical-functor = Displayed-functor Id β° β±As promised, composition of vertical functors is much simpler.
module _
{ob βb oe βe of βf oh βh}
{B : Precategory ob βb}
{β° : Displayed B oe βe}
{β± : Displayed B of βf}
{β : Displayed B oh βh}
where
open Displayed-functor
open is-fibred-functor
infixr 30 _βV_ _βV_ : Vertical-functor β± β β Vertical-functor β° β± β Vertical-functor β° β
(F' βV G') .Fβ' x' = F' .Fβ' (G' .Fβ' x')
(F' βV G') .Fβ' f' = F' .Fβ' (G' .Fβ' f')
(F' βV G') .F-id' = ap (F' .Fβ') (G' .F-id') β F' .F-id'
(F' βV G') .F-β' = ap (F' .Fβ') (G' .F-β') β (F' .F-β')General and vertical composition of vertical functors definitionnally agree on both the actions on objects and morphisms: the only difference is in how the result is indexed.
Fβ'-βV-pathp
: β {F' : Vertical-functor β± β} {G' : Vertical-functor β° β±}
β PathP (Ξ» i β Displayed-functor (Fβ-id2 i) β° β) (F' Fβ' G') (F' βV G')
Fβ'-βV-pathp =
Displayed-functor-pathp (Ξ» i β Fβ-id2 i)
(Ξ» x' β refl)
(Ξ» f' β refl)As such, the composite of vertical fibred functors is also fibred.
βV-fibred
: β {F' : Vertical-functor β± β} {G' : Vertical-functor β° β±}
β is-fibred-functor F' β is-fibred-functor G' β is-fibred-functor (F' βV G')
βV-fibred F'-fib G'-fib .F-cartesian cart =
F'-fib .F-cartesian (G'-fib .F-cartesian cart)module
_ {o β o' β' o'' β''}
{B : Precategory o β}
{β° : Displayed B o' β'}
{β± : Displayed B o'' β''}
where
private
module B = Precategory B
module β° = DR β°
module β± = DR β±
module β°β {x} = Precategory (Fibre β° x) using (_β_)
module β±β {x} = Precategory (Fibre β± x) using (_β_)
module Vertical-functor (F : Vertical-functor β° β±) where
open Displayed-functor F public
abstract
F-ββ
: β {x} {a b c : β°.Ob[ x ]} {f : β°.Hom[ B.id ] b c} {g : β°.Hom[ B.id ] a b}
β Fβ' (f β°β.β g) β‘ Fβ' f β±β.β Fβ' g
F-ββ = β±.cast[] (apd (Ξ» i β Fβ') (β°.unwrap _) β±.β[] F-β' β±.β[] β±.wrap _)
Fibre-map : β x β Functor (Fibre β° x) (Fibre β± x)
Fibre-map x .Functor.Fβ = Fβ'
Fibre-map x .Functor.Fβ = Fβ'
Fibre-map x .Functor.F-id = F-id'
Fibre-map x .Functor.F-β f g = F-ββ
open Vertical-functor
Vertical-functor-path
: {F G : Vertical-functor β° β±}
β (p0 : β {x} β (x' : β°.Ob[ x ]) β F .Fβ' x' β‘ G .Fβ' x')
β (p1 : β {x y x' y'} {f : B.Hom x y} β (f' : β°.Hom[ f ] x' y')
β PathP (Ξ» i β β±.Hom[ f ] (p0 x' i) (p0 y' i)) (F .Fβ' f') (G .Fβ' f'))
β F β‘ G
Vertical-functor-path = Displayed-functor-pathp reflDisplayed natural transformationsπ
Just like we have defined a displayed functor lying over an ordinary functor we can define a displayed natural transformation. Assume are displayed functors over resp. and we have a natural transformation Than one can define a displayed natural transformation lying over
module
_ {o β o' β' oβ ββ oβ' ββ'}
{A : Precategory o β}
{B : Precategory oβ ββ}
{β° : Displayed A o' β'}
{β± : Displayed B oβ' ββ'}
where
private
module A = CR A
module β° = Displayed β°
module β± = Displayed β±
module β°β {x} = Precategory (Fibre β° x) using (_β_)
module β±β {x} = Precategory (Fibre β± x) using (_β_)
open Displayed-functor
open _=>_
lvl : Level
lvl = o β o' β β β β' β ββ'
infix 20 _=[_]=>_ record _=[_]=>_
{F : Functor A B} {G : Functor A B}
(F' : Displayed-functor F β° β±)
(Ξ± : F => G)
(G' : Displayed-functor G β° β±)
: Type lvl
where
no-eta-equality
field
Ξ·' : β {x} (x' : β°.Ob[ x ]) β β±.Hom[ Ξ± .Ξ· x ] (F' .Fβ' x') (G' .Fβ' x')
is-natural'
: β {x y f} (x' : β°.Ob[ x ]) (y' : β°.Ob[ y ]) (f' : β°.Hom[ f ] x' y')
β Ξ·' y' β±.β' F' .Fβ' f' β±.β‘[ Ξ± .is-natural x y f ] G' .Fβ' f' β±.β' Ξ·' x'Let be two vertical functors. A displayed natural transformation between and is called a vertical natural transformation if all components of the natural transformation are vertical.
module _
{ob βb oe βe of βf}
{B : Precategory ob βb}
{β° : Displayed B oe βe}
{β± : Displayed B of βf}
where
private
open CR B
module β° = Displayed β°
module β± = DR β±
module β±β {x} = CR (Fibre β± x)
open Displayed-functor
infix 20 _=>β_ _=>β_ : Vertical-functor β° β± β Vertical-functor β° β± β Type _
F' =>β G' = F' =[ idnt ]=> G' module _=>β_ {F' G' : Vertical-functor β° β±} (Ξ± : F' =>β G') where
open _=[_]=>_ Ξ± public
abstract
is-naturalβ
: β {x} (x' y' : β°.Ob[ x ]) (f' : β°.Hom[ id ] x' y')
β Ξ·' y' β±β.β F' .Fβ' f' β‘ G' .Fβ' f' β±β.β Ξ·' x'
is-naturalβ x y f =
ap β±.hom[] (β±.from-pathp[]β» (is-natural' x y f))
β sym (β±.duplicate _ _ _)
private unquoteDecl eqv = declare-record-iso eqv (quote _=[_]=>_)
instance
Extensional-=>β
: β {βr F' G'}
β β¦ _ : Extensional (β {x} (x' : β°.Ob[ x ]) β β±.Hom[ id ] (F' .Fβ' x') (G' .Fβ' x')) βr β¦
β Extensional (F' =>β G') βr
Extensional-=>β {F' = F'} {G' = G'} β¦ e β¦ = injectionβextensional! {f = _=>β_.Ξ·'}
(Ξ» p β Iso.injective eqv (Ξ£-prop-path! p)) e
H-Level-=>β : β {F' G'} {n} β H-Level (F' =>β G') (2 + n)
H-Level-=>β = basic-instance 2 (Isoβis-hlevel 2 eqv (hlevel 2))
open _=>β_
idntβ : β {F} β F =>β F
idntβ .Ξ·' x' = β±.id'
idntβ .is-natural' x' y' f' = β±.to-pathp[] (DR.id-comm[] β±)
_βntβ_ : β {F G H} β G =>β H β F =>β G β F =>β H
(f βntβ g) .Ξ·' x' = f .Ξ·' _ β±β.β g .Ξ·' x'
_βntβ_ {F = F} {G = G} {H = H} f g .is-natural' {f = b} x' y' f' =
let open DR β± in to-pathp[] (
ap hom[] (whisker-l (idl id))
ββ sym (duplicate (ap (_β b) (idl id) β id-comm-sym) _ _)
ββ ap hom[] (from-pathp[]β» (pullr' id-comm-sym (g .is-natural' _ _ _)
{q = ap (_β b) (idl id) β id-comm-sym β introl refl}))
ββ sym (duplicate (eliml refl) _ _)
ββ ap hom[] (from-pathp[]β» (extendl' id-comm-sym (f .is-natural' x' y' f') {q = extendl id-comm-sym}))
ββ sym (duplicate (ap (b β_) (idl id)) (eliml refl) _)
ββ unwhisker-r _ _)
module _
{ob βb oc βc od βd oe βe}
{B : Precategory ob βb}
{π : Displayed B oc βc}
{π : Displayed B od βd}
{β° : Displayed B oe βe}
{F G : Vertical-functor π β°} {H K : Vertical-functor π π}
(Ξ± : F =>β G) (Ξ² : H =>β K) where
open Displayed-functor
open _=>β_
open CR B
private module E {x} = CR (Fibre β° x) using (_β_)
_ββ_ : (F βV H) =>β (G βV K)
_ββ_ .Ξ·' x' = G .Fβ' (Ξ² .Ξ·' _) E.β Ξ± .Ξ·' _
_ββ_ .is-natural' x' y' f' = to-pathp[] (
ap hom[] (whisker-l (idl id))
ββ sym (duplicate (ap (_β _) (idl id) β id-comm-sym) _ _)
ββ ap hom[] (from-pathp[]β» (pullr' _ (Ξ± .is-natural' _ _ _) {q = pullr id-comm-sym}))
ββ sym (duplicate (eliml refl) _ _)
ββ ap hom[] (from-pathp[]β»
(extendl' _ (symP (G .F-β') β[] (apd (Ξ» i β G .Fβ') (Ξ² .is-natural' _ _ _) β[] G .F-β'))
{q = extendl id-comm-sym}))
ββ sym (duplicate (ap (_ β_) (idl id)) _ _) ββ unwhisker-r _ _)
where open DR β°