Skip to content

Commit

Permalink
doc(number_theory/bernoulli): write statements in math mode (#7696)
Browse files Browse the repository at this point in the history
* It took me some work to see the difference between the two statements, so I added the statements in math mode.
* Change name `sum_range_pow'` -> `sum_Ico_pow`
  • Loading branch information
fpvandoorn committed May 22, 2021
1 parent fb95362 commit 97a5276
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/100.yaml
Expand Up @@ -281,7 +281,7 @@
title : Sum of kth powers
decls :
- sum_range_pow
- sum_range_pow'
- sum_Ico_pow
author : mathlib (Moritz Firsching, Fabian Kruse, Ashvni Narayanan)
78:
title : The Cauchy-Schwarz Inequality
Expand Down
8 changes: 5 additions & 3 deletions src/number_theory/bernoulli.lean
Expand Up @@ -261,7 +261,8 @@ end

section faulhaber

/-- Faulhaber's theorem relating the sum of of p-th powers to the Bernoulli numbers.
/-- Faulhaber's theorem relating the sum of of p-th powers to the Bernoulli numbers:
$$\sum_{k=0}^{n-1} k^p = \sum_{i=0}^p B_i\binom{p+1}{i}\frac{n^{p+1-i}}{p+1}.$$
See https://proofwiki.org/wiki/Faulhaber%27s_Formula and [orosi2018faulhaber] for
the proof provided here. -/
theorem sum_range_pow (n p : ℕ) :
Expand Down Expand Up @@ -317,9 +318,10 @@ begin
field_simp [mul_right_comm _ ↑p!, ← mul_assoc _ _ ↑p!, cast_add_one_ne_zero, hne],
end

/-- Alternate form of Faulhaber's theorem, relating the sum of p-th powers to the Bernoulli numbers.
/-- Alternate form of Faulhaber's theorem, relating the sum of p-th powers to the Bernoulli numbers:
$$\sum_{k=1}^{n} k^p = \sum_{i=0}^p (-1)^iB_i\binom{p+1}{i}\frac{n^{p+1-i}}{p+1}.$$
Deduced from `sum_range_pow`. -/
theorem sum_range_pow' (n p : ℕ) :
theorem sum_Ico_pow (n p : ℕ) :
∑ k in Ico 1 (n + 1), (k : ℚ) ^ p =
∑ i in range (p + 1), bernoulli' i * (p + 1).choose i * n ^ (p + 1 - i) / (p + 1) :=
begin
Expand Down

0 comments on commit 97a5276

Please sign in to comment.