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

Commit 4bc32ae

Browse files
kim-emTwoFXmergify[bot]
authored
feat(category_theory): regular monos (#2154)
* feat(category_theory): regular and normal monos * fixes * Apply suggestions from code review Co-Authored-By: Markus Himmel <markus@himmel-villmar.de> * shorter proofs * typos, thanks Co-Authored-By: Markus Himmel <markus@himmel-villmar.de> * Update src/category_theory/limits/shapes/regular_mono.lean Co-Authored-By: Markus Himmel <markus@himmel-villmar.de> * linting Co-authored-by: Markus Himmel <markus@himmel-villmar.de> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent 445e332 commit 4bc32ae

File tree

5 files changed

+137
-9
lines changed

5 files changed

+137
-9
lines changed

src/category_theory/epi_mono.lean

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2019 Reid Barton. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Reid Barton
4+
Authors: Reid Barton, Scott Morrison
55
66
Facts about epimorphisms and monomorphisms.
77
@@ -60,9 +60,6 @@ such that `f ≫ retraction f = 𝟙 X`.
6060
6161
Every split monomorphism is a monomorphism.
6262
-/
63-
-- TODO:
64-
-- Every split monomorphism is also a regular monomorphism,
65-
-- and this should be proved when they are introduced.
6663
class split_mono {X Y : C} (f : X ⟶ Y) :=
6764
(retraction : Y ⟶ X)
6865
(id' : f ≫ retraction = 𝟙 X . obviously)

src/category_theory/limits/shapes/constructions/pullbacks.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def has_limit_cospan_of_has_limit_pair_of_has_limit_parallel_pair
2929
let π₁ : X ⨯ Y ⟶ X := prod.fst, π₂ : X ⨯ Y ⟶ Y := prod.snd, e := equalizer.ι (π₁ ≫ f) (π₂ ≫ g) in
3030
{ cone := pullback_cone.mk (e ≫ π₁) (e ≫ π₂) $ by simp only [category.assoc, equalizer.condition],
3131
is_limit := pullback_cone.is_limit.mk _
32-
(λ s, equalizer.lift (π₁ ≫ f) (π₂ ≫ g) (prod.lift (s.π.app walking_cospan.left)
32+
(λ s, equalizer.lift (prod.lift (s.π.app walking_cospan.left)
3333
(s.π.app walking_cospan.right)) $ by
3434
rw [←category.assoc, limit.lift_π, ←category.assoc, limit.lift_π];
3535
exact pullback_cone.condition _)
@@ -61,7 +61,7 @@ let ι₁ : Y ⟶ Y ⨿ Z := coprod.inl, ι₂ : Z ⟶ Y ⨿ Z := coprod.inr,
6161
{ cocone := pushout_cocone.mk (ι₁ ≫ c) (ι₂ ≫ c) $
6262
by rw [←category.assoc, ←category.assoc, coequalizer.condition],
6363
is_colimit := pushout_cocone.is_colimit.mk _
64-
(λ s, coequalizer.desc (f ≫ ι₁) (g ≫ ι₂) (coprod.desc (s.ι.app walking_span.left)
64+
(λ s, coequalizer.desc (coprod.desc (s.ι.app walking_span.left)
6565
(s.ι.app walking_span.right)) $ by
6666
rw [category.assoc, colimit.ι_desc, category.assoc, colimit.ι_desc];
6767
exact pushout_cocone.condition _)

src/category_theory/limits/shapes/equalizers.lean

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ limit.π (parallel_pair f g) zero
327327
@[reassoc] lemma equalizer.condition : equalizer.ι f g ≫ f = equalizer.ι f g ≫ g :=
328328
fork.condition $ limit.cone $ parallel_pair f g
329329

330+
variables {f g}
331+
330332
abbreviation equalizer.lift {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) : W ⟶ equalizer f g :=
331333
limit.lift (parallel_pair f g) (fork.of_ι k h)
332334

@@ -338,7 +340,15 @@ limit.hom_ext $ cone_parallel_pair_ext _ h
338340

339341
/-- An equalizer morphism is a monomorphism -/
340342
instance equalizer.ι_mono : mono (equalizer.ι f g) :=
341-
{ right_cancellation := λ Z h k w, equalizer.hom_ext _ _ w }
343+
{ right_cancellation := λ Z h k w, equalizer.hom_ext w }
344+
345+
end
346+
347+
section
348+
variables {f g}
349+
/-- The equalizer morphism in any limit cone is a monomorphism. -/
350+
lemma mono_of_is_limit_parallel_pair {c : cone (parallel_pair f g)} (i : is_limit c) : mono (c.π.app zero) :=
351+
{ right_cancellation := λ Z h k w, i.hom_ext $ cone_parallel_pair_ext _ w }
342352

343353
end
344354

@@ -413,6 +423,8 @@ colimit.ι (parallel_pair f g) one
413423
@[reassoc] lemma coequalizer.condition : f ≫ coequalizer.π f g = g ≫ coequalizer.π f g :=
414424
cofork.condition $ colimit.cocone $ parallel_pair f g
415425

426+
variables {f g}
427+
416428
abbreviation coequalizer.desc {W : C} (k : Y ⟶ W) (h : f ≫ k = g ≫ k) : coequalizer f g ⟶ W :=
417429
colimit.desc (parallel_pair f g) (cofork.of_π k h)
418430

@@ -424,7 +436,16 @@ colimit.hom_ext $ cocone_parallel_pair_ext _ h
424436

425437
/-- A coequalizer morphism is an epimorphism -/
426438
instance coequalizer.π_epi : epi (coequalizer.π f g) :=
427-
{ left_cancellation := λ Z h k w, coequalizer.hom_ext _ _ w }
439+
{ left_cancellation := λ Z h k w, coequalizer.hom_ext w }
440+
441+
end
442+
443+
section
444+
variables {f g}
445+
446+
/-- The coequalizer morphism in any colimit cocone is an epimorphism. -/
447+
lemma epi_of_is_colimit_parallel_pair {c : cocone (parallel_pair f g)} (i : is_colimit c) : epi (c.ι.app one) :=
448+
{ left_cancellation := λ Z h k w, i.hom_ext $ cocone_parallel_pair_ext _ w }
428449

429450
end
430451

src/category_theory/limits/shapes/images.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ instance [Π {Z : C} (g h : image f ⟶ Z), has_limit.{v} (parallel_pair g h)] :
204204
⟨λ Z g h w,
205205
begin
206206
let q := equalizer.ι g h,
207-
let e' := equalizer.lift _ _ _ w, -- TODO make more of the arguments to equalizer.lift implicit?
207+
let e' := equalizer.lift _ w,
208208
let F' : mono_factorisation f :=
209209
{ I := equalizer g h,
210210
m := q ≫ image.ι f,
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/-
2+
Copyright (c) 2020 Scott Morrison. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Scott Morrison
5+
-/
6+
import category_theory.epi_mono
7+
import category_theory.limits.shapes.kernels
8+
9+
/-!
10+
# Definitions and basic properties of regular and normal monomorphisms and epimorphisms.
11+
12+
A regular monomorphism is a morphism that is the equalizer of some parallel pair.
13+
A normal monomorphism is a morphism that is the kernel of some other morphism.
14+
15+
We give the constructions
16+
* `split_mono → regular_mono`
17+
* `normal_mono → regular_mono`, and
18+
* `regular_mono → mono`.
19+
-/
20+
21+
namespace category_theory
22+
open category_theory.limits
23+
24+
universes v₁ u₁
25+
26+
variables {C : Type u₁} [𝒞 : category.{v₁} C]
27+
include 𝒞
28+
29+
variables {X Y : C}
30+
31+
/-- A regular monomorphism is a morphism which is the equalizer of some parallel pair. -/
32+
class regular_mono (f : X ⟶ Y) :=
33+
(Z : C)
34+
(left right : Y ⟶ Z)
35+
(w : f ≫ left = f ≫ right)
36+
(is_limit : is_limit (fork.of_ι f w))
37+
38+
/-- Every regular monomorphism is a monomorphism. -/
39+
@[priority 100]
40+
instance regular_mono.mono (f : X ⟶ Y) [regular_mono f] : mono f :=
41+
mono_of_is_limit_parallel_pair (regular_mono.is_limit f)
42+
43+
/-- Every split monomorphism is a regular monomorphism. -/
44+
@[priority 100]
45+
instance regular_mono.of_split_mono (f : X ⟶ Y) [split_mono f] : regular_mono f :=
46+
{ Z := Y,
47+
left := 𝟙 Y,
48+
right := retraction f ≫ f,
49+
w := by tidy,
50+
is_limit := split_mono_equalizes f }
51+
52+
section
53+
variables [has_zero_morphisms.{v₁} C]
54+
/-- A normal monomorphism is a morphism which is the kernel of some morphism. -/
55+
class normal_mono (f : X ⟶ Y) :=
56+
(Z : C)
57+
(g : Y ⟶ Z)
58+
(w : f ≫ g = 0)
59+
(is_limit : is_limit (kernel_fork.of_ι f w))
60+
61+
/-- Every normal monomorphism is a regular monomorphism. -/
62+
@[priority 100]
63+
instance normal_mono.regular_mono (f : X ⟶ Y) [I : normal_mono f] : regular_mono f :=
64+
{ left := I.g,
65+
right := 0,
66+
w := (by simpa using I.w),
67+
..I }
68+
end
69+
70+
/-- A regular epimorphism is a morphism which is the coequalizer of some parallel pair. -/
71+
class regular_epi (f : X ⟶ Y) :=
72+
(W : C)
73+
(left right : W ⟶ X)
74+
(w : left ≫ f = right ≫ f)
75+
(is_colimit : is_colimit (cofork.of_π f w))
76+
77+
/-- Every regular epimorphism is an epimorphism. -/
78+
@[priority 100]
79+
instance regular_epi.epi (f : X ⟶ Y) [regular_epi f] : epi f :=
80+
epi_of_is_colimit_parallel_pair (regular_epi.is_colimit f)
81+
82+
/-- Every split epimorphism is a regular epimorphism. -/
83+
@[priority 100]
84+
instance regular_epi.of_split_epi (f : X ⟶ Y) [split_epi f] : regular_epi f :=
85+
{ W := X,
86+
left := 𝟙 X,
87+
right := f ≫ section_ f,
88+
w := by tidy,
89+
is_colimit := split_epi_coequalizes f }
90+
91+
92+
section
93+
variables [has_zero_morphisms.{v₁} C]
94+
/-- A normal epimorphism is a morphism which is the cokernel of some morphism. -/
95+
class normal_epi (f : X ⟶ Y) :=
96+
(W : C)
97+
(g : W ⟶ X)
98+
(w : g ≫ f = 0)
99+
(is_colimit : is_colimit (cokernel_cofork.of_π f w))
100+
101+
/-- Every normal epimorphism is a regular epimorphism. -/
102+
@[priority 100]
103+
instance normal_epi.regular_epi (f : X ⟶ Y) [I : normal_epi f] : regular_epi f :=
104+
{ left := I.g,
105+
right := 0,
106+
w := (by simpa using I.w),
107+
..I }
108+
end
109+
110+
end category_theory

0 commit comments

Comments
 (0)