Theorem: SimplicialObject.Splitting.comp_PInfty_eq_zero_iff
File: Mathlib/AlgebraicTopology/DoldKan/SplitSimplicialObject.lean

tactic: constructor
state_before: C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0 ↔ f ≫ πSummand s (IndexSet.id [n].op) = 0

tactic: intro h
state_before: case mp
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0 → f ≫ πSummand s (IndexSet.id [n].op) = 0

tactic: rcases n with _|n
state_before: case mp
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ HomologicalComplex.Hom.f PInfty n = 0
⊢ f ≫ πSummand s (IndexSet.id [n].op) = 0

tactic: dsimp at h
state_before: case mp.zero
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
f : Z ⟶ X.obj [Nat.zero].op
h : f ≫ HomologicalComplex.Hom.f PInfty Nat.zero = 0
⊢ f ≫ πSummand s (IndexSet.id [Nat.zero].op) = 0

tactic: rw [comp_id] at h
state_before: case mp.zero
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
f : Z ⟶ X.obj [Nat.zero].op
h : f ≫ 𝟙 (X.obj [0].op) = 0
⊢ f ≫ πSummand s (IndexSet.id [Nat.zero].op) = 0

tactic: rw [h, zero_comp]
state_before: case mp.zero
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
f : Z ⟶ X.obj [Nat.zero].op
h : f = 0
⊢ f ≫ πSummand s (IndexSet.id [Nat.zero].op) = 0

tactic: have h' := f ≫= PInfty_f_add_QInfty_f (n + 1)
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
⊢ f ≫ πSummand s (IndexSet.id [Nat.succ n].op) = 0

tactic: dsimp at h'
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
h' :
  f ≫ (HomologicalComplex.Hom.f PInfty (n + 1) + HomologicalComplex.Hom.f QInfty (n + 1)) =
    f ≫ 𝟙 (HomologicalComplex.X K[X] (n + 1))
⊢ f ≫ πSummand s (IndexSet.id [Nat.succ n].op) = 0

tactic: rw [comp_id, comp_add, h, zero_add] at h'
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
h' : f ≫ (HomologicalComplex.Hom.f PInfty (n + 1) + HomologicalComplex.Hom.f QInfty (n + 1)) = f ≫ 𝟙 (X.obj [n + 1].op)
⊢ f ≫ πSummand s (IndexSet.id [Nat.succ n].op) = 0

tactic: rw [← h', assoc, QInfty_f, decomposition_Q, Preadditive.sum_comp, Preadditive.comp_sum,
  Finset.sum_eq_zero]
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
h' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f
⊢ f ≫ πSummand s (IndexSet.id [Nat.succ n].op) = 0

tactic: intro i _
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
h' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f
⊢ ∀ (x : Fin (n + 1)),
    x ∈ Finset.filter (fun i => ↑i < n + 1) Finset.univ →
      f ≫
          (HomologicalComplex.Hom.f (P ↑x) (n + 1) ≫
              SimplicialObject.δ X (Fin.succ (↑Fin.rev x)) ≫ SimplicialObject.σ X (↑Fin.rev x)) ≫
            πSummand s (IndexSet.id [Nat.succ n].op) =
        0

tactic: simp only [assoc, σ_comp_πSummand_id_eq_zero, comp_zero]
state_before: case mp.succ
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [Nat.succ n].op
h : f ≫ HomologicalComplex.Hom.f PInfty (Nat.succ n) = 0
h' : f ≫ HomologicalComplex.Hom.f QInfty (n + 1) = f
i : Fin (n + 1)
a✝ : i ∈ Finset.filter (fun i => ↑i < n + 1) Finset.univ
⊢ f ≫
      (HomologicalComplex.Hom.f (P ↑i) (n + 1) ≫
          SimplicialObject.δ X (Fin.succ (↑Fin.rev i)) ≫ SimplicialObject.σ X (↑Fin.rev i)) ≫
        πSummand s (IndexSet.id [Nat.succ n].op) =
    0

tactic: intro h
state_before: case mpr
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
⊢ f ≫ πSummand s (IndexSet.id [n].op) = 0 → f ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: rw [← comp_id f, assoc, s.decomposition_id, Preadditive.sum_comp, Preadditive.comp_sum,
  Fintype.sum_eq_zero]
state_before: case mpr
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
⊢ f ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: intro A
state_before: case mpr.h
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
⊢ ∀ (a : IndexSet [n].op), f ≫ (πSummand s a ≫ ιSummand s a) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: by_cases hA : A.EqId
state_before: case mpr.h
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
A : IndexSet [n].op
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: dsimp at hA
state_before: case pos
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
A : IndexSet [n].op
hA : IndexSet.EqId A
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: subst hA
state_before: case pos
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
A : IndexSet [n].op
hA : A = IndexSet.id [n].op
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: rw [assoc, reassoc_of% h, zero_comp]
state_before: case pos
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
⊢ f ≫ (πSummand s (IndexSet.id [n].op) ≫ ιSummand s (IndexSet.id [n].op)) ≫ HomologicalComplex.Hom.f PInfty n = 0

tactic: simp only [assoc, s.ιSummand_comp_PInfty_eq_zero A hA, comp_zero]
state_before: case neg
C : Type u_2
inst✝² : Category C
inst✝¹ : HasFiniteCoproducts C
X : SimplicialObject C
s : Splitting X
inst✝ : Preadditive C
Z : C
n : ℕ
f : Z ⟶ X.obj [n].op
h : f ≫ πSummand s (IndexSet.id [n].op) = 0
A : IndexSet [n].op
hA : ¬IndexSet.EqId A
⊢ f ≫ (πSummand s A ≫ ιSummand s A) ≫ HomologicalComplex.Hom.f PInfty n = 0