@@ -515,14 +515,31 @@ end
515
515
/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C` on
516
516
`s`, then the function is `C`-Lipschitz on `s`. Version with `has_fderiv_within` and
517
517
`lipschitz_on_with`. -/
518
- theorem convex.lipschitz_on_with_of_norm_has_fderiv_within_le
519
- (hf : ∀ x ∈ s, has_fderiv_within_at f (f' x) s x) (bound : ∀x∈s, ∥f' x∥ ≤ C)
520
- (hs : convex s) : lipschitz_on_with (real.to_nnreal C) f s :=
518
+ theorem convex.lipschitz_on_with_of_nnnorm_has_fderiv_within_le {C : ℝ≥ 0 }
519
+ (hf : ∀ x ∈ s, has_fderiv_within_at f (f' x) s x) (bound : ∀x∈s, ∥f' x∥₊ ≤ C)
520
+ (hs : convex s) : lipschitz_on_with C f s :=
521
521
begin
522
522
rw lipschitz_on_with_iff_norm_sub_le,
523
523
intros x x_in y y_in,
524
- convert hs.norm_image_sub_le_of_norm_has_fderiv_within_le hf bound y_in x_in,
525
- exact real.coe_to_nnreal C ((norm_nonneg $ f' x).trans $ bound x x_in)
524
+ exact hs.norm_image_sub_le_of_norm_has_fderiv_within_le hf bound y_in x_in
525
+ end
526
+
527
+ /-- Let `s` be a convex set in a real normed vector space `E`, let `f : E → G` be a function
528
+ differentiable within `s` in a neighborhood of `x : E` with derivative `f'`. Suppose that `f'`
529
+ is continuous within `s` at `x`. Then for any number `K : ℝ≥0` larger than `∥f' x∥₊`, `f` is
530
+ `K`-Lipschitz on some neighborhood of `x` within `s`. -/
531
+ lemma convex.exists_nhds_within_lipschitz_on_with_of_has_fderiv_within_at_of_continuous_within_at
532
+ (hs : convex s) {f : E → G} (hder : ∀ᶠ y in 𝓝[s] x, has_fderiv_within_at f (f' y) s y)
533
+ (hcont : continuous_within_at f' s x) (K : ℝ≥0 ) (hK : ∥f' x∥₊ < K) :
534
+ ∃ t ∈ 𝓝[s] x, lipschitz_on_with K f t :=
535
+ begin
536
+ obtain ⟨ε, ε0 , hε⟩ :
537
+ ∃ ε > 0 , ball x ε ∩ s ⊆ {y | has_fderiv_within_at f (f' y) s y ∧ ∥f' y∥₊ < K},
538
+ from mem_nhds_within_iff.1 (hder.and $ hcont.nnnorm.eventually (gt_mem_nhds hK)),
539
+ rw inter_comm at hε,
540
+ refine ⟨s ∩ ball x ε, inter_mem_nhds_within _ (ball_mem_nhds _ ε0 ), _⟩,
541
+ exact (hs.inter (convex_ball _ _)).lipschitz_on_with_of_nnnorm_has_fderiv_within_le
542
+ (λ y hy, (hε hy).1 .mono (inter_subset_left _ _)) (λ y hy, (hε hy).2 .le)
526
543
end
527
544
528
545
/-- The mean value theorem on a convex set: if the derivative of a function within this set is
@@ -536,10 +553,10 @@ bound xs ys
536
553
/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C` on
537
554
`s`, then the function is `C`-Lipschitz on `s`. Version with `fderiv_within` and
538
555
`lipschitz_on_with`. -/
539
- theorem convex.lipschitz_on_with_of_norm_fderiv_within_le
540
- (hf : differentiable_on 𝕜 f s) (bound : ∀x∈ s, ∥fderiv_within 𝕜 f s x∥ ≤ C)
541
- (hs : convex s) : lipschitz_on_with (real.to_nnreal C) f s:=
542
- hs.lipschitz_on_with_of_norm_has_fderiv_within_le (λ x hx, (hf x hx).has_fderiv_within_at) bound
556
+ theorem convex.lipschitz_on_with_of_nnnorm_fderiv_within_le {C : ℝ≥ 0 }
557
+ (hf : differentiable_on 𝕜 f s) (bound : ∀ x ∈ s, ∥fderiv_within 𝕜 f s x∥₊ ≤ C)
558
+ (hs : convex s) : lipschitz_on_with C f s:=
559
+ hs.lipschitz_on_with_of_nnnorm_has_fderiv_within_le (λ x hx, (hf x hx).has_fderiv_within_at) bound
543
560
544
561
/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C`,
545
562
then the function is `C`-Lipschitz. Version with `fderiv`. -/
@@ -551,10 +568,10 @@ hs.norm_image_sub_le_of_norm_has_fderiv_within_le
551
568
552
569
/-- The mean value theorem on a convex set: if the derivative of a function is bounded by `C` on
553
570
`s`, then the function is `C`-Lipschitz on `s`. Version with `fderiv` and `lipschitz_on_with`. -/
554
- theorem convex.lipschitz_on_with_of_norm_fderiv_le
555
- (hf : ∀ x ∈ s, differentiable_at 𝕜 f x) (bound : ∀x∈s, ∥fderiv 𝕜 f x∥ ≤ C)
556
- (hs : convex s) : lipschitz_on_with (real.to_nnreal C) f s :=
557
- hs.lipschitz_on_with_of_norm_has_fderiv_within_le
571
+ theorem convex.lipschitz_on_with_of_nnnorm_fderiv_le {C : ℝ≥ 0 }
572
+ (hf : ∀ x ∈ s, differentiable_at 𝕜 f x) (bound : ∀x∈s, ∥fderiv 𝕜 f x∥₊ ≤ C)
573
+ (hs : convex s) : lipschitz_on_with C f s :=
574
+ hs.lipschitz_on_with_of_nnnorm_has_fderiv_within_le
558
575
(λ x hx, (hf x hx).has_fderiv_at.has_fderiv_within_at) bound
559
576
560
577
/-- Variant of the mean value inequality on a convex set, using a bound on the difference between
@@ -620,11 +637,11 @@ convex.norm_image_sub_le_of_norm_has_fderiv_within_le (λ x hx, (hf x hx).has_fd
620
637
/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
621
638
bounded by `C` on `s`, then the function is `C`-Lipschitz on `s`.
622
639
Version with `has_deriv_within` and `lipschitz_on_with`. -/
623
- theorem convex.lipschitz_on_with_of_norm_has_deriv_within_le
624
- {f f' : ℝ → F} {C : ℝ} {s : set ℝ} (hs : convex s)
625
- (hf : ∀ x ∈ s, has_deriv_within_at f (f' x) s x) (bound : ∀x∈s, ∥f' x∥ ≤ C) :
626
- lipschitz_on_with (real.to_nnreal C) f s :=
627
- convex.lipschitz_on_with_of_norm_has_fderiv_within_le (λ x hx, (hf x hx).has_fderiv_within_at)
640
+ theorem convex.lipschitz_on_with_of_nnnorm_has_deriv_within_le
641
+ {f f' : ℝ → F} {C : ℝ≥ 0 } {s : set ℝ} (hs : convex s)
642
+ (hf : ∀ x ∈ s, has_deriv_within_at f (f' x) s x) (bound : ∀x∈s, ∥f' x∥₊ ≤ C) :
643
+ lipschitz_on_with C f s :=
644
+ convex.lipschitz_on_with_of_nnnorm_has_fderiv_within_le (λ x hx, (hf x hx).has_fderiv_within_at)
628
645
(λ x hx, le_trans (by simp) (bound x hx)) hs
629
646
630
647
/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function within
@@ -639,11 +656,11 @@ bound xs ys
639
656
/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
640
657
bounded by `C` on `s`, then the function is `C`-Lipschitz on `s`.
641
658
Version with `deriv_within` and `lipschitz_on_with`. -/
642
- theorem convex.lipschitz_on_with_of_norm_deriv_within_le
643
- {f : ℝ → F} {C : ℝ} {s : set ℝ} (hs : convex s)
644
- (hf : differentiable_on ℝ f s) (bound : ∀x∈s, ∥deriv_within f s x∥ ≤ C) :
645
- lipschitz_on_with (real.to_nnreal C) f s :=
646
- hs.lipschitz_on_with_of_norm_has_deriv_within_le (λ x hx, (hf x hx).has_deriv_within_at) bound
659
+ theorem convex.lipschitz_on_with_of_nnnorm_deriv_within_le
660
+ {f : ℝ → F} {C : ℝ≥ 0 } {s : set ℝ} (hs : convex s)
661
+ (hf : differentiable_on ℝ f s) (bound : ∀x∈s, ∥deriv_within f s x∥₊ ≤ C) :
662
+ lipschitz_on_with C f s :=
663
+ hs.lipschitz_on_with_of_nnnorm_has_deriv_within_le (λ x hx, (hf x hx).has_deriv_within_at) bound
647
664
648
665
/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
649
666
bounded by `C`, then the function is `C`-Lipschitz. Version with `deriv`. -/
@@ -656,10 +673,10 @@ hs.norm_image_sub_le_of_norm_has_deriv_within_le
656
673
/-- The mean value theorem on a convex set in dimension 1: if the derivative of a function is
657
674
bounded by `C` on `s`, then the function is `C`-Lipschitz on `s`.
658
675
Version with `deriv` and `lipschitz_on_with`. -/
659
- theorem convex.lipschitz_on_with_of_norm_deriv_le {f : ℝ → F} {C : ℝ} {s : set ℝ}
660
- (hf : ∀ x ∈ s, differentiable_at ℝ f x) (bound : ∀x∈s, ∥deriv f x∥ ≤ C)
661
- (hs : convex s) : lipschitz_on_with (real.to_nnreal C) f s :=
662
- hs.lipschitz_on_with_of_norm_has_deriv_within_le
676
+ theorem convex.lipschitz_on_with_of_nnnorm_deriv_le {f : ℝ → F} {C : ℝ≥ 0 } {s : set ℝ}
677
+ (hf : ∀ x ∈ s, differentiable_at ℝ f x) (bound : ∀x∈s, ∥deriv f x∥₊ ≤ C)
678
+ (hs : convex s) : lipschitz_on_with C f s :=
679
+ hs.lipschitz_on_with_of_nnnorm_has_deriv_within_le
663
680
(λ x hx, (hf x hx).has_deriv_at.has_deriv_within_at) bound
664
681
665
682
/-! ### Functions `[a, b] → ℝ`. -/
0 commit comments