File: Mathlib/Algebra/Homology/HomotopyCategory/DegreewiseSplit.lean

full_name: CochainComplex.cocycleOfDegreewiseSplit
code: /-- The `1`-cocycle attached to a degreewise split short exact sequence of cochain complexes. -/
def cocycleOfDegreewiseSplit : Cocycle S.X₃ S.X₁ 1 
goal: CochainComplex.HomComplex.Cocycle S.X₃ S.X₁ 1

full_name: CochainComplex.homOfDegreewiseSplit
code: /-- The canonical morphism `S.X₃ ⟶ S.X₁⟦(1 : ℤ)⟧` attached to a degreewise split
short exact sequence of cochain complexes. -/
def homOfDegreewiseSplit : S.X₃ ⟶ S.X₁⟦(1 : ℤ)⟧ 
goal: S.X₃ ⟶ (CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).obj S.X₁

full_name: CochainComplex.homOfDegreewiseSplit_f
code: @[simp]
lemma homOfDegreewiseSplit_f (n : ℤ) :
    (homOfDegreewiseSplit S σ).f n =
      (cocycleOfDegreewiseSplit S σ).1.v n (n + 1) rfl 
goal: (CochainComplex.homOfDegreewiseSplit S σ).f n = (↑(CochainComplex.cocycleOfDegreewiseSplit S σ)).v n (n + 1) ⋯

full_name: CochainComplex.triangleOfDegreewiseSplit_mor₁
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).mor₁ = S.f

full_name: CochainComplex.triangleOfDegreewiseSplit_mor₂
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).mor₂ = S.g

full_name: CochainComplex.triangleOfDegreewiseSplit_mor₃
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).mor₃ = CochainComplex.homOfDegreewiseSplit S σ

full_name: CochainComplex.triangleOfDegreewiseSplit_obj₁
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).obj₁ = S.X₁

full_name: CochainComplex.triangleOfDegreewiseSplit_obj₃
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).obj₃ = S.X₃

full_name: CochainComplex.triangleOfDegreewiseSplit
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: CategoryTheory.Pretriangulated.Triangle (CochainComplex C ℤ)

full_name: CochainComplex.triangleOfDegreewiseSplit_obj₂
code: /-- The triangle in `CochainComplex C ℤ` attached to a degreewise split short exact sequence
of cochain complexes. -/
@[simps! obj₁ obj₂ obj₃ mor₁ mor₂ mor₃]
def triangleOfDegreewiseSplit : Triangle (CochainComplex C ℤ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).obj₂ = S.X₂

full_name: CochainComplex.trianglehOfDegreewiseSplit
code: /-- The (distinguished) triangle in `HomotopyCategory C (ComplexShape.up ℤ)` attached to a
degreewise split short exact sequence of cochain complexes. -/
noncomputable abbrev trianglehOfDegreewiseSplit :
    Triangle (HomotopyCategory C (ComplexShape.up ℤ)) 
goal: CategoryTheory.Pretriangulated.Triangle (HomotopyCategory C (ComplexShape.up ℤ))

full_name: CochainComplex.mappingConeHomOfDegreewiseSplitXIso
code: /-- The canonical isomorphism `(mappingCone (homOfDegreewiseSplit S σ)).X p ≅ S.X₂.X q`
when `p + 1 = q`. -/
noncomputable def mappingConeHomOfDegreewiseSplitXIso (p q : ℤ) (hpq : p + 1 = q) :
    (mappingCone (homOfDegreewiseSplit S σ)).X p ≅ S.X₂.X q 
goal: (CochainComplex.mappingCone (CochainComplex.homOfDegreewiseSplit S σ)).X p ≅ S.X₂.X q

full_name: CochainComplex.mappingConeHomOfDegreewiseSplitIso_hom_f
code: /-- The canonical isomorphism `mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧`. -/
@[simps!]
noncomputable def mappingConeHomOfDegreewiseSplitIso :
    mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧ 
goal: (CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).hom.f i =
  (CochainComplex.mappingConeHomOfDegreewiseSplitXIso S σ i (i + 1) ⋯).hom

full_name: CochainComplex.mappingConeHomOfDegreewiseSplitIso
code: /-- The canonical isomorphism `mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧`. -/
@[simps!]
noncomputable def mappingConeHomOfDegreewiseSplitIso :
    mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧ 
goal: CochainComplex.mappingCone (CochainComplex.homOfDegreewiseSplit S σ) ≅
  (CategoryTheory.shiftFunctor (HomologicalComplex C (ComplexShape.up ℤ)) 1).obj S.X₂

full_name: CochainComplex.mappingConeHomOfDegreewiseSplitIso_inv_f
code: /-- The canonical isomorphism `mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧`. -/
@[simps!]
noncomputable def mappingConeHomOfDegreewiseSplitIso :
    mappingCone (homOfDegreewiseSplit S σ) ≅ S.X₂⟦(1 : ℤ)⟧ 
goal: (CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).inv.f i =
  (CochainComplex.mappingConeHomOfDegreewiseSplitXIso S σ i (i + 1) ⋯).inv

full_name: CochainComplex.shift_f_comp_mappingConeHomOfDegreewiseSplitIso_inv
code: @[reassoc (attr := simp)]
lemma shift_f_comp_mappingConeHomOfDegreewiseSplitIso_inv :
    S.f⟦(1 : ℤ)⟧' ≫ (mappingConeHomOfDegreewiseSplitIso S σ).inv = -mappingCone.inr _ 
goal: (CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).map S.f ≫
    (CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).inv =
  -CochainComplex.mappingCone.inr (CochainComplex.homOfDegreewiseSplit S σ)

full_name: CochainComplex.mappingConeHomOfDegreewiseSplitIso_inv_comp_triangle_mor₃
code: @[reassoc (attr := simp)]
lemma mappingConeHomOfDegreewiseSplitIso_inv_comp_triangle_mor₃ :
    (mappingConeHomOfDegreewiseSplitIso S σ).inv ≫
      (mappingCone.triangle (homOfDegreewiseSplit S σ)).mor₃ = -S.g⟦(1 : ℤ)⟧' 
goal: (CochainComplex.mappingConeHomOfDegreewiseSplitIso S σ).inv ≫
    (CochainComplex.mappingCone.triangle (CochainComplex.homOfDegreewiseSplit S σ)).mor₃ =
  -(CategoryTheory.shiftFunctor (CochainComplex C ℤ) 1).map S.g

full_name: CochainComplex.triangleOfDegreewiseSplitRotateRotateIso
code: /-- The canonical isomorphism of triangles
`(triangleOfDegreewiseSplit S σ).rotate.rotate ≅ mappingCone.triangle (homOfDegreewiseSplit S σ)`
when `S` is a degreewise split short exact sequence of cochain complexes. -/
noncomputable def triangleOfDegreewiseSplitRotateRotateIso :
    (triangleOfDegreewiseSplit S σ).rotate.rotate ≅
      mappingCone.triangle (homOfDegreewiseSplit S σ) 
goal: (CochainComplex.triangleOfDegreewiseSplit S σ).rotate.rotate ≅
  CochainComplex.mappingCone.triangle (CochainComplex.homOfDegreewiseSplit S σ)

full_name: CochainComplex.trianglehOfDegreewiseSplitRotateRotateIso
code: /-- The canonical isomorphism between `(trianglehOfDegreewiseSplit S σ).rotate.rotate` and
`mappingCone.triangleh (homOfDegreewiseSplit S σ)` when `S` is a degreewise split
short exact sequence of cochain complexes. -/
noncomputable def trianglehOfDegreewiseSplitRotateRotateIso :
    (trianglehOfDegreewiseSplit S σ).rotate.rotate ≅
      mappingCone.triangleh (homOfDegreewiseSplit S σ) 
goal: (CochainComplex.trianglehOfDegreewiseSplit S σ).rotate.rotate ≅
  CochainComplex.mappingCone.triangleh (CochainComplex.homOfDegreewiseSplit S σ)

full_name: CochainComplex.mappingCone.triangleRotateShortComplex_X₁
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: (CochainComplex.mappingCone.triangleRotateShortComplex φ).X₁ = (CochainComplex.mappingCone.triangle φ).rotate.obj₁

full_name: CochainComplex.mappingCone.triangleRotateShortComplex_g
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: (CochainComplex.mappingCone.triangleRotateShortComplex φ).g = (CochainComplex.mappingCone.triangle φ).rotate.mor₂

full_name: CochainComplex.mappingCone.triangleRotateShortComplex_X₃
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: (CochainComplex.mappingCone.triangleRotateShortComplex φ).X₃ = (CochainComplex.mappingCone.triangle φ).rotate.obj₃

full_name: CochainComplex.mappingCone.triangleRotateShortComplex_X₂
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: (CochainComplex.mappingCone.triangleRotateShortComplex φ).X₂ = (CochainComplex.mappingCone.triangle φ).rotate.obj₂

full_name: CochainComplex.mappingCone.triangleRotateShortComplex_f
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: (CochainComplex.mappingCone.triangleRotateShortComplex φ).f = (CochainComplex.mappingCone.triangle φ).rotate.mor₁

full_name: CochainComplex.mappingCone.triangleRotateShortComplex
code: /-- Given a morphism of cochain complexes `φ`, this is the short complex
given by `(triangle φ).rotate`. -/
@[simps]
noncomputable def triangleRotateShortComplex : ShortComplex (CochainComplex C ℤ) 
goal: CategoryTheory.ShortComplex (CochainComplex C ℤ)

full_name: CochainComplex.mappingCone.triangleRotateShortComplexSplitting
code: /-- `triangleRotateShortComplex φ` is a degreewise split short exact sequence of
cochain complexes. -/
@[simps]
noncomputable def triangleRotateShortComplexSplitting (n : ℤ) :
    ((triangleRotateShortComplex φ).map (eval _ _ n)).Splitting 
goal: ((CochainComplex.mappingCone.triangleRotateShortComplex φ).map
    (HomologicalComplex.eval C (ComplexShape.up ℤ) n)).Splitting

full_name: CochainComplex.mappingCone.triangleRotateShortComplexSplitting_r
code: /-- `triangleRotateShortComplex φ` is a degreewise split short exact sequence of
cochain complexes. -/
@[simps]
noncomputable def triangleRotateShortComplexSplitting (n : ℤ) :
    ((triangleRotateShortComplex φ).map (eval _ _ n)).Splitting 
goal: (CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ n).r = (CochainComplex.mappingCone.snd φ).v n n ⋯

full_name: CochainComplex.mappingCone.triangleRotateShortComplexSplitting_s
code: /-- `triangleRotateShortComplex φ` is a degreewise split short exact sequence of
cochain complexes. -/
@[simps]
noncomputable def triangleRotateShortComplexSplitting (n : ℤ) :
    ((triangleRotateShortComplex φ).map (eval _ _ n)).Splitting 
goal: (CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ n).s =
  -(CochainComplex.mappingCone.inl φ).v (n + 1) n ⋯

full_name: CochainComplex.mappingCone.cocycleOfDegreewiseSplit_triangleRotateShortComplexSplitting_v
code: @[simp]
lemma cocycleOfDegreewiseSplit_triangleRotateShortComplexSplitting_v (p : ℤ) :
    (cocycleOfDegreewiseSplit _ (triangleRotateShortComplexSplitting φ)).1.v p _ rfl =
      -φ.f _ 
goal: (↑(CochainComplex.cocycleOfDegreewiseSplit (CochainComplex.mappingCone.triangleRotateShortComplex φ)
          (CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ))).v
    p (p + 1) ⋯ =
  -φ.f (p + { as := 1 }.as)

full_name: CochainComplex.mappingCone.triangleRotateIsoTriangleOfDegreewiseSplit
code: /-- The triangle `(triangle φ).rotate` is isomorphic to a triangle attached to a
degreewise split short exact sequence of cochain complexes. -/
noncomputable def triangleRotateIsoTriangleOfDegreewiseSplit :
    (triangle φ).rotate ≅
      triangleOfDegreewiseSplit _ (triangleRotateShortComplexSplitting φ) 
goal: (CochainComplex.mappingCone.triangle φ).rotate ≅
  CochainComplex.triangleOfDegreewiseSplit (CochainComplex.mappingCone.triangleRotateShortComplex φ)
    (CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ)

full_name: CochainComplex.mappingCone.trianglehRotateIsoTrianglehOfDegreewiseSplit
code: /-- The triangle `(triangleh φ).rotate` is isomorphic to a triangle attached to a
degreewise split short exact sequence of cochain complexes. -/
noncomputable def trianglehRotateIsoTrianglehOfDegreewiseSplit :
    (triangleh φ).rotate ≅
      trianglehOfDegreewiseSplit _ (triangleRotateShortComplexSplitting φ) 
goal: (CochainComplex.mappingCone.triangleh φ).rotate ≅
  CochainComplex.trianglehOfDegreewiseSplit (CochainComplex.mappingCone.triangleRotateShortComplex φ)
    (CochainComplex.mappingCone.triangleRotateShortComplexSplitting φ)

full_name: HomotopyCategory.distinguished_iff_iso_trianglehOfDegreewiseSplit
code: lemma distinguished_iff_iso_trianglehOfDegreewiseSplit
    (T : Triangle (HomotopyCategory C (ComplexShape.up ℤ))) :
    (T ∈ distTriang _) ↔ ∃ (S : ShortComplex (CochainComplex C ℤ))
      (σ : ∀ n, (S.map (HomologicalComplex.eval C _ n)).Splitting),
      Nonempty (T ≅ CochainComplex.trianglehOfDegreewiseSplit S σ) 
goal: T ∈ CategoryTheory.Pretriangulated.distinguishedTriangles ↔
  ∃ S σ, Nonempty (T ≅ CochainComplex.trianglehOfDegreewiseSplit S σ)