l3lab/ntp-mathlib huggingface dataset:
/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
  | 0, _ => by simp
  | n + 1, 0 => by
    convert coeff_hermite_succ_zero (2 * n + 1) using 1
    -- porting note: ring_nf did not solve the goal on line 165
    rw [coeff_hermite_explicit n 1, (by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] :
      2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one, Nat.choose_zero_right,
      Nat.choose_one_right, pow_succ]
    push_cast
    ring
  | n + 1, k + 1 => by
    let hermite_explicit : ℕ → ℕ → ℤ := fun n k =>
      (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
    have hermite_explicit_recur :
      ∀ n k : ℕ,
        hermite_explicit (n + 1) (k + 1) =
          hermite_explicit (n + 1) k - (k + 2) * hermite_explicit n (k + 2) := by
      intro n k
      simp only
      -- Factor out (-1)'s.
      rw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]
      nth_rw 3 [neg_eq_neg_one_mul]
      simp only [mul_assoc, ← mul_add, pow_succ]
      congr 2
      -- Factor out double factorials.
      norm_cast
      -- porting note: ring_nf did not solve the goal on line 186
      rw [(by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1),
        Nat.doubleFactorial_add_one, mul_comm (2 * n + 1)]
      simp only [mul_assoc, ← mul_add]
      congr 1
      -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.
      rw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1),
        (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),
        (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]
      rw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel,
        Int.negSucc_eq]
      -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.
      ring_nf
      simp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]
      norm_cast
      simp only [← add_assoc, add_comm]
    change _ = hermite_explicit _ _
    rw [← add_assoc, coeff_hermite_succ_succ, hermite_explicit_recur]
    

Proof state:
n k : ℕ
hermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)
hermite_explicit_recur :
  ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)
⊢ coeff (hermite (2 * (n + 1) + k)) k - (↑k + 2) * coeff (hermite (2 * (n + 1) + k)) (k + 2) =
    hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)

Next tactic:
congr
/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
  | 0, _ => by simp
  | n + 1, 0 => by
    convert coeff_hermite_succ_zero (2 * n + 1) using 1
    -- porting note: ring_nf did not solve the goal on line 165
    rw [coeff_hermite_explicit n 1, (by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] :
      2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one, Nat.choose_zero_right,
      Nat.choose_one_right, pow_succ]
    push_cast
    ring
  | n + 1, k + 1 => by
    let hermite_explicit : ℕ → ℕ → ℤ := fun n k =>
      (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
    have hermite_explicit_recur :
      ∀ n k : ℕ,
        hermite_explicit (n + 1) (k + 1) =
          hermite_explicit (n + 1) k - (k + 2) * hermite_explicit n (k + 2) := by
      intro n k
      simp only
      -- Factor out (-1)'s.
      rw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]
      nth_rw 3 [neg_eq_neg_one_mul]
      simp only [mul_assoc, ← mul_add, pow_succ]
      congr 2
      -- Factor out double factorials.
      norm_cast
      -- porting note: ring_nf did not solve the goal on line 186
      rw [(by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1),
        Nat.doubleFactorial_add_one, mul_comm (2 * n + 1)]
      simp only [mul_assoc, ← mul_add]
      congr 1
      -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.
      rw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1),
        (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),
        (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]
      rw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel,
        Int.negSucc_eq]
      -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.
      ring_nf
      simp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]
      norm_cast
      simp only [← add_assoc, add_comm]
    change _ = hermite_explicit _ _
    rw [← add_assoc, coeff_hermite_succ_succ, hermite_explicit_recur]
    congr
    · 

Proof state:
case e_a
n k : ℕ
hermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)
hermite_explicit_recur :
  ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)
⊢ coeff (hermite (2 * (n + 1) + k)) k = hermite_explicit (n + 1) k

Next tactic:
rw [coeff_hermite_explicit (n + 1) k]
/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
  | 0, _ => by simp
  | n + 1, 0 => by
    convert coeff_hermite_succ_zero (2 * n + 1) using 1
    -- porting note: ring_nf did not solve the goal on line 165
    rw [coeff_hermite_explicit n 1, (by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] :
      2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one, Nat.choose_zero_right,
      Nat.choose_one_right, pow_succ]
    push_cast
    ring
  | n + 1, k + 1 => by
    let hermite_explicit : ℕ → ℕ → ℤ := fun n k =>
      (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
    have hermite_explicit_recur :
      ∀ n k : ℕ,
        hermite_explicit (n + 1) (k + 1) =
          hermite_explicit (n + 1) k - (k + 2) * hermite_explicit n (k + 2) := by
      intro n k
      simp only
      -- Factor out (-1)'s.
      rw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]
      nth_rw 3 [neg_eq_neg_one_mul]
      simp only [mul_assoc, ← mul_add, pow_succ]
      congr 2
      -- Factor out double factorials.
      norm_cast
      -- porting note: ring_nf did not solve the goal on line 186
      rw [(by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1),
        Nat.doubleFactorial_add_one, mul_comm (2 * n + 1)]
      simp only [mul_assoc, ← mul_add]
      congr 1
      -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.
      rw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1),
        (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),
        (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]
      rw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel,
        Int.negSucc_eq]
      -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.
      ring_nf
      simp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]
      norm_cast
      simp only [← add_assoc, add_comm]
    change _ = hermite_explicit _ _
    rw [← add_assoc, coeff_hermite_succ_succ, hermite_explicit_recur]
    congr
    · rw [coeff_hermite_explicit (n + 1) k]
    · 

Proof state:
case e_a.e_a
n k : ℕ
hermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)
hermite_explicit_recur :
  ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)
⊢ coeff (hermite (2 * (n + 1) + k)) (k + 2) = hermite_explicit n (k + 2)

Next tactic:
rw [(by ring : 2 * (n + 1) + k = 2 * n + (k + 2)), coeff_hermite_explicit n (k + 2)]
/-- Because of `coeff_hermite_of_odd_add`, every nonzero coefficient is described as follows. -/
theorem coeff_hermite_explicit :
    ∀ n k : ℕ, coeff (hermite (2 * n + k)) k = (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
  | 0, _ => by simp
  | n + 1, 0 => by
    convert coeff_hermite_succ_zero (2 * n + 1) using 1
    -- porting note: ring_nf did not solve the goal on line 165
    rw [coeff_hermite_explicit n 1, (by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] :
      2 * (n + 1) - 1 = 2 * n + 1), Nat.doubleFactorial_add_one, Nat.choose_zero_right,
      Nat.choose_one_right, pow_succ]
    push_cast
    ring
  | n + 1, k + 1 => by
    let hermite_explicit : ℕ → ℕ → ℤ := fun n k =>
      (-1) ^ n * (2 * n - 1)‼ * Nat.choose (2 * n + k) k
    have hermite_explicit_recur :
      ∀ n k : ℕ,
        hermite_explicit (n + 1) (k + 1) =
          hermite_explicit (n + 1) k - (k + 2) * hermite_explicit n (k + 2) := by
      intro n k
      simp only
      -- Factor out (-1)'s.
      rw [mul_comm (↑k + _ : ℤ), sub_eq_add_neg]
      nth_rw 3 [neg_eq_neg_one_mul]
      simp only [mul_assoc, ← mul_add, pow_succ]
      congr 2
      -- Factor out double factorials.
      norm_cast
      -- porting note: ring_nf did not solve the goal on line 186
      rw [(by rw [Nat.left_distrib, mul_one, Nat.add_one_sub_one] : 2 * (n + 1) - 1 = 2 * n + 1),
        Nat.doubleFactorial_add_one, mul_comm (2 * n + 1)]
      simp only [mul_assoc, ← mul_add]
      congr 1
      -- Match up binomial coefficients using `Nat.choose_succ_right_eq`.
      rw [(by ring : 2 * (n + 1) + (k + 1) = 2 * n + 1 + (k + 1) + 1),
        (by ring : 2 * (n + 1) + k = 2 * n + 1 + (k + 1)),
        (by ring : 2 * n + (k + 2) = 2 * n + 1 + (k + 1))]
      rw [Nat.choose, Nat.choose_succ_right_eq (2 * n + 1 + (k + 1)) (k + 1), Nat.add_sub_cancel,
        Int.negSucc_eq]
      -- porting note: ring could not solve the goal so the lines 195, 198-200 were added.
      ring_nf
      simp only [sub_eq_add_neg, ← neg_mul, ← right_distrib _ _ ((-(1 : ℤ)) ^ n), ← neg_add]
      norm_cast
      simp only [← add_assoc, add_comm]
    change _ = hermite_explicit _ _
    rw [← add_assoc, coeff_hermite_succ_succ, hermite_explicit_recur]
    congr
    · rw [coeff_hermite_explicit (n + 1) k]
    · rw [(by 

Proof state:
n k : ℕ
hermite_explicit : ℕ → ℕ → ℤ := fun n k => (-1) ^ n * ↑(2 * n - 1)‼ * ↑(Nat.choose (2 * n + k) k)
hermite_explicit_recur :
  ∀ (n k : ℕ), hermite_explicit (n + 1) (k + 1) = hermite_explicit (n + 1) k - (↑k + 2) * hermite_explicit n (k + 2)
⊢ 2 * (n + 1) + k = 2 * n + (k + 2)

Next tactic:
ring
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  

Proof state:
n k : ℕ
hnk : Even (n + k)
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)

Next tactic:
rcases le_or_lt k n with h_le | h_lt
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · 

Proof state:
case inl
n k : ℕ
hnk : Even (n + k)
h_le : k ≤ n
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)

Next tactic:
rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
    

Proof state:
case inl
n k : ℕ
hnk : Even (n - k)
h_le : k ≤ n
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)

Next tactic:
obtain ⟨m, hm⟩ := hnk
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
    obtain ⟨m, hm⟩ := hnk
    -- porting note: linarith failed to find a contradiction by itself
    

Proof state:
case inl.intro
n k : ℕ
h_le : k ≤ n
m : ℕ
hm : n - k = m + m
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)

Next tactic:
rw [(by linarith [by rwa [Nat.sub_eq_iff_eq_add h_le] at hm] : n = 2 * m + k),
      Nat.add_sub_cancel, Nat.mul_div_cancel_left _ (Nat.succ_pos 1), coeff_hermite_explicit]
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
    obtain ⟨m, hm⟩ := hnk
    -- porting note: linarith failed to find a contradiction by itself
    rw [(by 

Proof state:
n k : ℕ
h_le : k ≤ n
m : ℕ
hm : n - k = m + m
⊢ n = 2 * m + k

Next tactic:
linarith [by rwa [Nat.sub_eq_iff_eq_add h_le] at hm]
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
    obtain ⟨m, hm⟩ := hnk
    -- porting note: linarith failed to find a contradiction by itself
    rw [(by linarith [by 

Proof state:
n k : ℕ
h_le : k ≤ n
m : ℕ
hm : n - k = m + m
⊢ ?m.124456

Next tactic:
rwa [Nat.sub_eq_iff_eq_add h_le] at hm
theorem coeff_hermite_of_even_add {n k : ℕ} (hnk : Even (n + k)) :
    coeff (hermite n) k = (-1) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k := by
  rcases le_or_lt k n with h_le | h_lt
  · rw [Nat.even_add, ← Nat.even_sub h_le] at hnk
    obtain ⟨m, hm⟩ := hnk
    -- porting note: linarith failed to find a contradiction by itself
    rw [(by linarith [by rwa [Nat.sub_eq_iff_eq_add h_le] at hm] : n = 2 * m + k),
      Nat.add_sub_cancel, Nat.mul_div_cancel_left _ (Nat.succ_pos 1), coeff_hermite_explicit]
  · 

Proof state:
case inr
n k : ℕ
hnk : Even (n + k)
h_lt : n < k
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)

Next tactic:
simp [Nat.choose_eq_zero_of_lt h_lt, coeff_hermite_of_lt h_lt]
theorem coeff_hermite (n k : ℕ) :
    coeff (hermite n) k =
      if Even (n + k) then (-1 : ℤ) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k else 0 := by
  

Proof state:
n k : ℕ
⊢ coeff (hermite n) k = if Even (n + k) then (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k) else 0

Next tactic:
split_ifs with h
theorem coeff_hermite (n k : ℕ) :
    coeff (hermite n) k =
      if Even (n + k) then (-1 : ℤ) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k else 0 := by
  split_ifs with h
  

Proof state:
case pos
n k : ℕ
h : Even (n + k)
⊢ coeff (hermite n) k = (-1) ^ ((n - k) / 2) * ↑(n - k - 1)‼ * ↑(Nat.choose n k)
case neg n k : ℕ h : ¬Even (n + k) ⊢ coeff (hermite n) k = 0

Next tactic:
exact coeff_hermite_of_even_add h
theorem coeff_hermite (n k : ℕ) :
    coeff (hermite n) k =
      if Even (n + k) then (-1 : ℤ) ^ ((n - k) / 2) * (n - k - 1)‼ * Nat.choose n k else 0 := by
  split_ifs with h
  exact coeff_hermite_of_even_add h
  

Proof state:
case neg
n k : ℕ
h : ¬Even (n + k)
⊢ coeff (hermite n) k = 0

Next tactic:
exact coeff_hermite_of_odd_add (Nat.odd_iff_not_even.mpr h)
@[reassoc]
lemma IsComplex.zero' (hS : S.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S.map' i j ≫ S.map' j k = 0 := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S : ComposableArrows C n
hS : IsComplex S
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ map' S i j ≫ map' S j k = 0

Next tactic:
subst hij hjk
@[reassoc]
lemma IsComplex.zero' (hS : S.IsComplex) (i j k : ℕ) (hij : i + 1 = j := by linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S.map' i j ≫ S.map' j k = 0 := by
  subst hij hjk
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S : ComposableArrows C n
hS : IsComplex S
i : ℕ
hk : autoParam (i + 1 + 1 ≤ n) _auto✝
⊢ map' S i (i + 1) ≫ map' S (i + 1) (i + 1 + 1) = 0

Next tactic:
exact hS.zero i hk
lemma isComplex_of_iso {S₁ S₂ : ComposableArrows C n} (e : S₁ ≅ S₂) (h₁ : S₁.IsComplex) :
    S₂.IsComplex where
  zero i hi := by
    

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
i : ℕ
hi : autoParam (i + 2 ≤ n) _auto✝
⊢ map' S₂ i (i + 1) ≫ map' S₂ (i + 1) (i + 2) = 0

Next tactic:
rw [← cancel_epi (ComposableArrows.app' e.hom i), comp_zero,
      ← NatTrans.naturality_assoc, ← NatTrans.naturality,
      reassoc_of% (h₁.zero i hi), zero_comp]
lemma isComplex₀ (S : ComposableArrows C 0) : S.IsComplex where
  -- See https://github.com/leanprover/lean4/issues/2862
  -- Without `decide := true`, simp gets stuck at `hi : autoParam False _auto✝`
  zero i hi := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C 0
i : ℕ
hi : autoParam (i + 2 ≤ 0) _auto✝
⊢ map' S i (i + 1) ≫ map' S (i + 1) (i + 2) = 0

Next tactic:
simp (config := {decide := true}) at hi
lemma isComplex₁ (S : ComposableArrows C 1) : S.IsComplex where
  zero i hi := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C 1
i : ℕ
hi : autoParam (i + 2 ≤ 1) _auto✝
⊢ map' S i (i + 1) ≫ map' S (i + 1) (i + 2) = 0

Next tactic:
exfalso
lemma isComplex₁ (S : ComposableArrows C 1) : S.IsComplex where
  zero i hi := by exfalso; 

Proof state:
case h
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S✝ : ComposableArrows C n
S : ComposableArrows C 1
i : ℕ
hi : autoParam (i + 2 ≤ 1) _auto✝
⊢ False

Next tactic:
linarith
lemma Exact.exact' (hS : S.Exact) (i j k : ℕ) (hij : i + 1 = j := by linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    (S.sc' hS.toIsComplex i j k).Exact := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S : ComposableArrows C n
hS : Exact S
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ ShortComplex.Exact (sc' S (_ : IsComplex S) i j k)

Next tactic:
subst hij hjk
lemma Exact.exact' (hS : S.Exact) (i j k : ℕ) (hij : i + 1 = j := by linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    (S.sc' hS.toIsComplex i j k).Exact := by
  subst hij hjk
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S : ComposableArrows C n
hS : Exact S
i : ℕ
hk : autoParam (i + 1 + 1 ≤ n) _auto✝
⊢ ShortComplex.Exact (sc' S (_ : IsComplex S) i (i + 1) (i + 1 + 1))

Next tactic:
exact hS.exact i hk
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ sc'Map e.hom h₁ h₂ i j k ≫ sc'Map e.inv h₂ h₁ i j k = 𝟙 (sc' S₁ h₁ i j k)

Next tactic:
ext
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by ext <;> 

Proof state:
case h₁
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ (sc'Map e.hom h₁ h₂ i j k ≫ sc'Map e.inv h₂ h₁ i j k).τ₁ = (𝟙 (sc' S₁ h₁ i j k)).τ₁

Next tactic:
dsimp
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by ext <;> 

Proof state:
case h₂
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ (sc'Map e.hom h₁ h₂ i j k ≫ sc'Map e.inv h₂ h₁ i j k).τ₂ = (𝟙 (sc' S₁ h₁ i j k)).τ₂

Next tactic:
dsimp
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by ext <;> 

Proof state:
case h₃
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ (sc'Map e.hom h₁ h₂ i j k ≫ sc'Map e.inv h₂ h₁ i j k).τ₃ = (𝟙 (sc' S₁ h₁ i j k)).τ₃

Next tactic:
dsimp
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by ext <;> dsimp <;> 

Proof state:
case h₁
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ e.hom.app { val := i, isLt := (_ : i < n + 1) } ≫ e.inv.app { val := i, isLt := (_ : i < n + 1) } =
    𝟙 (S₁.obj { val := i, isLt := (_ : i < n + 1) })

Next tactic:
simp
/-- 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 linarith)
    (hjk : j + 1 = k := by linarith) (hk : k ≤ n := by linarith) :
    S₁.sc' h₁ i j k ≅ S₂.sc' h₂ i j k where
  hom := sc'Map e.hom h₁ h₂ i j k
  inv := sc'Map e.inv h₂ h₁ i j k
  hom_inv_id := by ext <;> dsimp <;> 

Proof state:
case h₂
C : Type u_1
inst✝¹ : Category.{?u.438443, u_1} C
inst✝ : HasZeroMorphisms C
n : ℕ
S S₁ S₂ : ComposableArrows C n
e : S₁ ≅ S₂
h₁ : IsComplex S₁
h₂ : IsComplex S₂
i j k : ℕ
hij : autoParam (i + 1 = j) _auto✝
hjk : autoParam (j + 1 = k) _auto✝
hk : autoParam (k ≤ n) _auto✝
⊢ e.hom.app { val := j, isLt := (_ : j < n + 1) } ≫ e.inv.app { val := j, isLt := (_ : j < n + 1) } =
    𝟙 (S₁.obj { val := j, isLt := (_ : j < n + 1) })

Next tactic:
simp