11/-
22Copyright (c) 2024 Bjørn Kjos-Hanssen. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
4- Authors: Bjørn Kjos-Hanssen, Patrick Massot, Floris van Doorn, Jireh Loreaux, Eric Wieser
4+ Authors: Bjørn Kjos-Hanssen, Patrick Massot, Floris van Doorn, Jireh Loreaux, Eric Wieser,
5+ Yongxi Lin, Louis (Yiyang) Liu
56-/
67module
78
@@ -95,7 +96,7 @@ lemma isMaxOn_Ioo_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (h : ContinuousAt f b
9596 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
9697 (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) :
9798 IsMaxOn f (Ioo a c) b := by
98- refine isMaxOn_of_mono_anti_Ioo ?_ ?_
99+ refine isMaxOn_Ioo_of_mono_anti ?_ ?_
99100 · apply monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc h hd₀) <;> simp_all
100101 · apply antitoneOn_of_deriv_nonpos (convex_Ico b c) (continuousOn_Ico h hd₁) <;> simp_all
101102
@@ -105,7 +106,7 @@ lemma isMaxOn_Ioc_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (hb : ContinuousAt f
105106 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
106107 (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) :
107108 IsMaxOn f (Ioc a c) b := by
108- refine isMaxOn_of_mono_anti_Ioc ?_ ?_
109+ refine isMaxOn_Ioc_of_mono_anti ?_ ?_
109110 · apply monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc hb hd₀) <;> simp_all
110111 · apply antitoneOn_of_deriv_nonpos (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
111112
@@ -115,7 +116,7 @@ lemma isMaxOn_Ico_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (ha : ContinuousAt f
115116 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
116117 (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) :
117118 IsMaxOn f (Ico a c) b := by
118- refine isMaxOn_of_mono_anti_Ico ?_ ?_
119+ refine isMaxOn_Ico_of_mono_anti ?_ ?_
119120 · apply monotoneOn_of_deriv_nonneg (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
120121 · apply antitoneOn_of_deriv_nonpos (convex_Ico b c) (continuousOn_Ico hb hd₁) <;> simp_all
121122
@@ -125,7 +126,7 @@ lemma isMaxOn_Icc_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (ha : ContinuousAt f
125126 (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
126127 (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
127128 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Icc a c) b := by
128- refine isMaxOn_of_mono_anti_Icc ?_ ?_
129+ refine isMaxOn_Icc_of_mono_anti ?_ ?_
129130 · apply monotoneOn_of_deriv_nonneg (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
130131 · apply antitoneOn_of_deriv_nonpos (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
131132
@@ -135,7 +136,7 @@ lemma isMaxOn_Ioi_of_deriv {f : ℝ → ℝ} {a b : ℝ} (hb : ContinuousAt f b)
135136 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
136137 (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) :
137138 IsMaxOn f (Ioi a) b := by
138- refine isMaxOn_of_mono_anti_Ioi ?_ ?_
139+ refine isMaxOn_Ioi_of_mono_anti ?_ ?_
139140 · apply monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc hb hd₀) <;> simp_all
140141 · apply antitoneOn_of_deriv_nonpos (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
141142
@@ -145,7 +146,7 @@ lemma isMaxOn_Ici_of_deriv {f : ℝ → ℝ} {a b : ℝ} (ha : ContinuousAt f a)
145146 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
146147 (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) :
147148 IsMaxOn f (Ici a) b := by
148- refine isMaxOn_of_mono_anti_Ici ?_ ?_
149+ refine isMaxOn_Ici_of_mono_anti ?_ ?_
149150 · apply monotoneOn_of_deriv_nonneg (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
150151 · apply antitoneOn_of_deriv_nonpos (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
151152
@@ -155,7 +156,7 @@ lemma isMaxOn_Iio_of_deriv {f : ℝ → ℝ} {b c : ℝ} (hb : ContinuousAt f b)
155156 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
156157 (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) :
157158 IsMaxOn f (Iio c) b := by
158- refine isMaxOn_of_mono_anti_Iio ?_ ?_
159+ refine isMaxOn_Iio_of_mono_anti ?_ ?_
159160 · apply monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
160161 · apply antitoneOn_of_deriv_nonpos (convex_Ico b c) (continuousOn_Ico hb hd₁) <;> simp_all
161162
@@ -165,7 +166,7 @@ lemma isMaxOn_Iic_of_deriv {f : ℝ → ℝ} {b c : ℝ} (hb : ContinuousAt f b)
165166 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
166167 (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) :
167168 IsMaxOn f (Iic c) b := by
168- refine isMaxOn_of_mono_anti_Iic ?_ ?_
169+ refine isMaxOn_Iic_of_mono_anti ?_ ?_
169170 · apply monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
170171 · apply antitoneOn_of_deriv_nonpos (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
171172
@@ -174,12 +175,10 @@ nonpositive on `(b, ∞)`. Then `f` attains its maximum on `ℝ` at `b`. -/
174175lemma isMaxOn_univ_of_deriv {f : ℝ → ℝ} {b : ℝ} (hb : ContinuousAt f b)
175176 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
176177 (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) :
177- IsMaxOn f univ b :=
178- isMaxOn_of_mono_anti_univ
179- (monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
180- (by simp_all))
181- (antitoneOn_of_deriv_nonpos (convex_Ici b) (continuousOn_Ici hb hd₁) (by simp_all)
182- (by simp_all))
178+ IsMaxOn f univ b := by
179+ refine isMaxOn_univ_of_mono_anti ?_ ?_
180+ · apply monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
181+ · apply antitoneOn_of_deriv_nonpos (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
183182
184183/-- The First-Derivative Test from calculus, maxima version.
185184Suppose `a < b < c`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonnegative on `(a,b)`
@@ -196,7 +195,7 @@ lemma isMinOn_Ioo_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (h : ContinuousAt f b
196195 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
197196 (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
198197 IsMinOn f (Ioo a c) b := by
199- refine isMinOn_of_anti_mono_Ioo ?_ ?_
198+ refine isMinOn_Ioo_of_anti_mono ?_ ?_
200199 · apply antitoneOn_of_deriv_nonpos (convex_Ioc a b) (continuousOn_Ioc h hd₀) <;> simp_all
201200 · apply monotoneOn_of_deriv_nonneg (convex_Ico b c) (continuousOn_Ico h hd₁) <;> simp_all
202201
@@ -206,7 +205,7 @@ lemma isMinOn_Ioc_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (hb : ContinuousAt f
206205 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
207206 (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
208207 IsMinOn f (Ioc a c) b := by
209- refine isMinOn_of_anti_mono_Ioc ?_ ?_
208+ refine isMinOn_Ioc_of_anti_mono ?_ ?_
210209 · apply antitoneOn_of_deriv_nonpos (convex_Ioc a b) (continuousOn_Ioc hb hd₀) <;> simp_all
211210 · apply monotoneOn_of_deriv_nonneg (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
212211
@@ -216,7 +215,7 @@ lemma isMinOn_Ico_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (ha : ContinuousAt f
216215 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
217216 (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
218217 IsMinOn f (Ico a c) b := by
219- refine isMinOn_of_anti_mono_Ico ?_ ?_
218+ refine isMinOn_Ico_of_anti_mono ?_ ?_
220219 · apply antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
221220 · apply monotoneOn_of_deriv_nonneg (convex_Ico b c) (continuousOn_Ico hb hd₁) <;> simp_all
222221
@@ -226,7 +225,7 @@ lemma isMinOn_Icc_of_deriv {f : ℝ → ℝ} {a b c : ℝ} (ha : ContinuousAt f
226225 (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
227226 (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
228227 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Icc a c) b := by
229- refine isMinOn_of_anti_mono_Icc ?_ ?_
228+ refine isMinOn_Icc_of_anti_mono ?_ ?_
230229 · apply antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
231230 · apply monotoneOn_of_deriv_nonneg (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
232231
@@ -236,7 +235,7 @@ lemma isMinOn_Ioi_of_deriv {f : ℝ → ℝ} {a b : ℝ} (hb : ContinuousAt f b)
236235 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
237236 (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) :
238237 IsMinOn f (Ioi a) b := by
239- refine isMinOn_of_anti_mono_Ioi ?_ ?_
238+ refine isMinOn_Ioi_of_anti_mono ?_ ?_
240239 · apply antitoneOn_of_deriv_nonpos (convex_Ioc a b) (continuousOn_Ioc hb hd₀) <;> simp_all
241240 · apply monotoneOn_of_deriv_nonneg (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
242241
@@ -246,7 +245,7 @@ lemma isMinOn_Ici_of_deriv {f : ℝ → ℝ} {a b : ℝ} (ha : ContinuousAt f a)
246245 (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
247246 (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) :
248247 IsMinOn f (Ici a) b := by
249- refine isMinOn_of_anti_mono_Ici ?_ ?_
248+ refine isMinOn_Ici_of_anti_mono ?_ ?_
250249 · apply antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc ha hb hd₀) <;> simp_all
251250 · apply monotoneOn_of_deriv_nonneg (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
252251
@@ -256,7 +255,7 @@ lemma isMinOn_Iio_of_deriv {f : ℝ → ℝ} {b c : ℝ} (hb : ContinuousAt f b)
256255 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
257256 (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
258257 IsMinOn f (Iio c) b := by
259- refine isMinOn_of_anti_mono_Iio ?_ ?_
258+ refine isMinOn_Iio_of_anti_mono ?_ ?_
260259 · apply antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
261260 · apply monotoneOn_of_deriv_nonneg (convex_Ico b c) (continuousOn_Ico hb hd₁) <;> simp_all
262261
@@ -266,7 +265,7 @@ lemma isMinOn_Iic_of_deriv {f : ℝ → ℝ} {b c : ℝ} (hb : ContinuousAt f b)
266265 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
267266 (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
268267 IsMinOn f (Iic c) b := by
269- refine isMinOn_of_anti_mono_Iic ?_ ?_
268+ refine isMinOn_Iic_of_anti_mono ?_ ?_
270269 · apply antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
271270 · apply monotoneOn_of_deriv_nonneg (convex_Icc b c) (continuousOn_Icc hb hc hd₁) <;> simp_all
272271
@@ -276,10 +275,9 @@ lemma isMinOn_univ_of_deriv {f : ℝ → ℝ} {b : ℝ} (hb : ContinuousAt f b)
276275 (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
277276 (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) :
278277 IsMinOn f univ b := by
279- refine isMinOn_of_anti_mono_univ
280- (antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) ?_ ?_)
281- (monotoneOn_of_deriv_nonneg (convex_Ici b) (continuousOn_Ici hb hd₁) ?_ ?_)
282- <;> simp_all
278+ refine isMinOn_univ_of_anti_mono ?_ ?_
279+ · apply antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) <;> simp_all
280+ · apply monotoneOn_of_deriv_nonneg (convex_Ici b) (continuousOn_Ici hb hd₁) <;> simp_all
283281
284282/-- The First-Derivative Test from calculus, minima version. -/
285283lemma isLocalMin_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b < c)
0 commit comments