Skip to content

Commit 7434ddb

Browse files
committed
chore: styling
1 parent c5abcd8 commit 7434ddb

File tree

5 files changed

+107
-107
lines changed

5 files changed

+107
-107
lines changed

src/Cat/Morphism/Factorisation.lagda.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ monic.
7272
→ (f-fac : Factorisation C L R f)
7373
→ C.is-monic f
7474
→ C.is-monic (f-fac .left)
75-
factor-monic→left-monic {f = f} f-fac f-monic =
76-
C.monic-cancell $ C.subst-is-monic (f-fac .factors) f-monic
75+
factor-monic→left-monic {f = f} f-fac f-monic = C.monic-cancell $
76+
C.subst-is-monic (f-fac .factors) f-monic
7777
```
7878

7979
If $f$ is [[epic]] and factors as $f = r \circ l$, then $r$ must also be
@@ -85,6 +85,6 @@ epic.
8585
→ (f-fac : Factorisation C L R f)
8686
→ C.is-epic f
8787
→ C.is-epic (f-fac .right)
88-
factor-epic→right-epic {f = f} f-fac f-epic =
89-
C.epic-cancelr $ C.subst-is-epic (f-fac .factors) f-epic
88+
factor-epic→right-epic {f = f} f-fac f-epic = C.epic-cancelr $
89+
C.subst-is-epic (f-fac .factors) f-epic
9090
```

src/Cat/Morphism/Factorisation/Orthogonal.lagda.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@ morphism are a proposition.
187187
q = Univalent.Hom-pathp-refll-iso c-cat {p = isop1p2 .fst} (isop1p2 .snd .snd)
188188

189189
go : x ≡ y
190-
go i .mid = c-cat .to-path (isop1p2 .fst) i
191-
go i .left = p i
190+
go i .mid = c-cat .to-path (isop1p2 .fst) i
191+
go i .left = p i
192192
go i .right = q i
193193
```
194194

195195
<!--
196196
```agda
197-
go i .left∈L = is-prop→pathp (λ i → is-tr (L · (p i))) (x .left∈L) (y .left∈L) i
197+
go i .left∈L = is-prop→pathp (λ i is-tr (L · (p i))) (x .left∈L) (y .left∈L) i
198198
go i .right∈R = is-prop→pathp (λ i is-tr (R · (q i))) (x .right∈R) (y .right∈R) i
199199
go i .factors =
200200
is-prop→pathp (λ i C.Hom-set _ _ f (q i C.∘ p i)) (x .factors) (y .factors) i
@@ -227,15 +227,13 @@ technical one.
227227
L-is-⊥R
228228
: {a b} (f : C.Hom a b)
229229
(f ∈ L) ≃ ( {c d} (m : C.Hom c d) m ∈ R Orthogonal C f m)
230-
L-is-⊥R f =
231-
prop-ext! (λ m f∈L m∈R → to f∈L m m∈R) from
232-
where
233-
to : ∀ {c d} (m : C.Hom c d) → f ∈ L → m ∈ R → Orthogonal C f m
234-
to m f∈L m∈R u v square = L⊥R f f∈L m m∈R u v square
230+
L-is-⊥R f = prop-ext! (λ m f∈L m∈R to f∈L m m∈R) from where
231+
to : {c d} (m : C.Hom c d) f ∈ L m ∈ R Orthogonal C f m
232+
to m f∈L m∈R u v square = L⊥R f f∈L m m∈R u v square
235233

236-
from : (∀ {c d} (m : C.Hom c d) → m ∈ R → Orthogonal C f m) → f ∈ L
237-
from ortho = subst (_∈ L) (sym (fa .factors)) $ L-is-stable _ _ m∈L (fa .left∈L)
238-
where
234+
from : ( {c d} (m : C.Hom c d) m ∈ R Orthogonal C f m) f ∈ L
235+
from ortho = subst (_∈ L) (sym (fa .factors)) $ L-is-stable _ _ m∈L (fa .left∈L)
236+
where
239237
```
240238

241239
Suppose that $f$ is left-orthogonal to every $r \in R$, and write out
@@ -261,8 +259,8 @@ and make note of the diagonal filler $g : B \to r(f)$, and that it
261259
satisfies $gf=e$ and $mg = \id$.
262260

263261
```agda
264-
fa = factor f
265-
gpq = ortho (fa .right) (fa .right∈R) (fa .left) C.id (C.idl _ ∙ (fa .factors))
262+
fa = factor f
263+
gpq = ortho (fa .right) (fa .right∈R) (fa .left) C.id (C.idl _ ∙ (fa .factors))
266264
```
267265

268266
We'll show $gr = \id$ by fitting it into a lifting diagram. But
@@ -284,18 +282,18 @@ needed.
284282
~~~
285283

286284
```agda
287-
gm=id : gpq .centre .fst C.∘ (fa .right) ≡ C.id
288-
gm=id = ap fst $ is-contr→is-prop
289-
(L⊥R _ (fa .left∈L) _ (fa .right∈R) _ _ refl)
290-
( _ , C.pullr (sym (fa .factors)) ∙ gpq .centre .snd .fst
291-
, C.cancell (gpq .centre .snd .snd)) (C.id , C.idl _ , C.idr _)
285+
gm=id : gpq .centre .fst C.∘ (fa .right) ≡ C.id
286+
gm=id = ap fst $ is-contr→is-prop
287+
(L⊥R _ (fa .left∈L) _ (fa .right∈R) _ _ refl)
288+
( _ , C.pullr (sym (fa .factors)) ∙ gpq .centre .snd .fst
289+
, C.cancell (gpq .centre .snd .snd)) (C.id , C.idl _ , C.idr _)
292290
```
293291

294292
Think back to the conclusion we wanted to reach: $r$ is in $L$, so since
295293
$f = r \circ l$ and $R$ is stable, so is $f$!
296294

297295
```agda
298-
m∈L : fa .right ∈ L
299-
m∈L = is-iso→in-L (fa .right) $
300-
C.make-invertible (gpq .centre .fst) (gpq .centre .snd .snd) gm=id
296+
m∈L : fa .right ∈ L
297+
m∈L = is-iso→in-L (fa .right) $
298+
C.make-invertible (gpq .centre .fst) (gpq .centre .snd .snd) gm=id
301299
```

src/Cat/Morphism/Lifts.lagda.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,7 @@ aforementioned lifting properties.
171171
{-# INCOHERENT Lifts-against-arrows-right #-}
172172
173173
open Impl hiding (Lifts; Orthogonal; Lifting) public
174-
private open module Reimpl {o ℓ} (C : Precategory o ℓ) = Impl {C = C} using (Lifts; Orthogonal; Lifting) public
175-
{-# DISPLAY Impl.Lifts {C = C} L R = Lifts C L R #-}
176-
{-# DISPLAY Impl.Orthogonal {C = C} L R = Orthogonal C L R #-}
177-
{-# DISPLAY Impl.Lifting {C = C} f g h k = Lifting C f g h k #-}
174+
module _ {o ℓ} (C : Precategory o ℓ) where open Impl {C = C} using (Lifts ; Orthogonal ; Lifting) public
178175
179176
module _ {o ℓ} (C : Precategory o ℓ) where
180177
open Cat.Reasoning C
@@ -229,8 +226,7 @@ some short calculations show that both triangles commute.
229226
```agda
230227
invertible-left-lifts f f-inv u v vf=gu =
231228
pure (u ∘ f.inv , cancelr f.invr , pulll (sym vf=gu) ∙ cancelr f.invl)
232-
where
233-
module f = is-invertible f-inv
229+
where module f = is-invertible f-inv
234230
```
235231

236232
<details>
@@ -240,8 +236,7 @@ some short calculations show that both triangles commute.
240236
```agda
241237
invertible-right-lifts g g-inv u v vf=gu =
242238
pure (g.inv ∘ v , pullr vf=gu ∙ cancell g.invr , cancell g.invl)
243-
where
244-
module g = is-invertible g-inv
239+
where module g = is-invertible g-inv
245240
```
246241
</details>
247242

@@ -371,8 +366,8 @@ type of lifts of such a square is a proposition.
371366
```agda
372367
left-epic→lift-is-prop
373368
: is-epic f → v ∘ f ≡ g ∘ u → is-prop (Lifting C f g u v)
374-
left-epic→lift-is-prop f-epi vf=gu (l , lf=u , _) (k , kf=u , _) =
375-
Σ-prop-path! (f-epi l k (lf=u ∙ sym kf=u))
369+
left-epic→lift-is-prop f-epi vf=gu (l , lf=u , _) (k , kf=u , _) = Σ-prop-path! $
370+
f-epi l k (lf=u ∙ sym kf=u)
376371
```
377372

378373
Dually, if $g$ is a [[monomorphism]], then we the type of lifts is also

src/Cat/Morphism/Orthogonal.lagda.md

Lines changed: 47 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -72,26 +72,33 @@ $!_X : X \to 1$ is the unique map from $X$ into the [[terminal object]].
7272
The proof is mostly a calculation, so we present it without a lot of comment.
7373

7474
```agda
75-
object-orthogonal-!-orthogonal {X = X} T f =
76-
prop-ext! fwd bwd
77-
where
78-
module T = Terminal T
79-
80-
fwd : Orthogonal C f X → Orthogonal C f (! T)
81-
fwd f⊥X u v sq .centre = f⊥X u .centre .fst , f⊥X u .centre .snd , T.!-unique₂ _ _
82-
fwd f⊥X u v sq .paths m = Σ-prop-path! (ap fst (f⊥X u .paths (m .fst , m .snd .fst)))
83-
84-
bwd : Orthogonal C f (! T) → Orthogonal C f X
85-
bwd f⊥! u .centre = f⊥! u T.! (T.!-unique₂ _ _) .centre .fst , f⊥! u T.! (T.!-unique₂ _ _) .centre .snd .fst
86-
bwd f⊥! u .paths (w , eq) = Σ-prop-path! (ap fst (f⊥! _ _ _ .paths (w , eq , (T.!-unique₂ _ _))))
75+
object-orthogonal-!-orthogonal {X = X} T f = prop-ext! fwd bwd where
76+
module T = Terminal T
77+
78+
fwd : Orthogonal C f X → Orthogonal C f T.!
79+
fwd f⊥X u v sq .centre =
80+
f⊥X u .centre .fst
81+
, f⊥X u .centre .snd
82+
, T.!-unique₂ _ _
83+
fwd f⊥X u v sq .paths m = Σ-prop-path! $
84+
ap fst (f⊥X u .paths (m .fst , m .snd .fst))
85+
86+
bwd : Orthogonal C f (! T) → Orthogonal C f X
87+
bwd f⊥! u .centre =
88+
f⊥! u T.! (T.!-unique₂ _ _) .centre .fst
89+
, f⊥! u T.! (T.!-unique₂ _ _) .centre .snd .fst
90+
bwd f⊥! u .paths (w , eq) = Σ-prop-path! $
91+
ap fst (f⊥! _ _ _ .paths (w , eq , (T.!-unique₂ _ _)))
8792
```
8893

8994
As a passing observation we note that if $f \ortho X$ and $X \cong Y$,
9095
then $f \ortho Y$. Of course, this is immediate in categories, but it
9196
holds in the generality of precategories.
9297

9398
```agda
94-
obj-orthogonal-iso : ∀ {a b} {X Y} (f : Hom a b) → X ≅ Y → Orthogonal C f X → Orthogonal C f Y
99+
obj-orthogonal-iso
100+
: ∀ {a b} {X Y} (f : Hom a b)
101+
→ X ≅ Y → Orthogonal C f X → Orthogonal C f Y
95102
```
96103

97104
<!--
@@ -113,11 +120,11 @@ A slightly more interesting lemma is that, if $f$ is orthogonal to
113120
itself, then it is an isomorphism:
114121

115122
```agda
116-
self-orthogonal→invertible : ∀ {a b} (f : Hom a b) → Orthogonal C f f → is-invertible f
123+
self-orthogonal→invertible
124+
: ∀ {a b} (f : Hom a b) → Orthogonal C f f → is-invertible f
117125
self-orthogonal→invertible f f⊥f =
118-
make-invertible (gpq .fst) (gpq .snd .snd) (gpq .snd .fst)
119-
where
120-
gpq = f⊥f id id (idl _ ∙ intror refl) .centre
126+
let (f , p , q) = f⊥f id id (idl _ ∙ intror refl) .centre in
127+
make-invertible f q p
121128
```
122129

123130
If $f$ is an epi or $g$ is a mono, then the mere existence of
@@ -127,23 +134,25 @@ _any_ lift is enough to establish that $f \ortho g$.
127134
left-epic-lift→orthogonal
128135
: (g : Hom c d)
129136
→ is-epic f → Lifts C f g → Orthogonal C f g
130-
left-epic-lift→orthogonal g f-epi lifts u v vf=gu =
131-
is-prop∥∥→is-contr (left-epic→lift-is-prop C f-epi vf=gu) (lifts u v vf=gu)
137+
left-epic-lift→orthogonal g f-epi lifts u v vf=gu = is-prop∥∥→is-contr
138+
(left-epic→lift-is-prop C f-epi vf=gu)
139+
(lifts u v vf=gu)
132140
133141
right-monic-lift→orthogonal
134142
: (f : Hom a b)
135143
→ is-monic g → Lifts C f g → Orthogonal C f g
136-
right-monic-lift→orthogonal f g-mono lifts u v vf=gu =
137-
is-prop∥∥→is-contr (right-monic→lift-is-prop C g-mono vf=gu) (lifts u v vf=gu)
144+
right-monic-lift→orthogonal f g-mono lifts u v vf=gu = is-prop∥∥→is-contr
145+
(right-monic→lift-is-prop C g-mono vf=gu)
146+
(lifts u v vf=gu)
138147
```
139148

140149
<!--
141150
```agda
142151
left-epic-lift→orthogonal-class
143152
: ∀ {κ} (R : Arrows C κ)
144153
→ is-epic f → Lifts C f R → Orthogonal C f R
145-
left-epic-lift→orthogonal-class R f-epic lifts r r∈R =
146-
left-epic-lift→orthogonal r f-epic (lifts r r∈R)
154+
left-epic-lift→orthogonal-class R f-epic lifts r r∈R = left-epic-lift→orthogonal
155+
r f-epic (lifts r r∈R)
147156
148157
right-monic-lift→orthogonal-class
149158
: ∀ {κ} (L : Arrows C κ)
@@ -159,13 +168,13 @@ other morphism.
159168
```agda
160169
invertible→left-orthogonal : (g : Hom c d) → Orthogonal C Isos g
161170
invertible→left-orthogonal g f f-inv =
162-
left-epic-lift→orthogonal g (invertible→epic f-inv) $
163-
invertible-left-lifts C f f-inv
171+
left-epic-lift→orthogonal g (invertible→epic f-inv)
172+
$ invertible-left-lifts C f f-inv
164173
165174
invertible→right-orthogonal : (f : Hom a b) → Orthogonal C f Isos
166175
invertible→right-orthogonal f g g-inv =
167-
right-monic-lift→orthogonal f (invertible→monic g-inv) $
168-
invertible-right-lifts C g g-inv
176+
right-monic-lift→orthogonal f (invertible→monic g-inv)
177+
$ invertible-right-lifts C g g-inv
169178
```
170179

171180
Phrased another way, the class of isomorphisms is left and right orthogonal
@@ -244,8 +253,7 @@ the object. Given a map $a : a \to \iota X$,
244253
in-subcategory→orthogonal-to-inverted
245254
: ∀ {X} {a b} {f : C.Hom a b} → D.is-invertible (r.₁ f) → Orthogonal C f (ι.₀ X)
246255
in-subcategory→orthogonal-to-inverted {X} {A} {B} {f} rf-inv a→x =
247-
contr (fact , factors) λ { (g , factors') →
248-
Σ-prop-path! (h≡k factors factors') }
256+
contr (fact , factors) λ { (g , factors') → Σ-prop-path! (h≡k factors factors') }
249257
where
250258
module rf = D.is-invertible rf-inv
251259
module η⁻¹ {a} = C.is-invertible (is-reflective→unit-right-is-iso r⊣ι ι-ff {a})
@@ -325,13 +333,13 @@ the subcategory:
325333
orthogonal-to-ηs→in-subcategory
326334
: ∀ {X} → (∀ B → Orthogonal C (unit.η B) X) → C.is-invertible (unit.η X)
327335
orthogonal-to-ηs→in-subcategory {X} ortho =
328-
C.make-invertible x lemma (ortho X C.id .centre .snd)
329-
where
336+
C.make-invertible x lemma (ortho X C.id .centre .snd) where
330337
x = ortho X C.id .centre .fst
331-
lemma = unit.η _ C.∘ x ≡⟨ unit.is-natural _ _ _ ⟩
332-
ιr.₁ x C.∘ unit.η (ιr.₀ X) ≡⟨ C.refl⟩∘⟨ η-comonad-commute r⊣ι ι-ff ⟩
333-
ιr.₁ x C.∘ ιr.₁ (unit.η X) ≡⟨ ιr.annihilate (ortho X C.id .centre .snd) ⟩
334-
C.id ∎
338+
lemma =
339+
unit.η _ C.∘ x ≡⟨ unit.is-natural _ _ _ ⟩
340+
ιr.₁ x C.∘ unit.η (ιr.₀ X) ≡⟨ C.refl⟩∘⟨ η-comonad-commute r⊣ι ι-ff ⟩
341+
ιr.₁ x C.∘ ιr.₁ (unit.η X) ≡⟨ ιr.annihilate (ortho X C.id .centre .snd) ⟩
342+
C.id ∎
335343
```
336344
337345
And the converse to *that* is a specialisation of the first thing we
@@ -344,6 +352,8 @@ which $\eta$ is an isomorphism.
344352
in-subcategory→orthogonal-to-ηs
345353
: ∀ {X B} → C.is-invertible (unit.η X) → Orthogonal C (unit.η B) X
346354
in-subcategory→orthogonal-to-ηs inv =
347-
obj-orthogonal-iso C (unit.η _) (C.invertible→iso _ (C.is-invertible-inverse inv)) $
348-
in-subcategory→orthogonal-to-inverted (is-reflective→left-unit-is-iso r⊣ι ι-ff)
355+
obj-orthogonal-iso C (unit.η _)
356+
(C.invertible→iso _ (C.is-invertible-inverse inv))
357+
$ in-subcategory→orthogonal-to-inverted
358+
(is-reflective→left-unit-is-iso r⊣ι ι-ff)
349359
```

0 commit comments

Comments
 (0)