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

Commit c356148

Browse files
committed
feat(category_theory/abelian): pseudoelements and a four lemma (#3803)
1 parent 0494807 commit c356148

File tree

6 files changed

+528
-3
lines changed

6 files changed

+528
-3
lines changed

src/category_theory/abelian/basic.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ section images
250250
variables {X Y : C} (f : X ⟶ Y)
251251

252252
lemma image_eq_image : limits.image f = images.image f := rfl
253+
lemma image_ι_eq_image_ι : limits.image.ι f = images.image.ι f := rfl
254+
lemma kernel_cokernel_eq_image_ι : kernel.ι (cokernel.π f) = images.image.ι f := rfl
253255

254256
/-- There is a canonical isomorphism between the coimage and the image of a morphism. -/
255257
abbreviation coimage_iso_image : coimages.coimage f ≅ images.image f :=
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/-
2+
Copyright (c) 2020 Markus Himmel. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Markus Himmel
5+
-/
6+
import category_theory.abelian.pseudoelements
7+
8+
/-!
9+
# The four lemma
10+
11+
Consider the following commutative diagram with exact rows in an abelian category:
12+
13+
A ---f--> B ---g--> C ---h--> D
14+
| | | |
15+
α β γ δ
16+
| | | |
17+
v v v v
18+
A' --f'-> B' --g'-> C' --h'-> D'
19+
20+
We prove the "mono" version of the four lemma: if α is an epimorphism and β and δ are monomorphisms,
21+
then γ is a monomorphism.
22+
23+
## Future work
24+
25+
The "epi" four lemma and the five lemma, which is then an easy corollary.
26+
27+
## Tags
28+
29+
four lemma, diagram lemma, diagram chase
30+
-/
31+
open category_theory
32+
open category_theory.abelian.pseudoelement
33+
34+
universes v u
35+
36+
variables {V : Type u} [category.{v} V] [abelian V]
37+
38+
local attribute [instance] preadditive.has_equalizers_of_has_kernels
39+
local attribute [instance] object_to_sort hom_to_fun
40+
41+
namespace category_theory.abelian
42+
43+
variables {A B C D A' B' C' D' : V}
44+
variables {f : A ⟶ B} {g : B ⟶ C} {h : C ⟶ D}
45+
variables {f' : A' ⟶ B'} {g' : B' ⟶ C'} {h' : C' ⟶ D'}
46+
variables {α : A ⟶ A'} {β : B ⟶ B'} {γ : C ⟶ C'} {δ : D ⟶ D'}
47+
variables [exact f g] [exact g h] [exact f' g']
48+
variables (comm₁ : α ≫ f' = f ≫ β) (comm₂ : β ≫ g' = g ≫ γ) (comm₃ : γ ≫ h' = h ≫ δ)
49+
include comm₁ comm₂ comm₃
50+
51+
/-- The four lemma, mono version. For names of objects and morphisms, consider the following
52+
diagram:
53+
54+
```
55+
A ---f--> B ---g--> C ---h--> D
56+
| | | |
57+
α β γ δ
58+
| | | |
59+
v v v v
60+
A' --f'-> B' --g'-> C' --h'-> D'
61+
```
62+
-/
63+
lemma mono_of_epi_of_mono_of_mono (hα : epi α) (hβ : mono β) (hδ : mono δ) : mono γ :=
64+
mono_of_zero_of_map_zero _ $ λ c hc,
65+
have h c = 0, from
66+
suffices δ (h c) = 0, from zero_of_map_zero _ (pseudo_injective_of_mono _) _ this,
67+
calc δ (h c) = h' (γ c) : by rw [←comp_apply, ←comm₃, comp_apply]
68+
... = h' 0 : by rw hc
69+
... = 0 : apply_zero _,
70+
exists.elim (pseudo_exact_of_exact.2 _ this) $ λ b hb,
71+
have g' (β b) = 0, from
72+
calc g' (β b) = γ (g b) : by rw [←comp_apply, comm₂, comp_apply]
73+
... = γ c : by rw hb
74+
... = 0 : hc,
75+
exists.elim (pseudo_exact_of_exact.2 _ this) $ λ a' ha',
76+
exists.elim (pseudo_surjective_of_epi α a') $ λ a ha,
77+
have f a = b, from
78+
suffices β (f a) = β b, from pseudo_injective_of_mono _ this,
79+
calc β (f a) = f' (α a) : by rw [←comp_apply, ←comm₁, comp_apply]
80+
... = f' a' : by rw ha
81+
... = β b : ha',
82+
calc c = g b : hb.symm
83+
... = g (f a) : by rw this
84+
... = 0 : pseudo_exact_of_exact.1 _
85+
86+
end category_theory.abelian

src/category_theory/abelian/exact.lean

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ begin
3434
exact ⟨h.1, kernel_comp_cokernel f g⟩ },
3535
{ refine λ h, ⟨h.1, _⟩,
3636
suffices hl :
37-
is_limit (kernel_fork.of_ι (image.ι f) ((epi_iff_cancel_zero (factor_thru_image f)).1
38-
(by apply_instance) _ (image.ι f ≫ g) (by simp [h.1]))),
37+
is_limit (kernel_fork.of_ι (image.ι f) (image_ι_comp_eq_zero h.1)),
3938
{ have : image_to_kernel_map f g h.1 =
4039
(is_limit.cone_point_unique_up_to_iso hl (limit.is_limit _)).hom,
4140
{ ext, simp },
@@ -61,4 +60,17 @@ begin
6160
simp [h.2] }
6261
end
6362

63+
/-- If `(f, g)` is exact, then `image.ι f` is a kernel of `g`. -/
64+
def is_limit_image [h : exact f g] :
65+
is_limit (kernel_fork.of_ι (image.ι f) (image_ι_comp_eq_zero h.1)) :=
66+
begin
67+
rw exact_iff at h,
68+
refine is_limit.of_ι _ _ _ _ _,
69+
{ refine λ W u hu, kernel.lift (cokernel.π f) u _,
70+
rw [←kernel.lift_ι g u hu, category.assoc, h.2, has_zero_morphisms.comp_zero] },
71+
{ exact λ _ _ _, kernel.lift_ι _ _ _ },
72+
{ tidy }
73+
end
74+
75+
6476
end category_theory.abelian

0 commit comments

Comments
 (0)