Theorem: Polynomial.coeff_hermite_of_odd_add
File: Mathlib/RingTheory/Polynomial/Hermite/Basic.lean

tactic: induction' n with n ih generalizing k
state_before: n k : ℕ
hnk : Odd (n + k)
⊢ (hermite n).coeff k = 0
state_after: case zero
k : ℕ
hnk : Odd (0 + k)
⊢ (hermite 0).coeff k = 0

case succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + k)
⊢ (hermite (n + 1)).coeff k = 0

tactic: rw [zero_add k] at hnk
state_before: case zero
k : ℕ
hnk : Odd (0 + k)
⊢ (hermite 0).coeff k = 0
state_after: case zero
k : ℕ
hnk : Odd k
⊢ (hermite 0).coeff k = 0

tactic: exact coeff_hermite_of_lt hnk.pos
state_before: case zero
k : ℕ
hnk : Odd k
⊢ (hermite 0).coeff k = 0
state_after: no goals

tactic: cases' k with k
state_before: case succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + k)
⊢ (hermite (n + 1)).coeff k = 0
state_after: case succ.zero
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
hnk : Odd (n + 1 + 0)
⊢ (hermite (n + 1)).coeff 0 = 0

case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ (hermite (n + 1)).coeff (k + 1) = 0

tactic: rw [Nat.succ_add_eq_add_succ] at hnk
state_before: case succ.zero
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
hnk : Odd (n + 1 + 0)
⊢ (hermite (n + 1)).coeff 0 = 0
state_after: case succ.zero
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
hnk : Odd (n + Nat.succ 0)
⊢ (hermite (n + 1)).coeff 0 = 0

tactic: rw [coeff_hermite_succ_zero, ih hnk, neg_zero]
state_before: case succ.zero
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
hnk : Odd (n + Nat.succ 0)
⊢ (hermite (n + 1)).coeff 0 = 0
state_after: no goals

tactic: rw [coeff_hermite_succ_succ, ih, ih, mul_zero, sub_zero]
state_before: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ (hermite (n + 1)).coeff (k + 1) = 0
state_after: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ Odd (n + (k + 2))

case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ Odd (n + k)

tactic: rwa [Nat.succ_add_eq_add_succ] at hnk
state_before: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ Odd (n + (k + 2))
state_after: no goals

tactic: rw [(by rw [Nat.succ_add, Nat.add_succ] : n.succ + k.succ = n + k + 2)] at hnk
state_before: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ Odd (n + k)
state_after: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + k + 2)
⊢ Odd (n + k)

tactic: exact (Nat.odd_add.mp hnk).mpr even_two
state_before: case succ.succ
n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + k + 2)
⊢ Odd (n + k)
state_after: no goals

tactic: rw [Nat.succ_add, Nat.add_succ]
state_before: n : ℕ
ih : ∀ {k : ℕ}, Odd (n + k) → (hermite n).coeff k = 0
k : ℕ
hnk : Odd (n + 1 + (k + 1))
⊢ n.succ + k.succ = n + k + 2
state_after: no goals