Theorem: AlgebraicTopology.DoldKan.Γ₀.Obj.Termwise.mapMono_comp
File: Mathlib/AlgebraicTopology/DoldKan/FunctorGamma.lean

tactic: by_cases h₁ : Δ = Δ'
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: by_cases h₂ : Δ' = Δ''
state_before: case neg
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: obtain ⟨k, hk⟩ := Nat.exists_eq_add_of_lt (len_lt_of_mono i h₁)
state_before: case neg
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: obtain ⟨k', hk'⟩ := Nat.exists_eq_add_of_lt (len_lt_of_mono i' h₂)
state_before: case neg.intro
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: have eq : Δ.len = Δ''.len + (k + k' + 2) := by linarith
state_before: case neg.intro.intro
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: rw [mapMono_eq_zero K (i' ≫ i) _ _]
state_before: case neg.intro.intro
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: rotate_left
state_before: case neg.intro.intro
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ mapMono K i ≫ mapMono K i' = 0

C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ Δ ≠ Δ''

C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ ¬Isδ₀ (i' ≫ i)

tactic: by_cases h₃ : Isδ₀ i
state_before: case neg.intro.intro
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ mapMono K i ≫ mapMono K i' = 0

tactic: subst h₁
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : Δ = Δ'
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: simp only [SimplexCategory.eq_id_of_mono i, comp_id, id_comp, mapMono_id K, eqToHom_refl]
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ
i : Δ ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: subst h₂
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : Δ' = Δ''
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: simp only [SimplexCategory.eq_id_of_mono i', comp_id, id_comp, mapMono_id K, eqToHom_refl]
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' : SimplexCategory
i : Δ' ⟶ Δ
inst✝¹ : Mono i
h₁ : ¬Δ = Δ'
i' : Δ' ⟶ Δ'
inst✝ : Mono i'
⊢ mapMono K i ≫ mapMono K i' = mapMono K (i' ≫ i)

tactic: linarith
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
⊢ len Δ = len Δ'' + (k + k' + 2)

tactic: by_contra h
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ Δ ≠ Δ''

tactic: simp only [self_eq_add_right, h, add_eq_zero_iff, and_false] at eq
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h : Δ = Δ''
⊢ False

tactic: by_contra h
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
⊢ ¬Isδ₀ (i' ≫ i)

tactic: simp only [h.1, add_right_inj] at eq
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h : Isδ₀ (i' ≫ i)
⊢ False

tactic: linarith
state_before: C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
h : Isδ₀ (i' ≫ i)
eq : 1 = k + k' + 2
⊢ False

tactic: by_cases h₄ : Isδ₀ i'
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h₃ : Isδ₀ i
⊢ mapMono K i ≫ mapMono K i' = 0

tactic: rw [mapMono_δ₀' K i h₃, mapMono_δ₀' K i' h₄, HomologicalComplex.d_comp_d]
state_before: case pos
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h₃ : Isδ₀ i
h₄ : Isδ₀ i'
⊢ mapMono K i ≫ mapMono K i' = 0

tactic: simp only [mapMono_eq_zero K i' h₂ h₄, comp_zero]
state_before: case neg
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h₃ : Isδ₀ i
h₄ : ¬Isδ₀ i'
⊢ mapMono K i ≫ mapMono K i' = 0

tactic: simp only [mapMono_eq_zero K i h₁ h₃, zero_comp]
state_before: case neg
C : Type u_2
inst✝³ : Category C
inst✝² : Preadditive C
K K' : ChainComplex C ℕ
f : K ⟶ K'
Δ Δ' Δ'' : SimplexCategory
i' : Δ'' ⟶ Δ'
i : Δ' ⟶ Δ
inst✝¹ : Mono i'
inst✝ : Mono i
h₁ : ¬Δ = Δ'
h₂ : ¬Δ' = Δ''
k : ℕ
hk : len Δ = len Δ' + k + 1
k' : ℕ
hk' : len Δ' = len Δ'' + k' + 1
eq : len Δ = len Δ'' + (k + k' + 2)
h₃ : ¬Isδ₀ i
⊢ mapMono K i ≫ mapMono K i' = 0