module Cat.Diagram.Pullback where
Pullbacksπ
A pullback of and is the product of and in the category the category of objects fibred over We note that the fibre of over some element of is the product of the fibres of and over Hence the pullback is also called the fibred product.
record is-pullback {P} (pβ : Hom P X) (f : Hom X Z) (pβ : Hom P Y) (g : Hom Y Z)
: Type (o β β) where
no-eta-equality
field
: f β pβ β‘ g β pβ square
The concrete incarnation of the abstract nonsense above is that a pullback turns out to be a universal square like the one below. Since it is a product, it comes equipped with projections and onto its factors; Since isnβt merely a product of and but rather of and considered as objects over in a specified way, overall square has to commute.
: β {P'} {pβ' : Hom P' X} {pβ' : Hom P' Y}
universal β f β pβ' β‘ g β pβ' β Hom P' P
: {p : f β pβ' β‘ g β pβ'} β pβ β universal p β‘ pβ'
pββuniversal : {p : f β pβ' β‘ g β pβ'} β pβ β universal p β‘ pβ'
pββuniversal
: {p : f β pβ' β‘ g β pβ'} {lim' : Hom P' P}
unique β pβ β lim' β‘ pβ'
β pβ β lim' β‘ pβ'
β lim' β‘ universal p
uniqueβ: {p : f β pβ' β‘ g β pβ'} {lim' lim'' : Hom P' P}
β pβ β lim' β‘ pβ' β pβ β lim' β‘ pβ'
β pβ β lim'' β‘ pβ' β pβ β lim'' β‘ pβ'
β lim' β‘ lim''
{p = o} p q r s = unique {p = o} p q β sym (unique r s) uniqueβ
By universal, we mean that any other βsquareβ (here the second βsquareβ has corners β itβs a bit bent) admits a unique factorisation that passes through We can draw the whole situation as in the diagram below. Note the little corner on indicating that the square is a pullback.
We provide a convenient packaging of the pullback and the projection maps:
record Pullback {X Y Z} (f : Hom X Z) (g : Hom Y Z) : Type (o β β) where
no-eta-equality
field
{apex} : Ob
: Hom apex X
pβ : Hom apex Y
pβ : is-pullback pβ f pβ g
has-is-pb
open is-pullback has-is-pb public
Categories with all pullbacksπ
We also provide a helper module for working with categories that have all pullbacks.
: β {o β} β Precategory o β β Type _
has-pullbacks = β {A B X} (f : Hom A X) (g : Hom B X) β Pullback C f g
has-pullbacks C where open Precategory C
module Pullbacks
{o β}
(C : Precategory o β)
(all-pullbacks : has-pullbacks C)
where
open Precategory C
module pullback {x y z} (f : Hom x z) (g : Hom y z) =
(all-pullbacks f g)
Pullback
: β {x y z} β Hom x z β Hom y z β Ob
Pb = pullback.apex Pb
Stabilityπ
Pullbacks, in addition to their nature as limits, serve as the way of βchanging the baseβ of a family of objects: if we think of an arrow as encoding the data of a family over (think of the special case where and then we can think of pulling back along as βthe universal solution to making a family over via β. One way of making this intuition formal is through the fundamental fibration of a category with pullbacks.
In that framing, there is a canonical choice for βtheβ pullback of an
arrow along another: We put the arrow
we want to pullback on the right side of the diagram, and the pullback
is the right arrow. Using the type is-pullback
defined above, the arrow
which results from pulling back is adjacent to the adjustment:
is-pullback fβΊ g _ f
. To help keep this straight, we define
what it means for a class of arrows to be stable under
pullback: If f
has a given property, then so does
fβΊ
, for any pullback of f
.
is-pullback-stable: β {β'} β (β {a b} β Hom a b β Type β') β Type _
=
is-pullback-stable P β {p A B X} (f : Hom A B) (g : Hom X B) {fβΊ : Hom p X} {p2}
β P f β is-pullback C fβΊ g p2 f β P fβΊ