File size: 1,237 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import Mathlib.Algebra.Homology.ShortComplex.Abelian

/-! # Homology Kernel Cokernel -/

namespace OAI.AlgebraicGeometry.CycleClass.Thom.TorAlgebra.HomologyKernelCokernel

noncomputable section

/-! Compute the homology of a short complex from any actual cokernel
of its first differential and the induced map out of that cokernel. -/

set_option backward.isDefEq.respectTransparency false

open _root_.CategoryTheory _root_.CategoryTheory.Limits

universe u v

variable {C : Type u} [Category.{v} C] [Abelian C]

def homologyIsoKernel (S : ShortComplex C) (Q : C) (p : S.X₂ ⟶ Q)
    (wp : S.f ≫ p = 0) (hp : IsColimit (CokernelCofork.ofπ p wp))
    (g : Q ⟶ S.X₃) (hg : p ≫ g = S.g) : S.homology ≅ kernel g := by
  have hdesc : hp.desc (CokernelCofork.ofπ S.g S.zero) = g := by
    apply Cofork.IsColimit.hom_ext hp
    rw [Cofork.IsColimit.π_desc]
    exact hg.symm
  subst g
  let h : S.RightHomologyData :=
    { Q := Q
      H := kernel (hp.desc (CokernelCofork.ofπ S.g S.zero))
      p := p
      ι := kernel.ι _
      wp := wp
      hp := hp
      wι := kernel.condition _
      hι := kernelIsKernel _ }
  exact h.homologyIso

end

end OAI.AlgebraicGeometry.CycleClass.Thom.TorAlgebra.HomologyKernelCokernel