Imports
import Mathlib.Tactic import Mathlib.Analysis.SpecificLimits.Basic import Analysis.Section_6_4

Analysis I, Section 9.1: Subsets of the real line

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:

  • Review of Mathlib intervals.

  • Adherent points, limit points, isolated points.

  • Closed sets and closure.

  • The Heine-Borel theorem for the real line.

variable (I : Type*)/- Definition 9.1.1 (Intervals) -/ Set.Icc_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a ≤ x ∧ x ≤ b} = Set.Icc a b#check Set.Icc_defSet.Ico_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a ≤ x ∧ x < b} = Set.Ico a b#check Set.Ico_def
Set.Ico_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a ≤ x ∧ x < b} = Set.Ico a b
Set.Ioc_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a < x ∧ x ≤ b} = Set.Ioc a b#check Set.Ioc_def
Set.Ioc_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a < x ∧ x ≤ b} = Set.Ioc a b
Set.Ioo_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a < x ∧ x < b} = Set.Ioo a b#check Set.Ioo_def
Set.Ioo_def.{u_1} {α : Type u_1} [Preorder α] (a b : α) : {x | a < x ∧ x < b} = Set.Ioo a b
Set.Ici_def.{u_1} {α : Type u_1} [Preorder α] (b : α) : {x | b ≤ x} = Set.Ici b#check Set.Ici_def
Set.Ici_def.{u_1} {α : Type u_1} [Preorder α] (b : α) : {x | b ≤ x} = Set.Ici b
Set.Ioi_def.{u_1} {α : Type u_1} [Preorder α] (a : α) : {x | a < x} = Set.Ioi a#check Set.Ioi_def
Set.Ioi_def.{u_1} {α : Type u_1} [Preorder α] (a : α) : {x | a < x} = Set.Ioi a
Set.Iic_def.{u_1} {α : Type u_1} [Preorder α] (b : α) : {x | x ≤ b} = Set.Iic b#check Set.Iic_def
Set.Iic_def.{u_1} {α : Type u_1} [Preorder α] (b : α) : {x | x ≤ b} = Set.Iic b
Set.Iio_def.{u_1} {α : Type u_1} [Preorder α] (a : α) : {x | x < a} = Set.Iio a#check Set.Iio_def
Set.Iio_def.{u_1} {α : Type u_1} [Preorder α] (a : α) : {x | x < a} = Set.Iio a
EReal.image_coe_Icc (x y : ℝ) : Real.toEReal '' Set.Icc x y = Set.Icc ↑x ↑y#check EReal.image_coe_Icc
EReal.image_coe_Icc (x y : ℝ) : Real.toEReal '' Set.Icc x y = Set.Icc ↑x ↑y
EReal.image_coe_Ico (x y : ℝ) : Real.toEReal '' Set.Ico x y = Set.Ico ↑x ↑y#check EReal.image_coe_Ico
EReal.image_coe_Ico (x y : ℝ) : Real.toEReal '' Set.Ico x y = Set.Ico ↑x ↑y
EReal.image_coe_Ioc (x y : ℝ) : Real.toEReal '' Set.Ioc x y = Set.Ioc ↑x ↑y#check EReal.image_coe_Ioc
EReal.image_coe_Ioc (x y : ℝ) : Real.toEReal '' Set.Ioc x y = Set.Ioc ↑x ↑y
EReal.image_coe_Ioo (x y : ℝ) : Real.toEReal '' Set.Ioo x y = Set.Ioo ↑x ↑y#check EReal.image_coe_Ioo
EReal.image_coe_Ioo (x y : ℝ) : Real.toEReal '' Set.Ioo x y = Set.Ioo ↑x ↑y
EReal.image_coe_Ici (x : ℝ) : Real.toEReal '' Set.Ici x = Set.Ico ↑x ⊤#check EReal.image_coe_Ici
EReal.image_coe_Ici (x : ℝ) : Real.toEReal '' Set.Ici x = Set.Ico ↑x ⊤
EReal.image_coe_Ioi (x : ℝ) : Real.toEReal '' Set.Ioi x = Set.Ioo ↑x ⊤#check EReal.image_coe_Ioi
EReal.image_coe_Ioi (x : ℝ) : Real.toEReal '' Set.Ioi x = Set.Ioo ↑x ⊤
EReal.image_coe_Iic (x : ℝ) : Real.toEReal '' Set.Iic x = Set.Ioc ⊥ ↑x#check EReal.image_coe_Iic
EReal.image_coe_Iic (x : ℝ) : Real.toEReal '' Set.Iic x = Set.Ioc ⊥ ↑x
EReal.image_coe_Iio (x : ℝ) : Real.toEReal '' Set.Iio x = Set.Ioo ⊥ ↑x#check EReal.image_coe_Iio
EReal.image_coe_Iio (x : ℝ) : Real.toEReal '' Set.Iio x = Set.Ioo ⊥ ↑x
/-- Example 9.1.4 -/ declaration uses `sorry`example {a b: EReal} (h: a > b) : Set.Icc a b = ∅ := I:Type u_1a:ERealb:ERealh:a > b⊢ Set.Icc a b = ∅ All goals completed! 🐙declaration uses `sorry`example {a b: EReal} (h: a ≥ b) : Set.Ico a b = ∅ := I:Type u_1a:ERealb:ERealh:a ≥ b⊢ Set.Ico a b = ∅ All goals completed! 🐙declaration uses `sorry`example {a b: EReal} (h: a ≥ b) : Set.Ioc a b = ∅ := I:Type u_1a:ERealb:ERealh:a ≥ b⊢ Set.Ioc a b = ∅ All goals completed! 🐙declaration uses `sorry`example {a b: EReal} (h: a ≥ b) : Set.Ioo a b = ∅ := I:Type u_1a:ERealb:ERealh:a ≥ b⊢ Set.Ioo a b = ∅ All goals completed! 🐙declaration uses `sorry`example {a b: EReal} (h: a = b) : Set.Icc a b = {a} := I:Type u_1a:ERealb:ERealh:a = b⊢ Set.Icc a b = {a} All goals completed! 🐙

Definition 9.1.5. Note that a slightly different Real.­Adherent was defined in Chapter 6.4

abbrev Real.adherent' (ε:ℝ) (x:ℝ) (X: Set ℝ) := ∃ y ∈ X, |x - y| ≤ ε
/-- Example 9.1.7 -/ declaration uses `sorry`example : (0.5:ℝ).adherent' 1.1 (.Ioo 0 1) := I:Type u_1⊢ Real.adherent' 0.5 1.1 (Set.Ioo 0 1) All goals completed! 🐙declaration uses `sorry`example : ¬ (0.1:ℝ).adherent' 1.1 (.Ioo 0 1) := I:Type u_1⊢ ¬Real.adherent' 0.1 1.1 (Set.Ioo 0 1) All goals completed! 🐙declaration uses `sorry`example : (0.5:ℝ).adherent' 1.1 {1,2,3} := I:Type u_1⊢ Real.adherent' 0.5 1.1 {1, 2, 3} All goals completed! 🐙namespace Chapter9

Definition 9.1.8 (Adherent points).

abbrev AdherentPt (x:ℝ) (X:Set ℝ) := ∀ ε > (0:ℝ), ε.adherent' x X
declaration uses `sorry`example : AdherentPt 1 (.Ioo 0 1) := I:Type u_1⊢ AdherentPt 1 (Set.Ioo 0 1) All goals completed! 🐙declaration uses `sorry`example : ¬ AdherentPt 2 (.Ioo 0 1) := I:Type u_1⊢ ¬AdherentPt 2 (Set.Ioo 0 1) All goals completed! 🐙

Definition 9.1.10 (Closure). Here we identify this definition with the Mathlib version.

theorem closure_def (X:Set ℝ) : closure X = { x | AdherentPt x X } := X:Set ℝ⊢ closure X = {x | AdherentPt x X} X:Set ℝx✝:ℝ⊢ x✝ ∈ closure X ↔ x✝ ∈ {x | AdherentPt x X}; X:Set ℝx✝:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |y - x✝| < ε) ↔ ∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ ε X:Set ℝx✝:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |y - x✝| < ε) → ∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εX:Set ℝx✝:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ ε) → ∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |y - x✝| < ε X:Set ℝx✝:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |y - x✝| < ε) → ∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εX:Set ℝx✝:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ ε) → ∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |y - x✝| < ε intro h X:Set ℝx✝:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εε:ℝ⊢ 0 < ε → ∃ y ∈ X, |y - x✝| < ε X:Set ℝx✝:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εε:ℝhε:0 < ε⊢ ∃ y ∈ X, |y - x✝| < ε all_goals X:Set ℝx✝:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εε:ℝhε:0 < εy:ℝhy:y ∈ Xhxy:|x✝ - y| ≤ ε / 2⊢ ∃ y ∈ X, |y - x✝| < ε; exact ⟨ _, hy, X:Set ℝx✝:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εε:ℝhε:0 < εy:ℝhy:y ∈ Xhxy:|x✝ - y| ≤ ε / 2⊢ |y - x✝| < ε X:Set ℝx✝:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y ∈ X, |x✝ - y| ≤ εε:ℝhε:0 < εy:ℝhy:y ∈ Xhxy:|x✝ - y| ≤ ε / 2⊢ |x✝ - y| < ε; All goals completed! 🐙 ⟩
theorem closure_def' (X:Set ℝ) (x :ℝ) : x ∈ closure X ↔ AdherentPt x X := X:Set ℝx:ℝ⊢ x ∈ closure X ↔ AdherentPt x X All goals completed! 🐙

identification of AdherentPt with Mathlib's ClusterPt

theorem AdherentPt_def (x:ℝ) (X:Set ℝ) : AdherentPt x X = ClusterPt x (.principal X) := x:ℝX:Set ℝ⊢ AdherentPt x X = ClusterPt x (Filter.principal X) All goals completed! 🐙

Lemma 9.1.11 / Exercise 9.1.1 (subset)

theorem declaration uses `sorry`subset_closure (X:Set ℝ): X ⊆ closure X := X:Set ℝ⊢ X ⊆ closure X All goals completed! 🐙

Lemma 9.1.11 / Exercise 9.1.1 (union)

theorem declaration uses `sorry`closure_union (X Y:Set ℝ): closure (X ∪ Y) = closure X ∪ closure Y := X:Set ℝY:Set ℝ⊢ closure (X ∪ Y) = closure X ∪ closure Y All goals completed! 🐙

Lemma 9.1.11 / Exercise 9.1.1 (inter)

theorem declaration uses `sorry`closure_inter (X Y:Set ℝ): closure (X ∩ Y) ⊆ closure X ∩ closure Y := X:Set ℝY:Set ℝ⊢ closure (X ∩ Y) ⊆ closure X ∩ closure Y All goals completed! 🐙

Lemma 9.1.11 / Exercise 9.1.1 (monotonicity)

theorem declaration uses `sorry`closure_subset {X Y:Set ℝ} (h: X ⊆ Y): closure X ⊆ closure Y := X:Set ℝY:Set ℝh:X ⊆ Y⊢ closure X ⊆ closure Y All goals completed! 🐙

Lemma 9.1.11 / Exercise 9.1.1 (sandwich)

theorem declaration uses `sorry`closure_of_subset_closure {X Y:Set ℝ} (h: X ⊆ Y) (h' : Y ⊆ closure X): closure Y = closure X := X:Set ℝY:Set ℝh:X ⊆ Yh':Y ⊆ closure X⊢ closure Y = closure X All goals completed! 🐙

Lemma 9.1.12

theorem declaration uses `sorry`closure_of_Ioo {a b:ℝ} (h:a < b) : closure (.Ioo a b) = .Icc a b := a:ℝb:ℝh:a < b⊢ closure (Set.Ioo a b) = Set.Icc a b -- This proof is written to follow the structure of the original text. a:ℝb:ℝh:a < bx:ℝ⊢ x ∈ closure (Set.Ioo a b) ↔ x ∈ Set.Icc a b; a:ℝb:ℝh:a < bx:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε) ↔ a ≤ x ∧ x ≤ b a:ℝb:ℝh:a < bx:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε) → a ≤ x ∧ x ≤ ba:ℝb:ℝh:a < bx:ℝ⊢ a ≤ x ∧ x ≤ b → ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε a:ℝb:ℝh:a < bx:ℝ⊢ (∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε) → a ≤ x ∧ x ≤ b a:ℝb:ℝh✝:a < bx:ℝh:∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε⊢ a ≤ x ∧ x ≤ b; a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < x⊢ ∃ ε, 0 < ε ∧ ∀ (y : ℝ), a < y ∧ y < b → ε < |x - y| a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':a ≤ x⊢ ∃ ε, 0 < ε ∧ ∀ (y : ℝ), a < y ∧ y < b → ε < |x - y|a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':x < a⊢ ∃ ε, 0 < ε ∧ ∀ (y : ℝ), a < y ∧ y < b → ε < |x - y| a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':a ≤ x⊢ ∃ ε, 0 < ε ∧ ∀ (y : ℝ), a < y ∧ y < b → ε < |x - y| a:ℝb:ℝh✝:a < bx:ℝh':a ≤ xh:b < x⊢ ∃ ε, 0 < ε ∧ ∀ (y : ℝ), a < y ∧ y < b → ε < |x - y| use x-b, a:ℝb:ℝh✝:a < bx:ℝh':a ≤ xh:b < x⊢ 0 < x - b All goals completed! 🐙 intro y a:ℝb:ℝh✝:a < bx:ℝh':a ≤ xh:b < xy:ℝleft✝:a < yright✝:y < b⊢ x - b < |x - y|; a:ℝb:ℝh✝:a < bx:ℝh':a ≤ xh:b < xy:ℝleft✝:a < yright✝:y < bthis:x - y ≤ |x - y|⊢ x - b < |x - y|; All goals completed! 🐙 use a-x, a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':x < a⊢ 0 < a - x All goals completed! 🐙 intro y a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':x < ay:ℝleft✝:a < yright✝:y < b⊢ a - x < |x - y|; a:ℝb:ℝh✝:a < bx:ℝh:a ≤ x → b < xh':x < ay:ℝleft✝:a < yright✝:y < bthis:-(x - y) ≤ |x - y|⊢ a - x < |x - y|; All goals completed! 🐙 a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ b⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:x = a⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ εa:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = a⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:x = a⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε All goals completed! 🐙 a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:x = b⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ εa:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:¬x = b⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:x = b⊢ ∀ (ε : ℝ), 0 < ε → ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε All goals completed! 🐙 intro ε a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:¬x = bε:ℝa✝:0 < ε⊢ ∃ y, (a < y ∧ y < b) ∧ |x - y| ≤ ε; use x, (a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:¬x = bε:ℝa✝:0 < ε⊢ a < x ∧ x < b All goals completed! 🐙); a:ℝb:ℝh:a < bx:ℝh1:a ≤ xh2:x ≤ bha:¬x = ahb:¬x = bε:ℝa✝:0 < ε⊢ 0 ≤ ε; All goals completed! 🐙
theorem declaration uses `sorry`closure_of_Ioc {a b:ℝ} (h:a < b) : closure (.Ioc a b) = .Icc a b := a:ℝb:ℝh:a < b⊢ closure (Set.Ioc a b) = Set.Icc a b All goals completed! 🐙theorem declaration uses `sorry`closure_of_Ico {a b:ℝ} (h:a < b) : closure (.Ico a b) = .Icc a b := a:ℝb:ℝh:a < b⊢ closure (Set.Ico a b) = Set.Icc a b All goals completed! 🐙theorem declaration uses `sorry`closure_of_Icc {a b:ℝ} (h:a ≤ b) : closure (.Icc a b) = .Icc a b := a:ℝb:ℝh:a ≤ b⊢ closure (Set.Icc a b) = Set.Icc a b All goals completed! 🐙theorem declaration uses `sorry`closure_of_Ioi {a:ℝ} : closure (.Ioi a) = .Ici a := a:ℝ⊢ closure (Set.Ioi a) = Set.Ici a All goals completed! 🐙theorem declaration uses `sorry`closure_of_Ici {a:ℝ} : closure (.Ici a) = .Ici a := a:ℝ⊢ closure (Set.Ici a) = Set.Ici a All goals completed! 🐙theorem declaration uses `sorry`closure_of_Iio {a:ℝ} : closure (.Iio a) = .Iic a := a:ℝ⊢ closure (Set.Iio a) = Set.Iic a All goals completed! 🐙theorem declaration uses `sorry`closure_of_Iic {a:ℝ} : closure (.Iic a) = .Iic a := a:ℝ⊢ closure (Set.Iic a) = Set.Iic a All goals completed! 🐙theorem declaration uses `sorry`closure_of_R : closure (.univ: Set ℝ) = .univ := ⊢ closure Set.univ = Set.univ All goals completed! 🐙

Lemma 9.1.13 / Exercise 9.1.2 (N)

theorem declaration uses `sorry`closure_of_N : closure ((fun n:ℕ ↦ (n:ℝ)) '' .univ) = ((fun n:ℕ ↦ (n:ℝ)) '' .univ) := ⊢ closure ((fun n ↦ ↑n) '' Set.univ) = (fun n ↦ ↑n) '' Set.univ All goals completed! 🐙

Lemma 9.1.13 / Exercise 9.1.2 (Z)

theorem declaration uses `sorry`closure_of_Z : closure ((fun n:ℤ ↦ (n:ℝ)) '' .univ) = ((fun n:ℤ ↦ (n:ℝ)) '' .univ) := ⊢ closure ((fun n ↦ ↑n) '' Set.univ) = (fun n ↦ ↑n) '' Set.univ All goals completed! 🐙

Lemma 9.1.13 / Exercise 9.1.2 (Q)

theorem declaration uses `sorry`closure_of_Q : closure ((fun n:ℚ ↦ (n:ℝ)) '' .univ) = .univ := ⊢ closure ((fun n ↦ ↑n) '' Set.univ) = Set.univ All goals completed! 🐙

Lemma 9.1.14 / Exercise 9.1.4

theorem declaration uses `sorry`limit_of_AdherentPt (X: Set ℝ) (x:ℝ) : AdherentPt x X ↔ ∃ a : ℕ → ℝ, (∀ n, a n ∈ X) ∧ Filter.atTop.Tendsto a (nhds x) := X:Set ℝx:ℝ⊢ AdherentPt x X ↔ ∃ a, (∀ (n : ℕ), a n ∈ X) ∧ Filter.Tendsto a Filter.atTop (nhds x) All goals completed! 🐙
theorem AdherentPt.of_mem {X: Set ℝ} {x: ℝ} (h: x ∈ X) : AdherentPt x X := X:Set ℝx:ℝh:x ∈ X⊢ AdherentPt x X X:Set ℝx:ℝh:x ∈ X⊢ ∃ a, (∀ (n : ℕ), a n ∈ X) ∧ Filter.Tendsto a Filter.atTop (nhds x); X:Set ℝx:ℝh:x ∈ X⊢ (∀ (n : ℕ), (fun x_1 ↦ x) n ∈ X) ∧ Filter.Tendsto (fun x_1 ↦ x) Filter.atTop (nhds x); All goals completed! 🐙

Definition 9.1.15. Here we use the Mathlib definition.

theorem isClosed_def (X:Set ℝ): IsClosed X ↔ closure X = X := closure_eq_iff_isClosed.symm
theorem isClosed_def' (X:Set ℝ): IsClosed X ↔ ∀ x, AdherentPt x X → x ∈ X := X:Set ℝ⊢ IsClosed X ↔ ∀ (x : ℝ), AdherentPt x X → x ∈ X X:Set ℝ⊢ closure X ⊆ X ↔ ∀ (x : ℝ), AdherentPt x X → x ∈ X; X:Set ℝ⊢ {x | AdherentPt x X} ⊆ X ↔ ∀ (x : ℝ), AdherentPt x X → x ∈ X; All goals completed! 🐙

Examples 9.1.16 (Icc)

theorem declaration uses `sorry`Icc_closed {a b:ℝ} : IsClosed (.Icc a b) := a:ℝb:ℝ⊢ IsClosed (Set.Icc a b) All goals completed! 🐙

Examples 9.1.16 (Ici)

theorem declaration uses `sorry`Ici_closed (a:ℝ) : IsClosed (.Ici a) := a:ℝ⊢ IsClosed (Set.Ici a) All goals completed! 🐙

Examples 9.1.16 (Iic)

theorem declaration uses `sorry`Iic_closed (a:ℝ) : IsClosed (.Iic a) := a:ℝ⊢ IsClosed (Set.Iic a) All goals completed! 🐙

Examples 9.1.16 (R)

theorem declaration uses `sorry`R_closed : IsClosed (.univ : Set ℝ) := ⊢ IsClosed Set.univ All goals completed! 🐙

Examples 9.1.16 (Ico)

theorem declaration uses `sorry`Ico_not_closed {a b:ℝ} (h: a < b) : ¬ IsClosed (.Ico a b) := a:ℝb:ℝh:a < b⊢ ¬IsClosed (Set.Ico a b) All goals completed! 🐙

Examples 9.1.16 (Ioc)

theorem declaration uses `sorry`Ioc_not_closed {a b:ℝ} (h: a < b) : ¬ IsClosed (.Ioc a b) := a:ℝb:ℝh:a < b⊢ ¬IsClosed (Set.Ioc a b) All goals completed! 🐙

Examples 9.1.16 (Ioo)

theorem declaration uses `sorry`Ioo_not_closed {a b:ℝ} (h: a < b) : ¬ IsClosed (.Ioo a b) := a:ℝb:ℝh:a < b⊢ ¬IsClosed (Set.Ioo a b) All goals completed! 🐙

Examples 9.1.16 (Ioi)

theorem declaration uses `sorry`Ioi_not_closed (a:ℝ) : ¬ IsClosed (.Ioi a) := a:ℝ⊢ ¬IsClosed (Set.Ioi a) All goals completed! 🐙

Examples 9.1.16 (Iio)

theorem declaration uses `sorry`Iio_not_closed (a:ℝ) : ¬ IsClosed (.Iio a) := a:ℝ⊢ ¬IsClosed (Set.Iio a) All goals completed! 🐙

Examples 9.1.16 (N)

theorem declaration uses `sorry`N_closed : IsClosed ((fun n:ℕ ↦ (n:ℝ)) '' .univ) := ⊢ IsClosed ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Examples 9.1.16 (Z)

theorem declaration uses `sorry`Z_closed : IsClosed ((fun n:ℤ ↦ (n:ℝ)) '' .univ) := ⊢ IsClosed ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Examples 9.1.16 (Q)

theorem declaration uses `sorry`Q_not_closed : ¬ IsClosed ((fun n:ℚ ↦ (n:ℝ)) '' .univ) := ⊢ ¬IsClosed ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Corollary 9.1.17

theorem isClosed_iff_limits_mem (X: Set ℝ) : IsClosed X ↔ ∀ (a:ℕ → ℝ) (L:ℝ), (∀ n, a n ∈ X) → Filter.atTop.Tendsto a (nhds L) → L ∈ X := X:Set ℝ⊢ IsClosed X ↔ ∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ X X:Set ℝ⊢ (∀ (x : ℝ), AdherentPt x X → x ∈ X) ↔ ∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ X X:Set ℝ⊢ (∀ (x : ℝ), AdherentPt x X → x ∈ X) → ∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ XX:Set ℝ⊢ (∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ X) → ∀ (x : ℝ), AdherentPt x X → x ∈ X X:Set ℝ⊢ (∀ (x : ℝ), AdherentPt x X → x ∈ X) → ∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ X intro h X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝:ℕ → ℝ⊢ ∀ (L : ℝ), (∀ (n : ℕ), a✝ n ∈ X) → Filter.Tendsto a✝ Filter.atTop (nhds L) → L ∈ X X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝:ℕ → ℝL:ℝ⊢ (∀ (n : ℕ), a✝ n ∈ X) → Filter.Tendsto a✝ Filter.atTop (nhds L) → L ∈ X X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝¹:ℕ → ℝL:ℝa✝:∀ (n : ℕ), a✝¹ n ∈ X⊢ Filter.Tendsto a✝¹ Filter.atTop (nhds L) → L ∈ X X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝²:ℕ → ℝL:ℝa✝¹:∀ (n : ℕ), a✝¹ n ∈ Xa✝:Filter.Tendsto a✝² Filter.atTop (nhds L)⊢ L ∈ X; X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝²:ℕ → ℝL:ℝa✝¹:∀ (n : ℕ), a✝¹ n ∈ Xa✝:Filter.Tendsto a✝² Filter.atTop (nhds L)⊢ AdherentPt L X; X:Set ℝh:∀ (x : ℝ), AdherentPt x X → x ∈ Xa✝²:ℕ → ℝL:ℝa✝¹:∀ (n : ℕ), a✝¹ n ∈ Xa✝:Filter.Tendsto a✝² Filter.atTop (nhds L)⊢ ∃ a, (∀ (n : ℕ), a n ∈ X) ∧ Filter.Tendsto a Filter.atTop (nhds L); All goals completed! 🐙 intro _ X:Set ℝa✝:∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ Xx✝:ℝ⊢ AdherentPt x✝ X → x✝ ∈ X X:Set ℝa✝:∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ Xx✝:ℝhx:AdherentPt x✝ X⊢ x✝ ∈ X; X:Set ℝa✝:∀ (a : ℕ → ℝ) (L : ℝ), (∀ (n : ℕ), a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds L) → L ∈ Xx✝:ℝhx:∃ a, (∀ (n : ℕ), a n ∈ X) ∧ Filter.Tendsto a Filter.atTop (nhds x✝)⊢ x✝ ∈ X; All goals completed! 🐙

Definition 9.1.18 (Limit points)

abbrev LimitPt (x:ℝ) (X: Set ℝ) := AdherentPt x (X \ {x})

Identification with Mathlib's AccPt

theorem LimitPt.iff_AccPt (x:ℝ) (X: Set ℝ) : LimitPt x X ↔ AccPt x (.principal X) := x:ℝX:Set ℝ⊢ LimitPt x X ↔ AccPt x (Filter.principal X) All goals completed! 🐙

Definition 9.1.19 (Isolated points).

abbrev IsolatedPt (x:ℝ) (X: Set ℝ) := x ∈ X ∧ ∃ ε>0, ∀ y ∈ X \ {x}, |x-y| > ε
/-- Example 9.1.19 -/ declaration uses `sorry`example : AdherentPt 3 ((.Ioo 1 2) ∪ {3}) := I:Type u_1⊢ AdherentPt 3 (Set.Ioo 1 2 ∪ {3}) All goals completed! 🐙declaration uses `sorry`example : ¬ LimitPt 3 ((.Ioo 1 2) ∪ {3}) := I:Type u_1⊢ ¬LimitPt 3 (Set.Ioo 1 2 ∪ {3}) All goals completed! 🐙declaration uses `sorry`example : IsolatedPt 3 ((.Ioo 1 2) ∪ {3}) := I:Type u_1⊢ IsolatedPt 3 (Set.Ioo 1 2 ∪ {3}) All goals completed! 🐙

Remark 9.1.20

theorem LimitPt.iff_limit (x:ℝ) (X: Set ℝ) : LimitPt x X ↔ ∃ a : ℕ → ℝ, (∀ n, a n ∈ X \ {x}) ∧ Filter.atTop.Tendsto a (nhds x) := x:ℝX:Set ℝ⊢ LimitPt x X ↔ ∃ a, (∀ (n : ℕ), a n ∈ X \ {x}) ∧ Filter.Tendsto a Filter.atTop (nhds x) All goals completed! 🐙

Lemma 9.1.21

theorem declaration uses `sorry`mem_Icc_isLimit {a b x:ℝ} (h: a < b) (hx: x ∈ Set.Icc a b) : LimitPt x (.Icc a b) := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) -- This proof is written to follow the structure of the original text, with some slight simplifications. a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ b⊢ LimitPt x (Set.Icc a b) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ b⊢ ∃ a_1, (∀ (n : ℕ), a_1 n ∈ Set.Icc a b \ {x}) ∧ Filter.Tendsto a_1 Filter.atTop (nhds x) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ ∃ a_1, (∀ (n : ℕ), a_1 n ∈ Set.Icc a b \ {x}) ∧ Filter.Tendsto a_1 Filter.atTop (nhds x)a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x = b⊢ ∃ a_1, (∀ (n : ℕ), a_1 n ∈ Set.Icc a b \ {x}) ∧ Filter.Tendsto a_1 Filter.atTop (nhds x) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ ∃ a_1, (∀ (n : ℕ), a_1 n ∈ Set.Icc a b \ {x}) ∧ Filter.Tendsto a_1 Filter.atTop (nhds x) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ (∀ (n : ℕ), (fun n ↦ x + 1 / (↑n + (b - x)⁻¹)) n ∈ Set.Icc a b \ {x}) ∧ Filter.Tendsto (fun n ↦ x + 1 / (↑n + (b - x)⁻¹)) Filter.atTop (nhds x) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ ∀ (n : ℕ), x + 1 / (↑n + (b - x)⁻¹) ∈ Set.Icc a b \ {x}a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ Filter.Tendsto (fun n ↦ x + 1 / (↑n + (b - x)⁻¹)) Filter.atTop (nhds x) a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ ∀ (n : ℕ), x + 1 / (↑n + (b - x)⁻¹) ∈ Set.Icc a b \ {x} a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕ⊢ x + 1 / (↑n + (b - x)⁻¹) ∈ Set.Icc a b \ {x}; a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕ⊢ (a ≤ x + (↑n + (b - x)⁻¹)⁻¹ ∧ x + (↑n + (b - x)⁻¹)⁻¹ ≤ b) ∧ ¬↑n + (b - x)⁻¹ = 0 have : b - x > 0 := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) All goals completed! 🐙 have : (b - x)⁻¹ > 0 := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) All goals completed! 🐙 have : n + (b - x)⁻¹ > 0 := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) All goals completed! 🐙 have : (n+(b - x)⁻¹)⁻¹ > 0 := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) All goals completed! 🐙 have : (b-x)⁻¹ ≤ n + (b - x)⁻¹ := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) All goals completed! 🐙 have : (n + (b - x)⁻¹)⁻¹ ≤ b-x := a:ℝb:ℝx:ℝh:a < bhx:x ∈ Set.Icc a b⊢ LimitPt x (Set.Icc a b) rwa [inv_le_comm₀ ?_ ?_a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕthis✝³:b - x > 0this✝²:(b - x)⁻¹ > 0this✝¹:↑n + (b - x)⁻¹ > 0this✝:(↑n + (b - x)⁻¹)⁻¹ > 0this:(b - x)⁻¹ ≤ ↑n + (b - x)⁻¹⊢ (b - x)⁻¹ ≤ ↑n + (b - x)⁻¹a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕthis✝³:b - x > 0this✝²:(b - x)⁻¹ > 0this✝¹:↑n + (b - x)⁻¹ > 0this✝:(↑n + (b - x)⁻¹)⁻¹ > 0this:(b - x)⁻¹ ≤ ↑n + (b - x)⁻¹⊢ 0 < ↑n + (b - x)⁻¹a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕthis✝³:b - x > 0this✝²:(b - x)⁻¹ > 0this✝¹:↑n + (b - x)⁻¹ > 0this✝:(↑n + (b - x)⁻¹)⁻¹ > 0this:(b - x)⁻¹ ≤ ↑n + (b - x)⁻¹⊢ 0 < b - x a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕthis✝³:b - x > 0this✝²:(b - x)⁻¹ > 0this✝¹:↑n + (b - x)⁻¹ > 0this✝:(↑n + (b - x)⁻¹)⁻¹ > 0this:(b - x)⁻¹ ≤ ↑n + (b - x)⁻¹⊢ 0 < ↑n + (b - x)⁻¹a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < bn:ℕthis✝³:b - x > 0this✝²:(b - x)⁻¹ > 0this✝¹:↑n + (b - x)⁻¹ > 0this✝:(↑n + (b - x)⁻¹)⁻¹ > 0this:(b - x)⁻¹ ≤ ↑n + (b - x)⁻¹⊢ 0 < b - x All goals completed! 🐙 All goals completed! 🐙 a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ nhds x = nhds (x + 0)a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ Filter.Tendsto (fun n ↦ 1 / (↑n + (b - x)⁻¹)) Filter.atTop (nhds 0); a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ nhds x = nhds (x + 0) All goals completed! 🐙 a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ Filter.Tendsto (fun k ↦ 1 / (k + (b - x)⁻¹)) Filter.atTop (nhds 0) convert tendsto_mul_add_inv_atTop_nhds_zero 1 (b - x)⁻¹ (a:ℝb:ℝx:ℝh:a < bhx:a ≤ x ∧ x ≤ bhxb:x < b⊢ 1 ≠ 0 All goals completed! 🐙) using 2 with n; All goals completed! 🐙 All goals completed! 🐙
theorem declaration uses `sorry`mem_Ico_isLimit {a b x:ℝ} (hx: x ∈ Set.Ico a b) : LimitPt x (.Ico a b) := a:ℝb:ℝx:ℝhx:x ∈ Set.Ico a b⊢ LimitPt x (Set.Ico a b) All goals completed! 🐙theorem declaration uses `sorry`mem_Ioc_isLimit {a b x:ℝ} (hx: x ∈ Set.Ioc a b) : LimitPt x (.Ioc a b) := a:ℝb:ℝx:ℝhx:x ∈ Set.Ioc a b⊢ LimitPt x (Set.Ioc a b) All goals completed! 🐙theorem declaration uses `sorry`mem_Ioo_isLimit {a b x:ℝ} (hx: x ∈ Set.Ioo a b) : LimitPt x (.Ioo a b) := a:ℝb:ℝx:ℝhx:x ∈ Set.Ioo a b⊢ LimitPt x (Set.Ioo a b) All goals completed! 🐙theorem declaration uses `sorry`mem_Ici_isLimit {a x:ℝ} (hx: x ∈ Set.Ici a) : LimitPt x (.Ici a) := a:ℝx:ℝhx:x ∈ Set.Ici a⊢ LimitPt x (Set.Ici a) All goals completed! 🐙theorem declaration uses `sorry`mem_Ioi_isLimit {a x:ℝ} (hx: x ∈ Set.Ioi a) : LimitPt x (.Ioi a) := a:ℝx:ℝhx:x ∈ Set.Ioi a⊢ LimitPt x (Set.Ioi a) All goals completed! 🐙theorem declaration uses `sorry`mem_Iic_isLimit {a x:ℝ} (hx: x ∈ Set.Iic a) : LimitPt x (.Iic a) := a:ℝx:ℝhx:x ∈ Set.Iic a⊢ LimitPt x (Set.Iic a) All goals completed! 🐙theorem declaration uses `sorry`mem_Iio_isLimit {a x:ℝ} (hx: x ∈ Set.Iio a) : LimitPt x (.Iio a) := a:ℝx:ℝhx:x ∈ Set.Iio a⊢ LimitPt x (Set.Iio a) All goals completed! 🐙theorem declaration uses `sorry`mem_R_isLimit {x:ℝ} : LimitPt x (.univ) := x:ℝ⊢ LimitPt x Set.univ All goals completed! 🐙

Definition 9.1.22. We use here Mathlib's Bornology.­IsBounded

theorem isBounded_def (X: Set ℝ) : Bornology.IsBounded X ↔ ∃ M > 0, X ⊆ .Icc (-M) M := X:Set ℝ⊢ Bornology.IsBounded X ↔ ∃ M > 0, X ⊆ Set.Icc (-M) M X:Set ℝ⊢ (∃ C, ∀ x ∈ X, |x| ≤ C) ↔ ∃ M, 0 < M ∧ X ⊆ Set.Icc (-M) M X:Set ℝ⊢ (∃ C, ∀ x ∈ X, |x| ≤ C) → ∃ M, 0 < M ∧ X ⊆ Set.Icc (-M) MX:Set ℝ⊢ (∃ M, 0 < M ∧ X ⊆ Set.Icc (-M) M) → ∃ C, ∀ x ∈ X, |x| ≤ C X:Set ℝ⊢ (∃ C, ∀ x ∈ X, |x| ≤ C) → ∃ M, 0 < M ∧ X ⊆ Set.Icc (-M) M X:Set ℝC:ℝhC:∀ x ∈ X, |x| ≤ C⊢ ∃ M, 0 < M ∧ X ⊆ Set.Icc (-M) M; X:Set ℝC:ℝhC:∀ x ∈ X, |x| ≤ C⊢ 0 < max C 1 ∧ X ⊆ Set.Icc (-max C 1) (max C 1) refine ⟨ lt_of_lt_of_le (X:Set ℝC:ℝhC:∀ x ∈ X, |x| ≤ C⊢ 0 < 1 All goals completed! 🐙) (le_max_right _ _), ?_ ⟩ X:Set ℝC:ℝhC✝:∀ x ∈ X, |x| ≤ Cx:ℝhx:x ∈ XhC:|x| ≤ C⊢ x ∈ Set.Icc (-max C 1) (max C 1); X:Set ℝC:ℝhC✝:∀ x ∈ X, |x| ≤ Cx:ℝhx:x ∈ XhC:x ≤ C ∧ -x ≤ C⊢ x ∈ Set.Icc (-max C 1) (max C 1); X:Set ℝC:ℝhC✝:∀ x ∈ X, |x| ≤ Cx:ℝhx:x ∈ XhC:x ≤ C ∧ -x ≤ C⊢ -max C 1 ≤ x; All goals completed! 🐙 X:Set ℝM:ℝhM:0 < MhXM:X ⊆ Set.Icc (-M) M⊢ ∃ C, ∀ x ∈ X, |x| ≤ C; X:Set ℝM:ℝhM:0 < MhXM:X ⊆ Set.Icc (-M) M⊢ ∀ x ∈ X, |x| ≤ M; intro x X:Set ℝM:ℝhM:0 < MhXM:X ⊆ Set.Icc (-M) Mx:ℝhx:x ∈ X⊢ |x| ≤ M; X:Set ℝM:ℝhM:0 < Mx:ℝhx:x ∈ XhXM:x ∈ Set.Icc (-M) M⊢ |x| ≤ M; X:Set ℝM:ℝhM:0 < Mx:ℝhx:x ∈ XhXM:-M ≤ x ∧ x ≤ M⊢ -x ≤ M; All goals completed! 🐙

Example 9.1.23 (Icc)

theorem declaration uses `sorry`Icc_bounded (a b:ℝ) : Bornology.IsBounded (.Icc a b) := a:ℝb:ℝ⊢ Bornology.IsBounded (Set.Icc a b) All goals completed! 🐙

Example 9.1.23 (Ici)

theorem declaration uses `sorry`Ici_unbounded (a: ℝ) : ¬ Bornology.IsBounded (.Ici a) := a:ℝ⊢ ¬Bornology.IsBounded (Set.Ici a) All goals completed! 🐙

Example 9.1.23 (N)

theorem declaration uses `sorry`N_unbounded : ¬ Bornology.IsBounded ((fun n:ℕ ↦ (n:ℝ)) '' .univ) := ⊢ ¬Bornology.IsBounded ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Example 9.1.23 (Z)

theorem declaration uses `sorry`Z_unbounded : ¬ Bornology.IsBounded ((fun n:ℤ ↦ (n:ℝ)) '' .univ) := ⊢ ¬Bornology.IsBounded ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Example 9.1.23 (Q)

theorem declaration uses `sorry`Q_unbounded : ¬ Bornology.IsBounded ((fun n:ℚ ↦ (n:ℝ)) '' .univ) := ⊢ ¬Bornology.IsBounded ((fun n ↦ ↑n) '' Set.univ) All goals completed! 🐙

Example 9.1.23 (R)

theorem declaration uses `sorry`R_unbounded : ¬ Bornology.IsBounded (.univ: Set ℝ) := ⊢ ¬Bornology.IsBounded Set.univ All goals completed! 🐙

Theorem 9.1.24 / Exercise 9.1.13 (Heine-Borel theorem for the line).

theorem declaration uses `sorry`Heine_Borel (X: Set ℝ) : IsClosed X ∧ Bornology.IsBounded X ↔ ∀ a : ℕ → ℝ, (∀ n, a n ∈ X) → (∃ n : ℕ → ℕ, StrictMono n ∧ ∃ L ∈ X, Filter.atTop.Tendsto (fun j ↦ a (n j)) (nhds L)) := X:Set ℝ⊢ IsClosed X ∧ Bornology.IsBounded X ↔ ∀ (a : ℕ → ℝ), (∀ (n : ℕ), a n ∈ X) → ∃ n, StrictMono n ∧ ∃ L ∈ X, Filter.Tendsto (fun j ↦ a (n j)) Filter.atTop (nhds L) All goals completed! 🐙
/-- Exercise 9.1.3 -/ declaration uses `sorry`example : ∃ (X Y:Set ℝ), closure (X ∩ Y) ≠ closure X ∩ closure Y := I:Type u_1⊢ ∃ X Y, closure (X ∩ Y) ≠ closure X ∩ closure Y All goals completed! 🐙/-- Exercise 9.1.5 -/ declaration uses `sorry`example (X:Set ℝ) : IsClosed (closure X) := I:Type u_1X:Set ℝ⊢ IsClosed (closure X) All goals completed! 🐙/-- Exercise 9.1.6 -/ declaration uses `sorry`example {X Y:Set ℝ} (hY: IsClosed Y) (hXY: X ⊆ Y) : closure X ⊆ Y := I:Type u_1X:Set ℝY:Set ℝhY:IsClosed YhXY:X ⊆ Y⊢ closure X ⊆ Y All goals completed! 🐙/-- Exercise 9.1.7 -/ declaration uses `sorry`example {n:ℕ} (X: Fin n → Set ℝ) (hX: ∀ i, IsClosed (X i)) : IsClosed (⋃ i, X i) := I:Type u_1n:ℕX:Fin n → Set ℝhX:∀ (i : Fin n), IsClosed (X i)⊢ IsClosed (⋃ i, X i) All goals completed! 🐙/-- Exercise 9.1.8 -/ declaration uses `sorry`example {I:Type} (X: I → Set ℝ) (hX: ∀ i, IsClosed (X i)) : IsClosed (⋂ i, X i) := I✝:Type u_1I:TypeX:I → Set ℝhX:∀ (i : I), IsClosed (X i)⊢ IsClosed (⋂ i, X i) All goals completed! 🐙/-- Exercise 9.1.9 (i) -/ declaration uses `sorry`example {X:Set ℝ} {x:ℝ} (hx: AdherentPt x X) : LimitPt x X ∨ IsolatedPt x X := I:Type u_1X:Set ℝx:ℝhx:AdherentPt x X⊢ LimitPt x X ∨ IsolatedPt x X All goals completed! 🐙/-- Exercise 9.1.9 (ii) -/ declaration uses `sorry`example {X:Set ℝ} {x:ℝ} : ¬ (LimitPt x X ∧ IsolatedPt x X) := I:Type u_1X:Set ℝx:ℝ⊢ ¬(LimitPt x X ∧ IsolatedPt x X) All goals completed! 🐙/-- Exercise 9.1.10 -/ declaration uses `sorry`example {X:Set ℝ} (hX: X ≠ ∅) : Bornology.IsBounded X ↔ sSup ((fun x:ℝ ↦ (x:EReal)) '' X) < ⊤ ∧ sInf ((fun x:ℝ ↦ (x:EReal)) '' X) > ⊥ := I:Type u_1X:Set ℝhX:X ≠ ∅⊢ Bornology.IsBounded X ↔ sSup ((fun x ↦ ↑x) '' X) < ⊤ ∧ sInf ((fun x ↦ ↑x) '' X) > ⊥ All goals completed! 🐙/-- Exercise 9.1.11 -/ declaration uses `sorry`example {X:Set ℝ} (hX: Bornology.IsBounded X) : Bornology.IsBounded (closure X) := I:Type u_1X:Set ℝhX:Bornology.IsBounded X⊢ Bornology.IsBounded (closure X) All goals completed! 🐙/-- Exercise 9.1.12. As a followup: prove or disprove this exercise with {lean}`[Fintype I]` removed. -/ declaration uses `sorry`example {I:Type} [Fintype I] (X: I → Set ℝ) (hX: ∀ i, Bornology.IsBounded (X i)) : Bornology.IsBounded (⋃ i, X i) := I✝:Type u_1I:Typeinst✝:Fintype IX:I → Set ℝhX:∀ (i : I), Bornology.IsBounded (X i)⊢ Bornology.IsBounded (⋃ i, X i) All goals completed! 🐙/-- Exercise 9.1.14 -/ declaration uses `sorry`example (I: Finset ℝ) : IsClosed (I:Set ℝ) ∧ Bornology.IsBounded (I:Set ℝ) := I✝:Type u_1I:Finset ℝ⊢ IsClosed ↑I ∧ Bornology.IsBounded ↑I All goals completed! 🐙/-- Exercise 9.1.15 -/ declaration uses `sorry`example {E:Set ℝ} (hE: Bornology.IsBounded E) (hnon: E.Nonempty): AdherentPt (sSup E) E ∧ AdherentPt (sSup E) Eᶜ := I:Type u_1E:Set ℝhE:Bornology.IsBounded Ehnon:E.Nonempty⊢ AdherentPt (sSup E) E ∧ AdherentPt (sSup E) Eᶜ All goals completed! 🐙end Chapter9