l3lab/ntp-mathlib huggingface dataset:
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ ↑(succ d) * eval (1 + x) (bernoulli d) = ↑(succ d) * (eval x (bernoulli d) + ↑d * x ^ (d - 1))

Next tactic:
rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i) =
    eval x ((monomial d) ↑(succ d) - ∑ k in range d, ↑(Nat.choose (d + 1) k) • bernoulli k) +
      ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| eval (1 + x) ((monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| eval (1 + x) ((monomial d) ↑(succ d)) - ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
congr
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| eval (1 + x) ((monomial d) ↑(succ d))
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
· skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| eval (1 + x) ((monomial d) ↑(succ d))

Next tactic:
skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
· apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ i in range d, eval (1 + x) (↑(Nat.choose (d + 1) i) • bernoulli i)

Next tactic:
apply_congr
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      

Proof state:
case a.h
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ range d = ?a.s₂
case a.a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
x✝ : ℕ
a✝ : x✝ ∈ ?a.s₂
⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝

Next tactic:
· skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · 

Proof state:
case a.h
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ range d = ?a.s₂

Next tactic:
skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      

Proof state:
case a.a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
x✝ : ℕ
a✝ : x✝ ∈ range d
⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝

Next tactic:
· rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · 

Proof state:
case a.a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
x✝ : ℕ
a✝ : x✝ ∈ range d
⊢ eval (1 + x) (↑(Nat.choose (d + 1) x✝) • bernoulli x✝) = ?a.g x✝

Next tactic:
rw [eval_smul, hd _ (mem_range.1 (by assumption))]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by 

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
x✝ : ℕ
a✝ : x✝ ∈ range d
⊢ x✝ ∈ range d

Next tactic:
assumption
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) -
      ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (eval x (bernoulli x_1) + ↑x_1 * x ^ (x_1 - 1)) =
    eval x ((monomial d) ↑(succ d) - ∑ k in range d, ↑(Nat.choose (d + 1) k) • bernoulli k) +
      ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
rw [eval_sub, eval_finset_sum]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) -
      ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (eval x (bernoulli x_1) + ↑x_1 * x ^ (x_1 - 1)) =
    eval x ((monomial d) ↑(succ d)) - ∑ i in range d, eval x (↑(Nat.choose (d + 1) i) • bernoulli i) +
      ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
simp_rw [eval_smul, smul_add]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) -
      ∑ x_1 in range d,
        (↑(Nat.choose (d + 1) x_1) • eval x (bernoulli x_1) + ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))) =
    eval x ((monomial d) ↑(succ d)) - ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • eval x (bernoulli x_1) +
      ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) - eval x ((monomial d) ↑(succ d)) =
    ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
conv_rhs =>
    congr
    · skip
    · congr
      rw [succ_eq_add_one, ← choose_succ_self_right d]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
congr
    · skip
    · congr
      rw [succ_eq_add_one, ← choose_succ_self_right d]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
congr
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
· skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1))

Next tactic:
skip
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · skip
    

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
· congr
      rw [succ_eq_add_one, ← choose_succ_self_right d]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · skip
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
congr
      rw [succ_eq_add_one, ← choose_succ_self_right d]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · skip
    · 

Proof state:
case a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑(succ d) * (↑d * x ^ (d - 1))

Next tactic:
congr
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · skip
    · congr
      

Proof state:
case a.a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑(succ d)
case a.a
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
| ↑d * x ^ (d - 1)

Next tactic:
rw [succ_eq_add_one, ← choose_succ_self_right d]
theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) := by
  refine' Nat.strong_induction_on n fun d hd => _
  have nz : ((d.succ : ℕ) : ℚ) ≠ 0 := by
    norm_cast
  apply (mul_right_inj' nz).1
  rw [← smul_eq_mul, ← eval_smul, bernoulli_eq_sub_sum, mul_add, ← smul_eq_mul, ← eval_smul,
    bernoulli_eq_sub_sum, eval_sub, eval_finset_sum]
  conv_lhs =>
    congr
    · skip
    · apply_congr
      · skip
      · rw [eval_smul, hd _ (mem_range.1 (by assumption))]
  rw [eval_sub, eval_finset_sum]
  simp_rw [eval_smul, smul_add]
  rw [sum_add_distrib, sub_add, sub_eq_sub_iff_sub_eq_sub, _root_.add_sub_sub_cancel]
  conv_rhs =>
    congr
    · skip
    · congr
      rw [succ_eq_add_one, ← choose_succ_self_right d]
  

Proof state:
n : ℕ
x : ℚ
d : ℕ
hd : ∀ m < d, eval (1 + x) (bernoulli m) = eval x (bernoulli m) + ↑m * x ^ (m - 1)
nz : ↑(succ d) ≠ 0
⊢ eval (1 + x) ((monomial d) ↑(succ d)) - eval x ((monomial d) ↑(succ d)) =
    ∑ x_1 in range d, ↑(Nat.choose (d + 1) x_1) • (↑x_1 * x ^ (x_1 - 1)) + ↑(Nat.choose (d + 1) d) * (↑d * x ^ (d - 1))

Next tactic:
rw [Nat.cast_succ, ← smul_eq_mul, ← sum_range_succ _ d, eval_monomial_one_add_sub]