@@ -65,9 +65,8 @@ private lemma continuousOn_Ico {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b) (h :
6565
6666/-- If `f` is continuous at `a, b` and differentiable on `(a, b)`, then `f` is continuous on
6767`[a, b]`. -/
68- private lemma continuousOn_Icc {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b)
69- (ha : ContinuousAt f a) (hb : ContinuousAt f b)
70- (hd₀ : DifferentiableOn ℝ f (Ioo a b)) : ContinuousOn f (Icc a b) :=
68+ private lemma continuousOn_Icc {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b) (ha : ContinuousAt f a)
69+ (hb : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b)) : ContinuousOn f (Icc a b) :=
7170 Ioo_union_both g₀ ▸ hd₀.continuousOn.union_continuousAt isOpen_Ioo (by simp_all)
7271
7372/-- If `f` is continuous at `b` and differentiable on `(-∞, b)`, then `f` is continuous on
@@ -88,46 +87,40 @@ private lemma continuousOn_Ici {f : ℝ → ℝ} {a : ℝ} (h : ContinuousAt f a
8887`(a, b)`, and the derivative `f'` is nonpositive on `(b, c)`. Then `f` attains its maximum on
8988`(a, c)` at `b`. -/
9089lemma isMaxOn_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b < c)
91- (h : ContinuousAt f b)
92- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
93- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
94- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
90+ (h : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
91+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
9592 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Ioo a c) b :=
9693 isMaxOn_of_mono_anti_Ioo g₀ g₁
9794 (monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc g₀ h hd₀) (by simp_all)
98- (by simp_all))
95+ (by simp_all))
9996 (antitoneOn_of_deriv_nonpos (convex_Ico b c) (continuousOn_Ico g₁ h hd₁) (by simp_all)
100- (by simp_all))
97+ (by simp_all))
10198
10299/-- Suppose `a < b ≤ c`, `f : ℝ → ℝ` is continuous at `b` and `c`, the derivative `f'` is
103100nonnegative on `(a, b)`, and the derivative `f'` is nonpositive on `(b, c)`. Then `f` attains its
104101maximum on `(a, c]` at `b`. -/
105102lemma isMaxOn_of_deriv_Ioc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b ≤ c)
106- (hb : ContinuousAt f b) (hc : ContinuousAt f c)
107- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
108- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
109- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
103+ (hb : ContinuousAt f b) (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
104+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
110105 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Ioc a c) b :=
111106 isMaxOn_of_mono_anti_Ioc g₀ g₁
112107 (monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc g₀ hb hd₀) (by simp_all)
113- (by simp_all))
108+ (by simp_all))
114109 (antitoneOn_of_deriv_nonpos (convex_Icc b c) (continuousOn_Icc g₁ hb hc hd₁) (by simp_all)
115- (by simp_all))
110+ (by simp_all))
116111
117112/-- Suppose `a ≤ b < c`, `f : ℝ → ℝ` is continuous at `b` and `c`, the derivative `f'` is
118113nonnegative on `(a,b)`, and the derivative `f'` is nonpositive on `(b,c)`. Then `f` attains its
119114maximum on `(a,c]` at `b`. -/
120115lemma isMaxOn_of_deriv_Ico {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a ≤ b) (g₁ : b < c)
121- (ha : ContinuousAt f a) (hb : ContinuousAt f b)
122- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
123- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
124- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
116+ (ha : ContinuousAt f a) (hb : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
117+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
125118 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Ico a c) b :=
126119 isMaxOn_of_mono_anti_Ico g₀ g₁
127120 (monotoneOn_of_deriv_nonneg (convex_Icc a b) (continuousOn_Icc g₀ ha hb hd₀) (by simp_all)
128- (by simp_all))
121+ (by simp_all))
129122 (antitoneOn_of_deriv_nonpos (convex_Ico b c) (continuousOn_Ico g₁ hb hd₁) (by simp_all)
130- (by simp_all))
123+ (by simp_all))
131124
132125/-- Suppose `a ≤ b ≤ c`, `f : ℝ → ℝ` is continuous at `a`, `b`, and `c`, the derivative `f'` is
133126nonnegative on `(a, b)`, and the derivative `f'` is nonpositive on `(b, c)`. Then `f` attains its
@@ -146,12 +139,10 @@ lemma isMaxOn_of_deriv_Icc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a ≤ b) (g
146139/-- Suppose `a < b`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonnegative on
147140`(a, b)`, and the derivative `f'` is nonpositive on `(b, ∞)`. Then `f` attains its maximum on
148141`(a, ∞)` at `b`. -/
149- lemma isMaxOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b)
150- (hb : ContinuousAt f b)
151- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
152- (hd₁ : DifferentiableOn ℝ f (Ioi b))
153- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
154- (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) : IsMaxOn f (Ioi a) b :=
142+ lemma isMaxOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b) (hb : ContinuousAt f b)
143+ (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
144+ (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) :
145+ IsMaxOn f (Ioi a) b :=
155146 isMaxOn_of_mono_anti_Ioi g₀
156147 (monotoneOn_of_deriv_nonneg (convex_Ioc a b) (continuousOn_Ioc g₀ hb hd₀) (by simp_all)
157148 (by simp_all))
@@ -161,11 +152,9 @@ lemma isMaxOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b)
161152/-- Suppose `a ≤ b`, `f : ℝ → ℝ` is continuous at `a` and `b`, the derivative `f'` is nonnegative
162153on `(a, b)`, and the derivative `f'` is nonpositive on `(b, ∞)`. Then `f` attains its maximum on
163154`[a, ∞)` at `b`. -/
164- lemma isMaxOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b)
165- (ha : ContinuousAt f a) (hb : ContinuousAt f b)
166- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
167- (hd₁ : DifferentiableOn ℝ f (Ioi b))
168- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
155+ lemma isMaxOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b) (ha : ContinuousAt f a)
156+ (hb : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
157+ (hd₁ : DifferentiableOn ℝ f (Ioi b)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
169158 (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) : IsMaxOn f (Ici a) b :=
170159 isMaxOn_of_mono_anti_Ici g₀
171160 (monotoneOn_of_deriv_nonneg (convex_Icc a b) (continuousOn_Icc g₀ ha hb hd₀) (by simp_all)
@@ -176,12 +165,9 @@ lemma isMaxOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b)
176165/-- Suppose `b < c`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonnegative on
177166`(-∞, b)`, and the derivative `f'` is nonpositive on `(b, c)`. Then `f` attains its maximum on
178167`(-∞, c)` at `b`. -/
179- lemma isMaxOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c)
180- (hb : ContinuousAt f b)
181- (hd₀ : DifferentiableOn ℝ f (Iio b))
182- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
183- (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x)
184- (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Iio c) b :=
168+ lemma isMaxOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c) (hb : ContinuousAt f b)
169+ (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
170+ (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Iio c) b :=
185171 isMaxOn_of_mono_anti_Iio g₁
186172 (monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
187173 (by simp_all))
@@ -191,11 +177,9 @@ lemma isMaxOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c)
191177/-- Suppose `b ≤ c`, `f : ℝ → ℝ` is continuous at `b` and `c`, the derivative `f'` is nonnegative
192178on `(-∞, b)`, and the derivative `f'` is nonpositive on `(b, c)`. Then `f` attains its maximum on
193179`(-∞, c]` at `b`. -/
194- lemma isMaxOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c)
195- (hb : ContinuousAt f b) (hc : ContinuousAt f c)
196- (hd₀ : DifferentiableOn ℝ f (Iio b))
197- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
198- (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x)
180+ lemma isMaxOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c) (hb : ContinuousAt f b)
181+ (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Iio b))
182+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x)
199183 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsMaxOn f (Iic c) b :=
200184 isMaxOn_of_mono_anti_Iic g₁
201185 (monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
@@ -206,12 +190,10 @@ lemma isMaxOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c)
206190/-- Suppose `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonnegative on `(-∞, b)`,
207191and the derivative `f'` is nonpositive on `(b, ∞)`. Then `f` attains its maximum on `ℝ`
208192at `b`. -/
209- lemma isMaxOn_of_deriv_univ {f : ℝ → ℝ} {b : ℝ}
210- (hb : ContinuousAt f b)
211- (hd₀ : DifferentiableOn ℝ f (Iio b))
212- (hd₁ : DifferentiableOn ℝ f (Ioi b))
213- (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x)
214- (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) : IsMaxOn f univ b :=
193+ lemma isMaxOn_of_deriv_univ {f : ℝ → ℝ} {b : ℝ} (hb : ContinuousAt f b)
194+ (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
195+ (h₀ : ∀ x ∈ Iio b, 0 ≤ deriv f x) (h₁ : ∀ x ∈ Ioi b, deriv f x ≤ 0 ) :
196+ IsMaxOn f univ b :=
215197 isMaxOn_of_mono_anti_univ
216198 (monotoneOn_of_deriv_nonneg (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
217199 (by simp_all))
@@ -223,12 +205,10 @@ lemma isMaxOn_of_deriv_univ {f : ℝ → ℝ} {b : ℝ}
223205/-- Suppose `b < c`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonpositive on
224206`(-∞, b)`, and the derivative `f'` is nonnegative on `(b, c)`. Then `f` attains its minimum on
225207`(-∞, c)` at `b`. -/
226- lemma isMinOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c)
227- (hb : ContinuousAt f b)
228- (hd₀ : DifferentiableOn ℝ f (Iio b))
229- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
230- (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 )
231- (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Iio c) b :=
208+ lemma isMinOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c) (hb : ContinuousAt f b)
209+ (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
210+ (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
211+ IsMinOn f (Iio c) b :=
232212 isMinOn_of_anti_mono_Iio g₁
233213 (antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
234214 (by simp_all))
@@ -238,11 +218,9 @@ lemma isMinOn_of_deriv_Iio {f : ℝ → ℝ} {b c : ℝ} (g₁ : b < c)
238218/-- Suppose `b ≤ c`, `f : ℝ → ℝ` is continuous at `b` and `c`, the derivative `f'` is nonpositive
239219on `(-∞, b)`, and the derivative `f'` is nonnegative on `(b, c)`. Then `f` attains its minimum on
240220`(-∞, c]` at `b`. -/
241- lemma isMinOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c)
242- (hb : ContinuousAt f b) (hc : ContinuousAt f c)
243- (hd₀ : DifferentiableOn ℝ f (Iio b))
244- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
245- (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 )
221+ lemma isMinOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c) (hb : ContinuousAt f b)
222+ (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Iio b))
223+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 )
246224 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Iic c) b :=
247225 isMinOn_of_anti_mono_Iic g₁
248226 (antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
@@ -253,12 +231,10 @@ lemma isMinOn_of_deriv_Iic {f : ℝ → ℝ} {b c : ℝ} (g₁ : b ≤ c)
253231/-- Suppose `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonpositive on `(-∞, b)`,
254232and the derivative `f'` is nonnegative on `(b, ∞)`. Then `f` attains its minimum on `ℝ`
255233at `b`. -/
256- lemma isMinOn_of_deriv_univ {f : ℝ → ℝ} {b : ℝ}
257- (hb : ContinuousAt f b)
258- (hd₀ : DifferentiableOn ℝ f (Iio b))
259- (hd₁ : DifferentiableOn ℝ f (Ioi b))
260- (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 )
261- (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) : IsMinOn f univ b :=
234+ lemma isMinOn_of_deriv_univ {f : ℝ → ℝ} {b : ℝ} (hb : ContinuousAt f b)
235+ (hd₀ : DifferentiableOn ℝ f (Iio b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
236+ (h₀ : ∀ x ∈ Iio b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) :
237+ IsMinOn f univ b :=
262238 isMinOn_of_anti_mono_univ
263239 (antitoneOn_of_deriv_nonpos (convex_Iic b) (continuousOn_Iic hb hd₀) (by simp_all)
264240 (by simp_all))
@@ -270,21 +246,17 @@ Suppose `a < b < c`, `f : ℝ → ℝ` is continuous at `b`,
270246the derivative `f'` is nonnegative on `(a,b)`, and
271247the derivative `f'` is nonpositive on `(b,c)`. Then `f` has a local maximum at `b`. -/
272248lemma isLocalMax_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b < c)
273- (h : ContinuousAt f b)
274- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
275- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
276- (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
249+ (h : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
250+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, 0 ≤ deriv f x)
277251 (h₁ : ∀ x ∈ Ioo b c, deriv f x ≤ 0 ) : IsLocalMax f b :=
278252 (isMaxOn_of_deriv_Ioo g₀ g₁ h hd₀ hd₁ h₀ h₁).isLocalMax (Ioo_mem_nhds g₀ g₁)
279253
280254/-- Suppose `a < b < c`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonpositive on
281255`(a,b)`, and the derivative `f'` is nonnegative on `(b,c)`. Then `f` attains its minimum on `(a,c)`
282256at `b`. -/
283257lemma isMinOn_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b < c)
284- (h : ContinuousAt f b)
285- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
286- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
287- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
258+ (h : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
259+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
288260 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Ioo a c) b :=
289261 have hIoc : ContinuousOn f (Ioc a b) := Ioo_union_right g₀ ▸
290262 hd₀.continuousOn.union_continuousAt isOpen_Ioo (by simp_all)
@@ -298,10 +270,8 @@ lemma isMinOn_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁
298270nonpositive on `(a, b)`, and the derivative `f'` is nonnegative on `(b, c)`. Then `f` attains its
299271minimum on `(a, c]` at `b`. -/
300272lemma isMinOn_of_deriv_Ioc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b ≤ c)
301- (hb : ContinuousAt f b) (hc : ContinuousAt f c)
302- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
303- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
304- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
273+ (hb : ContinuousAt f b) (hc : ContinuousAt f c) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
274+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
305275 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Ioc a c) b :=
306276 isMinOn_of_anti_mono_Ioc g₀ g₁
307277 (antitoneOn_of_deriv_nonpos (convex_Ioc a b) (continuousOn_Ioc g₀ hb hd₀) (by simp_all)
@@ -313,10 +283,8 @@ lemma isMinOn_of_deriv_Ioc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁
313283nonpositive on `(a, b)`, and the derivative `f'` is nonnegative on `(b, c)`. Then `f` attains its
314284minimum on `[a, c)` at `b`. -/
315285lemma isMinOn_of_deriv_Ico {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a ≤ b) (g₁ : b < c)
316- (ha : ContinuousAt f a) (hb : ContinuousAt f b)
317- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
318- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
319- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
286+ (ha : ContinuousAt f a) (hb : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
287+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
320288 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Ico a c) b :=
321289 isMinOn_of_anti_mono_Ico g₀ g₁
322290 (antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc g₀ ha hb hd₀) (by simp_all)
@@ -329,10 +297,9 @@ nonpositive on `(a, b)`, and the derivative `f'` is nonnegative on `(b, c)`. The
329297minimum on `[a, c]` at `b`. -/
330298lemma isMinOn_of_deriv_Icc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a ≤ b) (g₁ : b ≤ c)
331299 (ha : ContinuousAt f a) (hb : ContinuousAt f b) (hc : ContinuousAt f c)
332- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
333- (hd₁ : DifferentiableOn ℝ f (Ioo b c))
334- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
335- (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsMinOn f (Icc a c) b :=
300+ (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
301+ (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) :
302+ IsMinOn f (Icc a c) b :=
336303 isMinOn_of_anti_mono_Icc g₀ g₁
337304 (antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc g₀ ha hb hd₀) (by simp_all)
338305 (by simp_all))
@@ -342,12 +309,10 @@ lemma isMinOn_of_deriv_Icc {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a ≤ b) (g
342309/-- Suppose `a < b`, `f : ℝ → ℝ` is continuous at `b`, the derivative `f'` is nonpositive on
343310`(a, b)`, and the derivative `f'` is nonnegative on `(b, ∞)`. Then `f` attains its minimum on
344311`(a, ∞)` at `b`. -/
345- lemma isMinOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b)
346- (hb : ContinuousAt f b)
347- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
348- (hd₁ : DifferentiableOn ℝ f (Ioi b))
349- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
350- (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) : IsMinOn f (Ioi a) b :=
312+ lemma isMinOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b) (hb : ContinuousAt f b)
313+ (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioi b))
314+ (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 ) (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) :
315+ IsMinOn f (Ioi a) b :=
351316 isMinOn_of_anti_mono_Ioi g₀
352317 (antitoneOn_of_deriv_nonpos (convex_Ioc a b) (continuousOn_Ioc g₀ hb hd₀) (by simp_all)
353318 (by simp_all))
@@ -357,11 +322,9 @@ lemma isMinOn_of_deriv_Ioi {f : ℝ → ℝ} {a b : ℝ} (g₀ : a < b)
357322/-- Suppose `a ≤ b`, `f : ℝ → ℝ` is continuous at `a` and `b`, the derivative `f'` is nonpositive
358323on `(a, b)`, and the derivative `f'` is nonnegative on `(b, ∞)`. Then `f` attains its minimum on
359324`[a, ∞)` at `b`. -/
360- lemma isMinOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b)
361- (ha : ContinuousAt f a) (hb : ContinuousAt f b)
362- (hd₀ : DifferentiableOn ℝ f (Ioo a b))
363- (hd₁ : DifferentiableOn ℝ f (Ioi b))
364- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
325+ lemma isMinOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b) (ha : ContinuousAt f a)
326+ (hb : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
327+ (hd₁ : DifferentiableOn ℝ f (Ioi b)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
365328 (h₁ : ∀ x ∈ Ioi b, 0 ≤ deriv f x) : IsMinOn f (Ici a) b :=
366329 isMinOn_of_anti_mono_Ici g₀
367330 (antitoneOn_of_deriv_nonpos (convex_Icc a b) (continuousOn_Icc g₀ ha hb hd₀) (by simp_all)
@@ -370,10 +333,9 @@ lemma isMinOn_of_deriv_Ici {f : ℝ → ℝ} {a b : ℝ} (g₀ : a ≤ b)
370333 (by simp_all))
371334
372335/-- The First-Derivative Test from calculus, minima version. -/
373- lemma isLocalMin_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ}
374- (g₀ : a < b) (g₁ : b < c) (h : ContinuousAt f b)
375- (hd₀ : DifferentiableOn ℝ f (Ioo a b)) (hd₁ : DifferentiableOn ℝ f (Ioo b c))
376- (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
336+ lemma isLocalMin_of_deriv_Ioo {f : ℝ → ℝ} {a b c : ℝ} (g₀ : a < b) (g₁ : b < c)
337+ (h : ContinuousAt f b) (hd₀ : DifferentiableOn ℝ f (Ioo a b))
338+ (hd₁ : DifferentiableOn ℝ f (Ioo b c)) (h₀ : ∀ x ∈ Ioo a b, deriv f x ≤ 0 )
377339 (h₁ : ∀ x ∈ Ioo b c, 0 ≤ deriv f x) : IsLocalMin f b :=
378340 (isMinOn_of_deriv_Ioo g₀ g₁ h hd₀ hd₁ h₀ h₁).isLocalMin (Ioo_mem_nhds g₀ g₁)
379341
0 commit comments