File: Mathlib/NumberTheory/BernoulliPolynomials.lean

full_name: Polynomial.bernoulli
code: /-- The Bernoulli polynomials are defined in terms of the negative Bernoulli numbers. -/
def bernoulli (n : ℕ) : ℚ[X] 
goal: ℚ[X]

full_name: Polynomial.bernoulli_def
code: theorem bernoulli_def (n : ℕ) : bernoulli n =
    ∑ i ∈ range (n + 1), Polynomial.monomial i (_root_.bernoulli (n - i) * choose n i) 
goal: Polynomial.bernoulli n = ∑ i ∈ Finset.range (n + 1), (Polynomial.monomial i) (bernoulli (n - i) * ↑(n.choose i))

full_name: Polynomial.bernoulli_zero
code: @[simp]
theorem bernoulli_zero : bernoulli 0 = 1 
goal: Polynomial.bernoulli 0 = 1

full_name: Polynomial.bernoulli_eval_zero
code: @[simp]
theorem bernoulli_eval_zero (n : ℕ) : (bernoulli n).eval 0 = _root_.bernoulli n 
goal: Polynomial.eval 0 (Polynomial.bernoulli n) = bernoulli n

full_name: Polynomial.bernoulli_eval_one
code: @[simp]
theorem bernoulli_eval_one (n : ℕ) : (bernoulli n).eval 1 = bernoulli' n 
goal: Polynomial.eval 1 (Polynomial.bernoulli n) = bernoulli' n

full_name: Polynomial.derivative_bernoulli_add_one
code: theorem derivative_bernoulli_add_one (k : ℕ) :
    Polynomial.derivative (bernoulli (k + 1)) = (k + 1) * bernoulli k 
goal: Polynomial.derivative (Polynomial.bernoulli (k + 1)) = (↑k + 1) * Polynomial.bernoulli k

full_name: Polynomial.derivative_bernoulli
code: theorem derivative_bernoulli (k : ℕ) :
    Polynomial.derivative (bernoulli k) = k * bernoulli (k - 1) 
goal: Polynomial.derivative (Polynomial.bernoulli k) = ↑k * Polynomial.bernoulli (k - 1)

full_name: Polynomial.sum_bernoulli
code: @[simp]
nonrec theorem sum_bernoulli (n : ℕ) :
    (∑ k ∈ range (n + 1), ((n + 1).choose k : ℚ) • bernoulli k) = monomial n (n + 1 : ℚ) 
goal: ∑ k ∈ Finset.range (n + 1), ↑((n + 1).choose k) • Polynomial.bernoulli k = (Polynomial.monomial n) (↑n + 1)

full_name: Polynomial.bernoulli_eq_sub_sum
code: /-- Another version of `Polynomial.sum_bernoulli`. -/
theorem bernoulli_eq_sub_sum (n : ℕ) :
    (n.succ : ℚ) • bernoulli n =
      monomial n (n.succ : ℚ) - ∑ k ∈ Finset.range n, ((n + 1).choose k : ℚ) • bernoulli k 
goal: ↑n.succ • Polynomial.bernoulli n =
  (Polynomial.monomial n) ↑n.succ - ∑ k ∈ Finset.range n, ↑((n + 1).choose k) • Polynomial.bernoulli k

full_name: Polynomial.sum_range_pow_eq_bernoulli_sub
code: /-- Another version of `sum_range_pow`. -/
theorem sum_range_pow_eq_bernoulli_sub (n p : ℕ) :
    ((p + 1 : ℚ) * ∑ k ∈ range n, (k : ℚ) ^ p) = (bernoulli p.succ).eval (n : ℚ) -
    _root_.bernoulli p.succ 
goal: (↑p + 1) * ∑ k ∈ Finset.range n, ↑k ^ p = Polynomial.eval (↑n) (Polynomial.bernoulli p.succ) - bernoulli p.succ

full_name: Polynomial.bernoulli_succ_eval
code: /-- Rearrangement of `Polynomial.sum_range_pow_eq_bernoulli_sub`. -/
theorem bernoulli_succ_eval (n p : ℕ) : (bernoulli p.succ).eval (n : ℚ) =
    _root_.bernoulli p.succ + (p + 1 : ℚ) * ∑ k ∈ range n, (k : ℚ) ^ p 
goal: Polynomial.eval (↑n) (Polynomial.bernoulli p.succ) = bernoulli p.succ + (↑p + 1) * ∑ k ∈ Finset.range n, ↑k ^ p

full_name: Polynomial.bernoulli_eval_one_add
code: theorem bernoulli_eval_one_add (n : ℕ) (x : ℚ) :
    (bernoulli n).eval (1 + x) = (bernoulli n).eval x + n * x ^ (n - 1) 
goal: Polynomial.eval (1 + x) (Polynomial.bernoulli n) = Polynomial.eval x (Polynomial.bernoulli n) + ↑n * x ^ (n - 1)

full_name: Polynomial.bernoulli_generating_function
code: /-- The theorem that $(e^X - 1) * ∑ Bₙ(t)* X^n/n! = Xe^{tX}$ -/
theorem bernoulli_generating_function (t : A) :
    (mk fun n => aeval t ((1 / n ! : ℚ) • bernoulli n)) * (exp A - 1) =
      PowerSeries.X * rescale t (exp A) 
goal: (PowerSeries.mk fun n => (Polynomial.aeval t) ((1 / ↑n !) • Polynomial.bernoulli n)) * (PowerSeries.exp A - 1) =
  PowerSeries.X * (PowerSeries.rescale t) (PowerSeries.exp A)