Skip to content

Commit 88988f4

Browse files
Merge pull request #475 from tillrampe/localcoequalizers
Localcoequalizers
2 parents 5a4dfe7 + ec4f727 commit 88988f4

File tree

2 files changed

+72
-26
lines changed

2 files changed

+72
-26
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{-# OPTIONS --without-K --safe #-}
2+
3+
open import Categories.Bicategory
4+
5+
module Categories.Bicategory.LocalCoequalizers {o ℓ e t} (𝒞 : Bicategory o ℓ e t) where
6+
7+
open import Categories.Diagram.Coequalizer using (Coequalizer; Coequalizers)
8+
open import Level using (_⊔_)
9+
open import Categories.Functor.Properties using (PreservesCoequalizers)
10+
import Categories.Bicategory.Extras as Bicat
11+
open Bicat 𝒞
12+
13+
14+
record LocalCoequalizers : Set (o ⊔ ℓ ⊔ e ⊔ t) where
15+
field
16+
localCoequalizers : (A B : Obj) Coequalizers (hom A B)
17+
precompPreservesCoequalizer : {A B E : Obj} (f : E ⇒₁ A)
18+
PreservesCoequalizers (-⊚_ {E} {A} {B} f)
19+
postcompPreservesCoequalizer : {A B E : Obj} (f : B ⇒₁ E)
20+
PreservesCoequalizers (_⊚- {B} {E} {A} f)
21+
22+
open LocalCoequalizers
23+
24+
module _ (localcoeq : LocalCoequalizers)
25+
{A B E : Obj} {X Y : A ⇒₁ B} {α β : X ⇒₂ Y} where
26+
27+
_coeq-◁_ : (coeq : Coequalizer (hom A B) α β) (f : E ⇒₁ A)
28+
Coequalizer (hom E B) (α ◁ f) (β ◁ f)
29+
coeq coeq-◁ f = record
30+
{ obj = obj ∘₁ f
31+
; arr = arr ◁ f
32+
; isCoequalizer = precompPreservesCoequalizer localcoeq f {coeq = coeq}
33+
}
34+
where
35+
open Coequalizer coeq
36+
37+
_▷-coeq_ : (f : B ⇒₁ E) (coeq : Coequalizer (hom A B) α β)
38+
Coequalizer (hom A E) (f ▷ α) (f ▷ β)
39+
f ▷-coeq coeq = record
40+
{ obj = f ∘₁ obj
41+
; arr = f ▷ arr
42+
; isCoequalizer = postcompPreservesCoequalizer localcoeq f {coeq = coeq}
43+
}
44+
where
45+
open Coequalizer coeq

src/Categories/Diagram/Coequalizer/Properties.agda

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ open Category 𝒞
99

1010
open import Categories.Diagram.Coequalizer 𝒞 using (Coequalizer; IsCoequalizer; Coequalizer⇒Epi; up-to-iso)
1111
open import Categories.Morphism 𝒞 using (_RetractOf_; _≅_)
12+
open _≅_
1213
import Categories.Morphism.Reasoning as MR
1314
open import Categories.Diagram.Equalizer op using (Equalizer)
1415
open import Categories.Diagram.Equalizer.Properties op using (section-equalizer)
@@ -156,26 +157,26 @@ open MapBetweenCoequalizers public
156157
CoeqOfIsomorphicDiagram : {A B : Obj} {f g : A ⇒ B} (coeq : Coequalizer f g )
157158
{A' B' : Obj}
158159
(a : A ≅ A') (b : B ≅ B')
159-
Coequalizer (_≅_.from b ∘ f ∘ _≅_.to a) (_≅_.from b ∘ g ∘ _≅_.to a)
160+
Coequalizer (from b ∘ f ∘ to a) (from b ∘ g ∘ to a)
160161
CoeqOfIsomorphicDiagram {f = f} {g} coeq {A'} {B'} a b = record
161-
{ arr = arr ∘ _≅_.to b
162+
{ arr = arr ∘ to b
162163
; isCoequalizer = record
163164
{ equality = begin
164-
(arr ∘ _≅_.to b) ∘ _≅_.from b ∘ f ∘ _≅_.to a ≈⟨ assoc²γβ ⟩
165-
(arr ∘ _≅_.to b ∘ _≅_.from b) ∘ f ∘ _≅_.to a ≈⟨ elimʳ (_≅_.isoˡ b) ⟩∘⟨refl ⟩
166-
arr ∘ f ∘ _≅_.to a ≈⟨ extendʳ equality ⟩
167-
arr ∘ g ∘ _≅_.to a ≈⟨ introʳ (_≅_.isoˡ b) ⟩∘⟨refl ⟩
168-
(arr ∘ _≅_.to b ∘ _≅_.from b) ∘ g ∘ _≅_.to a ≈⟨ assoc²βγ ⟩
169-
(arr ∘ _≅_.to b) ∘ _≅_.from b ∘ g ∘ _≅_.to a ∎
165+
(arr ∘ to b) ∘ from b ∘ f ∘ to a ≈⟨ assoc²γβ ⟩
166+
(arr ∘ to b ∘ from b) ∘ f ∘ to a ≈⟨ elimʳ (isoˡ b) ⟩∘⟨refl ⟩
167+
arr ∘ f ∘ to a ≈⟨ extendʳ equality ⟩
168+
arr ∘ g ∘ to a ≈⟨ introʳ (isoˡ b) ⟩∘⟨refl ⟩
169+
(arr ∘ to b ∘ from b) ∘ g ∘ to a ≈⟨ assoc²βγ ⟩
170+
(arr ∘ to b) ∘ from b ∘ g ∘ to a ∎
170171
; coequalize = coequalize'
171172
; universal = λ {_} {h} {eq} begin
172-
h ≈⟨ switch-fromtoʳ b universal ⟩
173-
(coequalize' eq ∘ arr) ∘ _≅_.to b ≈⟨ assoc ⟩
174-
coequalize' eq ∘ (arr ∘ _≅_.to b) ∎
173+
h ≈⟨ switch-fromtoʳ b universal ⟩
174+
(coequalize' eq ∘ arr) ∘ to b ≈⟨ assoc ⟩
175+
coequalize' eq ∘ (arr ∘ to b) ∎
175176
; unique = λ {_} {h} {i} {eq} e unique (⟺ (switch-tofromʳ b (begin
176-
(i ∘ arr) ∘ _≅_.to b ≈⟨ assoc ⟩
177-
i ∘ arr ∘ _≅_.to b ≈⟨ ⟺ e ⟩
178-
h ∎)))
177+
(i ∘ arr) ∘ to b ≈⟨ assoc ⟩
178+
i ∘ arr ∘ to b ≈⟨ ⟺ e ⟩
179+
h ∎)))
179180
}
180181
}
181182
where
@@ -184,17 +185,17 @@ CoeqOfIsomorphicDiagram {f = f} {g} coeq {A'} {B'} a b = record
184185
open MR 𝒞
185186

186187
f' g' : A' ⇒ B'
187-
f' = _≅_.from b ∘ f ∘ _≅_.to a
188-
g' = _≅_.from b ∘ g ∘ _≅_.to a
188+
f' = from b ∘ f ∘ to a
189+
g' = from b ∘ g ∘ to a
189190

190191
equalize'⇒equalize : {C : Obj} {h : B' ⇒ C}
191192
(eq : h ∘ f' ≈ h ∘ g')
192-
(h ∘ _≅_.from b) ∘ f ≈ (h ∘ _≅_.from b) ∘ g
193+
(h ∘ from b) ∘ f ≈ (h ∘ from b) ∘ g
193194
equalize'⇒equalize {_} {h} eq = cancel-toʳ a (begin
194-
((h ∘ _≅_.from b) ∘ f) ∘ _≅_.to a ≈⟨ assoc²αε ⟩
195-
h ∘ f' ≈⟨ eq ⟩
196-
h ∘ g' ≈⟨ assoc²εα ⟩
197-
((h ∘ _≅_.from b) ∘ g) ∘ _≅_.to a ∎)
195+
((h ∘ from b) ∘ f) ∘ to a ≈⟨ assoc²αε ⟩
196+
h ∘ f' ≈⟨ eq ⟩
197+
h ∘ g' ≈⟨ assoc²εα ⟩
198+
((h ∘ from b) ∘ g) ∘ to a ∎)
198199

199200
coequalize' : {C : Obj} {h : B' ⇒ C}
200201
(eq : h ∘ f' ≈ h ∘ g')
@@ -354,9 +355,9 @@ module CoequalizerOfCoequalizer
354355
-- We need this for proving some coherences in the bicategory of monads and bimodules --
355356
IsoFitsInPentagon : (coeq : Coequalizer f⇒i₁ f⇒i₂)
356357
arr coeqcoeqᵍʰ ∘ arr coeqʰ
357-
_≅_.from (CoeqsAreIsomorphic coeq) ∘ arr coeq ∘ arr coeqⁱ
358+
≈ from (CoeqsAreIsomorphic coeq) ∘ arr coeq ∘ arr coeqⁱ
358359
IsoFitsInPentagon coeq = begin
359-
arr coeqcoeqᵍʰ ∘ arr coeqʰ ≈⟨ arrSq ⟩
360-
arrᶠⁱ ∘ arr coeqⁱ ≈⟨ universal coeq ⟩∘⟨refl ⟩
361-
(_≅_.from (CoeqsAreIsomorphic coeq) ∘ arr coeq) ∘ arr coeqⁱ ≈⟨ assoc ⟩
362-
_≅_.from (CoeqsAreIsomorphic coeq) ∘ arr coeq ∘ arr coeqⁱ ∎
360+
arr coeqcoeqᵍʰ ∘ arr coeqʰ ≈⟨ arrSq ⟩
361+
arrᶠⁱ ∘ arr coeqⁱ ≈⟨ universal coeq ⟩∘⟨refl ⟩
362+
(from (CoeqsAreIsomorphic coeq) ∘ arr coeq) ∘ arr coeqⁱ ≈⟨ assoc ⟩
363+
from (CoeqsAreIsomorphic coeq) ∘ arr coeq ∘ arr coeqⁱ ∎

0 commit comments

Comments
 (0)