Skip to content

Commit d835056

Browse files
committed
feat: computation of the connecting homomorphism of the snake lemma in concrete categories (#8512)
This PR provides a lemma `ShortComplex.SnakeInput.δ_apply` which allows the computation of the connecting homomorphism in concrete categories. Incidentally, we also deduce from previous results that functors which preserve homology preserve finite limits and finite colimits. Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
1 parent dc2eb24 commit d835056

File tree

3 files changed

+118
-1
lines changed

3 files changed

+118
-1
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ import Mathlib.Algebra.Homology.ShortComplex.Abelian
246246
import Mathlib.Algebra.Homology.ShortComplex.Basic
247247
import Mathlib.Algebra.Homology.ShortComplex.ConcreteCategory
248248
import Mathlib.Algebra.Homology.ShortComplex.Exact
249+
import Mathlib.Algebra.Homology.ShortComplex.ExactFunctor
249250
import Mathlib.Algebra.Homology.ShortComplex.FunctorEquivalence
250251
import Mathlib.Algebra.Homology.ShortComplex.HomologicalComplex
251252
import Mathlib.Algebra.Homology.ShortComplex.Homology

Mathlib/Algebra/Homology/ShortComplex/ConcreteCategory.lean

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
66
import Mathlib.Algebra.Homology.ShortComplex.Ab
7+
import Mathlib.Algebra.Homology.ShortComplex.ExactFunctor
8+
import Mathlib.Algebra.Homology.ShortComplex.SnakeLemma
9+
import Mathlib.CategoryTheory.Limits.Shapes.ConcreteCategory
710

811
/-!
912
# Exactness of short complexes in concrete abelian categories
@@ -14,11 +17,15 @@ if and only if it is so after applying the functor `forget₂ C Ab`.
1417
1518
-/
1619

20+
universe w v u
21+
1722
namespace CategoryTheory
1823

1924
open Limits
2025

21-
variable {C : Type*} [Category C] [ConcreteCategory C] [HasForget₂ C Ab]
26+
section
27+
28+
variable {C : Type u} [Category.{v} C] [ConcreteCategory.{w} C] [HasForget₂ C Ab]
2229

2330
@[simp]
2431
lemma ShortComplex.zero_apply
@@ -41,6 +48,13 @@ lemma Preadditive.mono_iff_injective {X Y : C} (f : X ⟶ Y) :
4148
infer_instance
4249
· apply Functor.mono_of_mono_map
4350

51+
lemma Preadditive.mono_iff_injective' {X Y : C} (f : X ⟶ Y) :
52+
Mono f ↔ Function.Injective ((forget C).map f) := by
53+
simp only [mono_iff_injective, ← CategoryTheory.mono_iff_injective]
54+
apply (MorphismProperty.RespectsIso.monomorphisms (Type w)).arrow_mk_iso_iff
55+
have e : forget₂ C Ab ⋙ forget Ab ≅ forget C := eqToIso (HasForget₂.forget_comp)
56+
exact Arrow.isoOfNatIso e (Arrow.mk f)
57+
4458
lemma Preadditive.epi_iff_injective {X Y : C} (f : X ⟶ Y) :
4559
Epi f ↔ Function.Surjective ((forget₂ C Ab).map f) := by
4660
rw [← AddCommGroupCat.epi_iff_surjective]
@@ -49,6 +63,13 @@ lemma Preadditive.epi_iff_injective {X Y : C} (f : X ⟶ Y) :
4963
infer_instance
5064
· apply Functor.epi_of_epi_map
5165

66+
lemma Preadditive.epi_iff_surjective' {X Y : C} (f : X ⟶ Y) :
67+
Epi f ↔ Function.Surjective ((forget C).map f) := by
68+
simp only [epi_iff_injective, ← CategoryTheory.epi_iff_surjective]
69+
apply (MorphismProperty.RespectsIso.epimorphisms (Type w)).arrow_mk_iso_iff
70+
have e : forget₂ C Ab ⋙ forget Ab ≅ forget C := eqToIso (HasForget₂.forget_comp)
71+
exact Arrow.isoOfNatIso e (Arrow.mk f)
72+
5273
namespace ShortComplex
5374

5475
lemma exact_iff_exact_map_forget₂ [S.HasHomology] :
@@ -77,4 +98,48 @@ end ShortComplex
7798

7899
end preadditive
79100

101+
end
102+
103+
section abelian
104+
105+
variable {C : Type u} [Category.{v} C] [ConcreteCategory.{v} C] [HasForget₂ C Ab]
106+
[Abelian C] [(forget₂ C Ab).Additive] [(forget₂ C Ab).PreservesHomology]
107+
108+
attribute [local instance] ConcreteCategory.funLike ConcreteCategory.hasCoeToSort
109+
110+
namespace ShortComplex
111+
112+
namespace SnakeInput
113+
114+
variable (D : SnakeInput C)
115+
116+
/-- This lemma allows the computation of the connecting homomorphism
117+
`D.δ` when `D : SnakeInput C` and `C` is a concrete category. -/
118+
lemma δ_apply (x₃ : D.L₀.X₃) (x₂ : D.L₁.X₂) (x₁ : D.L₂.X₁)
119+
(h₂ : D.L₁.g x₂ = D.v₀₁.τ₃ x₃) (h₁ : D.L₂.f x₁ = D.v₁₂.τ₂ x₂) :
120+
D.δ x₃ = D.v₂₃.τ₁ x₁ := by
121+
have := (forget₂ C Ab).preservesFiniteLimitsOfPreservesHomology
122+
have : PreservesFiniteLimits (forget C) := by
123+
have : forget₂ C Ab ⋙ forget Ab = forget C := HasForget₂.forget_comp
124+
simpa only [← this] using compPreservesFiniteLimits _ _
125+
have eq := congr_fun ((forget C).congr_map D.snd_δ)
126+
(Limits.Concrete.pullbackMk D.L₁.g D.v₀₁.τ₃ x₂ x₃ h₂)
127+
have eq₁ := Concrete.pullbackMk_fst D.L₁.g D.v₀₁.τ₃ x₂ x₃ h₂
128+
have eq₂ := Concrete.pullbackMk_snd D.L₁.g D.v₀₁.τ₃ x₂ x₃ h₂
129+
dsimp [FunLike.coe] at eq₁ eq₂
130+
rw [Functor.map_comp, types_comp_apply, FunctorToTypes.map_comp_apply] at eq
131+
rw [eq₂] at eq
132+
refine' eq.trans (congr_arg ((forget C).map D.v₂₃.τ₁) _)
133+
apply (Preadditive.mono_iff_injective' D.L₂.f).1 inferInstance
134+
rw [← FunctorToTypes.map_comp_apply, φ₁_L₂_f]
135+
dsimp [φ₂]
136+
rw [Functor.map_comp, types_comp_apply, eq₁]
137+
exact h₁.symm
138+
139+
end SnakeInput
140+
141+
end ShortComplex
142+
143+
end abelian
144+
80145
end CategoryTheory
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/-
2+
Copyright (c) 2023 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.Algebra.Homology.ShortComplex.PreservesHomology
7+
import Mathlib.CategoryTheory.Preadditive.LeftExact
8+
9+
/-!
10+
# Exact functors
11+
12+
In this file, it is shown that additive functors which preserves homology
13+
also preserves finite limits and finite colimits.
14+
15+
TODO: provive alternate characterizations of left/right exact functors
16+
in terms of preservation of exactness.
17+
18+
-/
19+
20+
namespace CategoryTheory
21+
22+
open Limits ZeroObject
23+
24+
namespace Functor
25+
26+
variable {C D : Type*} [Category C] [Category D] [Preadditive C] [Preadditive D]
27+
(F : C ⥤ D) [F.Additive] [F.PreservesHomology] [HasZeroObject C]
28+
29+
/-- An additive functor which preserves homology preserves finite limits. -/
30+
noncomputable def preservesFiniteLimitsOfPreservesHomology
31+
[HasFiniteProducts C] [HasKernels C] : PreservesFiniteLimits F := by
32+
have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesKernel F f
33+
have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryProducts
34+
have : HasEqualizers C := Preadditive.hasEqualizers_of_hasKernels
35+
have : HasZeroObject D :=
36+
⟨F.obj 0, by rw [IsZero.iff_id_eq_zero, ← F.map_id, id_zero, F.map_zero]⟩
37+
exact preservesFiniteLimitsOfPreservesKernels F
38+
39+
/-- An additive which preserves homology preserves finite colimits. -/
40+
noncomputable def preservesFiniteColimitsOfPreservesHomology
41+
[HasFiniteCoproducts C] [HasCokernels C] : PreservesFiniteColimits F := by
42+
have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesCokernel F f
43+
have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryCoproducts
44+
have : HasCoequalizers C := Preadditive.hasCoequalizers_of_hasCokernels
45+
have : HasZeroObject D :=
46+
⟨F.obj 0, by rw [IsZero.iff_id_eq_zero, ← F.map_id, id_zero, F.map_zero]⟩
47+
exact preservesFiniteColimitsOfPreservesCokernels F
48+
49+
end Functor
50+
51+
end CategoryTheory

0 commit comments

Comments
 (0)