module Cat.Functor.Pullback
{o ℓ} {C : Precategory o ℓ}
where
Base change🔗
Let be a category with all pullbacks, and a morphism in . Then we have a functor , called the base change, where the action on objects is given by pulling back along .
On objects, the functor maps as in the diagram below. It’s a bit busy, so look at it in parts: On the left we have the object of , and on the right we have the whole pullback diagram, showing how the parts fit together. The actual object of the functor gives is the vertical arrow .
module _ (pullbacks : ∀ {X Y Z} f g → Pullback C {X} {Y} {Z} f g) {X Y : Ob} (f : Hom Y X) where
: Functor (Slice C X) (Slice C Y)
Base-change .F₀ x = ob where
Base-change : /-Obj Y
ob .domain = pullbacks (x .map) f .apex
ob .map = pullbacks (x .map) f .p₂ ob
On morphisms, we use the universal property of the pullback to obtain a map , by observing that the square diagram below is a cone over .
.F₁ {x} {y} dh = dh' where
Base-change module ypb = Pullback (pullbacks (y .map) f)
module xpb = Pullback (pullbacks (x .map) f)
: /-Hom _ _
dh' .map = ypb.universal {p₁' = dh .map ∘ xpb.p₁}
dh' (pulll (dh .commutes) ∙ xpb.square)
.commutes = ypb.p₂∘universal dh'
The properties of pullbacks also guarantee that this operation is functorial, but the details are not particularly enlightening.
.F-id {x} = ext (sym (xpb.unique id-comm (idr _)))
Base-change where module xpb = Pullback (pullbacks (x .map) f)
.F-∘ {x} {y} {z} am bm =
Base-change (sym (zpb.unique
ext (pulll zpb.p₁∘universal ∙ pullr ypb.p₁∘universal ∙ assoc _ _ _)
(pulll zpb.p₂∘universal ∙ ypb.p₂∘universal)))
where
module ypb = Pullback (pullbacks (y .map) f)
module zpb = Pullback (pullbacks (z .map) f)
Properties🔗
The base change functor is a right adjoint. We construct the left adjoint directly, then give the unit and counit, and finally prove the triangle identities.
The left adjoint, called dependent sum and written , is given on objects by precomposition with , and on morphisms by what is essentially the identity function — only the witness of commutativity must change.
module _ {X Y : Ob} (f : Hom Y X) where
: Functor (Slice C Y) (Slice C X)
Σf .F₀ o = cut (f ∘ o .map)
Σf .F₁ dh = record { map = dh .map ; commutes = pullr (dh .commutes) }
Σf .F-id = trivial!
Σf .F-∘ f g = trivial!
Σf
open _⊣_
open _=>_
The adjunction unit and counit are given by the universal properties of pullbacks. ⚠️ WIP ⚠️
module _ (pullbacks : ∀ {X Y Z} f g → Pullback C {X} {Y} {Z} f g) {X Y : Ob} (f : Hom Y X) where
open _⊣_
open _=>_
: Σf f ⊣ Base-change pullbacks f
Σf⊣f* .unit .η obj = dh where
Σf⊣f* module pb = Pullback (pullbacks (f ∘ obj .map) f)
: /-Hom _ _
dh .map = pb.universal {p₁' = id} {p₂' = obj .map} (idr _)
dh .commutes = pb.p₂∘universal
dh .unit .is-natural x y g =
Σf⊣f* (pb.unique₂
ext {p = (f ∘ y .map) ∘ id ∘ g .map ≡⟨ cat! C ⟩ f ∘ y .map ∘ g .map ∎}
(pulll pb.p₁∘universal)
(pulll pb.p₂∘universal)
(pulll pb.p₁∘universal ∙ pullr pb'.p₁∘universal ∙ id-comm)
(pulll pb.p₂∘universal ∙ pb'.p₂∘universal ∙ sym (g .commutes)))
where
module pb = Pullback (pullbacks (f ∘ y .map) f)
module pb' = Pullback (pullbacks (f ∘ x .map) f)
.counit .η obj = dh where
Σf⊣f* module pb = Pullback (pullbacks (obj .map) f)
: /-Hom _ _
dh .map = pb.p₁
dh .commutes = pb.square
dh .counit .is-natural x y g = ext pb.p₁∘universal
Σf⊣f* where module pb = Pullback (pullbacks (y .map) f)
.zig {A} = ext pb.p₁∘universal
Σf⊣f* where module pb = Pullback (pullbacks (f ∘ A .map) f)
.zag {B} = ext
Σf⊣f* (sym (pb.unique₂ {p = pb.square}
(idr _) (idr _)
(pulll pb.p₁∘universal ∙ pullr pb'.p₁∘universal ∙ idr _)
(pulll pb.p₂∘universal ∙ pb'.p₂∘universal))) where
module pb = Pullback (pullbacks (B .map) f)
module pb' = Pullback (pullbacks (f ∘ pb.p₂) f)