Analysis I, Section 9.8: Monotonic functions
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 monotonicity concepts.
namespace Chapter9Definition 9.8.1
theorem MonotoneOn.iff {X: Set ℝ} (f: ℝ → ℝ) : MonotoneOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f x := X:Set ℝf:ℝ → ℝ⊢ MonotoneOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f x
X:Set ℝf:ℝ → ℝ⊢ MonotoneOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f x) → MonotoneOn f X
X:Set ℝf:ℝ → ℝ⊢ MonotoneOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f x X:Set ℝf:ℝ → ℝa✝³:MonotoneOn f Xx✝:ℝa✝²:x✝ ∈ Xy✝:ℝa✝¹:y✝ ∈ Xa✝:y✝ > x✝⊢ f y✝ ≥ f x✝; All goals completed! 🐙
X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy:a✝ ≤ b✝⊢ f a✝ ≤ f b✝; X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy✝:a✝ ≤ b✝hxy:a✝ < b✝⊢ f a✝ ≤ f b✝X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f xa✝:ℝx✝¹:a✝ ∈ Xx✝:a✝ ∈ Xhxy:a✝ ≤ a✝⊢ f a✝ ≤ f a✝
X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≥ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy✝:a✝ ≤ b✝hxy:a✝ < b✝⊢ f a✝ ≤ f b✝ All goals completed! 🐙
All goals completed! 🐙theorem StrictMono.iff {X: Set ℝ} (f: ℝ → ℝ) : StrictMonoOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x := X:Set ℝf:ℝ → ℝ⊢ StrictMonoOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x
X:Set ℝf:ℝ → ℝ⊢ StrictMonoOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y > f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x) → StrictMonoOn f X X:Set ℝf:ℝ → ℝ⊢ StrictMonoOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y > f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x) → StrictMonoOn f X X:Set ℝf:ℝ → ℝa✝:∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x⊢ StrictMonoOn f X X:Set ℝf:ℝ → ℝa✝³:StrictMonoOn f Xx✝:ℝa✝²:x✝ ∈ Xy✝:ℝa✝¹:y✝ ∈ Xa✝:y✝ > x✝⊢ f y✝ > f x✝X:Set ℝf:ℝ → ℝa✝:∀ x ∈ X, ∀ y ∈ X, y > x → f y > f x⊢ StrictMonoOn f X All goals completed! 🐙theorem AntitoneOn.iff {X: Set ℝ} (f: ℝ → ℝ) : AntitoneOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f x := X:Set ℝf:ℝ → ℝ⊢ AntitoneOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f x
X:Set ℝf:ℝ → ℝ⊢ AntitoneOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f x) → AntitoneOn f X
X:Set ℝf:ℝ → ℝ⊢ AntitoneOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f x X:Set ℝf:ℝ → ℝa✝³:AntitoneOn f Xx✝:ℝa✝²:x✝ ∈ Xy✝:ℝa✝¹:y✝ ∈ Xa✝:y✝ > x✝⊢ f y✝ ≤ f x✝; All goals completed! 🐙
X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy:a✝ ≤ b✝⊢ f b✝ ≤ f a✝; X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy✝:a✝ ≤ b✝hxy:a✝ < b✝⊢ f b✝ ≤ f a✝X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f xa✝:ℝx✝¹:a✝ ∈ Xx✝:a✝ ∈ Xhxy:a✝ ≤ a✝⊢ f a✝ ≤ f a✝
X:Set ℝf:ℝ → ℝa✝¹:∀ x ∈ X, ∀ y ∈ X, y > x → f y ≤ f xa✝:ℝx✝¹:a✝ ∈ Xb✝:ℝx✝:b✝ ∈ Xhxy✝:a✝ ≤ b✝hxy:a✝ < b✝⊢ f b✝ ≤ f a✝ All goals completed! 🐙
All goals completed! 🐙theorem StrictAntitone.iff {X: Set ℝ} (f: ℝ → ℝ) : StrictAntiOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x := X:Set ℝf:ℝ → ℝ⊢ StrictAntiOn f X ↔ ∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x
X:Set ℝf:ℝ → ℝ⊢ StrictAntiOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y < f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x) → StrictAntiOn f X X:Set ℝf:ℝ → ℝ⊢ StrictAntiOn f X → ∀ x ∈ X, ∀ y ∈ X, y > x → f y < f xX:Set ℝf:ℝ → ℝ⊢ (∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x) → StrictAntiOn f X X:Set ℝf:ℝ → ℝa✝:∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x⊢ StrictAntiOn f X X:Set ℝf:ℝ → ℝa✝³:StrictAntiOn f Xx✝:ℝa✝²:x✝ ∈ Xy✝:ℝa✝¹:y✝ ∈ Xa✝:y✝ > x✝⊢ f y✝ < f x✝X:Set ℝf:ℝ → ℝa✝:∀ x ∈ X, ∀ y ∈ X, y > x → f y < f x⊢ StrictAntiOn f X All goals completed! 🐙Examples 9.8.2
example : StrictMonoOn (fun x:ℝ ↦ x^2) (.Ici 0) := ⊢ StrictMonoOn (fun x => x ^ 2) (Set.Ici 0) All goals completed! 🐙example : StrictAntiOn (fun x:ℝ ↦ x^2) (.Iic 0) := ⊢ StrictAntiOn (fun x => x ^ 2) (Set.Iic 0) All goals completed! 🐙example : ¬ MonotoneOn (fun x:ℝ ↦ x^2) .univ := ⊢ ¬MonotoneOn (fun x => x ^ 2) Set.univ All goals completed! 🐙example : ¬ AntitoneOn (fun x:ℝ ↦ x^2) .univ := ⊢ ¬AntitoneOn (fun x => x ^ 2) Set.univ All goals completed! 🐙example {X:Set ℝ} {f:ℝ → ℝ} (hf: StrictMonoOn f X) : MonotoneOn f X := X:Set ℝf:ℝ → ℝhf:StrictMonoOn f X⊢ MonotoneOn f X All goals completed! 🐙example (X:Set ℝ) : MonotoneOn (fun x:ℝ ↦ (6:ℝ)) X := X:Set ℝ⊢ MonotoneOn (fun x => 6) X All goals completed! 🐙example (X:Set ℝ) : AntitoneOn (fun x:ℝ ↦ (6:ℝ)) X := X:Set ℝ⊢ AntitoneOn (fun x => 6) X All goals completed! 🐙example {X:Set ℝ} (hX: Nontrivial X) : ¬ StrictMonoOn (fun x:ℝ ↦ (6:ℝ)) X := X:Set ℝhX:Nontrivial ↑X⊢ ¬StrictMonoOn (fun x => 6) X All goals completed! 🐙example (X:Set ℝ) (hX: Nontrivial X) : ¬ StrictAntiOn (fun x:ℝ ↦ (6:ℝ)) X := X:Set ℝhX:Nontrivial ↑X⊢ ¬StrictAntiOn (fun x => 6) X All goals completed! 🐙example : ∃ (X:Set ℝ) (f:ℝ → ℝ), ContinuousOn f X ∧ ¬ MonotoneOn f X ∧ ¬ AntitoneOn f X := ⊢ ∃ X f, ContinuousOn f X ∧ ¬MonotoneOn f X ∧ ¬AntitoneOn f X All goals completed! 🐙example : ∃ (X:Set ℝ) (f:ℝ → ℝ), MonotoneOn f X ∧ ¬ ContinuousOn f X := ⊢ ∃ X f, MonotoneOn f X ∧ ¬ContinuousOn f X All goals completed! 🐙Proposition 9.8.3 / Exercise 9.8.4
theorem MonotoneOn.exist_inverse {a b:ℝ} (h: a < b) (f: ℝ → ℝ) (hcont: ContinuousOn f (.Icc a b)) (hmono: StrictMonoOn f (.Icc a b)) :
f '' (.Icc a b) = .Icc (f a) (f b) ∧
∃ finv: ℝ → ℝ, ContinuousOn finv (.Icc (f a) (f b)) ∧ StrictMonoOn finv (.Icc (f a) (f b)) ∧
finv '' (.Icc (f a) (f b)) = .Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧
∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y
:= a:ℝb:ℝh:a < bf:ℝ → ℝhcont:ContinuousOn f (Set.Icc a b)hmono:StrictMonoOn f (Set.Icc a b)⊢ f '' Set.Icc a b = Set.Icc (f a) (f b) ∧
∃ finv,
ContinuousOn finv (Set.Icc (f a) (f b)) ∧
StrictMonoOn finv (Set.Icc (f a) (f b)) ∧
finv '' Set.Icc (f a) (f b) = Set.Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧ ∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y
All goals completed! 🐙Example 9.8.4
example {R :ℝ} (hR: R > 0) {n:ℕ} (hn: n > 0) : ∃ g : ℝ → ℝ, ∀ x ∈ Set.Icc 0 (R^n), (g x)^n = x := R:ℝhR:R > 0n:ℕhn:n > 0⊢ ∃ g, ∀ x ∈ Set.Icc 0 (R ^ n), g x ^ n = x
R:ℝhR:R > 0n:ℕhn:n > 0f:ℝ → ℝ := fun x => x ^ _fvar.7026⊢ ∃ g, ∀ x ∈ Set.Icc 0 (R ^ n), g x ^ n = x
have hcont : ContinuousOn f (.Icc 0 R) := R:ℝhR:R > 0n:ℕhn:n > 0⊢ ∃ g, ∀ x ∈ Set.Icc 0 (R ^ n), g x ^ n = x All goals completed! 🐙
have hmono : StrictMonoOn f (.Icc 0 R) := R:ℝhR:R > 0n:ℕhn:n > 0⊢ ∃ g, ∀ x ∈ Set.Icc 0 (R ^ n), g x ^ n = x
R:ℝhR:R > 0n:ℕhn:n > 0f:ℝ → ℝ := fun x => x ^ _fvar.7026hcont:ContinuousOn _fvar.7081 (Set.Icc 0 _fvar.7024) := ?_mvar.7408a✝:ℝhx:a✝ ∈ Set.Icc 0 Rb✝:ℝx✝:b✝ ∈ Set.Icc 0 Rhxy:a✝ < b✝⊢ f a✝ < f b✝; R:ℝn:ℕf:ℝ → ℝ := fun x => x ^ _fvar.7026a✝:ℝb✝:ℝhR:0 < Rhn:0 < nhcont:ContinuousOn (fun x => x ^ n) (Set.Icc 0 R)hx:0 ≤ a✝ ∧ a✝ ≤ Rx✝:0 ≤ b✝ ∧ b✝ ≤ Rhxy:a✝ < b✝⊢ a✝ ^ n < b✝ ^ n
R:ℝn:ℕf:ℝ → ℝ := fun x => x ^ _fvar.7026a✝:ℝb✝:ℝhR:0 < Rhn:0 < nhcont:ContinuousOn (fun x => x ^ n) (Set.Icc 0 R)hx:0 ≤ a✝ ∧ a✝ ≤ Rx✝:0 ≤ b✝ ∧ b✝ ≤ Rhxy:a✝ < b✝⊢ 0 ≤ a✝R:ℝn:ℕf:ℝ → ℝ := fun x => x ^ _fvar.7026a✝:ℝb✝:ℝhR:0 < Rhn:0 < nhcont:ContinuousOn (fun x => x ^ n) (Set.Icc 0 R)hx:0 ≤ a✝ ∧ a✝ ≤ Rx✝:0 ≤ b✝ ∧ b✝ ≤ Rhxy:a✝ < b✝⊢ n ≠ 0 R:ℝn:ℕf:ℝ → ℝ := fun x => x ^ _fvar.7026a✝:ℝb✝:ℝhR:0 < Rhn:0 < nhcont:ContinuousOn (fun x => x ^ n) (Set.Icc 0 R)hx:0 ≤ a✝ ∧ a✝ ≤ Rx✝:0 ≤ b✝ ∧ b✝ ≤ Rhxy:a✝ < b✝⊢ 0 ≤ a✝R:ℝn:ℕf:ℝ → ℝ := fun x => x ^ _fvar.7026a✝:ℝb✝:ℝhR:0 < Rhn:0 < nhcont:ContinuousOn (fun x => x ^ n) (Set.Icc 0 R)hx:0 ≤ a✝ ∧ a✝ ≤ Rx✝:0 ≤ b✝ ∧ b✝ ≤ Rhxy:a✝ < b✝⊢ n ≠ 0 All goals completed! 🐙
obtain ⟨ g, ⟨ _, _, _, _, hg⟩ ⟩ := (MonotoneOn.exist_inverse (R:ℝhR:R > 0n:ℕhn:n > 0f:ℝ → ℝ := fun x => x ^ _fvar.7026hcont:ContinuousOn _fvar.7081 (Set.Icc 0 _fvar.7024) := ContinuousOn.pow (continuousOn_id' (Set.Icc 0 _fvar.7024)) _fvar.7026hmono:StrictMonoOn _fvar.7081 (Set.Icc 0 _fvar.7024) :=
fun ⦃a⦄ hx ⦃b⦄ x hxy =>
id
(pow_lt_pow_left₀ hxy
(Chapter9._example._proof_1 _fvar.7024 _fvar.7026 a b (Eq.mp gt_iff_lt._simp_1 _fvar.7027) (id _fvar.7409)
(Eq.mp Set.mem_Icc._simp_1 hx) (Eq.mp Set.mem_Icc._simp_1 x) hxy)
(Chapter9._example._proof_2 _fvar.7024 _fvar.7026 a b (Eq.mp gt_iff_lt._simp_1 _fvar.7027) (id _fvar.7409)
(Eq.mp Set.mem_Icc._simp_1 hx) (Eq.mp Set.mem_Icc._simp_1 x) hxy))⊢ 0 < R All goals completed! 🐙) f hcont hmono).2
R:ℝhR:R > 0n:ℕhn:n > 0f:ℝ → ℝ := fun x => x ^ _fvar.7026hcont:ContinuousOn _fvar.7081 (Set.Icc 0 _fvar.7024) := ?_mvar.7408hmono:StrictMonoOn _fvar.7081 (Set.Icc 0 _fvar.7024) := ?_mvar.7883g:ℝ → ℝleft✝³:ContinuousOn g (Set.Icc (f 0) (f R))left✝²:StrictMonoOn g (Set.Icc (f 0) (f R))left✝¹:g '' Set.Icc (f 0) (f R) = Set.Icc 0 Rleft✝:∀ x ∈ Set.Icc 0 R, g (f x) = xhg:∀ y ∈ Set.Icc 0 (R ^ n), g y ^ n = y⊢ ∃ g, ∀ x ∈ Set.Icc 0 (R ^ n), g x ^ n = x; All goals completed! 🐙Exercise 9.8.1
theorem IsMaxOn.of_monotone_on_compact {a b:ℝ} (h:a < b) {f:ℝ → ℝ} (hf: MonotoneOn f (.Icc a b)) :
∃ xmax ∈ Set.Icc a b, IsMaxOn f (.Icc a b) xmax := a:ℝb:ℝh:a < bf:ℝ → ℝhf:MonotoneOn f (Set.Icc a b)⊢ ∃ xmax ∈ Set.Icc a b, IsMaxOn f (Set.Icc a b) xmax All goals completed! 🐙theorem IsMaxOn.of_strictmono_on_compact {a b:ℝ} (h:a < b) {f:ℝ → ℝ} (hf: StrictMonoOn f (.Icc a b)) :
∃ xmax ∈ Set.Icc a b, IsMaxOn f (.Icc a b) xmax := a:ℝb:ℝh:a < bf:ℝ → ℝhf:StrictMonoOn f (Set.Icc a b)⊢ ∃ xmax ∈ Set.Icc a b, IsMaxOn f (Set.Icc a b) xmax All goals completed! 🐙theorem IsMaxOn.of_antitone_on_compact {a b:ℝ} (h:a < b) {f:ℝ → ℝ} (hf: AntitoneOn f (.Icc a b)) :
∃ xmax ∈ Set.Icc a b, IsMaxOn f (.Icc a b) xmax := a:ℝb:ℝh:a < bf:ℝ → ℝhf:AntitoneOn f (Set.Icc a b)⊢ ∃ xmax ∈ Set.Icc a b, IsMaxOn f (Set.Icc a b) xmax All goals completed! 🐙theorem IsMaxOn.of_strictantitone_on_compact {a b:ℝ} (h:a < b) {f:ℝ → ℝ} (hf: StrictAntiOn f (.Icc a b)) :
∃ xmax ∈ Set.Icc a b, IsMaxOn f (.Icc a b) xmax := a:ℝb:ℝh:a < bf:ℝ → ℝhf:StrictAntiOn f (Set.Icc a b)⊢ ∃ xmax ∈ Set.Icc a b, IsMaxOn f (Set.Icc a b) xmax
All goals completed! 🐙theorem BddOn.of_monotone {a b:ℝ} {f:ℝ → ℝ} (hf: MonotoneOn f (.Icc a b)) :
BddOn f (.Icc a b) := a:ℝb:ℝf:ℝ → ℝhf:MonotoneOn f (Set.Icc a b)⊢ BddOn f (Set.Icc a b)
All goals completed! 🐙theorem BddOn.of_antitone {a b:ℝ} {f:ℝ → ℝ} (hf: AntitoneOn f (.Icc a b)) :
BddOn f (.Icc a b) := a:ℝb:ℝf:ℝ → ℝhf:AntitoneOn f (Set.Icc a b)⊢ BddOn f (Set.Icc a b)
All goals completed! 🐙Exercise 9.8.2
theorem no_strictmono_intermediate_value : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ) (hf: StrictMonoOn f (.Icc a b)), ¬ ∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) := ⊢ ∃ a b, ∃ (_ : a < b), ∃ f, ∃ (_ : StrictMonoOn f (Set.Icc a b)), ¬∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) All goals completed! 🐙theorem no_monotone_intermediate_value : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ) (hf: MonotoneOn f (.Icc a b)), ¬ ∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) := ⊢ ∃ a b, ∃ (_ : a < b), ∃ f, ∃ (_ : MonotoneOn f (Set.Icc a b)), ¬∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) All goals completed! 🐙theorem no_strictanti_intermediate_value : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ) (hf: StrictAntiOn f (.Icc a b)), ¬ ∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) := ⊢ ∃ a b, ∃ (_ : a < b), ∃ f, ∃ (_ : StrictAntiOn f (Set.Icc a b)), ¬∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) All goals completed! 🐙theorem no_antitone_intermediate_value : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ) (hf: AntitoneOn f (.Icc a b)), ¬ ∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) := ⊢ ∃ a b, ∃ (_ : a < b), ∃ f, ∃ (_ : AntitoneOn f (Set.Icc a b)), ¬∃ y, y ∈ Set.Icc (f a) (f b) ∨ y ∈ Set.Icc (f a) (f b) All goals completed! 🐙Exercise 9.8.3
theorem mono_of_continuous_inj {a b:ℝ} (h: a < b) {f:ℝ → ℝ}
(hf: ContinuousOn f (.Icc a b))
(hinj: Function.Injective (fun x: Set.Icc a b ↦ f x )) :
StrictMonoOn f (.Icc a b) ∨ StrictAntiOn f (.Icc a b) := a:ℝb:ℝh:a < bf:ℝ → ℝhf:ContinuousOn f (Set.Icc a b)hinj:Function.Injective fun x => f ↑x⊢ StrictMonoOn f (Set.Icc a b) ∨ StrictAntiOn f (Set.Icc a b)
All goals completed! 🐙Exercise 9.8.4
def MonotoneOn.exist_inverse_without_continuity {a b:ℝ} (h: a < b) {f: ℝ → ℝ} (hmono: StrictMonoOn f (.Icc a b)) :
Decidable (f '' (.Icc a b) = .Icc (f a) (f b) ∧
∃ finv: ℝ → ℝ, ContinuousOn finv (.Icc (f a) (f b)) ∧ StrictMonoOn finv (.Icc (f a) (f b)) ∧
finv '' (.Icc (f a) (f b)) = .Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧
∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y )
:= a:ℝb:ℝh:a < bf:ℝ → ℝhmono:StrictMonoOn f (Set.Icc a b)⊢ Decidable
(f '' Set.Icc a b = Set.Icc (f a) (f b) ∧
∃ finv,
ContinuousOn finv (Set.Icc (f a) (f b)) ∧
StrictMonoOn finv (Set.Icc (f a) (f b)) ∧
finv '' Set.Icc (f a) (f b) = Set.Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧ ∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y)
-- the first line of this construction should be either `apply isTrue` or `apply isFalse`.
All goals completed! 🐙Exercise 9.8.4
def MonotoneOn.exist_inverse_without_strictmono {a b:ℝ} (h: a < b) (f: ℝ → ℝ)
(hcont: ContinuousOn f (.Icc a b)) (hmono: MonotoneOn f (.Icc a b)) :
Decidable (f '' (.Icc a b) = .Icc (f a) (f b) ∧
∃ finv: ℝ → ℝ, ContinuousOn finv (.Icc (f a) (f b)) ∧ StrictMonoOn finv (.Icc (f a) (f b)) ∧
finv '' (.Icc (f a) (f b)) = .Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧
∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y )
:= a:ℝb:ℝh:a < bf:ℝ → ℝhcont:ContinuousOn f (Set.Icc a b)hmono:MonotoneOn f (Set.Icc a b)⊢ Decidable
(f '' Set.Icc a b = Set.Icc (f a) (f b) ∧
∃ finv,
ContinuousOn finv (Set.Icc (f a) (f b)) ∧
StrictMonoOn finv (Set.Icc (f a) (f b)) ∧
finv '' Set.Icc (f a) (f b) = Set.Icc a b ∧
(∀ x ∈ Set.Icc a b, finv (f x) = x) ∧ ∀ y ∈ Set.Icc (f a) (f b), f (finv y) = y)
-- the first line of this construction should be either `apply isTrue` or `apply isFalse`.
All goals completed! 🐙/- Exercise 9.8.4: state and prove an analogue of `MonotoneOne.exist_inverse` for `Antitone` functions. -/
-- theorem AntitoneOn.exist_inverse {a b:ℝ} (h: a < b) (f: ℝ → ℝ) (hcont: ContinuousOn f (.Icc a b)) (hmono: StrictAntiOn f (.Icc a b)) : sorry := by sorryAn equivalence between the natural numbers and the rationals.
noncomputable abbrev q_9_8_5 : ℕ ≃ ℚ := nonempty_equiv_of_countable.somenoncomputable abbrev g_9_8_5 : ℚ → ℝ := fun q ↦ (2:ℝ)^(-q_9_8_5.symm q:ℤ)noncomputable abbrev f_9_8_5 : ℝ → ℝ := fun x ↦ ∑' r : {r:ℚ // (r:ℝ) < x}, g_9_8_5 rExercise 9.8.5(a)
theorem StrictMonoOn.of_f_9_8_5 : StrictMonoOn f_9_8_5 .univ := ⊢ StrictMonoOn f_9_8_5 Set.univ
All goals completed! 🐙Exercise 9.8.5(b)
theorem ContinuousAt.of_f_9_8_5' (r:ℚ) : ¬ ContinuousAt f_9_8_5 r := r:ℚ⊢ ¬ContinuousAt f_9_8_5 ↑r
All goals completed! 🐙Exercise 9.8.5(c)
theorem ContinuousAt.of_f_9_8_5 {x:ℝ} (hx: ¬ ∃ r:ℚ, x = r) : ContinuousAt f_9_8_5 x := x:ℝhx:¬∃ r, x = ↑r⊢ ContinuousAt f_9_8_5 x
All goals completed! 🐙end Chapter9