Аналіз I, Глава 9.4
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:
-
Continuity of functions
namespace Chapter9
Визначення 9.4.1. Here we use the Mathlib definition of continuity. The hypothesis x ∈ X
is not needed!
theorem ContinuousWithinAt.iff (X:Set ℝ) (f: ℝ → ℝ) (x₀:ℝ) :
ContinuousWithinAt f X x₀ ↔ Convergesto X f (f x₀) x₀ := X:Set ℝf:ℝ → ℝx₀:ℝ⊢ ContinuousWithinAt f X x₀ ↔ Convergesto X f (f x₀) x₀
All goals completed! 🐙
#check ContinuousOn.eq_1
ContinuousOn.eq_1.{u_1, u_2} {X : Type u_1} {Y : Type u_2} [TopologicalSpace X] [TopologicalSpace Y] (f : X → Y) (s : Set X) : ContinuousOn f s = ∀ x ∈ s, ContinuousWithinAt f s x
#check continuous_iff_continuousOn_univ
continuous_iff_continuousOn_univ.{u_1, u_2} {α : Type u_1} {β : Type u_2} [TopologicalSpace α] [TopologicalSpace β] {f : α → β} : Continuous f ↔ ContinuousOn f Set.univ
#check continuousWithinAt_univ
continuousWithinAt_univ.{u_1, u_2} {α : Type u_1} {β : Type u_2} [TopologicalSpace α] [TopologicalSpace β] (f : α → β) (x : α) : ContinuousWithinAt f Set.univ x ↔ ContinuousAt f x
Приклад 9.4.2 -
example (c x₀:ℝ) : ContinuousWithinAt (fun x ↦ c) Set.univ x₀ := c:ℝx₀:ℝ⊢ ContinuousWithinAt (fun x => c) Set.univ x₀ All goals completed! 🐙
example (c x₀:ℝ) : ContinuousAt (fun x ↦ c) x₀ := c:ℝx₀:ℝ⊢ ContinuousAt (fun x => c) x₀ All goals completed! 🐙
example (c:ℝ) : ContinuousOn (fun x:ℝ ↦ c) Set.univ := c:ℝ⊢ ContinuousOn (fun x => c) Set.univ All goals completed! 🐙
example (c:ℝ) : Continuous (fun x:ℝ ↦ c) := c:ℝ⊢ Continuous fun x => c All goals completed! 🐙
Приклад 9.4.3 -
example : Continuous (fun x:ℝ ↦ x) := ⊢ Continuous fun x => x All goals completed! 🐙
Приклад 9.4.4 -
example {x₀:ℝ} (h: x₀ ≠ 0) : ContinuousAt Real.sign x₀ := x₀:ℝh:x₀ ≠ 0⊢ ContinuousAt Real.sign x₀ All goals completed! 🐙
example :¬ ContinuousAt Real.sign 0 := ⊢ ¬ContinuousAt Real.sign 0 All goals completed! 🐙
Приклад 9.4.5 -
example (x₀:ℝ) : ¬ ContinuousAt f_9_3_21 x₀ := x₀:ℝ⊢ ¬ContinuousAt f_9_3_21 x₀ All goals completed! 🐙
example {x₀:ℝ} (h: x₀ ≠ 0) : ContinuousAt f_9_4_6 x₀ := x₀:ℝh:x₀ ≠ 0⊢ ContinuousAt f_9_4_6 x₀ All goals completed! 🐙
example : ¬ ContinuousAt f_9_4_6 0 := ⊢ ¬ContinuousAt f_9_4_6 0 All goals completed! 🐙
example : ContinuousWithinAt f_9_4_6 (Set.Ici 0) 0 := ⊢ ContinuousWithinAt f_9_4_6 (Set.Ici 0) 0 All goals completed! 🐙
Твердження 9.4.7 / Вправа 9.4.1. It is possible that the hypothesis x₀ ∈ X
is unnecessary.
theorem ContinuousWithinAt.tfae (X:Set ℝ) (f: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X) :
[
ContinuousWithinAt f X x₀,
∀ a:ℕ → ℝ, (∀ n, a n ∈ X) → Filter.Tendsto a Filter.atTop (nhds x₀) → Filter.Tendsto (fun n ↦ f (a n)) Filter.atTop (nhds (f x₀)),
∀ ε > 0, ∃ δ > 0, ∀ x ∈ X, |x-x₀| < δ → |f x - f x₀| < ε
].TFAE := X:Set ℝf:ℝ → ℝx₀:ℝh:x₀ ∈ X⊢ [ContinuousWithinAt f X x₀,
∀ (a : ℕ → ℝ),
(∀ (n : ℕ), a n ∈ X) →
Filter.Tendsto a Filter.atTop (nhds x₀) → Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀)),
∀ ε > 0, ∃ δ > 0, ∀ x ∈ X, |x - x₀| < δ → |f x - f x₀| < ε].TFAE
All goals completed! 🐙
Ремарка 9.4.8 -
theorem Filter.Tendsto.comp_of_continuous {X:Set ℝ} {f: ℝ → ℝ} {x₀:ℝ} (h : x₀ ∈ X)
(h_cont: ContinuousWithinAt f X x₀) {a: ℕ → ℝ} (ha: ∀ n, a n ∈ X)
(hconv: Filter.Tendsto a Filter.atTop (nhds x₀)):
Filter.Tendsto (fun n ↦ f (a n)) Filter.atTop (nhds (f x₀)) := X:Set ℝf:ℝ → ℝx₀:ℝh:x₀ ∈ Xh_cont:ContinuousWithinAt f X x₀a:ℕ → ℝha:∀ (n : ℕ), a n ∈ Xhconv:Filter.Tendsto a Filter.atTop (nhds x₀)⊢ Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))
X:Set ℝf:ℝ → ℝx₀:ℝh:x₀ ∈ Xh_cont:ContinuousWithinAt f X x₀a:ℕ → ℝha:∀ (n : ℕ), a n ∈ Xhconv:Filter.Tendsto a Filter.atTop (nhds x₀)this:ContinuousWithinAt f X x₀ ↔
∀ (a : ℕ → ℝ),
(∀ (n : ℕ), a n ∈ X) →
Filter.Tendsto a Filter.atTop (nhds x₀) → Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))⊢ Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))
X:Set ℝf:ℝ → ℝx₀:ℝh:x₀ ∈ Xh_cont:∀ (a : ℕ → ℝ),
(∀ (n : ℕ), a n ∈ X) →
Filter.Tendsto a Filter.atTop (nhds x₀) → Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))a:ℕ → ℝha:∀ (n : ℕ), a n ∈ Xhconv:Filter.Tendsto a Filter.atTop (nhds x₀)this:ContinuousWithinAt f X x₀ ↔
∀ (a : ℕ → ℝ),
(∀ (n : ℕ), a n ∈ X) →
Filter.Tendsto a Filter.atTop (nhds x₀) → Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))⊢ Filter.Tendsto (fun n => f (a n)) Filter.atTop (nhds (f x₀))
All goals completed! 🐙
/- Proposition 9.4.9 -/
theorem ContinuousWithinAt.add {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (f + g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f + g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f + g) ((f + g) x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f + g) ((f + g) x₀) x₀
All goals completed! 🐙
theorem ContinuousWithinAt.sub {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (f - g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f - g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f - g) ((f - g) x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f - g) ((f - g) x₀) x₀
All goals completed! 🐙
theorem ContinuousWithinAt.max {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (max f g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f ⊔ g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f ⊔ g) (Max.max f g x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f ⊔ g) (Max.max f g x₀) x₀
All goals completed! 🐙
theorem ContinuousWithinAt.min {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (min f g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f ⊓ g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f ⊓ g) (Min.min f g x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f ⊓ g) (Min.min f g x₀) x₀
All goals completed! 🐙
theorem ContinuousWithinAt.mul' {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (f * g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f * g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f * g) ((f * g) x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ Xhf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f * g) ((f * g) x₀) x₀
All goals completed! 🐙
theorem ContinuousWithinAt.div' {X:Set ℝ} (f g: ℝ → ℝ) {x₀:ℝ} (h : x₀ ∈ X) (hM: g x₀ ≠ 0)
(hf: ContinuousWithinAt f X x₀) (hg: ContinuousWithinAt g X x₀) :
ContinuousWithinAt (f / g) X x₀ := X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ XhM:g x₀ ≠ 0hf:ContinuousWithinAt f X x₀hg:ContinuousWithinAt g X x₀⊢ ContinuousWithinAt (f / g) X x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ XhM:g x₀ ≠ 0hf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀⊢ Convergesto X (f / g) ((f / g) x₀) x₀
X:Set ℝf:ℝ → ℝg:ℝ → ℝx₀:ℝh:x₀ ∈ XhM:g x₀ ≠ 0hf:Convergesto X f (f x₀) x₀hg:Convergesto X g (g x₀) x₀had:AdherentPt x₀ X⊢ Convergesto X (f / g) ((f / g) x₀) x₀
All goals completed! 🐙
Твердження 9.4.10 / Вправа 9.4.3
theorem Continuous.exp {a:ℝ} (ha: a>0) : Continuous (fun x:ℝ ↦ a ^ x) := a:ℝha:a > 0⊢ Continuous fun x => a ^ x
All goals completed! 🐙
Твердження 9.4.11 / Вправа 9.4.4
theorem Continuous.exp' (p:ℝ) : ContinuousOn (fun x:ℝ ↦ x ^ p) (Set.Ioi 0) := p:ℝ⊢ ContinuousOn (fun x => x ^ p) (Set.Ioi 0)
All goals completed! 🐙
Твердження 9.4.12
theorem Continuous.abs : Continuous (fun x:ℝ ↦ |x|) := ⊢ Continuous fun x => |x|
All goals completed! 🐙 -- TODO
Твердження 9.4.13 / Вправа 9.4.5
theorem ContinuousWithinAt.comp {X Y: Set ℝ} {f g:ℝ → ℝ} (hf: ∀ x ∈ X, f x ∈ Y) {x₀:ℝ} (hx₀: x ∈ X) (hf_cont: ContinuousWithinAt f X x₀) (hg_cont: ContinuousWithinAt g Y (f x₀)): ContinuousWithinAt (g ∘ f) X x₀ := x:ℝX:Set ℝY:Set ℝf:ℝ → ℝg:ℝ → ℝhf:∀ x ∈ X, f x ∈ Yx₀:ℝhx₀:x ∈ Xhf_cont:ContinuousWithinAt f X x₀hg_cont:ContinuousWithinAt g Y (f x₀)⊢ ContinuousWithinAt (g ∘ f) X x₀ All goals completed! 🐙
Приклад 9.4.14
example : Continuous (fun x:ℝ ↦ 3*x + 1) := ⊢ Continuous fun x => 3 * x + 1
All goals completed! 🐙
example : Continuous (fun x:ℝ ↦ (5:ℝ)^x) := ⊢ Continuous fun x => 5 ^ x
All goals completed! 🐙
example : Continuous (fun x:ℝ ↦ (5:ℝ)^(3*x+1)) := ⊢ Continuous fun x => 5 ^ (3 * x + 1)
All goals completed! 🐙
example : Continuous (fun x:ℝ ↦ |x^2-8*x+8|^(Real.sqrt 2) / (x^2 + 1)) := ⊢ Continuous fun x => |x ^ 2 - 8 * x + 8| ^ √2 / (x ^ 2 + 1)
All goals completed! 🐙
Вправа 9.4.6
theorem ContinuousOn.restrict {X Y:Set ℝ} {f: ℝ → ℝ} (hY: Y ⊆ X) (hf: ContinuousOn f X) : ContinuousOn f Y := X:Set ℝY:Set ℝf:ℝ → ℝhY:Y ⊆ Xhf:ContinuousOn f X⊢ ContinuousOn f Y
All goals completed! 🐙
Вправа 9.4.7
theorem Continuous.polynomial {n:ℕ} (c: Fin n → ℝ) : Continuous (fun x:ℝ ↦ ∑ i, c i * x ^ (i:ℕ)) := n:ℕc:Fin n → ℝ⊢ Continuous fun x => ∑ i, c i * x ^ ↑i
All goals completed! 🐙