File: Mathlib/Algebra/Homology/ExactSequence.lean

full_name: CategoryTheory.ShortComplex.toComposableArrows_obj
code: /-- The composable arrows associated to a short complex. -/
@[simps!]
def ShortComplex.toComposableArrows (S : ShortComplex C) : ComposableArrows C 2 
goal: ∀ (a : Fin (1 + 1 + 1)),
  S.toComposableArrows.obj a =
    CategoryTheory.ComposableArrows.Precomp.obj (CategoryTheory.ComposableArrows.mk₁ S.g) S.X₁ a

full_name: CategoryTheory.ShortComplex.toComposableArrows_map
code: /-- The composable arrows associated to a short complex. -/
@[simps!]
def ShortComplex.toComposableArrows (S : ShortComplex C) : ComposableArrows C 2 
goal: ∀ {X Y : Fin (1 + 1 + 1)} (g : X ⟶ Y),
  S.toComposableArrows.map g =
    CategoryTheory.ComposableArrows.Precomp.map (CategoryTheory.ComposableArrows.mk₁ S.g) S.f X Y ⋯

full_name: CategoryTheory.ShortComplex.toComposableArrows
code: /-- The composable arrows associated to a short complex. -/
@[simps!]
def ShortComplex.toComposableArrows (S : ShortComplex C) : ComposableArrows C 2 
goal: CategoryTheory.ComposableArrows C 2

full_name: CategoryTheory.ComposableArrows.IsComplex
code: /-- `F : ComposableArrows C n` is a complex if all compositions of
two consecutive arrows are zero. -/
structure IsComplex : Prop where
  /-- the composition of two consecutive arrows is zero -/
  zero (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S.map' i (i + 1) ≫ S.map' (i + 1) (i + 2) = 0
goal: Prop

full_name: CategoryTheory.ComposableArrows.IsComplex.zero
code: /-- `F : ComposableArrows C n` is a complex if all compositions of
two consecutive arrows are zero. -/
structure IsComplex : Prop where
  /-- the composition of two consecutive arrows is zero -/
  zero (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S.map' i (i + 1) ≫ S.map' (i + 1) (i + 2) = 0
goal: CategoryTheory.CategoryStruct.comp (S.map' i (i + 1) ⋯ ⋯) (S.map' (i + 1) (i + 2) ⋯ hi) = 0

full_name: CategoryTheory.ComposableArrows.IsComplex.zero'
code: @[reassoc]
lemma IsComplex.zero' (hS : S.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S.map' i j ≫ S.map' j k = 0 
goal: CategoryTheory.CategoryStruct.comp (S.map' i j ⋯ ⋯) (S.map' j k ⋯ hk) = 0

full_name: CategoryTheory.ComposableArrows.isComplex_of_iso
code: lemma isComplex_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) (h₁ : S₁.IsComplex) :
    S₂.IsComplex 
goal: S₂.IsComplex

full_name: CategoryTheory.ComposableArrows.isComplex_iff_of_iso
code: lemma isComplex_iff_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) :
    S₁.IsComplex ↔ S₂.IsComplex 
goal: S₁.IsComplex ↔ S₂.IsComplex

full_name: CategoryTheory.ComposableArrows.isComplex₀
code: lemma isComplex₀ (S : ComposableArrows C 0) : S.IsComplex 
goal: S.IsComplex

full_name: CategoryTheory.ComposableArrows.isComplex₁
code: lemma isComplex₁ (S : ComposableArrows C 1) : S.IsComplex 
goal: S.IsComplex

full_name: CategoryTheory.ComposableArrows.sc'
code: /-- The short complex consisting of maps `S.map' i j` and `S.map' j k` when we know
that `S : ComposableArrows C n` satisfies `S.IsComplex`. -/
abbrev sc' (hS : S.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    ShortComplex C 
goal: CategoryTheory.ShortComplex C

full_name: CategoryTheory.ComposableArrows.sc
code: /-- The short complex consisting of maps `S.map' i (i + 1)` and `S.map' (i + 1) (i + 2)`
when we know that `S : ComposableArrows C n` satisfies `S.IsComplex`. -/
abbrev sc (hS : S.IsComplex) (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    ShortComplex C 
goal: CategoryTheory.ShortComplex C

full_name: CategoryTheory.ComposableArrows.Exact
code: /-- `F : ComposableArrows C n` is exact if it is a complex and that all short
complexes consisting of two consecutive arrows are exact. -/
structure Exact extends S.IsComplex : Prop where
  exact (i : ℕ) (hi : i + 2 ≤ n := by omega) : (S.sc toIsComplex i).Exact
goal: Prop

full_name: CategoryTheory.ComposableArrows.Exact.exact
code: /-- `F : ComposableArrows C n` is exact if it is a complex and that all short
complexes consisting of two consecutive arrows are exact. -/
structure Exact extends S.IsComplex : Prop where
  exact (i : ℕ) (hi : i + 2 ≤ n := by omega) : (S.sc toIsComplex i).Exact
goal: (S.sc ⋯ i ⋯).Exact

full_name: CategoryTheory.ComposableArrows.Exact.exact'
code: lemma Exact.exact' (hS : S.Exact) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    (S.sc' hS.toIsComplex i j k).Exact 
goal: (S.sc' ⋯ i j k ⋯ ⋯ ⋯).Exact

full_name: CategoryTheory.ComposableArrows.sc'Map
code: /-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k 
goal: S₁.sc' h₁ i j k ⋯ ⋯ ⋯ ⟶ S₂.sc' h₂ i j k ⋯ ⋯ ⋯

full_name: CategoryTheory.ComposableArrows.sc'Map_τ₂
code: /-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k 
goal: (CategoryTheory.ComposableArrows.sc'Map φ h₁ h₂ i j k hij hjk hk).τ₂ = φ.app ⟨j, ⋯⟩

full_name: CategoryTheory.ComposableArrows.sc'Map_τ₁
code: /-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k 
goal: (CategoryTheory.ComposableArrows.sc'Map φ h₁ h₂ i j k hij hjk hk).τ₁ = φ.app ⟨i, ⋯⟩

full_name: CategoryTheory.ComposableArrows.sc'Map_τ₃
code: /-- Functoriality maps for `ComposableArrows.sc'`. -/
@[simps]
def sc'Map {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ⟶ S₂.sc' h₂ i j k 
goal: (CategoryTheory.ComposableArrows.sc'Map φ h₁ h₂ i j k hij hjk hk).τ₃ = φ.app ⟨k, ⋯⟩

full_name: CategoryTheory.ComposableArrows.scMap_τ₁
code: /-- Functoriality maps for `ComposableArrows.sc`. -/
@[simps!]
def scMap {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ⟶ S₂.sc h₂ i 
goal: (CategoryTheory.ComposableArrows.scMap φ h₁ h₂ i hi).τ₁ = φ.app ⟨i, ⋯⟩

full_name: CategoryTheory.ComposableArrows.scMap_τ₃
code: /-- Functoriality maps for `ComposableArrows.sc`. -/
@[simps!]
def scMap {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ⟶ S₂.sc h₂ i 
goal: (CategoryTheory.ComposableArrows.scMap φ h₁ h₂ i hi).τ₃ = φ.app ⟨i + 2, ⋯⟩

full_name: CategoryTheory.ComposableArrows.scMap
code: /-- Functoriality maps for `ComposableArrows.sc`. -/
@[simps!]
def scMap {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ⟶ S₂.sc h₂ i 
goal: S₁.sc h₁ i ⋯ ⟶ S₂.sc h₂ i ⋯

full_name: CategoryTheory.ComposableArrows.scMap_τ₂
code: /-- Functoriality maps for `ComposableArrows.sc`. -/
@[simps!]
def scMap {S₁ S₂ : ComposableArrows C n} (φ : S₁ ⟶ S₂) (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ⟶ S₂.sc h₂ i 
goal: (CategoryTheory.ComposableArrows.scMap φ h₁ h₂ i hi).τ₂ = φ.app ⟨i + 1, ⋯⟩

full_name: CategoryTheory.ComposableArrows.sc'MapIso
code: /-- The isomorphism `S₁.sc' _ i j k ≅ S₂.sc' _ i j k` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def sc'MapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k 
goal: S₁.sc' h₁ i j k ⋯ ⋯ ⋯ ≅ S₂.sc' h₂ i j k ⋯ ⋯ ⋯

full_name: CategoryTheory.ComposableArrows.sc'MapIso_hom
code: /-- The isomorphism `S₁.sc' _ i j k ≅ S₂.sc' _ i j k` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def sc'MapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k 
goal: (CategoryTheory.ComposableArrows.sc'MapIso e h₁ h₂ i j k hij hjk hk).hom =
  CategoryTheory.ComposableArrows.sc'Map e.hom h₁ h₂ i j k ⋯ ⋯ ⋯

full_name: CategoryTheory.ComposableArrows.sc'MapIso_inv
code: /-- The isomorphism `S₁.sc' _ i j k ≅ S₂.sc' _ i j k` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def sc'MapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by omega)
    (hjk : j + 1 = k := by omega) (hk : k ≤ n := by omega) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k 
goal: (CategoryTheory.ComposableArrows.sc'MapIso e h₁ h₂ i j k hij hjk hk).inv =
  CategoryTheory.ComposableArrows.sc'Map e.inv h₂ h₁ i j k ⋯ ⋯ ⋯

full_name: CategoryTheory.ComposableArrows.scMapIso
code: /-- The isomorphism `S₁.sc _ i ≅ S₂.sc _ i` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def scMapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ≅ S₂.sc h₂ i 
goal: S₁.sc h₁ i ⋯ ≅ S₂.sc h₂ i ⋯

full_name: CategoryTheory.ComposableArrows.scMapIso_inv
code: /-- The isomorphism `S₁.sc _ i ≅ S₂.sc _ i` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def scMapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ≅ S₂.sc h₂ i 
goal: (CategoryTheory.ComposableArrows.scMapIso e h₁ h₂ i hi).inv = CategoryTheory.ComposableArrows.scMap e.inv h₂ h₁ i ⋯

full_name: CategoryTheory.ComposableArrows.scMapIso_hom
code: /-- The isomorphism `S₁.sc _ i ≅ S₂.sc _ i` induced by an isomorphism `S₁ ≅ S₂`
in `ComposableArrows C n`. -/
@[simps]
def scMapIso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂)
    (h₁ : S₁.IsComplex) (h₂ : S₂.IsComplex)
    (i : ℕ) (hi : i + 2 ≤ n := by omega) :
    S₁.sc h₁ i ≅ S₂.sc h₂ i 
goal: (CategoryTheory.ComposableArrows.scMapIso e h₁ h₂ i hi).hom = CategoryTheory.ComposableArrows.scMap e.hom h₁ h₂ i ⋯

full_name: CategoryTheory.ComposableArrows.exact_of_iso
code: lemma exact_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) (h₁ : S₁.Exact) :
    S₂.Exact 
goal: S₂.Exact

full_name: CategoryTheory.ComposableArrows.exact_iff_of_iso
code: lemma exact_iff_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) :
    S₁.Exact ↔ S₂.Exact 
goal: S₁.Exact ↔ S₂.Exact

full_name: CategoryTheory.ComposableArrows.exact₀
code: lemma exact₀ (S : ComposableArrows C 0) : S.Exact 
goal: S.Exact

full_name: CategoryTheory.ComposableArrows.exact₁
code: lemma exact₁ (S : ComposableArrows C 1) : S.Exact 
goal: S.Exact

full_name: CategoryTheory.ComposableArrows.isComplex₂_iff
code: lemma isComplex₂_iff (S : ComposableArrows C 2) :
    S.IsComplex ↔ S.map' 0 1 ≫ S.map' 1 2 = 0 
goal: S.IsComplex ↔ CategoryTheory.CategoryStruct.comp (S.map' 0 1 ⋯ ⋯) (S.map' 1 2 ⋯ ⋯) = 0

full_name: CategoryTheory.ComposableArrows.isComplex₂_mk
code: lemma isComplex₂_mk (S : ComposableArrows C 2) (w : S.map' 0 1 ≫ S.map' 1 2 = 0) :
    S.IsComplex 
goal: S.IsComplex

full_name: CategoryTheory.ShortComplex.isComplex_toComposableArrows
code: lemma _root_.CategoryTheory.ShortComplex.isComplex_toComposableArrows (S : ShortComplex C) :
    S.toComposableArrows.IsComplex 
goal: S.toComposableArrows.IsComplex

full_name: CategoryTheory.ComposableArrows.exact₂_iff
code: lemma exact₂_iff (S : ComposableArrows C 2) (hS : S.IsComplex) :
    S.Exact ↔ (S.sc' hS 0 1 2).Exact 
goal: S.Exact ↔ (S.sc' hS 0 1 2 ⋯ ⋯ ⋯).Exact

full_name: CategoryTheory.ComposableArrows.exact₂_mk
code: lemma exact₂_mk (S : ComposableArrows C 2) (w : S.map' 0 1 ≫ S.map' 1 2 = 0)
    (h : (ShortComplex.mk _ _ w).Exact) : S.Exact 
goal: S.Exact

full_name: CategoryTheory.ShortComplex.Exact.exact_toComposableArrows
code: lemma _root_.CategoryTheory.ShortComplex.Exact.exact_toComposableArrows
    {S : ShortComplex C} (hS : S.Exact) :
    S.toComposableArrows.Exact 
goal: S.toComposableArrows.Exact

full_name: CategoryTheory.ShortComplex.exact_iff_exact_toComposableArrows
code: lemma _root_.CategoryTheory.ShortComplex.exact_iff_exact_toComposableArrows
    (S : ShortComplex C) :
    S.Exact ↔ S.toComposableArrows.Exact 
goal: S.Exact ↔ S.toComposableArrows.Exact

full_name: CategoryTheory.ComposableArrows.exact_iff_δ₀
code: lemma exact_iff_δ₀ (S : ComposableArrows C (n + 2)) :
    S.Exact ↔ (mk₂ (S.map' 0 1) (S.map' 1 2)).Exact ∧ S.δ₀.Exact 
goal: S.Exact ↔ (CategoryTheory.ComposableArrows.mk₂ (S.map' 0 1 ⋯ ⋯) (S.map' 1 2 ⋯ ⋯)).Exact ∧ S.δ₀.Exact

full_name: CategoryTheory.ComposableArrows.Exact.δ₀
code: lemma Exact.δ₀ {S : ComposableArrows C (n + 2)} (hS : S.Exact) :
    S.δ₀.Exact 
goal: S.δ₀.Exact

full_name: CategoryTheory.ComposableArrows.exact_of_δ₀
code: /-- If `S : ComposableArrows C (n + 2)` is such that the first two arrows form
an exact sequence and that the tail `S.δ₀` is exact, then `S` is also exact.
See `ShortComplex.SnakeInput.snake_lemma` in `Algebra.Homology.ShortComplex.SnakeLemma`
for a use of this lemma. -/
lemma exact_of_δ₀ {S : ComposableArrows C (n + 2)}
    (h : (mk₂ (S.map' 0 1) (S.map' 1 2)).Exact) (h₀ : S.δ₀.Exact) : S.Exact 
goal: S.Exact

full_name: CategoryTheory.ComposableArrows.exact_iff_δlast
code: lemma exact_iff_δlast {n : ℕ} (S : ComposableArrows C (n + 2)) :
    S.Exact ↔ S.δlast.Exact ∧ (mk₂ (S.map' n (n + 1)) (S.map' (n + 1) (n + 2))).Exact 
goal: S.Exact ↔
  S.δlast.Exact ∧ (CategoryTheory.ComposableArrows.mk₂ (S.map' n (n + 1) ⋯ ⋯) (S.map' (n + 1) (n + 2) ⋯ ⋯)).Exact

full_name: CategoryTheory.ComposableArrows.Exact.δlast
code: lemma Exact.δlast {S : ComposableArrows C (n + 2)} (hS : S.Exact) :
    S.δlast.Exact 
goal: S.δlast.Exact

full_name: CategoryTheory.ComposableArrows.exact_of_δlast
code: lemma exact_of_δlast {n : ℕ} (S : ComposableArrows C (n + 2))
    (h₁ : S.δlast.Exact) (h₂ : (mk₂ (S.map' n (n + 1)) (S.map' (n + 1) (n + 2))).Exact) :
    S.Exact 
goal: S.Exact