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

Commit c494db5

Browse files
committed
feat(category_theory/limits/shapes/equalizers): equalizer comparison map (#4927)
1 parent 11368e1 commit c494db5

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

src/category_theory/limits/shapes/equalizers.lean

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace category_theory.limits
5151

5252
local attribute [tidy] tactic.case_bash
5353

54-
universes v u
54+
universes v u u₂
5555

5656
/-- The type of objects for the diagram indexing a (co)equalizer. -/
5757
@[derive decidable_eq, derive inhabited] inductive walking_parallel_pair : Type v
@@ -209,7 +209,6 @@ by rw [t.app_zero_left, t.app_zero_right]
209209
lemma cofork.condition (t : cofork f g) : f ≫ cofork.π t = g ≫ cofork.π t :=
210210
by rw [t.left_app_one, t.right_app_one]
211211

212-
213212
/-- To check whether two maps are equalized by both maps of a fork, it suffices to check it for the
214213
first map -/
215214
lemma fork.equalizer_ext (s : fork f g) {W : C} {k l : W ⟶ s.X}
@@ -361,8 +360,8 @@ def fork.mk_hom {s t : fork f g} (k : s.X ⟶ t.X) (w : k ≫ t.ι = s.ι) : s
361360
w' :=
362361
begin
363362
rintro ⟨_|_⟩,
364-
exact w,
365-
simpa using w =≫ f,
363+
{ exact w },
364+
{ simpa using w =≫ f },
366365
end }
367366

368367
/--
@@ -664,6 +663,48 @@ rfl
664663
(coequalizer.iso_target_of_self f).inv = coequalizer.π f f :=
665664
rfl
666665

666+
section comparison
667+
668+
variables {D : Type u₂} [category.{v} D] (G : C ⥤ D)
669+
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`. -/
672+
def equalizer_comparison [has_equalizer f g] [has_equalizer (G.map f) (G.map g)] :
673+
G.obj (equalizer f g) ⟶ equalizer (G.map f) (G.map g) :=
674+
equalizer.lift (G.map (equalizer.ι _ _)) (by simp only [←G.map_comp, equalizer.condition])
675+
676+
@[simp, reassoc]
677+
lemma equalizer_comparison_comp_π [has_equalizer f g] [has_equalizer (G.map f) (G.map g)] :
678+
equalizer_comparison f g G ≫ equalizer.ι (G.map f) (G.map g) = G.map (equalizer.ι f g) :=
679+
equalizer.lift_ι _ _
680+
681+
@[simp, reassoc]
682+
lemma map_lift_equalizer_comparison [has_equalizer f g] [has_equalizer (G.map f) (G.map g)]
683+
{Z : C} {h : Z ⟶ X} (w : h ≫ f = h ≫ g) :
684+
G.map (equalizer.lift h w) ≫ equalizer_comparison f g G =
685+
equalizer.lift (G.map h) (by simp only [←G.map_comp, w]) :=
686+
by { ext, simp [← G.map_comp] }
687+
688+
-- TODO: show this is an iso iff G preserves the coequalizer of `f,g`.
689+
/-- The comparison morphism for the coequalizer of `f,g`. -/
690+
def coequalizer_comparison [has_coequalizer f g] [has_coequalizer (G.map f) (G.map g)] :
691+
coequalizer (G.map f) (G.map g) ⟶ G.obj (coequalizer f g) :=
692+
coequalizer.desc (G.map (coequalizer.π _ _)) (by simp only [←G.map_comp, coequalizer.condition])
693+
694+
@[simp, reassoc]
695+
lemma ι_comp_coequalizer_comparison [has_coequalizer f g] [has_coequalizer (G.map f) (G.map g)] :
696+
coequalizer.π _ _ ≫ coequalizer_comparison f g G = G.map (coequalizer.π _ _) :=
697+
coequalizer.π_desc _ _
698+
699+
@[simp, reassoc]
700+
lemma coequalizer_comparison_map_desc [has_coequalizer f g] [has_coequalizer (G.map f) (G.map g)]
701+
{Z : C} {h : Y ⟶ Z} (w : f ≫ h = g ≫ h) :
702+
coequalizer_comparison f g G ≫ G.map (coequalizer.desc h w) =
703+
coequalizer.desc (G.map h) (by simp only [←G.map_comp, w]) :=
704+
by { ext, simp [← G.map_comp] }
705+
706+
end comparison
707+
667708
variables (C)
668709

669710
/-- `has_equalizers` represents a choice of equalizer for every pair of morphisms -/

0 commit comments

Comments
 (0)