module Cat.Displayed.Functor where
Displayed 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.
record Displayed-functor : Type lvl where
no-eta-equality
field
: ∀ {x} (o : ℰ.Ob[ x ]) → ℱ.Ob[ F.₀ x ]
F₀' : ∀ {a b} {f : A.Hom a b} {a' b'}
F₁' → ℰ.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.
: ∀ {x} {o : ℰ.Ob[ x ]}
F-id' → PathP (λ i → ℱ.Hom[ F.F-id i ] (F₀' o) (F₀' o))
(F₁' ℰ.id') ℱ.id'
: ∀ {a b c} {f : A.Hom b c} {g : A.Hom a b} {a' b' c'}
F-∘' {f' : ℰ.Hom[ f ] b' c'} {g' : ℰ.Hom[ g ] a' b'}
→ PathP (λ i → ℱ.Hom[ F.F-∘ f g i ] (F₀' a') (F₀' c'))
(F₁' (f' ℰ.∘' g'))
(F₁' f' ℱ.∘' F₁' g')
= F₀'
₀' = F₁' ₁'
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:
: Displayed-functor ℰ ℱ F → Type _
is-fibred-functor =
is-fibred-functor F' ∀ {a b a' b'} {f : A.Hom a b} (f' : ℰ.Hom[ f ] a' b')
→ is-cartesian ℰ f f' → is-cartesian ℱ (F.₁ f) (F₁' f')
where open Displayed-functor F'
record Fibred-functor : Type (lvl ⊔ o₂ ⊔ ℓ₂) where
no-eta-equality
field
: Displayed-functor ℰ ℱ F
disp : is-fibred-functor disp
F-cartesian
open Displayed-functor disp public
One can also define the composition of displayed functors, which lies over the composition of the underlying functors.
_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' = to-pathp $
(F' .F₁' (G' .F₁' ℰ.id')) ≡⟨ reindex _ _ ∙ sym (hom[]-∙ (ap F.F₁ G.F-id) F.F-id) ⟩
hom[] (hom[] (F' .F₁' (G' .F₁' ℰ.id'))) ≡⟨ ap hom[] (shiftl _ λ i → F' .F₁' (G' .F-id' i)) ⟩
hom[] (F' .F₁' ℱ.id') ≡⟨ from-pathp (F' .F-id') ⟩
hom[] .id' ∎
ℋ(F' F∘' G') .F-∘' {f = f} {g = g} {f' = f'} {g' = g'} = to-pathp $
(F' .F₁' (G' .F₁' (f' ℰ.∘' g'))) ≡⟨ reindex _ _ ∙ sym (hom[]-∙ (ap F.F₁ (G.F-∘ f g)) (F.F-∘ (G.₁ f) (G.₁ g))) ⟩
hom[] (hom[] (F' .F₁' (G' .F₁' (f' ℰ.∘' g')))) ≡⟨ ap hom[] (shiftl _ λ i → F' .F₁' (G' .F-∘' {f' = f'} {g' = g'} i)) ⟩
hom[] (F' .F₁' ((G' .F₁' f') ℱ.∘' (G' .F₁' g'))) ≡⟨ from-pathp (F' .F-∘') ⟩
hom[] .F₁' (G' .F₁' f') ℋ.∘' F' .F₁' (G' .F₁' g') ∎ F'
Furthermore, there is a displayed identity functor that lies over the identity functor.
: Displayed-functor ℰ ℰ Id
Id' .F₀' x = x
Id' .F₁' f = f
Id' .F-id' = refl
Id' .F-∘' = refl Id'
The identity functor is obviously fibred.
: is-fibred-functor Id'
Id'-fibred = cart
Id'-fibred f cart
: Fibred-functor ℰ ℰ Id
Idf' .Fibred-functor.disp = Id'
Idf' .Fibred-functor.F-cartesian = Id'-fibred Idf'
Vertical 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.
record Vertical-functor : Type (o ⊔ ℓ ⊔ o' ⊔ ℓ' ⊔ o'' ⊔ ℓ'') where
no-eta-equality
field
: ∀ {x} (o : ℰ.Ob[ x ]) → ℱ.Ob[ x ]
F₀' : ∀ {a b} {f : B.Hom a b} {a' b'}
F₁' → ℰ.Hom[ f ] a' b' → ℱ.Hom[ f ] (F₀' a') (F₀' b')
: ∀ {x} {o : ℰ.Ob[ x ]}
F-id' → PathP ( λ _ → ℱ.Hom[ B.id ] (F₀' o) (F₀' o))
(F₁' ℰ.id') ℱ.id'
: ∀ {a b c} {f : B.Hom b c} {g : B.Hom a b} {a' b' c'}
F-∘' {f' : ℰ.Hom[ f ] b' c'} {g' : ℰ.Hom[ g ] a' b'}
→ PathP (λ _ → ℱ.Hom[ f B.∘ g ] (F₀' a') (F₀' c')) (F₁' (f' ℰ.∘' g'))
(F₁' f' ℱ.∘' F₁' g')
= F₀'
₀' = F₁' ₁'
This definition is equivalent to a displayed functor over the identity functor.
Displayed-functor→Vertical-functor: Displayed-functor ℰ ℱ Id → Vertical-functor ℰ ℱ
= V where
Displayed-functor→Vertical-functor F' module F' = Displayed-functor F'
open Vertical-functor
: Vertical-functor ℰ ℱ
V .F₀' = F'.₀'
V .F₁' = F'.₁'
V .F-id' = F'.F-id'
V .F-∘' = F'.F-∘'
V
Vertical-functor→Displayed-functor: Vertical-functor ℰ ℱ → Displayed-functor ℰ ℱ Id
= F' where
Vertical-functor→Displayed-functor V module V = Vertical-functor V
open Displayed-functor
: Displayed-functor ℰ ℱ Id
F' .F₀' = V.₀'
F' .F₁' = V.₁'
F' .F-id' = V.F-id'
F' .F-∘' = V.F-∘' F'
We also provide a specialized definition for vertical fibred functors.
: Vertical-functor ℰ ℱ → Type _
is-vertical-fibred =
is-vertical-fibred F' ∀ {a b a' b'} {f : B.Hom a b} (f' : ℰ.Hom[ f ] a' b')
→ is-cartesian ℰ f f' → is-cartesian ℱ f (F₁' f')
where open Vertical-functor F'
record Vertical-fibred-functor : Type lvl where
no-eta-equality
field
: Vertical-functor ℰ ℱ
vert : is-vertical-fibred vert
F-cartesian open Vertical-functor vert public
A functor displayed over the identity functor is fibred if and only if it is a vertical fibred functor.
is-fibred→is-vertical-fibred: ∀ (F' : Displayed-functor ℰ ℱ Id)
→ is-fibred-functor F'
→ is-vertical-fibred (Displayed-functor→Vertical-functor F')
= F-fib
is-fibred→is-vertical-fibred F' F-fib
is-vertical-fibred→is-fibred: ∀ (F' : Vertical-functor ℰ ℱ)
→ is-vertical-fibred F'
→ is-fibred-functor (Vertical-functor→Displayed-functor F')
= F-fib
is-vertical-fibred→is-fibred F' F-fib
Fibred→Vertical-fibred: Fibred-functor ℰ ℱ Id → Vertical-fibred-functor ℰ ℱ
.Vertical-fibred-functor.vert =
Fibred→Vertical-fibred F' (Fibred-functor.disp F')
Displayed-functor→Vertical-functor .Vertical-fibred-functor.F-cartesian =
Fibred→Vertical-fibred F'
is-fibred→is-vertical-fibred(Fibred-functor.disp F')
(Fibred-functor.F-cartesian F')
Vertical-Fibred→Vertical: Vertical-fibred-functor ℰ ℱ → Fibred-functor ℰ ℱ Id
.Fibred-functor.disp =
Vertical-Fibred→Vertical F' (Vertical-fibred-functor.vert F')
Vertical-functor→Displayed-functor .Fibred-functor.F-cartesian =
Vertical-Fibred→Vertical F'
is-vertical-fibred→is-fibred(Vertical-fibred-functor.vert F')
(Vertical-fibred-functor.F-cartesian F')
As promised, composition of vertical functors is much simpler.
_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-∘')
Furthermore, the composite of vertical fibred functors is also fibred.
V∘-fibred: ∀ (F' : Vertical-functor ℱ ℋ) (G' : Vertical-functor ℰ ℱ)
→ is-vertical-fibred F' → is-vertical-fibred G' → is-vertical-fibred (F' V∘ G')
= F'-fib (G' .F₁' f') (G'-fib f' cart)
V∘-fibred F' G' F'-fib G'-fib f' cart
_Vf∘_
: Vertical-fibred-functor ℱ ℋ
→ Vertical-fibred-functor ℰ ℱ
→ Vertical-fibred-functor ℰ ℋ
(F' Vf∘ G') .Vertical-fibred-functor.vert =
.vert F' V∘ Vertical-fibred-functor.vert G'
Vertical-fibred-functor(F' Vf∘ G') .Vertical-fibred-functor.F-cartesian =
V∘-fibred(Vertical-fibred-functor.vert F')
(Vertical-fibred-functor.vert G')
(Vertical-fibred-functor.F-cartesian F')
(Vertical-fibred-functor.F-cartesian G')
The identity functor is obviously fibred vertical.
: Vertical-functor ℰ ℰ
IdV = Displayed-functor→Vertical-functor Id'
IdV
: is-vertical-fibred IdV
IdV-fibred = is-fibred→is-vertical-fibred Id' Id'-fibred
IdV-fibred
: Vertical-fibred-functor ℰ ℰ
IdVf = Fibred→Vertical-fibred Idf' IdVf
Displayed 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 ℰ = Displayed ℰ
module ℱ = Displayed ℱ
open Displayed-functor
open _=>_
: Level
lvl = o ⊔ o' ⊔ ℓ ⊔ ℓ' ⊔ ℓ₂'
lvl 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.
record _=>↓_ (F' G' : Vertical-functor ℰ ℱ) : Type lvl where
no-eta-equality
field
: ∀ {x} (x' : ℰ.Ob[ x ]) → ℱ.Hom[ id ] (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' ℱ.≡[ id-comm-sym ] G' .F₁' f' ℱ.∘' η' x'
This notion of natural transformation is also the correct one for fibred vertical functors, as there is no higher structure that needs to be preserved.
_=>f↓_ : (F' G' : Vertical-fibred-functor ℰ ℱ) → Type _
= F' .vert =>↓ G' .vert
F' =>f↓ G' where open Vertical-fibred-functor