Analysis I, Section 6.6: Subsequences
I have attempted to make the translation as faithful a paraphrasing as possible of the original text. When there is a choice between a more idiomatic Lean solution and a more faithful translation, I have generally chosen the latter. In particular, there will be places where the Lean code could be "golfed" to be more elegant and idiomatic, but I have consciously avoided doing so.
Main constructions and results of this section:
-
Definition of a subsequence.
namespace Chapter6Definition 6.6.1
abbrev Sequence.subseq (a b: ℕ → ℝ) : Prop := ∃ f : ℕ → ℕ, StrictMono f ∧ ∀ n, b n = a (f n)/- Example 6.6.2 -/
example (a:ℕ → ℝ) : Sequence.subseq a (fun n ↦ a (2 * n)) := a:ℕ → ℝ⊢ Sequence.subseq a fun n => a (2 * n) All goals completed! 🐙example {f: ℕ → ℕ} (hf: StrictMono f) : Function.Injective f := f:ℕ → ℕhf:StrictMono f⊢ Function.Injective f All goals completed! 🐙example :
Sequence.subseq (fun n ↦ if Even n then 1 + (10:ℝ)^(-(n/2:ℤ)-1) else (1:ℝ)^(-(n/2:ℤ)-1))
(fun n ↦ 1 + (10:ℝ)^(-(n:ℤ)-1)) := ⊢ Sequence.subseq (fun n => if Even n then 1 + 10 ^ (-(↑n / 2) - 1) else 1 ^ (-(↑n / 2) - 1)) fun n => 1 + 10 ^ (-↑n - 1)
All goals completed! 🐙example :
Sequence.subseq (fun n ↦ if Even n then 1 + (10:ℝ)^(-(n/2:ℤ)-1) else (1:ℝ)^(-(n/2:ℤ)-1))
(fun n ↦ (10:ℝ)^(-(n:ℤ)-1)) := ⊢ Sequence.subseq (fun n => if Even n then 1 + 10 ^ (-(↑n / 2) - 1) else 1 ^ (-(↑n / 2) - 1)) fun n => 10 ^ (-↑n - 1)
All goals completed! 🐙Lemma 6.6.4 / Exercise 6.6.1
theorem Sequence.subseq_self (a:ℕ → ℝ) : Sequence.subseq a a := a:ℕ → ℝ⊢ subseq a a All goals completed! 🐙Lemma 6.6.4 / Exercise 6.6.1
theorem Sequence.subseq_trans {a b c:ℕ → ℝ} (hab: Sequence.subseq a b) (hbc: Sequence.subseq b c) :
Sequence.subseq a c := a:ℕ → ℝb:ℕ → ℝc:ℕ → ℝhab:subseq a bhbc:subseq b c⊢ subseq a c All goals completed! 🐙Proposition 6.6.5 / Exercise 6.6.4
theorem Sequence.convergent_iff_subseq (a:ℕ → ℝ) (L:ℝ) :
(a:Sequence).TendsTo L ↔ ∀ b:ℕ → ℝ, Sequence.subseq a b → (b:Sequence).TendsTo L := a:ℕ → ℝL:ℝ⊢ (↑a).TendsTo L ↔ ∀ (b : ℕ → ℝ), subseq a b → (↑b).TendsTo L
All goals completed! 🐙Proposition 6.6.6 / Exercise 6.6.5
theorem Sequence.limit_point_iff_subseq (a:ℕ → ℝ) (L:ℝ) :
(a:Sequence).LimitPoint L ↔ ∃ b:ℕ → ℝ, Sequence.subseq a b ∧ (b:Sequence).TendsTo L := a:ℕ → ℝL:ℝ⊢ (↑a).LimitPoint L ↔ ∃ b, subseq a b ∧ (↑b).TendsTo L
All goals completed! 🐙Theorem 6.6.8 (Bolzano-Weierstrass theorem)
theorem Sequence.convergent_of_subseq_of_bounded {a:ℕ→ ℝ} (ha: (a:Sequence).IsBounded) :
∃ b:ℕ → ℝ, Sequence.subseq a b ∧ (b:Sequence).Convergent := a:ℕ → ℝha:(↑a).IsBounded⊢ ∃ b, subseq a b ∧ (↑b).Convergent
-- This proof is written to follow the structure of the original text.
a:ℕ → ℝha:(↑a).IsBoundedL_plus:ℝhL_plus:(↑a).limsup = ↑L_plusw✝:ℝh✝:(↑a).liminf = ↑w✝⊢ ∃ b, subseq a b ∧ (↑b).Convergent
a:ℕ → ℝha:(↑a).IsBoundedL_plus:ℝhL_plus:(↑a).limsup = ↑L_plusw✝:ℝh✝:(↑a).liminf = ↑w✝this:?_mvar.2454 := Chapter6.Sequence.limit_point_of_limsup _fvar.2432⊢ ∃ b, subseq a b ∧ (↑b).Convergent
a:ℕ → ℝha:(↑a).IsBoundedL_plus:ℝhL_plus:(↑a).limsup = ↑L_plusw✝:ℝh✝:(↑a).liminf = ↑w✝this:∃ b, subseq a b ∧ (↑b).TendsTo L_plus⊢ ∃ b, subseq a b ∧ (↑b).Convergent; a:ℕ → ℝha:(↑a).IsBoundedL_plus:ℝhL_plus:(↑a).limsup = ↑L_plusw✝:ℝh✝:(↑a).liminf = ↑w✝this✝:∃ b, subseq a b ∧ (↑b).TendsTo L_plusb✝:ℕ → ℝp✝:subseq a b✝this:(↑b✝).TendsTo L_plus⊢ (↑b✝).Convergent; All goals completed! 🐙/- Exercise 6.6.2 -/
def Sequence.exist_subseq_of_subseq :
Decidable (∃ a b : ℕ → ℝ, a ≠ b ∧ Sequence.subseq a b ∧ Sequence.subseq b a) := ⊢ Decidable (∃ a b, a ≠ b ∧ subseq a b ∧ subseq b a)
-- The first line of this construction should be `apply isTrue` or `apply isFalse`.
All goals completed! 🐙
Exercise 6.6.3. You may find the API around Mathlib's Nat.find to be useful
(and to avoid any decidability issues)
theorem Sequence.subseq_of_unbounded {a:ℕ → ℝ} (ha: ¬ (a:Sequence).IsBounded) :
∃ b:ℕ → ℝ, Sequence.subseq a b ∧ (b:Sequence)⁻¹.TendsTo 0 := a:ℕ → ℝha:¬(↑a).IsBounded⊢ ∃ b, subseq a b ∧ (↑b)⁻¹.TendsTo 0
All goals completed! 🐙end Chapter6