Sequences can be thought of as functions from ℤ to ℚ.
Equations
- Chapter5.Sequence.instCoeFun = { coe := fun (a : Chapter5.Sequence) => a.seq }
Functions from ℕ to ℚ can be thought of as sequences starting from 0; Sequence.ofNatFun performs this conversion.
The coe attribute allows the delaborator to print Sequence.ofNatFun f as ↑f, which is more concise; you may safely remove this if you prefer the more explicit notation.
Instances For
If a : ℕ → ℚ is used in a context where a Sequence is expected, automatically coerce a to Sequence.ofNatFun a (which will be pretty-printed as ↑a).
Equations
Example 5.1.2
Equations
- Chapter5.Sequence.squares = ↑fun (n : ℕ) => ↑n ^ 2
Instances For
Example 5.1.2
Equations
- Chapter5.Sequence.squares_from_three = Chapter5.Sequence.mk' 3 fun (x : { n : ℤ // n ≥ 3 }) => ↑↑x ^ 2
Instances For
Sequence.from starts a : Sequence from n₁. It is intended for use when n₁ ≥ n₀, but returns
the "junk" value of the original sequence a otherwise.
Equations
Instances For
Definition 5.1.6 (Eventually ε-steady)
Equations
- ε.EventuallySteady a = ∃ N ≥ a.n₀, ε.Steady (a.from N)
Instances For
Example 5.1.7: The sequence 1, 1/2, 1/3, ... is not 0.1-steady
Example 5.1.7: The sequence a_10, a_11, a_12, ... is 0.1-steady
Example 5.1.7: The sequence 1, 1/2, 1/3, ... is eventually 0.1-steady
Example 5.1.7
The sequence 10, 0, 0, ... is eventually ε-steady for every ε > 0. Left as an exercise.
Definition of Cauchy sequences, for a sequence starting at 0
Example 5.1.10. (This requires extensive familiarity with Mathlib's API for the real numbers.)
Example 5.1.10. (This requires extensive familiarity with Mathlib's API for the real numbers.)
Lemma 5.1.15 (Cauchy sequences are bounded) / Exercise 5.1.1