@@ -3,32 +3,30 @@ Copyright (c) 2020 Markus Himmel. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Markus Himmel
5
5
-/
6
- import Mathlib.Algebra.Category.GroupCat.ZModuleEquivalence
7
- import Mathlib.Algebra.Category.GroupCat.Limits
8
6
import Mathlib.Algebra.Category.GroupCat.Colimits
7
+ import Mathlib.Algebra.Category.GroupCat.FilteredColimits
8
+ import Mathlib.Algebra.Category.GroupCat.Kernels
9
+ import Mathlib.Algebra.Category.GroupCat.Limits
10
+ import Mathlib.Algebra.Category.GroupCat.ZModuleEquivalence
9
11
import Mathlib.Algebra.Category.ModuleCat.Abelian
10
- import Mathlib.CategoryTheory.Abelian.Basic
12
+ import Mathlib.CategoryTheory.Abelian.FunctorCategory
13
+ import Mathlib.CategoryTheory.Limits.ConcreteCategory
11
14
12
15
#align_import algebra.category.Group.abelian from "leanprover-community/mathlib" @"f7baecbb54bd0f24f228576f97b1752fc3c9b318"
13
16
14
17
/-!
15
18
# The category of abelian groups is abelian
16
19
-/
17
20
18
-
19
- open CategoryTheory
20
-
21
- open CategoryTheory.Limits
21
+ open CategoryTheory Limits
22
22
23
23
universe u
24
24
25
25
noncomputable section
26
26
27
27
namespace AddCommGroupCat
28
28
29
- section
30
-
31
- variable {X Y : AddCommGroupCat.{u}} (f : X ⟶ Y)
29
+ variable {X Y Z : AddCommGroupCat.{u}} (f : X ⟶ Y) (g : Y ⟶ Z)
32
30
33
31
/-- In the category of abelian groups, every monomorphism is normal. -/
34
32
def normalMono (_ : Mono f) : NormalMono f :=
@@ -44,18 +42,38 @@ def normalEpi (_ : Epi f) : NormalEpi f :=
44
42
set_option linter.uppercaseLean3 false in
45
43
#align AddCommGroup.normal_epi AddCommGroupCat.normalEpi
46
44
47
- end
48
-
49
45
/-- The category of abelian groups is abelian. -/
50
46
instance : Abelian AddCommGroupCat.{u} where
51
- has_finite_products := ⟨by infer_instance ⟩
47
+ has_finite_products := ⟨HasFiniteProducts.out ⟩
52
48
normalMonoOfMono := normalMono
53
49
normalEpiOfEpi := normalEpi
54
- add_comp := by
55
- intros
56
- simp only [Preadditive.add_comp]
57
- comp_add := by
58
- intros
59
- simp only [Preadditive.comp_add]
50
+
51
+ theorem exact_iff : Exact f g ↔ f.range = g.ker := by
52
+ rw [Abelian.exact_iff' f g (kernelIsLimit _) (cokernelIsColimit _)]
53
+ exact
54
+ ⟨fun h => ((AddMonoidHom.range_le_ker_iff _ _).mpr h.left).antisymm
55
+ ((QuotientAddGroup.ker_le_range_iff _ _).mpr h.right),
56
+ fun h => ⟨(AddMonoidHom.range_le_ker_iff _ _).mp h.le,
57
+ (QuotientAddGroup.ker_le_range_iff _ _).mp h.symm.le⟩⟩
58
+
59
+ /-- The category of abelian groups satisfies Grothedieck's Axiom AB5. -/
60
+ instance {J : Type u} [SmallCategory J] [IsFiltered J] :
61
+ PreservesFiniteLimits <| colim (J := J) (C := AddCommGroupCat.{u}) := by
62
+ refine Functor.preservesFiniteLimitsOfMapExact _
63
+ fun F G H η γ h => (exact_iff _ _).mpr (le_antisymm ?_ ?_)
64
+ all_goals replace h : ∀ j : J, Exact (η.app j) (γ.app j) :=
65
+ fun j => Functor.map_exact ((evaluation _ _).obj j) η γ h
66
+ · rw [AddMonoidHom.range_le_ker_iff, ← comp_def]
67
+ exact colimit.hom_ext fun j => by simp [reassoc_of% (h j).w]
68
+ · intro x (hx : _ = _)
69
+ rcases Concrete.colimit_exists_rep G x with ⟨j, y, rfl⟩
70
+ erw [← comp_apply, colimit.ι_map, comp_apply,
71
+ ← map_zero (by exact colimit.ι H j : H.obj j →+ ↑(colimit H))] at hx
72
+ rcases Concrete.colimit_exists_of_rep_eq H _ _ hx with ⟨k, e₁, e₂, hk : _ = H.map e₂ 0 ⟩
73
+ rw [map_zero, ← comp_apply, ← NatTrans.naturality, comp_apply] at hk
74
+ rcases ((exact_iff _ _).mp <| h k).ge hk with ⟨t, ht⟩
75
+ use colimit.ι F k t
76
+ erw [← comp_apply, colimit.ι_map, comp_apply, ht]
77
+ exact colimit.w_apply G e₁ y
60
78
61
79
end AddCommGroupCat
0 commit comments