Theorem: bernsteinPolynomial.iterate_derivative_at_0_eq_zero_of_lt
File: Mathlib/RingTheory/Polynomial/Bernstein.lean

tactic: cases' ν with ν
state_before: R : Type u_1
inst✝ : CommRing R
n ν k : ℕ
⊢ k < ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n ν)) = 0

tactic: rintro ⟨⟩
state_before: case zero
R : Type u_1
inst✝ : CommRing R
n k : ℕ
⊢ k < Nat.zero → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n Nat.zero)) = 0

tactic: rw [Nat.lt_succ_iff]
state_before: case succ
R : Type u_1
inst✝ : CommRing R
n k ν : ℕ
⊢ k < Nat.succ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0

tactic: induction' k with k ih generalizing n ν
state_before: case succ
R : Type u_1
inst✝ : CommRing R
n k ν : ℕ
⊢ k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0

tactic: simp [eval_at_0]
state_before: case succ.zero
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ n ν : ℕ
⊢ Nat.zero ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[Nat.zero]) (bernsteinPolynomial R n (Nat.succ ν))) = 0

tactic: simp only [derivative_succ, Int.coe_nat_eq_zero, mul_eq_zero, Function.comp_apply,
  Function.iterate_succ, Polynomial.iterate_derivative_sub,
  Polynomial.iterate_derivative_nat_cast_mul, Polynomial.eval_mul, Polynomial.eval_nat_cast,
  Polynomial.eval_sub]
state_before: case succ.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
⊢ Nat.succ k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[Nat.succ k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0

tactic: intro h
state_before: case succ.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
⊢ Nat.succ k ≤ ν →
    ↑n *
        (Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) ν)) -
          Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) (ν + 1)))) =
      0

tactic: apply mul_eq_zero_of_right
state_before: case succ.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
h : Nat.succ k ≤ ν
⊢ ↑n *
      (Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) ν)) -
        Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) (ν + 1)))) =
    0

tactic: rw [ih _ _ (Nat.le_of_succ_le h), sub_zero]
state_before: case succ.succ.h
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
h : Nat.succ k ≤ ν
⊢ Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) ν)) -
      Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) (ν + 1))) =
    0

tactic: convert ih _ _ (Nat.pred_le_pred h)
state_before: case succ.succ.h
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
h : Nat.succ k ≤ ν
⊢ Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R (n - 1) ν)) = 0

tactic: exact (Nat.succ_pred_eq_of_pos (k.succ_pos.trans_le h)).symm
state_before: case h.e'_2.h.e'_4.h.h.e'_4.h.e'_4
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ k : ℕ
ih : ∀ (n ν : ℕ), k ≤ ν → Polynomial.eval 0 ((↑Polynomial.derivative^[k]) (bernsteinPolynomial R n (Nat.succ ν))) = 0
n ν : ℕ
h : Nat.succ k ≤ ν
e_2✝ : Ring.toSemiring = CommSemiring.toSemiring
⊢ ν = Nat.succ (Nat.pred ν)