Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 147a81a

Browse files
committed
chore(category_theory/limits): preserving coequalizers (#5212)
dualise stuff from before
1 parent b82eb7a commit 147a81a

File tree

2 files changed

+85
-7
lines changed

2 files changed

+85
-7
lines changed

src/category_theory/limits/preserves/shapes/equalizers.lean

Lines changed: 85 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import category_theory.limits.shapes.equalizers
77
import category_theory.limits.preserves.basic
88

99
/-!
10-
# Preserving equalizers
10+
# Preserving (co)equalizers
1111
12-
Constructions to relate the notions of preserving equalizers and reflecting equalizers
13-
to concrete forks.
12+
Constructions to relate the notions of preserving (co)equalizers and reflecting (co)equalizers
13+
to concrete (co)forks.
1414
1515
In particular, we show that `equalizer_comparison G f` is an isomorphism iff `G` preserves
16-
the limit of `f`.
16+
the limit of `f` as well as the dual.
1717
-/
1818

1919
noncomputable theory
@@ -28,6 +28,7 @@ variables (G : C ⥤ D)
2828

2929
namespace category_theory.limits
3030

31+
section equalizers
3132
variables {X Y Z : C} {f g : X ⟶ Y} {h : Z ⟶ X} (w : h ≫ f = h ≫ g)
3233

3334
/--
@@ -38,7 +39,7 @@ def is_limit_map_cone_fork_equiv :
3839
is_limit (G.map_cone (fork.of_ι h w)) ≃
3940
is_limit (fork.of_ι (G.map h) (by simp only [←G.map_comp, w]) : fork (G.map f) (G.map g)) :=
4041
(is_limit.postcompose_hom_equiv (diagram_iso_parallel_pair _) _).symm.trans
41-
(is_limit.equiv_iso_limit (fork.ext (iso.refl _) (by simp [fork.ι_eq_app_zero])))
42+
(is_limit.equiv_iso_limit (fork.ext (iso.refl _) (by simp)))
4243

4344
/-- The property of preserving equalizers expressed in terms of forks. -/
4445
def is_limit_fork_map_of_is_limit [preserves_limit (parallel_pair f g) G]
@@ -80,7 +81,6 @@ begin
8081
end
8182

8283
variables [preserves_limit (parallel_pair f g) G]
83-
8484
/--
8585
If `G` preserves the equalizer of `(f,g)`, then the equalizer comparison map for `G` at `(f,g)` is
8686
an isomorphism.
@@ -102,4 +102,83 @@ begin
102102
apply_instance
103103
end
104104

105+
end equalizers
106+
107+
section coequalizers
108+
109+
variables {X Y Z : C} {f g : X ⟶ Y} {h : Y ⟶ Z} (w : f ≫ h = g ≫ h)
110+
111+
/--
112+
The map of a cofork is a colimit iff the cofork consisting of the mapped morphisms is a colimit.
113+
This essentially lets us commute `cofork.of_π` with `functor.map_cocone`.
114+
-/
115+
def is_colimit_map_cocone_cofork_equiv :
116+
is_colimit (G.map_cocone (cofork.of_π h w)) ≃
117+
is_colimit (cofork.of_π (G.map h) (by simp only [←G.map_comp, w]) : cofork (G.map f) (G.map g)) :=
118+
(is_colimit.precompose_inv_equiv (diagram_iso_parallel_pair _) _).symm.trans
119+
(is_colimit.equiv_iso_colimit (cofork.ext (iso.refl _) (by { dsimp, simp })))
120+
121+
/-- The property of preserving coequalizers expressed in terms of coforks. -/
122+
def is_colimit_cofork_map_of_is_colimit [preserves_colimit (parallel_pair f g) G]
123+
(l : is_colimit (cofork.of_π h w)) :
124+
is_colimit (cofork.of_π (G.map h) (by simp only [←G.map_comp, w]) : cofork (G.map f) (G.map g)) :=
125+
is_colimit_map_cocone_cofork_equiv G w (preserves_colimit.preserves l)
126+
127+
/-- The property of reflecting coequalizers expressed in terms of coforks. -/
128+
def is_colimit_of_is_colimit_cofork_map [reflects_colimit (parallel_pair f g) G]
129+
(l : is_colimit (cofork.of_π (G.map h) (by simp only [←G.map_comp, w])
130+
: cofork (G.map f) (G.map g))) :
131+
is_colimit (cofork.of_π h w) :=
132+
reflects_colimit.reflects ((is_colimit_map_cocone_cofork_equiv G w).symm l)
133+
134+
variables (f g) [has_coequalizer f g]
135+
136+
/--
137+
If `G` preserves coequalizers and `C` has them, then the cofork constructed of the mapped morphisms
138+
of a cofork is a colimit.
139+
-/
140+
def is_colimit_of_has_coequalizer_of_preserves_colimit
141+
[preserves_colimit (parallel_pair f g) G] :
142+
is_colimit (cofork.of_π (G.map (coequalizer.π f g)) _) :=
143+
is_colimit_cofork_map_of_is_colimit G _ (coequalizer_is_coequalizer f g)
144+
145+
variables [has_coequalizer (G.map f) (G.map g)]
146+
147+
/--
148+
If the coequalizer comparison map for `G` at `(f,g)` is an isomorphism, then `G` preserves the
149+
coequalizer of `(f,g)`.
150+
-/
151+
def of_iso_comparison [i : is_iso (coequalizer_comparison f g G)] :
152+
preserves_colimit (parallel_pair f g) G :=
153+
begin
154+
apply preserves_colimit_of_preserves_colimit_cocone (coequalizer_is_coequalizer f g),
155+
apply (is_colimit_map_cocone_cofork_equiv _ _).symm _,
156+
apply is_colimit.of_point_iso (colimit.is_colimit (parallel_pair (G.map f) (G.map g))),
157+
apply i,
158+
end
159+
160+
variables [preserves_colimit (parallel_pair f g) G]
161+
/--
162+
If `G` preserves the coequalizer of `(f,g)`, then the coequalizer comparison map for `G` at `(f,g)`
163+
is an isomorphism.
164+
-/
165+
def preserves_coequalizer.iso :
166+
coequalizer (G.map f) (G.map g) ≅ G.obj (coequalizer f g) :=
167+
is_colimit.cocone_point_unique_up_to_iso
168+
(colimit.is_colimit _)
169+
(is_colimit_of_has_coequalizer_of_preserves_colimit G f g)
170+
171+
@[simp]
172+
lemma preserves_coequalizer.iso_hom :
173+
(preserves_coequalizer.iso G f g).hom = coequalizer_comparison f g G :=
174+
rfl
175+
176+
instance : is_iso (coequalizer_comparison f g G) :=
177+
begin
178+
rw ← preserves_coequalizer.iso_hom,
179+
apply_instance
180+
end
181+
182+
end coequalizers
183+
105184
end category_theory.limits

src/category_theory/limits/shapes/equalizers.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ lemma map_lift_equalizer_comparison [has_equalizer f g] [has_equalizer (G.map f)
682682
equalizer.lift (G.map h) (by simp only [←G.map_comp, w]) :=
683683
by { ext, simp [← G.map_comp] }
684684

685-
-- TODO: show this is an iso iff G preserves the coequalizer of `f,g`.
686685
/-- The comparison morphism for the coequalizer of `f,g`. -/
687686
def coequalizer_comparison [has_coequalizer f g] [has_coequalizer (G.map f) (G.map g)] :
688687
coequalizer (G.map f) (G.map g) ⟶ G.obj (coequalizer f g) :=

0 commit comments

Comments
 (0)