@@ -85,14 +85,13 @@ lemma mem_pos_tangent_cone_at_of_segment_subset {s : set E} {x y : E} (h : segme
85
85
y - x ∈ pos_tangent_cone_at s x :=
86
86
begin
87
87
let c := λn:ℕ, (2 :ℝ)^n,
88
- let d := λn:ℕ, (c n)⁻¹ • (y- x),
88
+ let d := λn:ℕ, (c n)⁻¹ • (y - x),
89
89
refine ⟨c, d, filter.univ_mem_sets' (λn, h _), _, _⟩,
90
90
show x + d n ∈ segment x y,
91
- { rw segment_eq_image,
92
- refine ⟨(c n)⁻¹, ⟨_, _⟩, _ ⟩,
91
+ { rw segment_eq_image' ,
92
+ refine ⟨(c n)⁻¹, ⟨_, _⟩, rfl ⟩,
93
93
{ rw inv_nonneg, apply pow_nonneg, norm_num },
94
- { apply inv_le_one, apply one_le_pow_of_one_le, norm_num },
95
- { simp only [d, sub_smul, smul_sub, one_smul], abel } },
94
+ { apply inv_le_one, apply one_le_pow_of_one_le, norm_num } },
96
95
show tendsto c at_top at_top,
97
96
{ exact tendsto_pow_at_top_at_top_of_one_lt one_lt_two },
98
97
show filter.tendsto (λ (n : ℕ), c n • d n) filter.at_top (𝓝 (y - x)),
@@ -105,13 +104,12 @@ begin
105
104
apply tendsto_const_nhds }
106
105
end
107
106
107
+ lemma mem_pos_tangent_cone_at_of_segment_subset' {s : set E} {x y : E} (h : segment x (x + y) ⊆ s) :
108
+ y ∈ pos_tangent_cone_at s x :=
109
+ by simpa only [add_sub_cancel'] using mem_pos_tangent_cone_at_of_segment_subset h
110
+
108
111
lemma pos_tangent_cone_at_univ : pos_tangent_cone_at univ a = univ :=
109
- eq_univ_iff_forall.2
110
- begin
111
- assume x,
112
- rw [← add_sub_cancel x a],
113
- exact mem_pos_tangent_cone_at_of_segment_subset (subset_univ _)
114
- end
112
+ eq_univ_of_forall $ λ x, mem_pos_tangent_cone_at_of_segment_subset' (subset_univ _)
115
113
116
114
/-- If `f` has a local max on `s` at `a`, `f'` is the derivative of `f` at `a` within `s`, and
117
115
`y` belongs to the positive tangent cone of `s` at `a`, then `f' y ≤ 0`. -/
@@ -268,13 +266,12 @@ end real
268
266
269
267
section Rolle
270
268
271
- variables (f f' : ℝ → ℝ) {a b : ℝ} (hab : a < b) (hfc : continuous_on f (Icc a b)) (hfI : f a = f b)
272
-
273
- include hab hfc hfI
269
+ variables (f f' : ℝ → ℝ) {a b : ℝ}
274
270
275
271
/-- A continuous function on a closed interval with `f a = f b` takes either its maximum
276
272
or its minimum value at a point in the interior of the interval. -/
277
- lemma exists_Ioo_extr_on_Icc : ∃ c ∈ Ioo a b, is_extr_on f (Icc a b) c :=
273
+ lemma exists_Ioo_extr_on_Icc (hab : a < b) (hfc : continuous_on f (Icc a b)) (hfI : f a = f b) :
274
+ ∃ c ∈ Ioo a b, is_extr_on f (Icc a b) c :=
278
275
begin
279
276
have ne : (Icc a b).nonempty, from nonempty_Icc.2 (le_of_lt hab),
280
277
-- Consider absolute min and max points
@@ -300,26 +297,30 @@ end
300
297
301
298
/-- A continuous function on a closed interval with `f a = f b` has a local extremum at some
302
299
point of the corresponding open interval. -/
303
- lemma exists_local_extr_Ioo : ∃ c ∈ Ioo a b, is_local_extr f c :=
300
+ lemma exists_local_extr_Ioo (hab : a < b) (hfc : continuous_on f (Icc a b)) (hfI : f a = f b) :
301
+ ∃ c ∈ Ioo a b, is_local_extr f c :=
304
302
let ⟨c, cmem, hc⟩ := exists_Ioo_extr_on_Icc f hab hfc hfI
305
- in ⟨c, cmem, hc.is_local_extr $ mem_nhds_sets_iff. 2 ⟨Ioo a b, Ioo_subset_Icc_self, is_open_Ioo, cmem⟩ ⟩
303
+ in ⟨c, cmem, hc.is_local_extr $ Icc_mem_nhds cmem. 1 cmem. 2 ⟩
306
304
307
305
/-- Rolle's Theorem `has_deriv_at` version -/
308
- lemma exists_has_deriv_at_eq_zero (hff' : ∀ x ∈ Ioo a b, has_deriv_at f (f' x) x) :
306
+ lemma exists_has_deriv_at_eq_zero (hab : a < b) (hfc : continuous_on f (Icc a b)) (hfI : f a = f b)
307
+ (hff' : ∀ x ∈ Ioo a b, has_deriv_at f (f' x) x) :
309
308
∃ c ∈ Ioo a b, f' c = 0 :=
310
309
let ⟨c, cmem, hc⟩ := exists_local_extr_Ioo f hab hfc hfI in
311
310
⟨c, cmem, hc.has_deriv_at_eq_zero $ hff' c cmem⟩
312
311
313
312
/-- Rolle's Theorem `deriv` version -/
314
- lemma exists_deriv_eq_zero : ∃ c ∈ Ioo a b, deriv f c = 0 :=
313
+ lemma exists_deriv_eq_zero (hab : a < b) (hfc : continuous_on f (Icc a b)) (hfI : f a = f b) :
314
+ ∃ c ∈ Ioo a b, deriv f c = 0 :=
315
315
let ⟨c, cmem, hc⟩ := exists_local_extr_Ioo f hab hfc hfI in
316
316
⟨c, cmem, hc.deriv_eq_zero⟩
317
317
318
- omit hfc hfI
319
-
320
- variables {f f'}
318
+ variables {f f'} {l : ℝ}
321
319
322
- lemma exists_has_deriv_at_eq_zero' {l : ℝ}
320
+ /-- Rolle's Theorem, a version for a function on an open interval: if `f` has derivative `f'`
321
+ on `(a, b)` and has the same limit `l` at `𝓝[Ioi a] a` and `𝓝[Iio b] b`, then `f' c = 0`
322
+ for some `c ∈ (a, b)`. -/
323
+ lemma exists_has_deriv_at_eq_zero' (hab : a < b)
323
324
(hfa : tendsto f (𝓝[Ioi a] a) (𝓝 l)) (hfb : tendsto f (𝓝[Iio b] b) (𝓝 l))
324
325
(hff' : ∀ x ∈ Ioo a b, has_deriv_at f (f' x) x) :
325
326
∃ c ∈ Ioo a b, f' c = 0 :=
@@ -336,7 +337,11 @@ begin
336
337
exact ⟨Ioo a b, Ioo_mem_nhds hc.1 hc.2 , extend_from_extends this ⟩
337
338
end
338
339
339
- lemma exists_deriv_eq_zero' {l : ℝ}
340
+ /-- Rolle's Theorem, a version for a function on an open interval: if `f` has the same limit `l` at
341
+ `𝓝[Ioi a] a` and `𝓝[Iio b] b`, then `deriv f c = 0` for some `c ∈ (a, b)`. This version does not
342
+ require differentiability of `f` because we define `deriv f c = 0` whenever `f` is not
343
+ differentiable at `c`. -/
344
+ lemma exists_deriv_eq_zero' (hab : a < b)
340
345
(hfa : tendsto f (𝓝[Ioi a] a) (𝓝 l)) (hfb : tendsto f (𝓝[Iio b] b) (𝓝 l)) :
341
346
∃ c ∈ Ioo a b, deriv f c = 0 :=
342
347
classical.by_cases
0 commit comments