case pos
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)

case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ¬ν ≤ n
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
by_cases h : ν ≤ n
case pos.zero
R : Type u_1
inst✝ : CommRing R
n✝ ν : ℕ
h✝ : ν ≤ n✝
n : ℕ
h : Nat.zero ≤ n
⊢ eval 0 ((↑derivative^[Nat.zero]) (bernsteinPolynomial R n Nat.zero)) =
    eval (↑(n - (Nat.zero - 1))) (pochhammer R Nat.zero)

case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
⊢ eval 0 ((↑derivative^[Nat.succ ν]) (bernsteinPolynomial R n (Nat.succ ν))) =
    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))
case pos
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ν ≤ n
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
induction' ν with ν ih generalizing n
no goals
case pos.zero
R : Type u_1
inst✝ : CommRing R
n✝ ν : ℕ
h✝ : ν ≤ n✝
n : ℕ
h : Nat.zero ≤ n
⊢ eval 0 ((↑derivative^[Nat.zero]) (bernsteinPolynomial R n Nat.zero)) =
    eval (↑(n - (Nat.zero - 1))) (pochhammer R Nat.zero)
simp [eval_at_0]
case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
⊢ eval 0 ((↑derivative^[Nat.succ ν]) (bernsteinPolynomial R n (Nat.succ ν))) =
    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))
case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
⊢ eval 0 ((↑derivative^[Nat.succ ν]) (bernsteinPolynomial R n (Nat.succ ν))) =
    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))
have h' : ν ≤ n - 1 := le_tsub_of_add_le_right h
case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
⊢ eval 0 ((↑derivative^[Nat.succ ν]) (bernsteinPolynomial R n (Nat.succ ν))) =
    eval (↑(n - (Nat.succ ν - 1))) (pochhammer R (Nat.succ ν))
simp only [derivative_succ, ih (n - 1) h', iterate_derivative_succ_at_0_eq_zero,
  Nat.succ_sub_succ_eq_sub, tsub_zero, sub_zero, iterate_derivative_sub,
  iterate_derivative_nat_cast_mul, eval_one, eval_mul, eval_add, eval_sub, eval_X, eval_comp,
  eval_nat_cast, Function.comp_apply, Function.iterate_succ, pochhammer_succ_left]
case pos.succ.inl
R : Type u_1
inst✝ : CommRing R
n✝ ν : ℕ
h✝ : ν ≤ n✝
n : ℕ
ih : ∀ (n : ℕ), 0 ≤ n → eval 0 ((↑derivative^[0]) (bernsteinPolynomial R n 0)) = eval (↑(n - (0 - 1))) (pochhammer R 0)
h : Nat.succ 0 ≤ n
h' : 0 ≤ n - 1
⊢ ↑n * eval (↑(n - 1 - (0 - 1))) (pochhammer R 0) = ↑(n - 0) * eval (↑(n - 0) + 1) (pochhammer R 0)

case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
case pos.succ
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
obtain rfl | h'' := ν.eq_zero_or_pos
no goals
case pos.succ.inl
R : Type u_1
inst✝ : CommRing R
n✝ ν : ℕ
h✝ : ν ≤ n✝
n : ℕ
ih : ∀ (n : ℕ), 0 ≤ n → eval 0 ((↑derivative^[0]) (bernsteinPolynomial R n 0)) = eval (↑(n - (0 - 1))) (pochhammer R 0)
h : Nat.succ 0 ≤ n
h' : 0 ≤ n - 1
⊢ ↑n * eval (↑(n - 1 - (0 - 1))) (pochhammer R 0) = ↑(n - 0) * eval (↑(n - 0) + 1) (pochhammer R 0)
simp
case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
this : n - 1 - (ν - 1) = n - ν
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
have : n - 1 - (ν - 1) = n - ν := by
  rw [gt_iff_lt, ← Nat.succ_le_iff] at h''
  rw [← tsub_add_eq_tsub_tsub, add_comm, tsub_add_cancel_of_le h'']
case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
this : n - 1 - (ν - 1) = n - ν
⊢ ↑n * eval (↑(n - ν)) (pochhammer R ν) = (↑(n - ν) + ↑ν) * eval (↑(n - ν)) (pochhammer R ν)
case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
this : n - 1 - (ν - 1) = n - ν
⊢ ↑n * eval (↑(n - 1 - (ν - 1))) (pochhammer R ν) = ↑(n - ν) * eval (↑(n - ν) + 1) (pochhammer R ν)
rw [this, pochhammer_eval_succ]
no goals
case pos.succ.inr
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
this : n - 1 - (ν - 1) = n - ν
⊢ ↑n * eval (↑(n - ν)) (pochhammer R ν) = (↑(n - ν) + ↑ν) * eval (↑(n - ν)) (pochhammer R ν)
rw_mod_cast [tsub_add_cancel_of_le (h'.trans n.pred_le)]
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : Nat.succ 0 ≤ ν
⊢ n - 1 - (ν - 1) = n - ν
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : ν > 0
⊢ n - 1 - (ν - 1) = n - ν
rw [gt_iff_lt, ← Nat.succ_le_iff] at h''
no goals
R : Type u_1
inst✝ : CommRing R
n✝ ν✝ : ℕ
h✝ : ν✝ ≤ n✝
ν : ℕ
ih : ∀ (n : ℕ), ν ≤ n → eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
n : ℕ
h : Nat.succ ν ≤ n
h' : ν ≤ n - 1
h'' : Nat.succ 0 ≤ ν
⊢ n - 1 - (ν - 1) = n - ν
rw [← tsub_add_eq_tsub_tsub, add_comm, tsub_add_cancel_of_le h'']
case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : n < ν
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : ¬ν ≤ n
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
simp only [not_le] at h
case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : n < ν
⊢ eval 0 ((↑derivative^[ν]) 0) = eval (↑0) (pochhammer R ν)
case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : n < ν
⊢ eval 0 ((↑derivative^[ν]) (bernsteinPolynomial R n ν)) = eval (↑(n - (ν - 1))) (pochhammer R ν)
rw [tsub_eq_zero_iff_le.mpr (Nat.le_pred_of_lt h), eq_zero_of_lt R h]
no goals
case neg
R : Type u_1
inst✝ : CommRing R
n ν : ℕ
h : n < ν
⊢ eval 0 ((↑derivative^[ν]) 0) = eval (↑0) (pochhammer R ν)
simp [pos_iff_ne_zero.mp (pos_of_gt h)]