module Cat.Regular.Slice
{o ℓ} {C : Precategory o ℓ} (y : ⌞ C ⌟) (reg : is-regular C) where
Regular categories are stable under slicing🔗
Let be a regular category: a finitely complete category where maps have pullback-stable strong epi-mono factorisations. In this module, we’ll establish that, for any object the slice is also a regular category. If we motivate regular categories by the well-behaved calculus of relations of their internal language, stability under slicing means that relations remain well-behaved under passing to arbitrary contexts.
private
module r = is-regular reg
= Slice C y
C/y module C/y = Cr C/y
open Cr C
open Factorisation
open is-regular
open Functor
open /-Obj
open /-Hom
private
: Finitely-complete C/y
C/y-lex = with-pullbacks C/y Slice-terminal-object pb where
C/y-lex : ∀ {A B X} (f : C/y.Hom A X) (g : C/y.Hom B X) → Pullback C/y f g
pb {A = A} f g = below where
pb = r.lex.pullbacks (f .map) (g .map)
above
: Pullback C/y f g
below .Pullback.apex = cut (A .map ∘ above .Pullback.p₁)
below .Pullback.p₁ .map = above .Pullback.p₁
below .Pullback.p₁ .commutes = refl
below .Pullback.p₂ .map = above .Pullback.p₂
below .Pullback.p₂ .commutes =
below (sym (g .commutes)) ∙ ap₂ _∘_ refl (sym (above .Pullback.square)) ∙ pulll (f .commutes)
pushl .Pullback.has-is-pb = pullback-above→pullback-below (above .Pullback.has-is-pb)
below
pres-mono: ∀ {a b} (h : a C/y.↪ b)
→ a .domain ↪ b .domain
.mor = h .mor .map
pres-mono h {a = A} h .monic a b p = ap map $ h .C/y.monic
pres-mono {c = cut (A .map ∘ a)}
(record { commutes = refl })
(record { commutes = pushl (sym (h .mor .commutes)) ·· ap₂ _∘_ refl (sym p) ·· pulll (h .mor .commutes) })
(ext p)
Other than finite limits, which we have already extensively investigated in slice categories (see limits in slices), what remains of the proof is a characterisation of the strong epimorphisms in a slice To do this, we will freely use that and are finitely complete, and instead characterise the extremal epimorphisms.
For this, it will suffice to show that the inclusion functor both preserves and reflects extermal epimorphisms. Given an extremal epi over and a non-trivial factorisation of through a monomorphism in we can show that itself is a monomorphism over and that it factors in It follows that is invertible as a map over meaning it is invertible in
preserve-cover: ∀ {a b} (h : C/y.Hom a b)
→ is-strong-epi C/y h
→ is-strong-epi C (h .map)
{b = B} h cover = is-extremal-epi→is-strong-epi C r.has-is-lex λ m g p →
preserve-cover let
: cut (B .map ∘ m .mor) C/y.↪ B
mono = record
mono { mor = record { map = m .mor ; commutes = refl }
; monic = λ g h p → ext (m .monic _ _ (ap map p))
}
: C/y.is-invertible (record { map = m .mor ; commutes = refl })
inv = extreme mono
inv (record { map = g ; commutes = pullr (sym p) ∙ h .commutes })
(ext p)
in make-invertible
(inv .C/y.is-invertible.inv .map)
(ap map (inv .C/y.is-invertible.invl))
(ap map (inv .C/y.is-invertible.invr))
where extreme = is-strong-epi→is-extremal-epi C/y cover
In the converse direction, suppose is a map over which is a strong epimorphism in Since the projection functor preserves monos (it preserves pullbacks), any non-trivial factorisation of through a monomorphism over must still be a non-trivial factorisation when regarded in We can then calculate that the inverse to is still a map over
reflect-cover: ∀ {a b} (h : C/y.Hom a b)
→ is-strong-epi C (h .map)
→ is-strong-epi C/y h
= is-extremal-epi→is-strong-epi C/y C/y-lex λ m g p →
reflect-cover h cover let inv = extn (pres-mono m) (g .map) (ap map p)
in C/y.make-invertible
(record
{ map = inv .is-invertible.inv
; commutes = invertible→epic inv _ _ $
(inv .is-invertible.invr) ∙ sym (m .mor .commutes)
cancelr })
(ext (inv .is-invertible.invl))
(ext (inv .is-invertible.invr))
where extn = is-strong-epi→is-extremal-epi C cover
Since the projection functor preserves and reflects strong epimorphisms, we can compute image factorisations over as image factorisations in And since the projection functor additionally preserves pullbacks, by the same argument, it suffices for strong epimorphisms to be stable under pullback in for them to be stable under pullback in too.
: is-regular (Slice C y)
slice-is-regular .factor {a} {b} f = fact' where
slice-is-regular = r.factor (f .map)
fact private module f = Factorisation fact
: Factorisation C/y (StrongEpi C/y) (Mono C/y) f
fact' .mediating = cut (b .map ∘ f.forget)
fact' .mediate = record { commutes = pullr (sym f.factors) ∙ f .commutes }
fact' .forget .map = f.forget
fact' .forget .commutes = refl
fact' .mediate∈E = do
fact' .mediate∈E
c ← f(reflect-cover (fact' .mediate) c)
pure .forget∈M = inc λ g h p → ext $ □-out! f.forget∈M (g .map) (h .map) (ap map p)
fact' .factors = ext f.factors
fact'
.stable {B = B} f g {p1} {p2} cover is-pb =
slice-is-regular .stable _ _
reflect-cover p1 $ r(preserve-cover _ cover)
(pullback-below→pullback-above is-pb)
.has-is-lex = C/y-lex slice-is-regular