Analysis I, Section 9.9: Uniform continuity

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:

  • API for Mathlib's UniformContinuousOn.{ua, ub} {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] (f : α β) (s : Set α) : PropUniformContinuousOn.

  • Continuous functions on compact intervals are uniformly continuous.

open Chapter6 Filternamespace Chapter9declaration uses `sorry`example : ContinuousOn (fun x: 1/x) (.Icc 0 2) := ContinuousOn (fun x => 1 / x) (Set.Icc 0 2) All goals completed! 🐙declaration uses `sorry`example : ¬ BddOn (fun x: 1/x) (.Icc 0 2) := ¬BddOn (fun x => 1 / x) (Set.Icc 0 2) All goals completed! 🐙

Example 9.9.1

declaration uses `sorry`example (x : ) : let f : := fun x 1/x let ε : := 0.1 let x₀ : := 1 let δ : := 1/11 |x-x₀| δ |f x - f x₀| ε := x:let f := fun x => 1 / x; let ε := 0.1; let x₀ := 1; let δ := 1 / 11; |x - x₀| δ |f x - f x₀| ε x:f: := fun x => 1 / xε: := 0.1x₀: := 1δ: := 1 / 11|x - x₀| δ |f x - f x₀| ε All goals completed! 🐙
declaration uses `sorry`example (x:) : let f : := fun x 1/x let ε : := 0.1 let x₀ : := 0.1 let δ : := 1/1010 |x-x₀| δ |f x - f x₀| ε := x:let f := fun x => 1 / x; let ε := 0.1; let x₀ := 0.1; let δ := 1 / 1010; |x - x₀| δ |f x - f x₀| ε x:f: := fun x => 1 / xε: := 0.1x₀: := 0.1δ: := 1 / 1010|x - x₀| δ |f x - f x₀| ε -- need the `-merge` flag due to the collision of `ε` and `x₀` All goals completed! 🐙declaration uses `sorry`example (x:) : let g : := fun x 2*x let ε : := 0.1 let x₀ : := 1 let δ : := 0.05 |x-x₀| δ |g x - g x₀| ε := x:let g := fun x => 2 * x; let ε := 0.1; let x₀ := 1; let δ := 5e-2; |x - x₀| δ |g x - g x₀| ε x:g: := fun x => 2 * xε: := 0.1x₀: := 1δ: := 5e-2|x - x₀| δ |g x - g x₀| ε All goals completed! 🐙declaration uses `sorry`example (x₀ x : ) : let g : := fun x 2*x let ε : := 0.1 let δ : := 0.05 |x-x₀| δ |g x - g x₀| ε := x₀:x:let g := fun x => 2 * x; let ε := 0.1; let δ := 5e-2; |x - x₀| δ |g x - g x₀| ε x₀:x:g: := fun x => 2 * xε: := 0.1δ: := 5e-2|x - x₀| δ |g x - g x₀| ε All goals completed! 🐙

Definition 9.9.2. Here we use the Mathlib term UniformContinuousOn.{ua, ub} {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] (f : α β) (s : Set α) : PropUniformContinuousOn

theorem UniformContinuousOn.iff (f: ) (X:Set ) : UniformContinuousOn f X ε > (0:), δ > (0:), x₀ X, x X, δ.Close x x₀ ε.Close (f x) (f x₀) := f: X:Set UniformContinuousOn f X ε > 0, δ > 0, x₀ X, x X, δ.Close x x₀ ε.Close (f x) (f x₀) simp_rw f: X:Set UniformContinuousOn f X ε > 0, δ > 0, x₀ X, x X, δ.Close x x₀ ε.Close (f x) (f x₀)Metric.uniformContinuousOn_iff_le, Real.Close] All goals completed! 🐙
theorem declaration uses `sorry`ContinuousOn.ofUniformContinuousOn {X:Set } (f: ) (hf: UniformContinuousOn f X) : ContinuousOn f X := X:Set f: hf:UniformContinuousOn f XContinuousOn f X All goals completed! 🐙declaration uses `sorry`example : ¬ UniformContinuousOn (fun x: 1/x) (Set.Icc 0 2) := ¬UniformContinuousOn (fun x => 1 / x) (Set.Icc 0 2) All goals completed! 🐙end Chapter9

Definition 9.9.5. This is similar but not identical to Unknown constant `Real.close_seq`Real.close_seq from Section 6.1.

abbrev Real.CloseSeqs (ε:) (a b: Chapter6.Sequence) : Prop := (a.m = b.m) n a.m, ε.Close (a n) (b n)
abbrev Real.EventuallyCloseSeqs (ε:) (a b: Chapter6.Sequence) : Prop := N a.m, ε.CloseSeqs (a.from N) (b.from N)abbrev Chapter6.Sequence.equiv (a b: Sequence) : Prop := ε > (0:), ε.EventuallyCloseSeqs a b

Remark 9.9.6

theorem declaration uses `sorry`Chapter6.Sequence.equiv_iff_rat (a b: Sequence) : a.equiv b ε > (0:), (ε:).EventuallyCloseSeqs a b := a:Sequenceb:Sequencea.equiv b ε > 0, (↑ε).EventuallyCloseSeqs a b All goals completed! 🐙

Lemma 9.9.7 / Exercise 9.9.1

theorem declaration uses `sorry`Chapter6.Sequence.equiv_iff (a b: Sequence) : a.equiv b atTop.Tendsto (fun n a n - b n) (nhds 0) := a:Sequenceb:Sequencea.equiv b Tendsto (fun n => a.seq n - b.seq n) atTop (nhds 0) All goals completed! 🐙
namespace Chapter9

Proposition 9.9.8 / Exercise 9.9.2

theorem declaration uses `sorry`UniformContinuousOn.iff_preserves_equiv {X:Set } (f: ) : UniformContinuousOn f X x y: , ( n, x n X) ( n, y n X) (x:Sequence).equiv (y:Sequence) (f x:Sequence).equiv (f y:Sequence) := X:Set f: UniformContinuousOn f X (x y : ), (∀ (n : ), x n X) (∀ (n : ), y n X) (↑x).equiv y (↑(f x)).equiv (f y) All goals completed! 🐙

Remark 9.9.9

theorem declaration uses `sorry`Chapter6.Sequence.equiv_const (x₀: ) (x: ) : atTop.Tendsto x (nhds x₀) (x:Sequence).equiv (fun n: x₀:Sequence) := x₀:x: Tendsto x atTop (nhds x₀) (↑x).equiv fun n => x₀ All goals completed! 🐙

Example 9.9.10

noncomputable abbrev f_9_9_10 : := fun x 1/x
declaration uses `sorry`example : (fun n: 1/(n+1:):Sequence).equiv (fun n: 1/(2*(n+1):):Sequence) := (↑fun n => 1 / (n + 1)).equiv fun n => 1 / (2 * (n + 1)) All goals completed! 🐙declaration uses `sorry`example (n:) : 1/(n+1:) Set.Ioo 0 2 := n:1 / (n + 1) Set.Ioo 0 2 All goals completed! 🐙declaration uses `sorry`example (n:) : 1/(2*(n+1):) Set.Ioo 0 2 := n:1 / (2 * (n + 1)) Set.Ioo 0 2 All goals completed! 🐙declaration uses `sorry`example : ¬ (fun n: f_9_9_10 (1/(n+1:)):Sequence).equiv (fun n: f_9_9_10 (1/(2*(n+1):)):Sequence) := ¬(↑fun n => f_9_9_10 (1 / (n + 1))).equiv fun n => f_9_9_10 (1 / (2 * (n + 1))) All goals completed! 🐙declaration uses `sorry`example : ¬ UniformContinuousOn f_9_9_10 (.Ioo 0 2) := ¬UniformContinuousOn f_9_9_10 (Set.Ioo 0 2) All goals completed! 🐙

Example 9.9.11

abbrev f_9_9_11 : := fun x x^2
declaration uses `sorry`example : ((fun n: (n+1:)):Sequence).equiv ((fun n: (n+1)+1/(n+1:)):Sequence) := (↑fun n => n + 1).equiv fun n => n + 1 + 1 / (n + 1) All goals completed! 🐙declaration uses `sorry`example : ¬ ((fun n: f_9_9_11 (n+1:)):Sequence).equiv ((fun n: f_9_9_11 ((n+1)+1/(n+1:))):Sequence) := ¬(↑fun n => f_9_9_11 (n + 1)).equiv fun n => f_9_9_11 (n + 1 + 1 / (n + 1)) All goals completed! 🐙declaration uses `sorry`example : ¬ UniformContinuousOn f_9_9_11 .univ := ¬UniformContinuousOn f_9_9_11 Set.univ All goals completed! 🐙

Proposition 9.9.12 / Exercise 9.9.3

theorem declaration uses `sorry`UniformContinuousOn.ofCauchy {X:Set } (f: ) (hf: UniformContinuousOn f X) {x: } (hx: (x:Sequence).IsCauchy) (hmem : n, x n X) : (f x:Sequence).IsCauchy := X:Set f: hf:UniformContinuousOn f Xx: hx:(↑x).IsCauchyhmem: (n : ), x n X(↑(f x)).IsCauchy All goals completed! 🐙

Example 9.9.13

declaration uses `sorry`example : ((fun n: 1/(n+1:)):Sequence).IsCauchy := (↑fun n => 1 / (n + 1)).IsCauchy All goals completed! 🐙
declaration uses `sorry`example (n:) : 1/(n+1:) Set.Ioo 0 2 := n:1 / (n + 1) Set.Ioo 0 2 All goals completed! 🐙declaration uses `sorry`example : ¬ ((fun n: f_9_9_10 (1/(n+1:))):Sequence).IsCauchy := ¬(↑fun n => f_9_9_10 (1 / (n + 1))).IsCauchy All goals completed! 🐙declaration uses `sorry`example : ¬ UniformContinuousOn f_9_9_10 (Set.Ioo 0 2) := ¬UniformContinuousOn f_9_9_10 (Set.Ioo 0 2) All goals completed! 🐙

Corollary 9.9.14 / Exercise 9.9.4

theorem declaration uses `sorry`UniformContinuousOn.limit_at_adherent {X:Set } (f: ) (hf: UniformContinuousOn f X) {x₀:} (hx₀: AdherentPt x₀ X) : L:, (nhdsWithin x₀ X).Tendsto f (nhds L) := X:Set f: hf:UniformContinuousOn f Xx₀:hx₀:AdherentPt x₀ X L, Tendsto f (nhdsWithin x₀ X) (nhds L) All goals completed! 🐙

Proposition 9.9.15 / Exercise 9.9.5

theorem declaration uses `sorry`UniformContinuousOn.of_bounded {E X:Set } {f: } (hf: UniformContinuousOn f X) (hEX: E X) (hE: Bornology.IsBounded E) : Bornology.IsBounded (f '' E) := E:Set X:Set f: hf:UniformContinuousOn f XhEX:E XhE:Bornology.IsBounded EBornology.IsBounded (f '' E) All goals completed! 🐙

Theorem 9.9.16

theorem declaration uses `sorry`UniformContinuousOn.of_continuousOn {a b:} {f: } (hcont: ContinuousOn f (.Icc a b)) : UniformContinuousOn f (.Icc a b) := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) -- This proof is written to follow the structure of the original text. a:b:f: hcont:ContinuousOn f (Set.Icc a b)h:¬UniformContinuousOn f (Set.Icc a b)False; a:b:f: hcont:ContinuousOn f (Set.Icc a b)h:¬ (x y : ), (∀ (n : ), x n Set.Icc a b) (∀ (n : ), y n Set.Icc a b) (↑x).equiv y (↑(f x)).equiv (f y)False a:b:f: hcont:ContinuousOn f (Set.Icc a b)h: x, (∀ (n : ), x n Set.Icc a b) x_1, (∀ (n : ), x_1 n Set.Icc a b) (↑x).equiv x_1 x_2, 0 < x_2 (x_3 : ), 0 x_3 x_4, 0 x_4 x_3 x_4 x_2 < dist (if 0 x_4 x_3 x_4 then if 0 x_4 then f (x x_4.toNat) else 0 else 0) (if 0 x_4 x_3 x_4 then if 0 x_4 then f (x_1 x_4.toNat) else 0 else 0)False a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)False a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}False have hE : Infinite E := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}¬Finite E a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}this:Finite EFalse replace : ε.EventuallyCloseSeqs (fun n f (x n):Sequence) (fun n f (y n):Sequence) := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) All goals completed! 🐙 All goals completed! 🐙 a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:Infinite E := Eq.mpr (id (congrArg (fun _a => _a) (Eq.symm (propext not_finite_iff_infinite)))) (id fun h => have this := sorry; sorry)this:Countable EFalse a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:Infinite E := Eq.mpr (id (congrArg (fun _a => _a) (Eq.symm (propext not_finite_iff_infinite)))) (id fun h => have this := sorry; sorry)this:Countable En: := Nat.nth EFalse a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth EFalse have hmono : StrictMono n := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) All goals completed! 🐙 a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jFalse have hsep (j:) : |f (x (n j)) - f (y (n j))| > ε := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEj:hmem:n j E|f (x (n j)) - f (y (n j))| > ε All goals completed! 🐙 a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bFalse a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bFalse a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)False a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)False a:b:f: hcont:ContinuousOn f (Set.Icc a b)x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)False a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) L := ContinuousOn.continuousWithinAt _fvar.18899 hLFalse a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:(↑x).equiv yε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono n := Nat.nth_strictMono hEhmem: (j : ), n j E := fun j => Nat.nth_mem_of_infinite hE jhsep: (j : ), |f (x (n j)) - f (y (n j))| > ε := fun j => Eq.mpr (id gt_iff_lt._simp_1) (Eq.mp (congrFun' (congrArg Membership.mem (congrArg setOf (funext fun n => not_le._simp_1))) (n j)) (hmem j))hxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) L := ContinuousOn.continuousWithinAt _fvar.18899 hLhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L)) := Tendsto.comp_of_continuous hL hcont (fun k => hxmem (j k)) hconvFalse a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:Tendsto (fun n => (↑x).seq n - (↑y).seq n) atTop (nhds 0)ε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))False replace hequiv : atTop.Tendsto (fun k x (n (j k)) - y (n (j k))) (nhds 0) := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:Tendsto (fun n => (↑x).seq n - (↑y).seq n) atTop (nhds 0)ε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hj':Tendsto j atTop atTopTendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:Tendsto (fun n => (↑x).seq n - (↑y).seq n) atTop (nhds 0)ε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hj':Tendsto j atTop atTophn':Tendsto n atTop atTopTendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bhequiv:Tendsto (fun n => (↑x).seq n - (↑y).seq n) atTop (nhds 0)ε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hj':Tendsto j atTop atTophn':Tendsto n atTop atTophcoe:Tendsto Nat.cast atTop atTopTendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) All goals completed! 🐙 have hyconv : atTop.Tendsto (fun k y (n (j k))) (nhds L) := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hequiv:Tendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) := Tendsto.comp _fvar.298052 (Tendsto.comp tendsto_natCast_atTop_atTop (Tendsto.comp (StrictMono.tendsto_atTop hmono) (StrictMono.tendsto_atTop hj)))k:y (n (j k)) = x (n (j k)) - (x (n (j k)) - y (n (j k)))a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hequiv:Tendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) := Tendsto.comp _fvar.298052 (Tendsto.comp tendsto_natCast_atTop_atTop (Tendsto.comp (StrictMono.tendsto_atTop hmono) (StrictMono.tendsto_atTop hj)))L = L - 0 a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hequiv:Tendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) := Tendsto.comp _fvar.298052 (Tendsto.comp tendsto_natCast_atTop_atTop (Tendsto.comp (StrictMono.tendsto_atTop hmono) (StrictMono.tendsto_atTop hj)))k:y (n (j k)) = x (n (j k)) - (x (n (j k)) - y (n (j k))) All goals completed! 🐙 All goals completed! 🐙 a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hequiv:Tendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) := Tendsto.comp _fvar.298052 (Tendsto.comp tendsto_natCast_atTop_atTop (Tendsto.comp (StrictMono.tendsto_atTop hmono) (StrictMono.tendsto_atTop hj)))hyconv:Tendsto (fun n_1 => f (y (n (j n_1)))) atTop (nhds (f L)) := Tendsto.comp_of_continuous hL hcont (fun k => hymem (j k)) _fvar.377835False have : atTop.Tendsto (fun k f (x (n (j k))) - f (y (n (j k)))) (nhds 0) := a:b:f: hcont:ContinuousOn f (Set.Icc a b)UniformContinuousOn f (Set.Icc a b) a:b:f: x: hx: (n : ), x n Set.Icc a by: hy: (n : ), y n Set.Icc a bε::0 < εh: (x_1 : ), 0 x_1 x_2, 0 x_2 x_1 x_2 ε < dist (if 0 x_2 x_1 x_2 then if 0 x_2 then f (x x_2.toNat) else 0 else 0) (if 0 x_2 x_1 x_2 then if 0 x_2 then f (y x_2.toNat) else 0 else 0)E:Set := {n | ¬ε.Close (f (x n)) (f (y n))}hE:E.Infinitethis:Countable En: := Nat.nth Ehmono:StrictMono nhmem: (j : ), n j Ehsep: (j : ), |f (x (n j)) - f (y (n j))| > εhxmem: (j : ), x (n j) Set.Icc a bhymem: (j : ), y (n j) Set.Icc a bhclosed:IsClosed (Set.Icc a b)hbounded:Bornology.IsBounded (Set.Icc a b)j: hj:StrictMono jL:hL:L Set.Icc a bhconv:Tendsto (fun j_1 => x (n (j j_1))) atTop (nhds L)hcont:ContinuousWithinAt f (Set.Icc a b) Lhconv':Tendsto (fun n_1 => f (x (n (j n_1)))) atTop (nhds (f L))hequiv:Tendsto (fun k => x (n (j k)) - y (n (j k))) atTop (nhds 0) := Tendsto.comp _fvar.298052 (Tendsto.comp tendsto_natCast_atTop_atTop (Tendsto.comp (StrictMono.tendsto_atTop hmono) (StrictMono.tendsto_atTop hj)))hyconv:Tendsto (fun n_1 => f (y (n (j n_1)))) atTop (nhds (f L)) := Tendsto.comp_of_continuous hL hcont (fun k => hymem (j k)) _fvar.3778350 = f L - f L; All goals completed! 🐙 All goals completed! 🐙

Exercise 9.9.6

theorem declaration uses `sorry`UniformContinuousOn.comp {X Y: Set } {f g: } (hf: UniformContinuousOn f X) (hg: UniformContinuousOn g Y) (hrange: f '' X Y) : UniformContinuousOn (g f) X := X:Set Y:Set f: g: hf:UniformContinuousOn f Xhg:UniformContinuousOn g Yhrange:f '' X YUniformContinuousOn (g f) X All goals completed! 🐙
end Chapter9