@@ -23,7 +23,7 @@ namespace Chapter10
2323/-- Definition 10.2.1 (Local maxima and minima). Here we use Mathlib's `IsLocalMaxOn` type. -/
2424theorem IsLocalMaxOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
2525 IsLocalMaxOn f X x₀ ↔
26- ∃ δ > 0 , IsMaxOn f (X ∩ Set .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
26+ ∃ δ > 0 , IsMaxOn f (X ∩ .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
2727 simp [isMaxOn_iff, IsLocalMaxOn, IsMaxFilter, nhdsWithin.eq_1, Filter.eventually_inf_principal,
2828 Metric.eventually_nhds_iff, Real.dist_eq, abs_sub_lt_iff ]
2929 peel with ε hε x
@@ -33,7 +33,7 @@ theorem IsLocalMaxOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
3333
3434theorem IsLocalMinOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
3535 IsLocalMinOn f X x₀ ↔
36- ∃ δ > 0 , IsMinOn f (X ∩ Set .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
36+ ∃ δ > 0 , IsMinOn f (X ∩ .Ioo (x₀ - δ) (x₀ + δ)) x₀ := by
3737 simp [isMinOn_iff, IsLocalMinOn, IsMinFilter, nhdsWithin.eq_1, Filter.eventually_inf_principal,
3838 Metric.eventually_nhds_iff, Real.dist_eq, abs_sub_lt_iff ]
3939 peel with ε hε x
@@ -44,20 +44,20 @@ theorem IsLocalMinOn.iff (X:Set ℝ) (f:ℝ → ℝ) (x₀:ℝ) :
4444/-- Example 10.2.3 -/
4545abbrev f_10_2_3 : ℝ → ℝ := fun x ↦ x^2 - x^4
4646
47- example : ¬ IsMinOn f_10_2_3 Set .univ 0 := by sorry
47+ example : ¬ IsMinOn f_10_2_3 .univ 0 := by sorry
4848
49- example : IsMinOn f_10_2_3 (Set .Ioo (-1 ) 1 ) 0 := by sorry
49+ example : IsMinOn f_10_2_3 (.Ioo (-1 ) 1 ) 0 := by sorry
5050
51- example : IsLocalMaxOn f_10_2_3 Set .univ 0 := by sorry
51+ example : IsLocalMaxOn f_10_2_3 .univ 0 := by sorry
5252
5353/-- Example 10.2.4 -/
54- example : ¬ ∃ x, IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set .univ) x := by sorry
54+ example : ¬ ∃ x, IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) x := by sorry
5555
56- example : ¬ ∃ x, IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set .univ) x := by sorry
56+ example : ¬ ∃ x, IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) x := by sorry
5757
58- example (n:ℤ) : IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set .univ) n := by sorry
58+ example (n:ℤ) : IsMaxOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) n := by sorry
5959
60- example (n:ℤ) : IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' Set .univ) n := by sorry
60+ example (n:ℤ) : IsMinOn (· : ℝ → ℝ) ((↑· : ℤ → ℝ) '' .univ) n := by sorry
6161
6262/-- Remark 10.2.5 -/
6363theorem IsLocalMaxOn.of_restrict {X Y:Set ℝ} (hXY: Y ⊆ X) (f:ℝ → ℝ) (x₀:ℝ)
@@ -70,59 +70,59 @@ theorem IsLocalMinOn.of_restrict {X Y:Set ℝ} (hXY: Y ⊆ X) (f:ℝ → ℝ) (x
7070
7171/-- Proposition 10.2.6 (Local extrema are stationary) / Exercise 10.2.1 -/
7272theorem IsLocalMaxOn.deriv_eq_zero {a b:ℝ} (hab: a < b) {f:ℝ → ℝ} {x₀:ℝ}
73- (hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMaxOn f (Set .Ioo a b) x₀) {L:ℝ}
74- (hderiv: HasDerivWithinAt f L (Set .Ioo a b) x₀) : L = 0 := by
73+ (hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMaxOn f (.Ioo a b) x₀) {L:ℝ}
74+ (hderiv: HasDerivWithinAt f L (.Ioo a b) x₀) : L = 0 := by
7575 sorry
7676
7777/-- Proposition 10.2.6 (Local extrema are stationary) / Exercise 10.2.1 -/
7878theorem IsLocalMinOn.deriv_eq_zero {a b:ℝ} (hab: a < b) {f:ℝ → ℝ} {x₀:ℝ}
79- (hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMinOn f (Set .Ioo a b) x₀) {L:ℝ}
80- (hderiv: HasDerivWithinAt f L (Set .Ioo a b) x₀) : L = 0 := by
79+ (hx₀: x₀ ∈ Set.Ioo a b) (h: IsLocalMinOn f (.Ioo a b) x₀) {L:ℝ}
80+ (hderiv: HasDerivWithinAt f L (.Ioo a b) x₀) : L = 0 := by
8181 sorry
8282
8383theorem IsMaxOn.deriv_eq_zero_counter : ∃ (a b:ℝ) (hab: a < b) (f:ℝ → ℝ)
84- (x₀:ℝ) (hx₀: x₀ ∈ Set.Icc a b) (h: IsMaxOn f (Set .Icc a b) x₀) (L:ℝ)
85- (hderiv: HasDerivWithinAt f L (Set .Icc a b) x₀), L ≠ 0 := by
84+ (x₀:ℝ) (hx₀: x₀ ∈ Set.Icc a b) (h: IsMaxOn f (.Icc a b) x₀) (L:ℝ)
85+ (hderiv: HasDerivWithinAt f L (.Icc a b) x₀), L ≠ 0 := by
8686 sorry
8787
8888/-- Theorem 10.2.7 (Rolle's theorem) / Exercise 10.2.4 -/
8989theorem _root_.HasDerivWithinAt.exist_zero {a b:ℝ} (hab: a < b) {g:ℝ → ℝ}
90- (hcont: ContinuousOn g (Set .Icc a b)) (hderiv: DifferentiableOn ℝ g (Set .Ioo a b))
91- (hgab: g a = g b) : ∃ x ∈ Set.Ioo a b, HasDerivWithinAt g 0 (Set .Ioo a b) x := by
90+ (hcont: ContinuousOn g (.Icc a b)) (hderiv: DifferentiableOn ℝ g (.Ioo a b))
91+ (hgab: g a = g b) : ∃ x ∈ Set.Ioo a b, HasDerivWithinAt g 0 (.Ioo a b) x := by
9292 sorry
9393
9494/-- Corollary 10.2.9 (Mean value theorem ) / Exercise 10.2.5 -/
9595theorem _root_.HasDerivWithinAt.mean_value {a b:ℝ} (hab: a < b) {f:ℝ → ℝ}
96- (hcont: ContinuousOn f (Set .Icc a b)) (hderiv: DifferentiableOn ℝ f (Set .Ioo a b)) :
97- ∃ x ∈ Set.Ioo a b, HasDerivWithinAt f ((f b - f a) / (b - a)) (Set .Ioo a b) x := by
96+ (hcont: ContinuousOn f (.Icc a b)) (hderiv: DifferentiableOn ℝ f (.Ioo a b)) :
97+ ∃ x ∈ Set.Ioo a b, HasDerivWithinAt f ((f b - f a) / (b - a)) (.Ioo a b) x := by
9898 sorry
9999
100100/-- Exercise 10.2.2 -/
101- example : ∃ f:ℝ → ℝ, ContinuousOn f (Set .Icc (-1 ) 1 ) ∧
102- IsMaxOn f (Set .Icc (-1 ) 1 ) 0 ∧ ¬ DifferentiableWithinAt ℝ f (Set .Icc (-1 ) 1 ) 0 := by
101+ example : ∃ f:ℝ → ℝ, ContinuousOn f (.Icc (-1 ) 1 ) ∧
102+ IsMaxOn f (.Icc (-1 ) 1 ) 0 ∧ ¬ DifferentiableWithinAt ℝ f (.Icc (-1 ) 1 ) 0 := by
103103 sorry
104104
105105/-- Exercise 10.2.3 -/
106- example : ∃ f:ℝ → ℝ, DifferentiableOn ℝ f (Set .Icc (-1 ) 1 ) ∧
107- HasDerivWithinAt f 0 (Set .Ioo (-1 ) 1 ) 0 ∧
108- ¬ IsLocalMaxOn f (Set .Icc (-1 ) 1 ) 0 ∧ ¬ IsLocalMinOn f (Set .Icc (-1 ) 1 ) 0 := by
106+ example : ∃ f:ℝ → ℝ, DifferentiableOn ℝ f (.Icc (-1 ) 1 ) ∧
107+ HasDerivWithinAt f 0 (.Ioo (-1 ) 1 ) 0 ∧
108+ ¬ IsLocalMaxOn f (.Icc (-1 ) 1 ) 0 ∧ ¬ IsLocalMinOn f (.Icc (-1 ) 1 ) 0 := by
109109 sorry
110110
111111/-- Exercise 10.2.6 -/
112112theorem lipschitz_bound {M a b:ℝ} (hM: M > 0 ) (hab: a < b) {f:ℝ → ℝ}
113- (hcont: ContinuousOn f (Set .Icc a b))
114- (hderiv: DifferentiableOn ℝ f (Set .Ioo a b))
115- (hlip: ∀ x ∈ Set.Ioo a b, |derivWithin f (Set .Ioo a b) x| ≤ M)
113+ (hcont: ContinuousOn f (.Icc a b))
114+ (hderiv: DifferentiableOn ℝ f (.Ioo a b))
115+ (hlip: ∀ x ∈ Set.Ioo a b, |derivWithin f (.Ioo a b) x| ≤ M)
116116 {x y:ℝ} (hx: x ∈ Set.Ioo a b) (hy: y ∈ Set.Ioo a b) :
117117 |f x - f y| ≤ M * |x - y| := by
118118 sorry
119119
120120/-- Exercise 10.2.7 -/
121121theorem _root_.UniformContinuousOn.of_lipschitz {f:ℝ → ℝ}
122- (hcont: ContinuousOn f Set .univ)
123- (hderiv: DifferentiableOn ℝ f Set .univ)
124- (hlip: BddOn (deriv f) Set .univ) :
125- UniformContinuousOn f (Set .univ) := by
122+ (hcont: ContinuousOn f .univ)
123+ (hderiv: DifferentiableOn ℝ f .univ)
124+ (hlip: BddOn (deriv f) .univ) :
125+ UniformContinuousOn f (.univ) := by
126126 sorry
127127
128128
0 commit comments