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

Commit 41e0903

Browse files
committed
feat(category_theory/limits/preserves): preserving equalizers (#5044)
Constructions and lemmas about preserving equalizers
1 parent 2a68477 commit 41e0903

File tree

2 files changed

+110
-2
lines changed

2 files changed

+110
-2
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
/-
2+
Copyright (c) 2020 Bhavik Mehta. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Bhavik Mehta
5+
-/
6+
import category_theory.limits.shapes.equalizers
7+
import category_theory.limits.preserves.basic
8+
9+
/-!
10+
# Preserving equalizers
11+
12+
Constructions to relate the notions of preserving equalizers and reflecting equalizers
13+
to concrete forks.
14+
15+
In particular, we show that `equalizer_comparison G f` is an isomorphism iff `G` preserves
16+
the limit of `f`.
17+
-/
18+
19+
noncomputable theory
20+
21+
universes v u₁ u₂
22+
23+
open category_theory category_theory.category category_theory.limits
24+
25+
variables {C : Type u₁} [category.{v} C]
26+
variables {D : Type u₂} [category.{v} D]
27+
variables (G : C ⥤ D)
28+
29+
namespace category_theory.limits
30+
31+
variables {X Y Z : C} {f g : X ⟶ Y} {h : Z ⟶ X} (w : h ≫ f = h ≫ g)
32+
33+
/--
34+
The map of a fork is a limit iff the fork consisting of the mapped morphisms is a limit. This
35+
essentially lets us commute `fork.of_ι` with `functor.map_cone`.
36+
-/
37+
def is_limit_map_cone_fork_equiv :
38+
is_limit (G.map_cone (fork.of_ι h w)) ≃
39+
is_limit (fork.of_ι (G.map h) (by simp only [←G.map_comp, w]) : fork (G.map f) (G.map g)) :=
40+
(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+
43+
/-- The property of preserving equalizers expressed in terms of forks. -/
44+
def is_limit_fork_map_of_is_limit [preserves_limit (parallel_pair f g) G]
45+
(l : is_limit (fork.of_ι h w)) :
46+
is_limit (fork.of_ι (G.map h) (by simp only [←G.map_comp, w]) : fork (G.map f) (G.map g)) :=
47+
is_limit_map_cone_fork_equiv G w (preserves_limit.preserves l)
48+
49+
/-- The property of reflecting equalizers expressed in terms of forks. -/
50+
def is_limit_of_is_limit_fork_map [reflects_limit (parallel_pair f g) G]
51+
(l : is_limit (fork.of_ι (G.map h) (by simp only [←G.map_comp, w]) : fork (G.map f) (G.map g))) :
52+
is_limit (fork.of_ι h w) :=
53+
reflects_limit.reflects ((is_limit_map_cone_fork_equiv G w).symm l)
54+
55+
variables (f g) [has_equalizer f g]
56+
57+
/--
58+
If `G` preserves equalizers and `C` has them, then the fork constructed of the mapped morphisms of
59+
a fork is a limit.
60+
-/
61+
def is_limit_of_has_equalizer_of_preserves_limit
62+
[preserves_limit (parallel_pair f g) G] :
63+
is_limit (fork.of_ι (G.map (equalizer.ι f g))
64+
(by simp only [←G.map_comp, equalizer.condition])) :=
65+
is_limit_fork_map_of_is_limit G _ (equalizer_is_equalizer f g)
66+
67+
variables [has_equalizer (G.map f) (G.map g)]
68+
69+
/--
70+
If the equalizer comparison map for `G` at `(f,g)` is an isomorphism, then `G` preserves the
71+
equalizer of `(f,g)`.
72+
-/
73+
def preserves_equalizer.of_iso_comparison [i : is_iso (equalizer_comparison f g G)] :
74+
preserves_limit (parallel_pair f g) G :=
75+
begin
76+
apply preserves_limit_of_preserves_limit_cone (equalizer_is_equalizer f g),
77+
apply (is_limit_map_cone_fork_equiv _ _).symm _,
78+
apply is_limit.of_point_iso (limit.is_limit (parallel_pair (G.map f) (G.map g))),
79+
apply i,
80+
end
81+
82+
variables [preserves_limit (parallel_pair f g) G]
83+
84+
/--
85+
If `G` preserves the equalizer of `(f,g)`, then the equalizer comparison map for `G` at `(f,g)` is
86+
an isomorphism.
87+
-/
88+
def preserves_equalizer.iso :
89+
G.obj (equalizer f g) ≅ equalizer (G.map f) (G.map g) :=
90+
is_limit.cone_point_unique_up_to_iso
91+
(is_limit_of_has_equalizer_of_preserves_limit G f g)
92+
(limit.is_limit _)
93+
94+
@[simp]
95+
lemma preserves_equalizer.iso_hom :
96+
(preserves_equalizer.iso G f g).hom = equalizer_comparison f g G :=
97+
rfl
98+
99+
instance : is_iso (equalizer_comparison f g G) :=
100+
begin
101+
rw ← preserves_equalizer.iso_hom,
102+
apply_instance
103+
end
104+
105+
end category_theory.limits

src/category_theory/limits/shapes/equalizers.lean

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,11 @@ section comparison
667667

668668
variables {D : Type u₂} [category.{v} D] (G : C ⥤ D)
669669

670-
-- TODO: show this is an iso iff `G` preserves the equalizer of `f,g`.
671-
/-- The comparison morphism for the equalizer of `f,g`. -/
670+
/--
671+
The comparison morphism for the equalizer of `f,g`.
672+
This is an isomorphism iff `G` preserves the equalizer of `f,g`; see
673+
`category_theory/limits/preserves/shapes/equalizers.lean`
674+
-/
672675
def equalizer_comparison [has_equalizer f g] [has_equalizer (G.map f) (G.map g)] :
673676
G.obj (equalizer f g) ⟶ equalizer (G.map f) (G.map g) :=
674677
equalizer.lift (G.map (equalizer.ι _ _)) (by simp only [←G.map_comp, equalizer.condition])

0 commit comments

Comments
 (0)