Skip to content

Commit 001e405

Browse files
committed
doc(Data): misc. improvements (#31431)
This PR fixes a batch of typos in the `Data` subdirectory. Found and fixed with help from Codex. As part of this work, we also demote some headers that shouldn't have been H1.
1 parent 0669680 commit 001e405

File tree

3 files changed

+12
-20
lines changed

3 files changed

+12
-20
lines changed

Mathlib/Data/ENNReal/Real.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ files.
1515
1616
This file provides a `positivity` extension for `ENNReal.ofReal`.
1717
18-
# Main theorems
18+
## Main statements
1919
2020
- `trichotomy (p : ℝ≥0∞) : p = 0 ∨ p = ∞ ∨ 0 < p.toReal`: often used for `WithLp` and `lp`
2121
- `dichotomy (p : ℝ≥0∞) [Fact (1 ≤ p)] : p = ∞ ∨ 1 ≤ p.toReal`: often used for `WithLp` and `lp`

Mathlib/Data/Nat/Factorial/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ lemma two_pow_mul_factorial_le_factorial_two_mul (n : ℕ) : 2 ^ n * n ! ≤ (2
461461

462462

463463
/-!
464-
# Factorial via binary splitting.
464+
### Factorial via binary splitting.
465465
466466
We prove this is equal to the standard factorial and mark it `@[csimp]`.
467467

Mathlib/Data/Nat/Fib/Basic.lean

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,46 +13,38 @@ import Mathlib.Data.Nat.Choose.Basic
1313
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
1414

1515
/-!
16-
# Fibonacci Numbers
16+
# Fibonacci numbers
1717
18-
This file defines the fibonacci series, proves results about it and introduces
19-
methods to compute it quickly.
20-
-/
21-
22-
/-!
23-
# The Fibonacci Sequence
24-
25-
## Summary
26-
27-
Definition of the Fibonacci sequence `F₀ = 0, F₁ = 1, Fₙ₊₂ = Fₙ + Fₙ₊₁`.
18+
This file defines the Fibonacci sequence as `F₀ = 0, F₁ = 1, Fₙ₊₂ = Fₙ + Fₙ₊₁`. Furthermore, it
19+
proves results about the sequence and introduces methods to compute it quickly.
2820
29-
## Main Definitions
21+
## Main definitions
3022
3123
- `Nat.fib` returns the stream of Fibonacci numbers.
3224
33-
## Main Statements
25+
## Main statements
3426
35-
- `Nat.fib_add_two`: shows that `fib` indeed satisfies the Fibonacci recurrence `Fₙ₊₂ = Fₙ + Fₙ₊₁.`.
27+
- `Nat.fib_add_two`: shows that `fib` indeed satisfies the Fibonacci recurrence `Fₙ₊₂ = Fₙ + Fₙ₊₁`.
3628
- `Nat.fib_gcd`: `fib n` is a strong divisibility sequence.
3729
- `Nat.fib_succ_eq_sum_choose`: `fib` is given by the sum of `Nat.choose` along an antidiagonal.
3830
- `Nat.fib_succ_eq_succ_sum`: shows that `F₀ + F₁ + ⋯ + Fₙ = Fₙ₊₂ - 1`.
3931
- `Nat.fib_two_mul` and `Nat.fib_two_mul_add_one` are the basis for an efficient algorithm to
4032
compute `fib` (see `Nat.fastFib`).
4133
42-
## Implementation Notes
34+
## Implementation notes
4335
4436
For efficiency purposes, the sequence is defined using `Stream.iterate`.
4537
4638
## Tags
4739
48-
fib, fibonacci
40+
Fibonacci numbers, Fibonacci sequence
4941
-/
5042

5143
namespace Nat
5244

5345

5446

55-
/-- Implementation of the fibonacci sequence satisfying
47+
/-- Implementation of the Fibonacci sequence satisfying
5648
`fib 0 = 0, fib 1 = 1, fib (n + 2) = fib n + fib (n + 1)`.
5749
5850
*Note:* We use a stream iterator for better performance when compared to the naive recursive
@@ -74,7 +66,7 @@ theorem fib_one : fib 1 = 1 :=
7466
theorem fib_two : fib 2 = 1 :=
7567
rfl
7668

77-
/-- Shows that `fib` indeed satisfies the Fibonacci recurrence `Fₙ₊₂ = Fₙ + Fₙ₊₁.` -/
69+
/-- Shows that `fib` indeed satisfies the Fibonacci recurrence `Fₙ₊₂ = Fₙ + Fₙ₊₁`. -/
7870
theorem fib_add_two {n : ℕ} : fib (n + 2) = fib n + fib (n + 1) := by
7971
simp [fib, Function.iterate_succ_apply']
8072

0 commit comments

Comments
 (0)