|
| 1 | +--- |
| 2 | +description: | |
| 3 | + Comma categories as two-sided displayed categories. |
| 4 | +--- |
| 5 | +<!-- |
| 6 | +```agda |
| 7 | +open import Cat.Displayed.TwoSided.Discrete |
| 8 | +open import Cat.Displayed.Cocartesian |
| 9 | +open import Cat.Displayed.Cartesian |
| 10 | +open import Cat.Instances.Product |
| 11 | +open import Cat.Displayed.Base |
| 12 | +open import Cat.Prelude |
| 13 | +
|
| 14 | +import Cat.Functor.Reasoning |
| 15 | +import Cat.Reasoning |
| 16 | +``` |
| 17 | +--> |
| 18 | +```agda |
| 19 | +module Cat.Displayed.Instances.Comma where |
| 20 | +``` |
| 21 | + |
| 22 | +# Comma categories as displayed categories |
| 23 | + |
| 24 | +We can neatly present [[comma categories]] as categories displayed over |
| 25 | +product categories. |
| 26 | + |
| 27 | +<!-- |
| 28 | +```agda |
| 29 | +module _ |
| 30 | + {oa ℓa ob ℓb oc ℓc} |
| 31 | + {A : Precategory oa ℓa} |
| 32 | + {B : Precategory ob ℓb} |
| 33 | + {C : Precategory oc ℓc} |
| 34 | + (F : Functor A C) |
| 35 | + (G : Functor B C) |
| 36 | + where |
| 37 | + private |
| 38 | + module A = Cat.Reasoning A |
| 39 | + module B = Cat.Reasoning B |
| 40 | + module C = Cat.Reasoning C |
| 41 | + module F = Cat.Functor.Reasoning F |
| 42 | + module G = Cat.Functor.Reasoning G |
| 43 | +
|
| 44 | + open Displayed |
| 45 | +``` |
| 46 | +--> |
| 47 | + |
| 48 | +```agda |
| 49 | + Comma : Displayed (A ×ᶜ B) ℓc ℓc |
| 50 | + Comma .Ob[_] (a , b) = C.Hom (F.₀ a) (G.₀ b) |
| 51 | + Comma .Hom[_] (u , v) f g = G.₁ v C.∘ f ≡ g C.∘ F.₁ u |
| 52 | + Comma .Hom[_]-set _ _ _ = hlevel 2 |
| 53 | + Comma .id' = C.eliml G.F-id ∙ C.intror F.F-id |
| 54 | + Comma ._∘'_ α β = G.popr β ∙ sym (F.shufflel (sym α)) |
| 55 | + Comma .idr' _ = prop! |
| 56 | + Comma .idl' _ = prop! |
| 57 | + Comma .assoc' _ _ _ = prop! |
| 58 | +``` |
| 59 | + |
| 60 | +## Comma categories are discrete two-sided fibrations |
| 61 | + |
| 62 | +<!-- |
| 63 | +```agda |
| 64 | +module _ |
| 65 | + {oa ℓa ob ℓb oc ℓc} |
| 66 | + {A : Precategory oa ℓa} |
| 67 | + {B : Precategory ob ℓb} |
| 68 | + {C : Precategory oc ℓc} |
| 69 | + {F : Functor A C} |
| 70 | + {G : Functor B C} |
| 71 | + where |
| 72 | + private |
| 73 | + module A = Cat.Reasoning A |
| 74 | + module B = Cat.Reasoning B |
| 75 | + module C = Cat.Reasoning C |
| 76 | + module F = Cat.Functor.Reasoning F |
| 77 | + module G = Cat.Functor.Reasoning G |
| 78 | +
|
| 79 | + open is-discrete-two-sided-fibration |
| 80 | + open Displayed |
| 81 | +``` |
| 82 | +--> |
| 83 | + |
| 84 | +Comma categories are [[discrete two-sided fibrations]]. |
| 85 | + |
| 86 | +```agda |
| 87 | + Comma-is-discrete-two-sided-fibration |
| 88 | + : is-discrete-two-sided-fibration (Comma F G) |
| 89 | + Comma-is-discrete-two-sided-fibration .fibre-set _ _ = hlevel 2 |
| 90 | + Comma-is-discrete-two-sided-fibration .cart-lift f g .centre = |
| 91 | + g C.∘ F.₁ f , C.eliml G.F-id |
| 92 | + Comma-is-discrete-two-sided-fibration .cart-lift f g .paths (h , p) = |
| 93 | + Σ-prop-path! (sym p ∙ C.eliml G.F-id) |
| 94 | + Comma-is-discrete-two-sided-fibration .cocart-lift f g .centre = |
| 95 | + G.₁ f C.∘ g , C.intror F.F-id |
| 96 | + Comma-is-discrete-two-sided-fibration .cocart-lift f g .paths (h , p) = |
| 97 | + Σ-prop-path! (p ∙ C.elimr F.F-id) |
| 98 | + Comma-is-discrete-two-sided-fibration .vert-lift {x = f} {y = g} {u = h} {v = k} p = |
| 99 | + G.F₁ B.id C.∘ G.F₁ k C.∘ f ≡⟨ C.eliml G.F-id ⟩ |
| 100 | + G.F₁ k C.∘ f ≡⟨ p ⟩ |
| 101 | + g C.∘ F.₁ h ≡⟨ C.intror F.F-id ⟩ |
| 102 | + (g C.∘ F.F₁ h) C.∘ F.F₁ A.id ∎ |
| 103 | + Comma-is-discrete-two-sided-fibration .factors _ = prop! |
| 104 | +``` |
| 105 | + |
| 106 | +Every *$B$-vertical* morphism in a discrete two-sided fibration is [[cartesian|cartesian morphism]], |
| 107 | +but this is not neccesarily true of *every* morphism. In our setting, |
| 108 | +the cartesian maps are given by squares that satisfy the following |
| 109 | +pasting property: for every (potentially non-commutative) square of the below |
| 110 | +form, if the overall rectangle commutes, then the upper square commutes. |
| 111 | + |
| 112 | +~~~{.quiver} |
| 113 | +\begin{tikzcd} |
| 114 | + F(A) && G(Y) \\ |
| 115 | + \\ |
| 116 | + F(W) && G(Y) \\ |
| 117 | + \\ |
| 118 | + F(X) && G(Z) |
| 119 | + \arrow["h", from=1-1, to=1-3] |
| 120 | + \arrow["F(j)"', from=1-1, to=3-1] |
| 121 | + \arrow["G(k)", from=1-3, to=3-3] |
| 122 | + \arrow["f", from=3-1, to=3-3] |
| 123 | + \arrow["F(u)"', from=3-1, to=5-1] |
| 124 | + \arrow["G(v)", from=3-3, to=5-3] |
| 125 | + \arrow["g"', from=5-1, to=5-3] |
| 126 | +\end{tikzcd} |
| 127 | +~~~ |
| 128 | + |
| 129 | +```agda |
| 130 | + pasting→comma-cartesian |
| 131 | + : ∀ {w x y z} {u : A.Hom w x} {v : B.Hom y z} {f : C.Hom (F.₀ w) (G.₀ y)} {g : C.Hom (F.₀ x) (G.₀ z)} |
| 132 | + → (p : G.₁ v C.∘ f ≡ g C.∘ F.₁ u) |
| 133 | + → (∀ {a b} {h : C.Hom (F.₀ a) (G.₀ b)} {j : A.Hom a w} {k : B.Hom b y} |
| 134 | + → G.₁ v C.∘ G.₁ k C.∘ h ≡ g C.∘ F.₁ u C.∘ F.₁ j |
| 135 | + → G.₁ k C.∘ h ≡ f C.∘ F.₁ j) |
| 136 | + → is-cartesian (Comma F G) (u , v) p |
| 137 | + pasting→comma-cartesian p paste .is-cartesian.universal _ outer = |
| 138 | + paste (C.pulll (sym $ G.F-∘ _ _) ·· outer ·· ap₂ C._∘_ refl (F.F-∘ _ _)) |
| 139 | + pasting→comma-cartesian p paste .is-cartesian.commutes _ _ = prop! |
| 140 | + pasting→comma-cartesian p paste .is-cartesian.unique _ _ = prop! |
| 141 | +
|
| 142 | + comma-cartesian→pasting |
| 143 | + : ∀ {w x y z} {u : A.Hom w x} {v : B.Hom y z} {f : C.Hom (F.₀ w) (G.₀ y)} {g : C.Hom (F.₀ x) (G.₀ z)} |
| 144 | + → (p : G.₁ v C.∘ f ≡ g C.∘ F.₁ u) |
| 145 | + → is-cartesian (Comma F G) (u , v) p |
| 146 | + → ∀ {a b} {h : C.Hom (F.₀ a) (G.₀ b)} {j : A.Hom a w} {k : B.Hom b y} |
| 147 | + → G.₁ v C.∘ G.₁ k C.∘ h ≡ g C.∘ F.₁ u C.∘ F.₁ j |
| 148 | + → G.₁ k C.∘ h ≡ f C.∘ F.₁ j |
| 149 | + comma-cartesian→pasting p p-cart outer = |
| 150 | + is-cartesian.universal p-cart _ $ |
| 151 | + C.pushl (G.F-∘ _ _) ·· outer ·· ap₂ C._∘_ refl (sym $ F.F-∘ _ _) |
| 152 | +``` |
| 153 | + |
| 154 | +Moreover, a square is [[cocartesian|cocartesian-morphism]] when it satisfies |
| 155 | +the dual pasting lemma. |
| 156 | + |
| 157 | +```agda |
| 158 | + pasting→comma-cocartesian |
| 159 | + : ∀ {w x y z} {u : A.Hom w x} {v : B.Hom y z} {f : C.Hom (F.₀ w) (G.₀ y)} {g : C.Hom (F.₀ x) (G.₀ z)} |
| 160 | + → (p : G.₁ v C.∘ f ≡ g C.∘ F.₁ u) |
| 161 | + → (∀ {a b} {h : C.Hom (F.₀ a) (G.₀ b)} {j : A.Hom x a} {k : B.Hom z b} |
| 162 | + → G.₁ k C.∘ G.₁ v C.∘ f ≡ h C.∘ F.₁ j C.∘ F.₁ u |
| 163 | + → G.₁ k C.∘ g ≡ h C.∘ F.₁ j) |
| 164 | + → is-cocartesian (Comma F G) (u , v) p |
| 165 | +
|
| 166 | + comma-cocartesian→pasting |
| 167 | + : ∀ {w x y z} {u : A.Hom w x} {v : B.Hom y z} {f : C.Hom (F.₀ w) (G.₀ y)} {g : C.Hom (F.₀ x) (G.₀ z)} |
| 168 | + → (p : G.₁ v C.∘ f ≡ g C.∘ F.₁ u) |
| 169 | + → is-cocartesian (Comma F G) (u , v) p |
| 170 | + → ∀ {a b} {h : C.Hom (F.₀ a) (G.₀ b)} {j : A.Hom x a} {k : B.Hom z b} |
| 171 | + → G.₁ k C.∘ G.₁ v C.∘ f ≡ h C.∘ F.₁ j C.∘ F.₁ u |
| 172 | + → G.₁ k C.∘ g ≡ h C.∘ F.₁ j |
| 173 | +
|
| 174 | +``` |
| 175 | + |
| 176 | +<details> |
| 177 | +<summary>The proofs are formally dual, so we omit them. |
| 178 | +</summary> |
| 179 | + |
| 180 | +```agda |
| 181 | + pasting→comma-cocartesian p paste .is-cocartesian.universal _ outer = |
| 182 | + paste (C.pulll (sym $ G.F-∘ _ _) ·· outer ·· ap₂ C._∘_ refl (F.F-∘ _ _)) |
| 183 | + pasting→comma-cocartesian p paste .is-cocartesian.commutes _ _ = prop! |
| 184 | + pasting→comma-cocartesian p paste .is-cocartesian.unique _ _ = prop! |
| 185 | +
|
| 186 | + comma-cocartesian→pasting p p-cocart outer = |
| 187 | + is-cocartesian.universal p-cocart _ $ |
| 188 | + C.pushl (G.F-∘ _ _) ·· outer ·· ap₂ C._∘_ refl (sym $ F.F-∘ _ _) |
| 189 | +``` |
| 190 | +</details> |
0 commit comments