Theorem: bernoulli'PowerSeries_mul_exp_sub_one
File: Mathlib/NumberTheory/Bernoulli.lean

Proof steps:
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ bernoulli'PowerSeries A * (exp A - 1) = X * exp A
state_after: case h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A n) (bernoulli'PowerSeries A * (exp A - 1)) = (coeff A n) (X * exp A)
tactic: ext n
state_before: case h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A n) (bernoulli'PowerSeries A * (exp A - 1)) = (coeff A n) (X * exp A)
state_after: case h.zero
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ (coeff A 0) (bernoulli'PowerSeries A * (exp A - 1)) = (coeff A 0) (X * exp A)

case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A (n + 1)) (bernoulli'PowerSeries A * (exp A - 1)) = (coeff A (n + 1)) (X * exp A)
tactic: cases' n with n
state_before: case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A (n + 1)) (bernoulli'PowerSeries A * (exp A - 1)) = (coeff A (n + 1)) (X * exp A)
state_after: case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A (n + 1, 0).1) (PowerSeries.mk fun n => (algebraMap ℚ A) (bernoulli' n / ↑n !)) *
        (coeff A (n + 1, 0).2) (exp A - 1) +
      ∑ p ∈ antidiagonal n,
        (coeff A (p.1, p.2 + 1).1) (PowerSeries.mk fun n => (algebraMap ℚ A) (bernoulli' n / ↑n !)) *
          (coeff A (p.1, p.2 + 1).2) (exp A - 1) =
    (coeff A (n + 1)) (exp A * X)
tactic: rw [bernoulli'PowerSeries, coeff_mul, mul_comm X, sum_antidiagonal_succ']
state_before: case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (coeff A (n + 1, 0).1) (PowerSeries.mk fun n => (algebraMap ℚ A) (bernoulli' n / ↑n !)) *
        (coeff A (n + 1, 0).2) (exp A - 1) +
      ∑ p ∈ antidiagonal n,
        (coeff A (p.1, p.2 + 1).1) (PowerSeries.mk fun n => (algebraMap ℚ A) (bernoulli' n / ↑n !)) *
          (coeff A (p.1, p.2 + 1).2) (exp A - 1) =
    (coeff A (n + 1)) (exp A * X)
state_after: case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ p ∈ antidiagonal n, bernoulli' p.1 / ↑p.1! * ((↑p.2 + 1) * ↑p.2!)⁻¹ = (↑n !)⁻¹
tactic: suffices (∑ p ∈ antidiagonal n,
      bernoulli' p.1 / p.1! * ((p.2 + 1) * p.2! : ℚ)⁻¹) = (n ! : ℚ)⁻¹ by
    simpa [map_sum, Nat.factorial] using congr_arg (algebraMap ℚ A) this
state_before: case h.succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ p ∈ antidiagonal n, bernoulli' p.1 / ↑p.1! * ((↑p.2 + 1) * ↑p.2!)⁻¹ = (↑n !)⁻¹
state_after: case h.succ.h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (∑ p ∈ antidiagonal n, bernoulli' p.1 / ↑p.1! * ((↑p.2 + 1) * ↑p.2!)⁻¹) * ↑n ! = 1
tactic: apply eq_inv_of_mul_eq_one_left
state_before: case h.succ.h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ (∑ p ∈ antidiagonal n, bernoulli' p.1 / ↑p.1! * ((↑p.2 + 1) * ↑p.2!)⁻¹) * ↑n ! = 1
state_after: case h.succ.h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i ∈ antidiagonal n, bernoulli' i.1 / ↑i.1! * ((↑i.2 + 1) * ↑i.2!)⁻¹ * ↑n ! = 1
tactic: rw [sum_mul]
state_before: case h.succ.h
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i ∈ antidiagonal n, bernoulli' i.1 / ↑i.1! * ((↑i.2 + 1) * ↑i.2!)⁻¹ * ↑n ! = 1
state_after: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i ∈ antidiagonal n, bernoulli' i.1 / ↑i.1! * ((↑i.2 + 1) * ↑i.2!)⁻¹ * ↑n ! =
    ∑ k ∈ antidiagonal n, ↑((k.1 + k.2).choose k.2) / (↑k.2 + 1) * bernoulli' k.1
tactic: convert bernoulli'_spec' n using 1
state_before: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∑ i ∈ antidiagonal n, bernoulli' i.1 / ↑i.1! * ((↑i.2 + 1) * ↑i.2!)⁻¹ * ↑n ! =
    ∑ k ∈ antidiagonal n, ↑((k.1 + k.2).choose k.2) / (↑k.2 + 1) * bernoulli' k.1
state_after: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∀ x ∈ antidiagonal n,
    bernoulli' x.1 / ↑x.1! * ((↑x.2 + 1) * ↑x.2!)⁻¹ * ↑n ! = ↑((x.1 + x.2).choose x.2) / (↑x.2 + 1) * bernoulli' x.1
tactic: apply sum_congr rfl
state_before: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∀ x ∈ antidiagonal n,
    bernoulli' x.1 / ↑x.1! * ((↑x.2 + 1) * ↑x.2!)⁻¹ * ↑n ! = ↑((x.1 + x.2).choose x.2) / (↑x.2 + 1) * bernoulli' x.1
state_after: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∀ (x : ℕ × ℕ),
    x.1 + x.2 = n →
      bernoulli' x.1 / ↑x.1! * ((↑x.2 + 1) * ↑x.2!)⁻¹ * ↑n ! = ↑((x.1 + x.2).choose x.2) / (↑x.2 + 1) * bernoulli' x.1
tactic: simp_rw [mem_antidiagonal]
state_before: case h.e'_2
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
n : ℕ
⊢ ∀ (x : ℕ × ℕ),
    x.1 + x.2 = n →
      bernoulli' x.1 / ↑x.1! * ((↑x.2 + 1) * ↑x.2!)⁻¹ * ↑n ! = ↑((x.1 + x.2).choose x.2) / (↑x.2 + 1) * bernoulli' x.1
state_after: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
⊢ bernoulli' (i, j).1 / ↑(i, j).1! * ((↑(i, j).2 + 1) * ↑(i, j).2!)⁻¹ * ↑((i, j).1 + (i, j).2)! =
    ↑(((i, j).1 + (i, j).2).choose (i, j).2) / (↑(i, j).2 + 1) * bernoulli' (i, j).1
tactic: rintro ⟨i, j⟩ rfl
state_before: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
⊢ bernoulli' (i, j).1 / ↑(i, j).1! * ((↑(i, j).2 + 1) * ↑(i, j).2!)⁻¹ * ↑((i, j).1 + (i, j).2)! =
    ↑(((i, j).1 + (i, j).2).choose (i, j).2) / (↑(i, j).2 + 1) * bernoulli' (i, j).1
state_after: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ bernoulli' (i, j).1 / ↑(i, j).1! * ((↑(i, j).2 + 1) * ↑(i, j).2!)⁻¹ * ↑((i, j).1 + (i, j).2)! =
    ↑(((i, j).1 + (i, j).2).choose (i, j).2) / (↑(i, j).2 + 1) * bernoulli' (i, j).1
tactic: have := factorial_mul_factorial_dvd_factorial_add i j
state_before: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ bernoulli' (i, j).1 / ↑(i, j).1! * ((↑(i, j).2 + 1) * ↑(i, j).2!)⁻¹ * ↑((i, j).1 + (i, j).2)! =
    ↑(((i, j).1 + (i, j).2).choose (i, j).2) / (↑(i, j).2 + 1) * bernoulli' (i, j).1
state_after: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ ((↑j ! * (↑j + 1) = (↑j + 1) * ↑j ! ∨ i ! = 0) ∨ (i + j)! = 0) ∨ bernoulli' i = 0
tactic: field_simp [mul_comm _ (bernoulli' i), mul_assoc, add_choose]
state_before: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ ((↑j ! * (↑j + 1) = (↑j + 1) * ↑j ! ∨ i ! = 0) ∨ (i + j)! = 0) ∨ bernoulli' i = 0
state_after: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ ((j ! * (j + 1) = (j + 1) * j ! ∨ i ! = 0) ∨ (i + j)! = 0) ∨ bernoulli' i = 0
tactic: norm_cast
state_before: case h.e'_2.mk
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
i j : ℕ
this : i ! * j ! ∣ (i + j)!
⊢ ((j ! * (j + 1) = (j + 1) * j ! ∨ i ! = 0) ∨ (i + j)! = 0) ∨ bernoulli' i = 0
state_after: no goals
tactic: simp [mul_comm (j + 1)]