case zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ∑ k in range zero, ↑(Nat.choose zero k) * bernoulli k = if zero = 1 then 1 else 0

case succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range (succ n), ↑(Nat.choose (succ n) k) * bernoulli k = if succ n = 1 then 1 else 0
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range n, ↑(Nat.choose n k) * bernoulli k = if n = 1 then 1 else 0
cases' n with n n
case succ.zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ∑ k in range (succ zero), ↑(Nat.choose (succ zero) k) * bernoulli k = if succ zero = 1 then 1 else 0

case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli k = if succ (succ n) = 1 then 1 else 0
case succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range (succ n), ↑(Nat.choose (succ n) k) * bernoulli k = if succ n = 1 then 1 else 0
cases' n with n n
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli k = if succ (succ n) = 1 then 1 else 0
suffices (∑ i in range n, ↑((n + 2).choose (i + 2)) * bernoulli (i + 2)) = n / 2 by
  simp only [this, sum_range_succ', cast_succ, bernoulli_one, bernoulli_zero, choose_one_right,
    mul_one, choose_zero_right, cast_zero, if_false, zero_add, succ_succ_ne_one]
  ring
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f : ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli' k = ↑(succ (succ n))
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
have f := sum_bernoulli' n.succ.succ
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f : ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli' k = ↑(succ (succ n))
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
simp_rw [sum_range_succ', bernoulli'_one, choose_one_right, cast_succ, ← eq_sub_iff_add_eq] at f
case succ.succ.refine'_1
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) =
    ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)

case succ.succ.refine'_2
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1) =
    ↑n / 2
case succ.succ
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
refine' Eq.trans _ (Eq.trans  f _)
no goals
case zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ∑ k in range zero, ↑(Nat.choose zero k) * bernoulli k = if zero = 1 then 1 else 0
simp
case succ.zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ↑(Nat.choose (succ zero) 0) * bernoulli 0 = if succ zero = 1 then 1 else 0
case succ.zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ∑ k in range (succ zero), ↑(Nat.choose (succ zero) k) * bernoulli k = if succ zero = 1 then 1 else 0
rw [sum_range_one]
no goals
case succ.zero
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ ↑(Nat.choose (succ zero) 0) * bernoulli 0 = if succ zero = 1 then 1 else 0
simp
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
this : ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
⊢ ↑n / 2 + (↑n + 1 + 1) * (-1 / 2) + 1 = 0
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
this : ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
⊢ ∑ k in range (succ (succ n)), ↑(Nat.choose (succ (succ n)) k) * bernoulli k = if succ (succ n) = 1 then 1 else 0
simp only [this, sum_range_succ', cast_succ, bernoulli_one, bernoulli_zero, choose_one_right,
  mul_one, choose_zero_right, cast_zero, if_false, zero_add, succ_succ_ne_one]
no goals
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
this : ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) = ↑n / 2
⊢ ↑n / 2 + (↑n + 1 + 1) * (-1 / 2) + 1 = 0
ring
case succ.succ.refine'_1.e_f
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ (fun i => ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2)) = fun k =>
    ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)
case succ.succ.refine'_1
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ∑ i in range n, ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2) =
    ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)
congr
case succ.succ.refine'_1.e_f.h
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
x : ℕ
⊢ ↑(Nat.choose (n + 2) (x + 2)) * bernoulli (x + 2) = ↑(Nat.choose (succ (succ n)) (x + 1 + 1)) * bernoulli' (x + 1 + 1)
case succ.succ.refine'_1.e_f
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ (fun i => ↑(Nat.choose (n + 2) (i + 2)) * bernoulli (i + 2)) = fun k =>
    ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1)
funext x
no goals
case succ.succ.refine'_1.e_f.h
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
x : ℕ
⊢ ↑(Nat.choose (n + 2) (x + 2)) * bernoulli (x + 2) = ↑(Nat.choose (succ (succ n)) (x + 1 + 1)) * bernoulli' (x + 1 + 1)
rw [bernoulli_eq_bernoulli'_of_ne_one (succ_ne_zero x ∘ succ.inj)]
case succ.succ.refine'_2
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ↑n + 1 + 1 - (↑0 + 1) - (↑n + 1 + 1) * 2⁻¹ = ↑n / 2
case succ.succ.refine'_2
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1) =
    ↑n / 2
simp only [one_div, mul_one, bernoulli'_zero, cast_one, choose_zero_right, add_sub_cancel,
  zero_add, choose_one_right, cast_succ, cast_add, cast_one, bernoulli'_one, one_div]
no goals
case succ.succ.refine'_2
A : Type ?u.636004
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
f :
  ∑ k in range n, ↑(Nat.choose (succ (succ n)) (k + 1 + 1)) * bernoulli' (k + 1 + 1) =
    ↑n + 1 + 1 - ↑(Nat.choose (succ (succ n)) 0) * bernoulli' 0 -
      ↑(Nat.choose (succ (succ n)) (0 + 1)) * bernoulli' (0 + 1)
⊢ ↑n + 1 + 1 - (↑0 + 1) - (↑n + 1 + 1) * 2⁻¹ = ↑n / 2
ring