topology.metric_space.lipschitz
⟷
Mathlib.Topology.MetricSpace.Lipschitz
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
@@ -465,6 +465,20 @@ protected lemma comp {g : β → γ} {t : set β} {Kg : ℝ≥0} (hg : lipschitz
lipschitz_on_with (Kg * K) (g ∘ f) s :=
lipschitz_on_with_iff_restrict.mpr $ hg.to_restrict.comp (hf.to_restrict_maps_to hmaps)
+lemma ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0}
+ (s : set α) (t : set β)
+ (hf₁ : ∀ b ∈ t, lipschitz_on_with K₁ (λ a, f a b) s)
+ (hf₂ : ∀ a ∈ s, lipschitz_on_with K₂ (f a) t) :
+ emetric.diam (set.image2 f s t) ≤ ↑K₁ * emetric.diam s + ↑K₂ * emetric.diam t :=
+begin
+ apply emetric.diam_le,
+ rintros _ ⟨a₁, b₁, ha₁, hb₁, rfl⟩ _ ⟨a₂, b₂, ha₂, hb₂, rfl⟩,
+ refine (edist_triangle _ (f a₂ b₁) _).trans _,
+ exact add_le_add
+ ((hf₁ b₁ hb₁ ha₁ ha₂).trans $ ennreal.mul_left_mono $ emetric.edist_le_diam_of_mem ha₁ ha₂)
+ ((hf₂ a₂ ha₂ hb₁ hb₂).trans $ ennreal.mul_left_mono $ emetric.edist_le_diam_of_mem hb₁ hb₂),
+end
+
end emetric
section metric
@@ -512,6 +526,17 @@ protected lemma iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
lipschitz_on_with K f s ↔ ∀ (x ∈ s) (y ∈ s), f x ≤ f y + K * dist x y :=
⟨lipschitz_on_with.le_add_mul, lipschitz_on_with.of_le_add_mul K⟩
+lemma bounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0}
+ {s : set α} {t : set β} (hs : metric.bounded s) (ht : metric.bounded t)
+ (hf₁ : ∀ b ∈ t, lipschitz_on_with K₁ (λ a, f a b) s)
+ (hf₂ : ∀ a ∈ s, lipschitz_on_with K₂ (f a) t) :
+ metric.bounded (set.image2 f s t) :=
+metric.bounded_iff_ediam_ne_top.2 $ ne_top_of_le_ne_top
+ (ennreal.add_ne_top.mpr ⟨
+ ennreal.mul_ne_top ennreal.coe_ne_top hs.ediam_ne_top,
+ ennreal.mul_ne_top ennreal.coe_ne_top ht.ediam_ne_top⟩)
+ (ediam_image2_le _ _ _ hf₁ hf₂)
+
end metric
end lipschitz_on_with
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-/
import Logic.Function.Iterate
-import Data.Set.Intervals.ProjIcc
+import Order.Interval.Set.ProjIcc
import Topology.Algebra.Order.Field
import Topology.MetricSpace.Basic
import Topology.Bornology.Hom
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -359,7 +359,7 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
#print LipschitzWith.iterate /-
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) (f^[n])
| 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by rw [pow_succ'] <;> exact (iterate n).comp hf
+ | n + 1 => by rw [pow_succ] <;> exact (iterate n).comp hf
#align lipschitz_with.iterate LipschitzWith.iterate
-/
@@ -394,7 +394,7 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
protected theorem pow_end {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by rw [pow_succ, pow_succ]; exact h.mul (pow n)
+ | n + 1 => by rw [pow_succ', pow_succ']; exact h.mul (pow n)
#align lipschitz_with.pow LipschitzWith.pow_end
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -496,7 +496,8 @@ def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBounde
let ⟨C, hC⟩ := Metric.isBounded_iff.1 hs
Metric.isBounded_iff.2
⟨K * C,
- ball_image_iff.2 fun x hx => ball_image_iff.2 fun y hy => hf.dist_le_mul_of_le (hC hx hy)⟩
+ forall_mem_image.2 fun x hx =>
+ forall_mem_image.2 fun y hy => hf.dist_le_mul_of_le (hC hx hy)⟩
#align lipschitz_with.to_locally_bounded_map LipschitzWith.toLocallyBoundedMap
-/
@@ -527,8 +528,8 @@ theorem isBounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Bornology.Is
theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Bornology.IsBounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
- ball_image_iff.2 fun x hx =>
- ball_image_iff.2 fun y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
+ forall_mem_image.2 fun x hx =>
+ forall_mem_image.2 fun y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
#align lipschitz_with.diam_image_le LipschitzWith.diam_image_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -708,6 +708,7 @@ protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : Lipschi
#align lipschitz_on_with.comp LipschitzOnWith.comp
-/
+#print LipschitzOnWith.ediam_image2_le /-
theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
(hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
(hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
@@ -721,6 +722,7 @@ theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α
((hf₁ b₁ hb₁ ha₁ ha₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem ha₁ ha₂)
((hf₂ a₂ ha₂ hb₁ hb₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem hb₁ hb₂)
#align lipschitz_on_with.ediam_image2_le LipschitzOnWith.ediam_image2_le
+-/
end Emetric
@@ -787,6 +789,7 @@ protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mul
-/
+#print LipschitzOnWith.isBounded_image2 /-
theorem isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set α} {t : Set β}
(hs : Bornology.IsBounded s) (ht : Bornology.IsBounded t)
(hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
@@ -798,6 +801,7 @@ theorem isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set
ENNReal.mul_ne_top ENNReal.coe_ne_top ht.ediam_ne_top⟩)
(ediam_image2_le _ _ _ hf₁ hf₂)
#align lipschitz_on_with.bounded_image2 LipschitzOnWith.isBounded_image2
+-/
end Metric
mathlib commit https://github.com/leanprover-community/mathlib/commit/c8f305514e0d47dfaa710f5a52f0d21b588e6328
@@ -9,7 +9,7 @@ import Topology.Algebra.Order.Field
import Topology.MetricSpace.Basic
import Topology.Bornology.Hom
-#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f47581155c818e6361af4e4fda60d27d020c226b"
+#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
/-!
# Lipschitz continuous functions
@@ -708,6 +708,20 @@ protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : Lipschi
#align lipschitz_on_with.comp LipschitzOnWith.comp
-/
+theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
+ (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
+ (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
+ EMetric.diam (Set.image2 f s t) ≤ ↑K₁ * EMetric.diam s + ↑K₂ * EMetric.diam t :=
+ by
+ apply EMetric.diam_le
+ rintro _ ⟨a₁, b₁, ha₁, hb₁, rfl⟩ _ ⟨a₂, b₂, ha₂, hb₂, rfl⟩
+ refine' (edist_triangle _ (f a₂ b₁) _).trans _
+ exact
+ add_le_add
+ ((hf₁ b₁ hb₁ ha₁ ha₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem ha₁ ha₂)
+ ((hf₂ a₂ ha₂ hb₁ hb₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem hb₁ hb₂)
+#align lipschitz_on_with.ediam_image2_le LipschitzOnWith.ediam_image2_le
+
end Emetric
section Metric
@@ -773,6 +787,18 @@ protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mul
-/
+theorem isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set α} {t : Set β}
+ (hs : Bornology.IsBounded s) (ht : Bornology.IsBounded t)
+ (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
+ (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) : Bornology.IsBounded (Set.image2 f s t) :=
+ Metric.isBounded_iff_ediam_ne_top.2 <|
+ ne_top_of_le_ne_top
+ (ENNReal.add_ne_top.mpr
+ ⟨ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top,
+ ENNReal.mul_ne_top ENNReal.coe_ne_top ht.ediam_ne_top⟩)
+ (ediam_image2_le _ _ _ hf₁ hf₂)
+#align lipschitz_on_with.bounded_image2 LipschitzOnWith.isBounded_image2
+
end Metric
end LipschitzOnWith
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -372,11 +372,11 @@ theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
-/
-#print LipschitzWith.mul /-
-protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
+#print LipschitzWith.mul_end /-
+protected theorem mul_end {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
hf.comp hg
-#align lipschitz_with.mul LipschitzWith.mul
+#align lipschitz_with.mul LipschitzWith.mul_end
-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
@@ -390,12 +390,12 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
#align lipschitz_with.list_prod LipschitzWith.list_prod
-/
-#print LipschitzWith.pow /-
-protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
+#print LipschitzWith.pow_end /-
+protected theorem pow_end {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by rw [pow_succ, pow_succ]; exact h.mul (pow n)
-#align lipschitz_with.pow LipschitzWith.pow
+#align lipschitz_with.pow LipschitzWith.pow_end
-/
end Emetric
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-/
-import Mathbin.Logic.Function.Iterate
-import Mathbin.Data.Set.Intervals.ProjIcc
-import Mathbin.Topology.Algebra.Order.Field
-import Mathbin.Topology.MetricSpace.Basic
-import Mathbin.Topology.Bornology.Hom
+import Logic.Function.Iterate
+import Data.Set.Intervals.ProjIcc
+import Topology.Algebra.Order.Field
+import Topology.MetricSpace.Basic
+import Topology.Bornology.Hom
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f47581155c818e6361af4e4fda60d27d020c226b"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -514,17 +514,17 @@ theorem comap_cobounded_le (hf : LipschitzWith K f) :
#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_le
-/
-#print LipschitzWith.bounded_image /-
-theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
- Metric.Bounded (f '' s) :=
- Metric.bounded_iff_ediam_ne_top.2 <|
+#print LipschitzWith.isBounded_image /-
+theorem isBounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Bornology.IsBounded s) :
+ Bornology.IsBounded (f '' s) :=
+ Metric.isBounded_iff_ediam_ne_top.2 <|
ne_top_of_le_ne_top (ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top)
(hf.ediam_image_le s)
-#align lipschitz_with.bounded_image LipschitzWith.bounded_image
+#align lipschitz_with.bounded_image LipschitzWith.isBounded_image
-/
#print LipschitzWith.diam_image_le /-
-theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded s) :
+theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Bornology.IsBounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
ball_image_iff.2 fun x hx =>
@@ -631,36 +631,44 @@ namespace Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] {s : Set α} {t : Set β}
+/- warning: metric.bounded.left_of_prod clashes with bornology.is_bounded.fst_of_prod -> Bornology.IsBounded.fst_of_prod
+Case conversion may be inaccurate. Consider using '#align metric.bounded.left_of_prod Bornology.IsBounded.fst_of_prodₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Metric.Bounded.left_of_prod /-
-theorem Bounded.left_of_prod (h : Bounded (s ×ˢ t)) (ht : t.Nonempty) : Bounded s := by
- simpa only [fst_image_prod s ht] using (@LipschitzWith.prod_fst α β _ _).bounded_image h
-#align metric.bounded.left_of_prod Metric.Bounded.left_of_prod
+#print Bornology.IsBounded.fst_of_prod /-
+theorem IsBounded.fst_of_prod (h : IsBounded (s ×ˢ t)) (ht : t.Nonempty) : IsBounded s := by
+ simpa only [fst_image_prod s ht] using (@LipschitzWith.prod_fst α β _ _).isBounded_image h
+#align metric.bounded.left_of_prod Bornology.IsBounded.fst_of_prod
-/
+/- warning: metric.bounded.right_of_prod clashes with bornology.is_bounded.snd_of_prod -> Bornology.IsBounded.snd_of_prod
+Case conversion may be inaccurate. Consider using '#align metric.bounded.right_of_prod Bornology.IsBounded.snd_of_prodₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Metric.Bounded.right_of_prod /-
-theorem Bounded.right_of_prod (h : Bounded (s ×ˢ t)) (hs : s.Nonempty) : Bounded t := by
- simpa only [snd_image_prod hs t] using (@LipschitzWith.prod_snd α β _ _).bounded_image h
-#align metric.bounded.right_of_prod Metric.Bounded.right_of_prod
+#print Bornology.IsBounded.snd_of_prod /-
+theorem IsBounded.snd_of_prod (h : IsBounded (s ×ˢ t)) (hs : s.Nonempty) : IsBounded t := by
+ simpa only [snd_image_prod hs t] using (@LipschitzWith.prod_snd α β _ _).isBounded_image h
+#align metric.bounded.right_of_prod Bornology.IsBounded.snd_of_prod
-/
+/- warning: metric.bounded_prod_of_nonempty clashes with bornology.is_bounded_prod_of_nonempty -> Bornology.isBounded_prod_of_nonempty
+Case conversion may be inaccurate. Consider using '#align metric.bounded_prod_of_nonempty Bornology.isBounded_prod_of_nonemptyₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Metric.bounded_prod_of_nonempty /-
-theorem bounded_prod_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
- Bounded (s ×ˢ t) ↔ Bounded s ∧ Bounded t :=
- ⟨fun h => ⟨h.left_of_prod ht, h.right_of_prod hs⟩, fun h => h.1.Prod h.2⟩
-#align metric.bounded_prod_of_nonempty Metric.bounded_prod_of_nonempty
+#print Bornology.isBounded_prod_of_nonempty /-
+theorem isBounded_prod_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
+ IsBounded (s ×ˢ t) ↔ IsBounded s ∧ IsBounded t :=
+ ⟨fun h => ⟨h.fst_of_prod ht, h.snd_of_prod hs⟩, fun h => h.1.Prod h.2⟩
+#align metric.bounded_prod_of_nonempty Bornology.isBounded_prod_of_nonempty
-/
+/- warning: metric.bounded_prod clashes with bornology.is_bounded_prod -> Bornology.isBounded_prod
+Case conversion may be inaccurate. Consider using '#align metric.bounded_prod Bornology.isBounded_prodₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print Metric.bounded_prod /-
-theorem bounded_prod : Bounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ Bounded s ∧ Bounded t :=
+#print Bornology.isBounded_prod /-
+theorem isBounded_prod : IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t :=
by
rcases s.eq_empty_or_nonempty with (rfl | hs); · simp
rcases t.eq_empty_or_nonempty with (rfl | ht); · simp
simp only [bounded_prod_of_nonempty hs ht, hs.ne_empty, ht.ne_empty, false_or_iff]
-#align metric.bounded_prod Metric.bounded_prod
+#align metric.bounded_prod Bornology.isBounded_prod
-/
end Metric
mathlib commit https://github.com/leanprover-community/mathlib/commit/442a83d738cb208d3600056c489be16900ba701d
@@ -106,11 +106,11 @@ alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
-#print lipschitz_on_univ /-
+#print lipschitzOn_univ /-
@[simp]
-theorem lipschitz_on_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
+theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
-#align lipschitz_on_univ lipschitz_on_univ
+#align lipschitz_on_univ lipschitzOn_univ
-/
#print lipschitzOnWith_iff_restrict /-
@@ -813,7 +813,7 @@ theorem continuous_prod_of_continuous_lipschitzWith [PseudoEMetricSpace α] [Top
[PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
(hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f :=
by
- simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
+ simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitzOn_univ] at *
exact continuousOn_prod_of_continuousOn_lipschitzOnWith f K (fun a _ => ha a) fun b _ => hb b
#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzWith
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -66,7 +66,7 @@ theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
-/
-alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.of_dist_le_mul
+alias ⟨LipschitzWith.dist_le_mul, LipschitzWith.of_dist_le_mul⟩ := lipschitzWith_iff_dist_le_mul
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
@@ -101,7 +101,8 @@ theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpac
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
-/
-alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzOnWith.of_dist_le_mul
+alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
+ lipschitzOnWith_iff_dist_le_mul
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
@@ -119,7 +120,7 @@ theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace
#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
-/
-alias lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict _
+alias ⟨LipschitzOnWith.to_restrict, _⟩ := lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
#print MapsTo.lipschitzOnWith_iff_restrict /-
@@ -130,7 +131,7 @@ theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetr
#align maps_to.lipschitz_on_with_iff_restrict MapsTo.lipschitzOnWith_iff_restrict
-/
-alias MapsTo.lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict_mapsTo _
+alias ⟨LipschitzOnWith.to_restrict_mapsTo, _⟩ := MapsTo.lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict_maps_to LipschitzOnWith.to_restrict_mapsTo
namespace LipschitzWith
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module topology.metric_space.lipschitz
-! leanprover-community/mathlib commit f47581155c818e6361af4e4fda60d27d020c226b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Logic.Function.Iterate
import Mathbin.Data.Set.Intervals.ProjIcc
@@ -14,6 +9,8 @@ import Mathbin.Topology.Algebra.Order.Field
import Mathbin.Topology.MetricSpace.Basic
import Mathbin.Topology.Bornology.Hom
+#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f47581155c818e6361af4e4fda60d27d020c226b"
+
/-!
# Lipschitz continuous functions
mathlib commit https://github.com/leanprover-community/mathlib/commit/d30d31261cdb4d2f5e612eabc3c4bf45556350d5
@@ -772,15 +772,15 @@ end Metric
end LipschitzOnWith
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print continuousOn_prod_of_continuousOn_lipschitz_on /-
+#print continuousOn_prod_of_continuousOn_lipschitzOnWith /-
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
of continuity of `f` on subsets of the product space. -/
-theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [TopologicalSpace β]
- [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
+theorem continuousOn_prod_of_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
+ [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
(ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
(hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) :=
by
@@ -801,23 +801,23 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
edist_triangle _ _ _
_ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
-#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
+#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitzOnWith
-/
-#print continuous_prod_of_continuous_lipschitz /-
+#print continuous_prod_of_continuous_lipschitzWith /-
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
of continuity of `f` on subsets of the product space. -/
-theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [TopologicalSpace β]
+theorem continuous_prod_of_continuous_lipschitzWith [PseudoEMetricSpace α] [TopologicalSpace β]
[PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
(hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f :=
by
simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
- exact continuousOn_prod_of_continuousOn_lipschitz_on f K (fun a _ => ha a) fun b _ => hb b
-#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitz
+ exact continuousOn_prod_of_continuousOn_lipschitzOnWith f K (fun a _ => ha a) fun b _ => hb b
+#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzWith
-/
open Metric
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -62,10 +62,12 @@ def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0)
#align lipschitz_with LipschitzWith
-/
+#print lipschitzWith_iff_dist_le_mul /-
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y := by
simp only [LipschitzWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
+-/
alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.of_dist_le_mul
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
@@ -94,11 +96,13 @@ theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K
#align lipschitz_on_with.mono LipschitzOnWith.mono
-/
+#print lipschitzOnWith_iff_dist_le_mul /-
theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y := by
simp only [LipschitzOnWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
+-/
alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzOnWith.of_dist_le_mul
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
@@ -148,43 +152,59 @@ protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : Lipschi
#align lipschitz_with.lipschitz_on_with LipschitzWith.lipschitzOnWith
-/
+#print LipschitzWith.edist_le_mul /-
theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y :=
h x y
#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mul
+-/
+#print LipschitzWith.edist_le_mul_of_le /-
theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
(h x y).trans <| ENNReal.mul_left_mono hr
#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
+-/
+#print LipschitzWith.edist_lt_mul_of_lt /-
theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
edist (f x) (f y) < K * r :=
(h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
+-/
+#print LipschitzWith.mapsTo_emetric_closedBall /-
theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
MapsTo f (closedBall x r) (closedBall (f x) (K * r)) := fun y hy => h.edist_le_mul_of_le hy
#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBall
+-/
+#print LipschitzWith.mapsTo_emetric_ball /-
theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
MapsTo f (ball x r) (ball (f x) (K * r)) := fun y hy => h.edist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ball
+-/
+#print LipschitzWith.edist_lt_top /-
theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
edist (f x) (f y) < ⊤ :=
(hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
+-/
+#print LipschitzWith.mul_edist_le /-
theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
(K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y :=
by
rw [mul_comm, ← div_eq_mul_inv]
exact ENNReal.div_le_of_le_mul' (h x y)
#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_le
+-/
+#print LipschitzWith.of_edist_le /-
protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : LipschitzWith 1 f :=
fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
+-/
#print LipschitzWith.weaken /-
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
@@ -192,6 +212,7 @@ protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K')
#align lipschitz_with.weaken LipschitzWith.weaken
-/
+#print LipschitzWith.ediam_image_le /-
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
EMetric.diam (f '' s) ≤ K * EMetric.diam s :=
by
@@ -199,13 +220,16 @@ theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩
exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_le
+-/
+#print LipschitzWith.edist_lt_of_edist_lt_div /-
theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥0∞}
(h : edist x y < d / K) : edist (f x) (f y) < d :=
calc
edist (f x) (f y) ≤ K * edist x y := hf x y
_ < d := ENNReal.mul_lt_of_lt_div' h
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
+-/
#print LipschitzWith.uniformContinuous /-
/-- A Lipschitz function is uniformly continuous -/
@@ -224,9 +248,11 @@ protected theorem continuous (hf : LipschitzWith K f) : Continuous f :=
#align lipschitz_with.continuous LipschitzWith.continuous
-/
+#print LipschitzWith.const /-
protected theorem const (b : β) : LipschitzWith 0 fun a : α => b := fun x y => by
simp only [edist_self, zero_le]
#align lipschitz_with.const LipschitzWith.const
+-/
#print LipschitzWith.id /-
protected theorem id : LipschitzWith 1 (@id α) :=
@@ -268,6 +294,7 @@ protected theorem restrict (hf : LipschitzWith K f) (s : Set α) : LipschitzWith
#align lipschitz_with.restrict LipschitzWith.restrict
-/
+#print LipschitzWith.comp /-
protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
@@ -275,11 +302,14 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
_ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
#align lipschitz_with.comp LipschitzWith.comp
+-/
+#print LipschitzWith.comp_lipschitzOnWith /-
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
(hf : LipschitzWith Kf f) (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (Kf * Kg) (f ∘ g) s :=
lipschitzOnWith_iff_restrict.mpr <| hf.comp hg.to_restrict
#align lipschitz_with.comp_lipschitz_on_with LipschitzWith.comp_lipschitzOnWith
+-/
#print LipschitzWith.prod_fst /-
protected theorem prod_fst : LipschitzWith 1 (@Prod.fst α β) :=
@@ -293,6 +323,7 @@ protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β) :=
#align lipschitz_with.prod_snd LipschitzWith.prod_snd
-/
+#print LipschitzWith.prod /-
protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
(hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) :=
by
@@ -300,6 +331,7 @@ protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f)
rw [ennreal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
exact max_le_max (hf x y) (hg x y)
#align lipschitz_with.prod LipschitzWith.prod
+-/
#print LipschitzWith.prod_mk_left /-
protected theorem prod_mk_left (a : α) : LipschitzWith 1 (Prod.mk a : β → α × β) := by
@@ -313,6 +345,7 @@ protected theorem prod_mk_right (b : β) : LipschitzWith 1 fun a : α => (a, b)
#align lipschitz_with.prod_mk_right LipschitzWith.prod_mk_right
-/
+#print LipschitzWith.uncurry /-
protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀ b, LipschitzWith Kα fun a => f a b)
(hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f) :=
by
@@ -323,6 +356,7 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
add_le_add (le_trans (hα _ _ _) <| ENNReal.mul_left_mono <| le_max_left _ _)
(le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
#align lipschitz_with.uncurry LipschitzWith.uncurry
+-/
#print LipschitzWith.iterate /-
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) (f^[n])
@@ -331,19 +365,24 @@ protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, Lips
#align lipschitz_with.iterate LipschitzWith.iterate
-/
+#print LipschitzWith.edist_iterate_succ_le_geometric /-
theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * K ^ n :=
by
rw [iterate_succ, mul_comm]
simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
+-/
+#print LipschitzWith.mul /-
protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
hf.comp hg
#align lipschitz_with.mul LipschitzWith.mul
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print LipschitzWith.list_prod /-
/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
endomorphism. -/
protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
@@ -351,12 +390,15 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
| [] => by simpa using LipschitzWith.id
| i::l => by simp only [List.map_cons, List.prod_cons]; exact (h i).mul (list_prod l)
#align lipschitz_with.list_prod LipschitzWith.list_prod
+-/
+#print LipschitzWith.pow /-
protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by rw [pow_succ, pow_succ]; exact h.mul (pow n)
#align lipschitz_with.pow LipschitzWith.pow
+-/
end Emetric
@@ -365,16 +407,21 @@ section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ] {K : ℝ≥0} {f : α → β}
{x y : α} {r : ℝ}
+#print LipschitzWith.of_dist_le' /-
protected theorem of_dist_le' {K : ℝ} (h : ∀ x y, dist (f x) (f y) ≤ K * dist x y) :
LipschitzWith (Real.toNNReal K) f :=
of_dist_le_mul fun x y =>
le_trans (h x y) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'
+-/
+#print LipschitzWith.mk_one /-
protected theorem mk_one (h : ∀ x y, dist (f x) (f y) ≤ dist x y) : LipschitzWith 1 f :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_with.mk_one LipschitzWith.mk_one
+-/
+#print LipschitzWith.of_le_add_mul' /-
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x ≤ f y + K * dist x y) :
@@ -382,48 +429,67 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x
have I : ∀ x y, f x - f y ≤ K * dist x y := fun x y => sub_le_iff_le_add'.2 (h x y)
LipschitzWith.of_dist_le' fun x y => abs_sub_le_iff.2 ⟨I x y, dist_comm y x ▸ I y x⟩
#align lipschitz_with.of_le_add_mul' LipschitzWith.of_le_add_mul'
+-/
+#print LipschitzWith.of_le_add_mul /-
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0) (h : ∀ x y, f x ≤ f y + K * dist x y) :
LipschitzWith K f := by simpa only [Real.toNNReal_coe] using LipschitzWith.of_le_add_mul' K h
#align lipschitz_with.of_le_add_mul LipschitzWith.of_le_add_mul
+-/
+#print LipschitzWith.of_le_add /-
protected theorem of_le_add {f : α → ℝ} (h : ∀ x y, f x ≤ f y + dist x y) : LipschitzWith 1 f :=
LipschitzWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_with.of_le_add LipschitzWith.of_le_add
+-/
+#print LipschitzWith.le_add_mul /-
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzWith K f) (x y) :
f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x y
#align lipschitz_with.le_add_mul LipschitzWith.le_add_mul
+-/
+#print LipschitzWith.iff_le_add_mul /-
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzWith K f ↔ ∀ x y, f x ≤ f y + K * dist x y :=
⟨LipschitzWith.le_add_mul, LipschitzWith.of_le_add_mul K⟩
#align lipschitz_with.iff_le_add_mul LipschitzWith.iff_le_add_mul
+-/
+#print LipschitzWith.nndist_le /-
theorem nndist_le (hf : LipschitzWith K f) (x y : α) : nndist (f x) (f y) ≤ K * nndist x y :=
hf.dist_le_mul x y
#align lipschitz_with.nndist_le LipschitzWith.nndist_le
+-/
+#print LipschitzWith.dist_le_mul_of_le /-
theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r :=
(hf.dist_le_mul x y).trans <| mul_le_mul_of_nonneg_left hr K.coe_nonneg
#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_le
+-/
+#print LipschitzWith.mapsTo_closedBall /-
theorem mapsTo_closedBall (hf : LipschitzWith K f) (x : α) (r : ℝ) :
MapsTo f (Metric.closedBall x r) (Metric.closedBall (f x) (K * r)) := fun y hy =>
hf.dist_le_mul_of_le hy
#align lipschitz_with.maps_to_closed_ball LipschitzWith.mapsTo_closedBall
+-/
+#print LipschitzWith.dist_lt_mul_of_lt /-
theorem dist_lt_mul_of_lt (hf : LipschitzWith K f) (hK : K ≠ 0) (hr : dist x y < r) :
dist (f x) (f y) < K * r :=
(hf.dist_le_mul x y).trans_lt <| (mul_lt_mul_left <| NNReal.coe_pos.2 hK.bot_lt).2 hr
#align lipschitz_with.dist_lt_mul_of_lt LipschitzWith.dist_lt_mul_of_lt
+-/
+#print LipschitzWith.mapsTo_ball /-
theorem mapsTo_ball (hf : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ) :
MapsTo f (Metric.ball x r) (Metric.ball (f x) (K * r)) := fun y hy => hf.dist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_ball LipschitzWith.mapsTo_ball
+-/
#print LipschitzWith.toLocallyBoundedMap /-
/-- A Lipschitz continuous map is a locally bounded map. -/
@@ -436,15 +502,19 @@ def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBounde
#align lipschitz_with.to_locally_bounded_map LipschitzWith.toLocallyBoundedMap
-/
+#print LipschitzWith.coe_toLocallyBoundedMap /-
@[simp]
theorem coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBoundedMap f) = f :=
rfl
#align lipschitz_with.coe_to_locally_bounded_map LipschitzWith.coe_toLocallyBoundedMap
+-/
+#print LipschitzWith.comap_cobounded_le /-
theorem comap_cobounded_le (hf : LipschitzWith K f) :
comap f (Bornology.cobounded β) ≤ Bornology.cobounded α :=
(hf.toLocallyBoundedMap f).2
#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_le
+-/
#print LipschitzWith.bounded_image /-
theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
@@ -455,12 +525,14 @@ theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded
#align lipschitz_with.bounded_image LipschitzWith.bounded_image
-/
+#print LipschitzWith.diam_image_le /-
theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
ball_image_iff.2 fun x hx =>
ball_image_iff.2 fun y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
#align lipschitz_with.diam_image_le LipschitzWith.diam_image_le
+-/
#print LipschitzWith.dist_left /-
protected theorem dist_left (y : α) : LipschitzWith 1 fun x => dist x y :=
@@ -474,26 +546,34 @@ protected theorem dist_right (x : α) : LipschitzWith 1 (dist x) :=
#align lipschitz_with.dist_right LipschitzWith.dist_right
-/
+#print LipschitzWith.dist /-
protected theorem dist : LipschitzWith 2 (Function.uncurry <| @dist α _) :=
LipschitzWith.uncurry LipschitzWith.dist_left LipschitzWith.dist_right
#align lipschitz_with.dist LipschitzWith.dist
+-/
+#print LipschitzWith.dist_iterate_succ_le_geometric /-
theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
dist ((f^[n]) x) ((f^[n + 1]) x) ≤ dist x (f x) * K ^ n :=
by
rw [iterate_succ, mul_comm]
simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometric
+-/
+#print lipschitzWith_max /-
theorem lipschitzWith_max : LipschitzWith 1 fun p : ℝ × ℝ => max p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_max_sub_max_le_max _ _ _ _)
#align lipschitz_with_max lipschitzWith_max
+-/
+#print lipschitzWith_min /-
theorem lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_min_sub_min_le_max _ _ _ _)
#align lipschitz_with_min lipschitzWith_min
+-/
end Metric
@@ -501,37 +581,51 @@ section Emetric
variable {α} [PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : ℝ≥0}
+#print LipschitzWith.max /-
protected theorem max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => max (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_max.comp (hf.prod hg)
#align lipschitz_with.max LipschitzWith.max
+-/
+#print LipschitzWith.min /-
protected theorem min (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => min (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_min.comp (hf.prod hg)
#align lipschitz_with.min LipschitzWith.min
+-/
+#print LipschitzWith.max_const /-
theorem max_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.max (LipschitzWith.const a)
#align lipschitz_with.max_const LipschitzWith.max_const
+-/
+#print LipschitzWith.const_max /-
theorem const_max (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max a (f x) := by
simpa only [max_comm] using hf.max_const a
#align lipschitz_with.const_max LipschitzWith.const_max
+-/
+#print LipschitzWith.min_const /-
theorem min_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.min (LipschitzWith.const a)
#align lipschitz_with.min_const LipschitzWith.min_const
+-/
+#print LipschitzWith.const_min /-
theorem const_min (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min a (f x) := by
simpa only [min_comm] using hf.min_const a
#align lipschitz_with.const_min LipschitzWith.const_min
+-/
end Emetric
+#print LipschitzWith.projIcc /-
protected theorem projIcc {a b : ℝ} (h : a ≤ b) : LipschitzWith 1 (projIcc a b h) :=
((LipschitzWith.id.const_min _).const_max _).subtype_mk _
#align lipschitz_with.proj_Icc LipschitzWith.projIcc
+-/
end LipschitzWith
@@ -593,16 +687,20 @@ protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :
#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
-/
+#print LipschitzOnWith.edist_lt_of_edist_lt_div /-
theorem edist_lt_of_edist_lt_div (hf : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
{d : ℝ≥0∞} (hd : edist x y < d / K) : edist (f x) (f y) < d :=
(lipschitzOnWith_iff_restrict.mp hf).edist_lt_of_edist_lt_div <|
show edist (⟨x, hx⟩ : s) ⟨y, hy⟩ < d / K from hd
#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_div
+-/
+#print LipschitzOnWith.comp /-
protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : LipschitzOnWith Kg g t)
(hf : LipschitzOnWith K f s) (hmaps : MapsTo f s t) : LipschitzOnWith (Kg * K) (g ∘ f) s :=
lipschitzOnWith_iff_restrict.mpr <| hg.to_restrict.comp (hf.to_restrict_mapsTo hmaps)
#align lipschitz_on_with.comp LipschitzOnWith.comp
+-/
end Emetric
@@ -612,17 +710,22 @@ variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ]
variable {K : ℝ≥0} {s : Set α} {f : α → β}
+#print LipschitzOnWith.of_dist_le' /-
protected theorem of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) :
LipschitzOnWith (Real.toNNReal K) f s :=
of_dist_le_mul fun x hx y hy =>
le_trans (h x hx y hy) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'
+-/
+#print LipschitzOnWith.mk_one /-
protected theorem mk_one (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) :
LipschitzOnWith 1 f s :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_on_with.mk_one LipschitzOnWith.mk_one
+-/
+#print LipschitzOnWith.of_le_add_mul' /-
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
@@ -632,34 +735,44 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
LipschitzOnWith.of_dist_le' fun x hx y hy =>
abs_sub_le_iff.2 ⟨I x hx y hy, dist_comm y x ▸ I y hy x hx⟩
#align lipschitz_on_with.of_le_add_mul' LipschitzOnWith.of_le_add_mul'
+-/
+#print LipschitzOnWith.of_le_add_mul /-
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0)
(h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y) : LipschitzOnWith K f s := by
simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
#align lipschitz_on_with.of_le_add_mul LipschitzOnWith.of_le_add_mul
+-/
+#print LipschitzOnWith.of_le_add /-
protected theorem of_le_add {f : α → ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) :
LipschitzOnWith 1 f s :=
LipschitzOnWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_on_with.of_le_add LipschitzOnWith.of_le_add
+-/
+#print LipschitzOnWith.le_add_mul /-
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzOnWith K f s) {x : α} (hx : x ∈ s)
{y : α} (hy : y ∈ s) : f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x hx y hy
#align lipschitz_on_with.le_add_mul LipschitzOnWith.le_add_mul
+-/
+#print LipschitzOnWith.iff_le_add_mul /-
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y :=
⟨LipschitzOnWith.le_add_mul, LipschitzOnWith.of_le_add_mul K⟩
#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mul
+-/
end Metric
end LipschitzOnWith
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print continuousOn_prod_of_continuousOn_lipschitz_on /-
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
@@ -689,7 +802,9 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
_ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
+-/
+#print continuous_prod_of_continuous_lipschitz /-
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
@@ -703,9 +818,11 @@ theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [Topolog
simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
exact continuousOn_prod_of_continuousOn_lipschitz_on f K (fun a _ => ha a) fun b _ => hb b
#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitz
+-/
open Metric
+#print continuousAt_of_locally_lipschitz /-
/-- If a function is locally Lipschitz around a point, then it is continuous at this point. -/
theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSpace β] {f : α → β}
{x : α} {r : ℝ} (hr : 0 < r) (K : ℝ) (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) :
@@ -720,6 +837,7 @@ theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSp
refine' (continuous_const.mul (continuous_id.dist continuous_const)).tendsto' _ _ _
simp
#align continuous_at_of_locally_lipschitz continuousAt_of_locally_lipschitz
+-/
#print LipschitzOnWith.extend_real /-
/-- A function `f : α → ℝ` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -205,7 +205,6 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
calc
edist (f x) (f y) ≤ K * edist x y := hf x y
_ < d := ENNReal.mul_lt_of_lt_div' h
-
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
#print LipschitzWith.uniformContinuous /-
@@ -275,7 +274,6 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
_ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
-
#align lipschitz_with.comp LipschitzWith.comp
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
@@ -690,7 +688,6 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
edist_triangle _ _ _
_ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
-
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
@@ -750,7 +747,6 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
f z ≤ f t + K * dist z t := hf.le_add_mul hz t.2
_ ≤ f t + K * (dist y z + dist y t) :=
add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle_left _ _ _) K.2) _
-
have E : eq_on f g s := by
intro x hx
refine' le_antisymm (le_ciInf fun y => hf.le_add_mul hx y.2) _
@@ -766,7 +762,6 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
by
rw [add_assoc, ← mul_add, add_comm (dist y z)]
exact add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle _ _ _) K.2) _
-
#align lipschitz_on_with.extend_real LipschitzOnWith.extend_real
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -679,7 +679,7 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
have εK : 0 < ε / 2 / K := ENNReal.div_pos_iff.2 ⟨ε0.ne', ENNReal.coe_ne_top⟩
have A : s ∩ EMetric.ball x (ε / 2 / K) ∈ 𝓝[s] x :=
inter_mem_nhdsWithin _ (EMetric.ball_mem_nhds _ εK)
- have B : { b : β | b ∈ t ∧ edist (f (x, b)) (f (x, y)) < ε / 2 } ∈ 𝓝[t] y :=
+ have B : {b : β | b ∈ t ∧ edist (f (x, b)) (f (x, y)) < ε / 2} ∈ 𝓝[t] y :=
inter_mem self_mem_nhdsWithin (ha x hx y hy (EMetric.ball_mem_nhds _ ε0))
filter_upwards [nhdsWithin_prod A B]
rintro ⟨a, b⟩
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -50,7 +50,7 @@ universe u v w x
open Filter Function Set
-open Topology NNReal ENNReal
+open scoped Topology NNReal ENNReal
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
@@ -186,9 +186,11 @@ protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : L
fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
+#print LipschitzWith.weaken /-
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
#align lipschitz_with.weaken LipschitzWith.weaken
+-/
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
EMetric.diam (f '' s) ≤ K * EMetric.diam s :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -62,29 +62,11 @@ def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0)
#align lipschitz_with LipschitzWith
-/
-/- warning: lipschitz_with_iff_dist_le_mul -> lipschitzWith_iff_dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, Iff (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, Iff (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mulₓ'. -/
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y := by
simp only [LipschitzWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
-/- warning: lipschitz_with.dist_le_mul -> LipschitzWith.dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mulₓ'. -/
-/- warning: lipschitz_with.of_dist_le_mul -> LipschitzWith.of_dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mulₓ'. -/
alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.of_dist_le_mul
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
@@ -112,30 +94,12 @@ theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K
#align lipschitz_on_with.mono LipschitzOnWith.mono
-/
-/- warning: lipschitz_on_with_iff_dist_le_mul -> lipschitzOnWith_iff_dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, Iff (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, Iff (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mulₓ'. -/
theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y := by
simp only [LipschitzOnWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
-/- warning: lipschitz_on_with.dist_le_mul -> LipschitzOnWith.dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) -> (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) -> (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mulₓ'. -/
-/- warning: lipschitz_on_with.of_dist_le_mul -> LipschitzOnWith.of_dist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mulₓ'. -/
alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzOnWith.of_dist_le_mul
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
@@ -184,75 +148,33 @@ protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : Lipschi
#align lipschitz_with.lipschitz_on_with LipschitzWith.lipschitzOnWith
-/
-/- warning: lipschitz_with.edist_le_mul -> LipschitzWith.edist_le_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mulₓ'. -/
theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y :=
h x y
#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mul
-/- warning: lipschitz_with.edist_le_mul_of_le -> LipschitzWith.edist_le_mul_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_leₓ'. -/
theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
(h x y).trans <| ENNReal.mul_left_mono hr
#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
-/- warning: lipschitz_with.edist_lt_mul_of_lt -> LipschitzWith.edist_lt_mul_of_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_ltₓ'. -/
theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
edist (f x) (f y) < K * r :=
(h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
-/- warning: lipschitz_with.maps_to_emetric_closed_ball -> LipschitzWith.mapsTo_emetric_closedBall is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.closedBall.{u1} α _inst_1 x r) (EMetric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.closedBall.{u1} α _inst_1 x r) (EMetric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBallₓ'. -/
theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
MapsTo f (closedBall x r) (closedBall (f x) (K * r)) := fun y hy => h.edist_le_mul_of_le hy
#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBall
-/- warning: lipschitz_with.maps_to_emetric_ball -> LipschitzWith.mapsTo_emetric_ball is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.ball.{u1} α _inst_1 x r) (EMetric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.ball.{u1} α _inst_1 x r) (EMetric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ballₓ'. -/
theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
MapsTo f (ball x r) (ball (f x) (K * r)) := fun y hy => h.edist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ball
-/- warning: lipschitz_with.edist_lt_top -> LipschitzWith.edist_lt_top is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_topₓ'. -/
theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
edist (f x) (f y) < ⊤ :=
(hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
-/- warning: lipschitz_with.mul_edist_le -> LipschitzWith.mul_edist_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (Inv.inv.{0} ENNReal ENNReal.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (Inv.inv.{0} ENNReal ENNReal.instInvENNReal (ENNReal.some K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_leₓ'. -/
theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
(K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y :=
by
@@ -260,32 +182,14 @@ theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
exact ENNReal.div_le_of_le_mul' (h x y)
#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_le
-/- warning: lipschitz_with.of_edist_le -> LipschitzWith.of_edist_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_edist_le LipschitzWith.of_edist_leₓ'. -/
protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : LipschitzWith 1 f :=
fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
-/- warning: lipschitz_with.weaken -> LipschitzWith.weaken is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {K' : NNReal}, (LE.le.{0} NNReal (Preorder.toHasLe.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) K K') -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K' f))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {K' : NNReal}, (LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (StrictOrderedSemiring.toPartialOrder.{0} NNReal instNNRealStrictOrderedSemiring))) K K') -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K' f))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.weaken LipschitzWith.weakenₓ'. -/
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
#align lipschitz_with.weaken LipschitzWith.weaken
-/- warning: lipschitz_with.ediam_image_le -> LipschitzWith.ediam_image_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EMetric.diam.{u1} α _inst_1 s)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EMetric.diam.{u1} α _inst_1 s)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_leₓ'. -/
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
EMetric.diam (f '' s) ≤ K * EMetric.diam s :=
by
@@ -294,12 +198,6 @@ theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_le
-/- warning: lipschitz_with.edist_lt_of_edist_lt_div -> LipschitzWith.edist_lt_of_edist_lt_div is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_divₓ'. -/
theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥0∞}
(h : edist x y < d / K) : edist (f x) (f y) < d :=
calc
@@ -325,12 +223,6 @@ protected theorem continuous (hf : LipschitzWith K f) : Continuous f :=
#align lipschitz_with.continuous LipschitzWith.continuous
-/
-/- warning: lipschitz_with.const -> LipschitzWith.const is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] (b : β), LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (a : α) => b)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] (b : β), LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero)) (fun (a : α) => b)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.const LipschitzWith.constₓ'. -/
protected theorem const (b : β) : LipschitzWith 0 fun a : α => b := fun x y => by
simp only [edist_self, zero_le]
#align lipschitz_with.const LipschitzWith.const
@@ -375,12 +267,6 @@ protected theorem restrict (hf : LipschitzWith K f) (s : Set α) : LipschitzWith
#align lipschitz_with.restrict LipschitzWith.restrict
-/
-/- warning: lipschitz_with.comp -> LipschitzWith.comp is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kg g) -> (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kg g) -> (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.comp LipschitzWith.compₓ'. -/
protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
@@ -390,12 +276,6 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
#align lipschitz_with.comp LipschitzWith.comp
-/- warning: lipschitz_with.comp_lipschitz_on_with -> LipschitzWith.comp_lipschitzOnWith is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β} {s : Set.{u1} α}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 Kg g s) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g) s)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β} {s : Set.{u1} α}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 Kg g s) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g) s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.comp_lipschitz_on_with LipschitzWith.comp_lipschitzOnWithₓ'. -/
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
(hf : LipschitzWith Kf f) (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (Kf * Kg) (f ∘ g) s :=
lipschitzOnWith_iff_restrict.mpr <| hf.comp hg.to_restrict
@@ -413,12 +293,6 @@ protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β) :=
#align lipschitz_with.prod_snd LipschitzWith.prod_snd
-/
-/- warning: lipschitz_with.prod -> LipschitzWith.prod is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β} {Kf : NNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kf f) -> (forall {g : α -> γ} {Kg : NNReal}, (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kg g) -> (LipschitzWith.{u1, max u2 u3} α (Prod.{u2, u3} β γ) _inst_1 (Prod.pseudoEMetricSpaceMax.{u2, u3} β γ _inst_2 _inst_3) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => Prod.mk.{u2, u3} β γ (f x) (g x))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β} {Kf : NNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kf f) -> (forall {g : α -> γ} {Kg : NNReal}, (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kg g) -> (LipschitzWith.{u1, max u3 u2} α (Prod.{u2, u3} β γ) _inst_1 (Prod.pseudoEMetricSpaceMax.{u2, u3} β γ _inst_2 _inst_3) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Prod.mk.{u2, u3} β γ (f x) (g x))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.prod LipschitzWith.prodₓ'. -/
protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
(hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) :=
by
@@ -439,12 +313,6 @@ protected theorem prod_mk_right (b : β) : LipschitzWith 1 fun a : α => (a, b)
#align lipschitz_with.prod_mk_right LipschitzWith.prod_mk_right
-/
-/- warning: lipschitz_with.uncurry -> LipschitzWith.uncurry is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β -> γ} {Kα : NNReal} {Kβ : NNReal}, (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kα (fun (a : α) => f a b)) -> (forall (a : α), LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kβ (f a)) -> (LipschitzWith.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.pseudoEMetricSpaceMax.{u1, u2} α β _inst_1 _inst_2) _inst_3 (HAdd.hAdd.{0, 0, 0} NNReal NNReal NNReal (instHAdd.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kα Kβ) (Function.uncurry.{u1, u2, u3} α β γ f))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β -> γ} {Kα : NNReal} {Kβ : NNReal}, (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kα (fun (a : α) => f a b)) -> (forall (a : α), LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kβ (f a)) -> (LipschitzWith.{max u2 u1, u3} (Prod.{u1, u2} α β) γ (Prod.pseudoEMetricSpaceMax.{u1, u2} α β _inst_1 _inst_2) _inst_3 (HAdd.hAdd.{0, 0, 0} NNReal NNReal NNReal (instHAdd.{0} NNReal (Distrib.toAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal instNNRealSemiring))))) Kα Kβ) (Function.uncurry.{u1, u2, u3} α β γ f))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.uncurry LipschitzWith.uncurryₓ'. -/
protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀ b, LipschitzWith Kα fun a => f a b)
(hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f) :=
by
@@ -463,12 +331,6 @@ protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, Lips
#align lipschitz_with.iterate LipschitzWith.iterate
-/
-/- warning: lipschitz_with.edist_iterate_succ_le_geometric -> LipschitzWith.edist_iterate_succ_le_geometric is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) n)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal))))))) (ENNReal.some K) n)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometricₓ'. -/
theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * K ^ n :=
by
@@ -476,23 +338,11 @@ theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
-/- warning: lipschitz_with.mul -> LipschitzWith.mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {g : Function.End.{u1} α} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kf f) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kg g) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (HMul.hMul.{u1, u1, u1} (Function.End.{u1} α) (Function.End.{u1} α) (Function.End.{u1} α) (instHMul.{u1} (Function.End.{u1} α) (MulOneClass.toHasMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α)))) f g))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {g : Function.End.{u1} α} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kf f) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kg g) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (HMul.hMul.{u1, u1, u1} (Function.End.{u1} α) (Function.End.{u1} α) (Function.End.{u1} α) (instHMul.{u1} (Function.End.{u1} α) (MulOneClass.toMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α)))) f g))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.mul LipschitzWith.mulₓ'. -/
protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
hf.comp hg
#align lipschitz_with.mul LipschitzWith.mul
-/- warning: lipschitz_with.list_prod -> LipschitzWith.list_prod is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] (f : ι -> (Function.End.{u1} α)) (K : ι -> NNReal), (forall (i : ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (K i) (f i)) -> (forall (l : List.{u2} ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (List.prod.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (List.map.{u2, 0} ι NNReal K l)) (List.prod.{u1} (Function.End.{u1} α) (MulOneClass.toHasMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) (MulOneClass.toHasOne.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) (List.map.{u2, u1} ι (Function.End.{u1} α) f l)))
-but is expected to have type
- forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] (f : ι -> (Function.End.{u1} α)) (K : ι -> NNReal), (forall (i : ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (K i) (f i)) -> (forall (l : List.{u2} ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (List.prod.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) instNNRealOne (List.map.{u2, 0} ι NNReal K l)) (List.prod.{u1} (Function.End.{u1} α) (MulOneClass.toMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α))) (Monoid.toOne.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α)) (List.map.{u2, u1} ι (Function.End.{u1} α) f l)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.list_prod LipschitzWith.list_prodₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
endomorphism. -/
@@ -502,12 +352,6 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
| i::l => by simp only [List.map_cons, List.prod_cons]; exact (h i).mul (list_prod l)
#align lipschitz_with.list_prod LipschitzWith.list_prod
-/- warning: lipschitz_with.pow -> LipschitzWith.pow is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {K : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (n : Nat), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HPow.hPow.{0, 0, 0} NNReal Nat NNReal (instHPow.{0, 0} NNReal Nat (Monoid.Pow.{0} NNReal (MonoidWithZero.toMonoid.{0} NNReal (Semiring.toMonoidWithZero.{0} NNReal NNReal.semiring)))) K n) (HPow.hPow.{u1, 0, u1} (Function.End.{u1} α) Nat (Function.End.{u1} α) (instHPow.{u1, 0} (Function.End.{u1} α) Nat (Monoid.Pow.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) f n))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {K : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (n : Nat), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HPow.hPow.{0, 0, 0} NNReal Nat NNReal (instHPow.{0, 0} NNReal Nat (Monoid.Pow.{0} NNReal (MonoidWithZero.toMonoid.{0} NNReal (Semiring.toMonoidWithZero.{0} NNReal instNNRealSemiring)))) K n) (HPow.hPow.{u1, 0, u1} (Function.End.{u1} α) Nat (Function.End.{u1} α) (instHPow.{u1, 0} (Function.End.{u1} α) Nat (Monoid.Pow.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α))) f n))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.pow LipschitzWith.powₓ'. -/
protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
@@ -521,34 +365,16 @@ section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ] {K : ℝ≥0} {f : α → β}
{x y : α} {r : ℝ}
-/- warning: lipschitz_with.of_dist_le' -> LipschitzWith.of_dist_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {K : Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {K : Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'ₓ'. -/
protected theorem of_dist_le' {K : ℝ} (h : ∀ x y, dist (f x) (f y) ≤ K * dist x y) :
LipschitzWith (Real.toNNReal K) f :=
of_dist_le_mul fun x y =>
le_trans (h x y) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'
-/- warning: lipschitz_with.mk_one -> LipschitzWith.mk_one is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.mk_one LipschitzWith.mk_oneₓ'. -/
protected theorem mk_one (h : ∀ x y, dist (f x) (f y) ≤ dist x y) : LipschitzWith 1 f :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_with.mk_one LipschitzWith.mk_one
-/- warning: lipschitz_with.of_le_add_mul' -> LipschitzWith.of_le_add_mul' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : Real), (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Real.toNNReal K) f)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : Real), (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Real.toNNReal K) f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add_mul' LipschitzWith.of_le_add_mul'ₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x ≤ f y + K * dist x y) :
@@ -557,98 +383,44 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x
LipschitzWith.of_dist_le' fun x y => abs_sub_le_iff.2 ⟨I x y, dist_comm y x ▸ I y x⟩
#align lipschitz_with.of_le_add_mul' LipschitzWith.of_le_add_mul'
-/- warning: lipschitz_with.of_le_add_mul -> LipschitzWith.of_le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : NNReal), (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : NNReal), (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add_mul LipschitzWith.of_le_add_mulₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0) (h : ∀ x y, f x ≤ f y + K * dist x y) :
LipschitzWith K f := by simpa only [Real.toNNReal_coe] using LipschitzWith.of_le_add_mul' K h
#align lipschitz_with.of_le_add_mul LipschitzWith.of_le_add_mul
-/- warning: lipschitz_with.of_le_add -> LipschitzWith.of_le_add is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add LipschitzWith.of_le_addₓ'. -/
protected theorem of_le_add {f : α → ℝ} (h : ∀ x y, f x ≤ f y + dist x y) : LipschitzWith 1 f :=
LipschitzWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_with.of_le_add LipschitzWith.of_le_add
-/- warning: lipschitz_with.le_add_mul -> LipschitzWith.le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.le_add_mul LipschitzWith.le_add_mulₓ'. -/
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzWith K f) (x y) :
f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x y
#align lipschitz_with.le_add_mul LipschitzWith.le_add_mul
-/- warning: lipschitz_with.iff_le_add_mul -> LipschitzWith.iff_le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, Iff (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, Iff (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.iff_le_add_mul LipschitzWith.iff_le_add_mulₓ'. -/
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzWith K f ↔ ∀ x y, f x ≤ f y + K * dist x y :=
⟨LipschitzWith.le_add_mul, LipschitzWith.of_le_add_mul K⟩
#align lipschitz_with.iff_le_add_mul LipschitzWith.iff_le_add_mul
-/- warning: lipschitz_with.nndist_le -> LipschitzWith.nndist_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toHasLe.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (StrictOrderedSemiring.toPartialOrder.{0} NNReal instNNRealStrictOrderedSemiring))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.nndist_le LipschitzWith.nndist_leₓ'. -/
theorem nndist_le (hf : LipschitzWith K f) (x y : α) : nndist (f x) (f y) ≤ K * nndist x y :=
hf.dist_le_mul x y
#align lipschitz_with.nndist_le LipschitzWith.nndist_le
-/- warning: lipschitz_with.dist_le_mul_of_le -> LipschitzWith.dist_le_mul_of_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_leₓ'. -/
theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r :=
(hf.dist_le_mul x y).trans <| mul_le_mul_of_nonneg_left hr K.coe_nonneg
#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_le
-/- warning: lipschitz_with.maps_to_closed_ball -> LipschitzWith.mapsTo_closedBall is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.closedBall.{u1} α _inst_1 x r) (Metric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.closedBall.{u1} α _inst_1 x r) (Metric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_closed_ball LipschitzWith.mapsTo_closedBallₓ'. -/
theorem mapsTo_closedBall (hf : LipschitzWith K f) (x : α) (r : ℝ) :
MapsTo f (Metric.closedBall x r) (Metric.closedBall (f x) (K * r)) := fun y hy =>
hf.dist_le_mul_of_le hy
#align lipschitz_with.maps_to_closed_ball LipschitzWith.mapsTo_closedBall
-/- warning: lipschitz_with.dist_lt_mul_of_lt -> LipschitzWith.dist_lt_mul_of_lt is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_lt_mul_of_lt LipschitzWith.dist_lt_mul_of_ltₓ'. -/
theorem dist_lt_mul_of_lt (hf : LipschitzWith K f) (hK : K ≠ 0) (hr : dist x y < r) :
dist (f x) (f y) < K * r :=
(hf.dist_le_mul x y).trans_lt <| (mul_lt_mul_left <| NNReal.coe_pos.2 hK.bot_lt).2 hr
#align lipschitz_with.dist_lt_mul_of_lt LipschitzWith.dist_lt_mul_of_lt
-/- warning: lipschitz_with.maps_to_ball -> LipschitzWith.mapsTo_ball is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.ball.{u1} α _inst_1 x r) (Metric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.ball.{u1} α _inst_1 x r) (Metric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_ball LipschitzWith.mapsTo_ballₓ'. -/
theorem mapsTo_ball (hf : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ) :
MapsTo f (Metric.ball x r) (Metric.ball (f x) (K * r)) := fun y hy => hf.dist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_ball LipschitzWith.mapsTo_ball
@@ -664,23 +436,11 @@ def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBounde
#align lipschitz_with.to_locally_bounded_map LipschitzWith.toLocallyBoundedMap
-/
-/- warning: lipschitz_with.coe_to_locally_bounded_map -> LipschitzWith.coe_toLocallyBoundedMap is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} (hf : LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f), Eq.{max (succ u1) (succ u2)} (α -> β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) (fun (_x : LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) => α -> β) (LocallyBoundedMap.hasCoeToFun.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) (LipschitzWith.toLocallyBoundedMap.{u1, u2} α β _inst_1 _inst_2 K f hf)) f
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} (hf : LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f), Eq.{max (succ u1) (succ u2)} (forall (ᾰ : α), (fun (x._@.Mathlib.Topology.Bornology.Hom._hyg.92 : α) => β) ᾰ) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) α (fun (_x : α) => (fun (x._@.Mathlib.Topology.Bornology.Hom._hyg.92 : α) => β) _x) (LocallyBoundedMapClass.toFunLike.{max u1 u2, u1, u2} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2) (LocallyBoundedMap.instLocallyBoundedMapClassLocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (LipschitzWith.toLocallyBoundedMap.{u1, u2} α β _inst_1 _inst_2 K f hf)) f
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.coe_to_locally_bounded_map LipschitzWith.coe_toLocallyBoundedMapₓ'. -/
@[simp]
theorem coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBoundedMap f) = f :=
rfl
#align lipschitz_with.coe_to_locally_bounded_map LipschitzWith.coe_toLocallyBoundedMap
-/- warning: lipschitz_with.comap_cobounded_le -> LipschitzWith.comap_cobounded_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toHasLe.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.instPartialOrderFilter.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_leₓ'. -/
theorem comap_cobounded_le (hf : LipschitzWith K f) :
comap f (Bornology.cobounded β) ≤ Bornology.cobounded α :=
(hf.toLocallyBoundedMap f).2
@@ -695,12 +455,6 @@ theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded
#align lipschitz_with.bounded_image LipschitzWith.bounded_image
-/
-/- warning: lipschitz_with.diam_image_le -> LipschitzWith.diam_image_le is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (s : Set.{u1} α), (Metric.Bounded.{u1} α _inst_1 s) -> (LE.le.{0} Real Real.hasLe (Metric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Metric.diam.{u1} α _inst_1 s))))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (s : Set.{u1} α), (Metric.Bounded.{u1} α _inst_1 s) -> (LE.le.{0} Real Real.instLEReal (Metric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Metric.diam.{u1} α _inst_1 s))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.diam_image_le LipschitzWith.diam_image_leₓ'. -/
theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
@@ -720,22 +474,10 @@ protected theorem dist_right (x : α) : LipschitzWith 1 (dist x) :=
#align lipschitz_with.dist_right LipschitzWith.dist_right
-/
-/- warning: lipschitz_with.dist -> LipschitzWith.dist is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α α) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 2 (OfNat.mk.{0} NNReal 2 (bit0.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) (Function.uncurry.{u1, u1, 0} α α Real (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α α) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 2 (instOfNat.{0} NNReal 2 (CanonicallyOrderedCommSemiring.toNatCast.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))) (Function.uncurry.{u1, u1, 0} α α Real (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist LipschitzWith.distₓ'. -/
protected theorem dist : LipschitzWith 2 (Function.uncurry <| @dist α _) :=
LipschitzWith.uncurry LipschitzWith.dist_left LipschitzWith.dist_right
#align lipschitz_with.dist LipschitzWith.dist
-/- warning: lipschitz_with.dist_iterate_succ_le_geometric -> LipschitzWith.dist_iterate_succ_le_geometric is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) K f) -> (forall (x : α) (n : Nat), LE.le.{0} Real Real.hasLe (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.monoid)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) n)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) K f) -> (forall (x : α) (n : Nat), LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.instMonoidReal)) (NNReal.toReal K) n)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometricₓ'. -/
theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
dist ((f^[n]) x) ((f^[n + 1]) x) ≤ dist x (f x) * K ^ n :=
by
@@ -743,23 +485,11 @@ theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometric
-/- warning: lipschitz_with_max -> lipschitzWith_max is a dubious translation:
-lean 3 declaration is
- LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (p : Prod.{0, 0} Real Real) => LinearOrder.max.{0} Real Real.linearOrder (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
-but is expected to have type
- LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (fun (p : Prod.{0, 0} Real Real) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with_max lipschitzWith_maxₓ'. -/
theorem lipschitzWith_max : LipschitzWith 1 fun p : ℝ × ℝ => max p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_max_sub_max_le_max _ _ _ _)
#align lipschitz_with_max lipschitzWith_max
-/- warning: lipschitz_with_min -> lipschitzWith_min is a dubious translation:
-lean 3 declaration is
- LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (p : Prod.{0, 0} Real Real) => LinearOrder.min.{0} Real Real.linearOrder (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
-but is expected to have type
- LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (fun (p : Prod.{0, 0} Real Real) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with_min lipschitzWith_minₓ'. -/
theorem lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_min_sub_min_le_max _ _ _ _)
@@ -771,76 +501,34 @@ section Emetric
variable {α} [PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : ℝ≥0}
-/- warning: lipschitz_with.max -> LipschitzWith.max is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder (f x) (g x)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (f x) (g x)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.max LipschitzWith.maxₓ'. -/
protected theorem max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => max (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_max.comp (hf.prod hg)
#align lipschitz_with.max LipschitzWith.max
-/- warning: lipschitz_with.min -> LipschitzWith.min is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder (f x) (g x)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (f x) (g x)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.min LipschitzWith.minₓ'. -/
protected theorem min (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => min (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_min.comp (hf.prod hg)
#align lipschitz_with.min LipschitzWith.min
-/- warning: lipschitz_with.max_const -> LipschitzWith.max_const is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder (f x) a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (f x) a))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.max_const LipschitzWith.max_constₓ'. -/
theorem max_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.max (LipschitzWith.const a)
#align lipschitz_with.max_const LipschitzWith.max_const
-/- warning: lipschitz_with.const_max -> LipschitzWith.const_max is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder a (f x)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) a (f x)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.const_max LipschitzWith.const_maxₓ'. -/
theorem const_max (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max a (f x) := by
simpa only [max_comm] using hf.max_const a
#align lipschitz_with.const_max LipschitzWith.const_max
-/- warning: lipschitz_with.min_const -> LipschitzWith.min_const is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder (f x) a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (f x) a))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.min_const LipschitzWith.min_constₓ'. -/
theorem min_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.min (LipschitzWith.const a)
#align lipschitz_with.min_const LipschitzWith.min_const
-/- warning: lipschitz_with.const_min -> LipschitzWith.const_min is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder a (f x)))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) a (f x)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.const_min LipschitzWith.const_minₓ'. -/
theorem const_min (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min a (f x) := by
simpa only [min_comm] using hf.min_const a
#align lipschitz_with.const_min LipschitzWith.const_min
end Emetric
-/- warning: lipschitz_with.proj_Icc -> LipschitzWith.projIcc is a dubious translation:
-lean 3 declaration is
- forall {a : Real} {b : Real} (h : LE.le.{0} Real Real.hasLe a b), LipschitzWith.{0, 0} Real (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (LinearOrder.toLattice.{0} Real Real.linearOrder)))) a b)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Subtype.pseudoEmetricSpace.{0} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (LinearOrder.toLattice.{0} Real Real.linearOrder)))) a b)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (Set.projIcc.{0} Real Real.linearOrder a b h)
-but is expected to have type
- forall {a : Real} {b : Real} (h : LE.le.{0} Real Real.instLEReal a b), LipschitzWith.{0, 0} Real (Set.Elem.{0} Real (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (DistribLattice.toLattice.{0} Real (instDistribLattice.{0} Real Real.linearOrder))))) a b)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (instPseudoEMetricSpaceSubtype.{0} Real (fun (x : Real) => Membership.mem.{0, 0} Real (Set.{0} Real) (Set.instMembershipSet.{0} Real) x (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (DistribLattice.toLattice.{0} Real (instDistribLattice.{0} Real Real.linearOrder))))) a b)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (Set.projIcc.{0} Real Real.linearOrder a b h)
-Case conversion may be inaccurate. Consider using '#align lipschitz_with.proj_Icc LipschitzWith.projIccₓ'. -/
protected theorem projIcc {a b : ℝ} (h : a ≤ b) : LipschitzWith 1 (projIcc a b h) :=
((LipschitzWith.id.const_min _).const_max _).subtype_mk _
#align lipschitz_with.proj_Icc LipschitzWith.projIcc
@@ -905,24 +593,12 @@ protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :
#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
-/
-/- warning: lipschitz_on_with.edist_lt_of_edist_lt_div -> LipschitzOnWith.edist_lt_of_edist_lt_div is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d)))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d)))
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_divₓ'. -/
theorem edist_lt_of_edist_lt_div (hf : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
{d : ℝ≥0∞} (hd : edist x y < d / K) : edist (f x) (f y) < d :=
(lipschitzOnWith_iff_restrict.mp hf).edist_lt_of_edist_lt_div <|
show edist (⟨x, hx⟩ : s) ⟨y, hy⟩ < d / K from hd
#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_div
-/- warning: lipschitz_on_with.comp -> LipschitzOnWith.comp is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {K : NNReal} {s : Set.{u1} α} {f : α -> β} {g : β -> γ} {t : Set.{u2} β} {Kg : NNReal}, (LipschitzOnWith.{u2, u3} β γ _inst_2 _inst_3 Kg g t) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (Set.MapsTo.{u1, u2} α β f s t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kg K) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) s)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {K : NNReal} {s : Set.{u1} α} {f : α -> β} {g : β -> γ} {t : Set.{u2} β} {Kg : NNReal}, (LipschitzOnWith.{u2, u3} β γ _inst_2 _inst_3 Kg g t) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (Set.MapsTo.{u1, u2} α β f s t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kg K) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.comp LipschitzOnWith.compₓ'. -/
protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : LipschitzOnWith Kg g t)
(hf : LipschitzOnWith K f s) (hmaps : MapsTo f s t) : LipschitzOnWith (Kg * K) (g ∘ f) s :=
lipschitzOnWith_iff_restrict.mpr <| hg.to_restrict.comp (hf.to_restrict_mapsTo hmaps)
@@ -936,35 +612,17 @@ variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ]
variable {K : ℝ≥0} {s : Set α} {f : α → β}
-/- warning: lipschitz_on_with.of_dist_le' -> LipschitzOnWith.of_dist_le' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β} {K : Real}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f s)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β} {K : Real}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'ₓ'. -/
protected theorem of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) :
LipschitzOnWith (Real.toNNReal K) f s :=
of_dist_le_mul fun x hx y hy =>
le_trans (h x hx y hy) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'
-/- warning: lipschitz_on_with.mk_one -> LipschitzOnWith.mk_one is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f s)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.mk_one LipschitzOnWith.mk_oneₓ'. -/
protected theorem mk_one (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) :
LipschitzOnWith 1 f s :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_on_with.mk_one LipschitzOnWith.mk_one
-/- warning: lipschitz_on_with.of_le_add_mul' -> LipschitzOnWith.of_le_add_mul' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : Real), (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Real.toNNReal K) f s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : Real), (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Real.toNNReal K) f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add_mul' LipschitzOnWith.of_le_add_mul'ₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
@@ -975,12 +633,6 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
abs_sub_le_iff.2 ⟨I x hx y hy, dist_comm y x ▸ I y hy x hx⟩
#align lipschitz_on_with.of_le_add_mul' LipschitzOnWith.of_le_add_mul'
-/- warning: lipschitz_on_with.of_le_add_mul -> LipschitzOnWith.of_le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : NNReal), (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : NNReal), (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add_mul LipschitzOnWith.of_le_add_mulₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0)
@@ -988,34 +640,16 @@ protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0)
simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
#align lipschitz_on_with.of_le_add_mul LipschitzOnWith.of_le_add_mul
-/- warning: lipschitz_on_with.of_le_add -> LipschitzOnWith.of_le_add is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f s)
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f s)
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add LipschitzOnWith.of_le_addₓ'. -/
protected theorem of_le_add {f : α → ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) :
LipschitzOnWith 1 f s :=
LipschitzOnWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_on_with.of_le_add LipschitzOnWith.of_le_add
-/- warning: lipschitz_on_with.le_add_mul -> LipschitzOnWith.le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s) -> (forall {x : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s) -> (forall {x : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall {y : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.le_add_mul LipschitzOnWith.le_add_mulₓ'. -/
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzOnWith K f s) {x : α} (hx : x ∈ s)
{y : α} (hy : y ∈ s) : f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x hx y hy
#align lipschitz_on_with.le_add_mul LipschitzOnWith.le_add_mul
-/- warning: lipschitz_on_with.iff_le_add_mul -> LipschitzOnWith.iff_le_add_mul is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, Iff (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, Iff (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))))
-Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mulₓ'. -/
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y :=
⟨LipschitzOnWith.le_add_mul, LipschitzOnWith.of_le_add_mul K⟩
@@ -1025,12 +659,6 @@ end Metric
end LipschitzOnWith
-/- warning: continuous_on_prod_of_continuous_on_lipschitz_on -> continuousOn_prod_of_continuousOn_lipschitz_on is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) {s : Set.{u1} α} {t : Set.{u2} β} (K : NNReal), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (ContinuousOn.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y)) t)) -> (forall (b : β), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b)) s)) -> (ContinuousOn.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.topologicalSpace.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f (Set.prod.{u1, u2} α β s t))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) {s : Set.{u1} α} {t : Set.{u2} β} (K : NNReal), (forall (a : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a s) -> (ContinuousOn.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y)) t)) -> (forall (b : β), (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) b t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b)) s)) -> (ContinuousOn.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (instTopologicalSpaceProd.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f (Set.prod.{u1, u2} α β s t))
-Case conversion may be inaccurate. Consider using '#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_onₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
@@ -1063,12 +691,6 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
-/- warning: continuous_prod_of_continuous_lipschitz -> continuous_prod_of_continuous_lipschitz is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) (K : NNReal), (forall (a : α), Continuous.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y))) -> (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b))) -> (Continuous.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.topologicalSpace.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f)
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) (K : NNReal), (forall (a : α), Continuous.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y))) -> (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b))) -> (Continuous.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (instTopologicalSpaceProd.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f)
-Case conversion may be inaccurate. Consider using '#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzₓ'. -/
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
@@ -1085,12 +707,6 @@ theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [Topolog
open Metric
-/- warning: continuous_at_of_locally_lipschitz -> continuousAt_of_locally_lipschitz is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {x : α} {r : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) r) -> (forall (K : Real), (forall (y : α), (LT.lt.{0} Real Real.hasLt (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) y x) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f y) (f x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) y x)))) -> (ContinuousAt.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α _inst_1)) (UniformSpace.toTopologicalSpace.{u2} β (PseudoMetricSpace.toUniformSpace.{u2} β _inst_2)) f x))
-but is expected to have type
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {x : α} {r : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) r) -> (forall (K : Real), (forall (y : α), (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) y x) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f y) (f x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) y x)))) -> (ContinuousAt.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α _inst_1)) (UniformSpace.toTopologicalSpace.{u2} β (PseudoMetricSpace.toUniformSpace.{u2} β _inst_2)) f x))
-Case conversion may be inaccurate. Consider using '#align continuous_at_of_locally_lipschitz continuousAt_of_locally_lipschitzₓ'. -/
/-- If a function is locally Lipschitz around a point, then it is continuous at this point. -/
theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSpace β] {f : α → β}
{x : α} {r : ℝ} (hr : 0 < r) (K : ℝ) (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -69,10 +69,8 @@ but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, Iff (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mulₓ'. -/
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
- {f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y :=
- by
- simp only [LipschitzWith, edist_nndist, dist_nndist]
- norm_cast
+ {f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y := by
+ simp only [LipschitzWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
/- warning: lipschitz_with.dist_le_mul -> LipschitzWith.dist_le_mul is a dubious translation:
@@ -122,10 +120,8 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mulₓ'. -/
theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
- LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y :=
- by
- simp only [LipschitzOnWith, edist_nndist, dist_nndist]
- norm_cast
+ LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y := by
+ simp only [LipschitzOnWith, edist_nndist, dist_nndist]; norm_cast
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
/- warning: lipschitz_on_with.dist_le_mul -> LipschitzOnWith.dist_le_mul is a dubious translation:
@@ -503,9 +499,7 @@ endomorphism. -/
protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
(h : ∀ i, LipschitzWith (K i) (f i)) : ∀ l : List ι, LipschitzWith (l.map K).Prod (l.map f).Prod
| [] => by simpa using LipschitzWith.id
- | i::l => by
- simp only [List.map_cons, List.prod_cons]
- exact (h i).mul (list_prod l)
+ | i::l => by simp only [List.map_cons, List.prod_cons]; exact (h i).mul (list_prod l)
#align lipschitz_with.list_prod LipschitzWith.list_prod
/- warning: lipschitz_with.pow -> LipschitzWith.pow is a dubious translation:
@@ -517,9 +511,7 @@ Case conversion may be inaccurate. Consider using '#align lipschitz_with.pow Lip
protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by
- rw [pow_succ, pow_succ]
- exact h.mul (pow n)
+ | n + 1 => by rw [pow_succ, pow_succ]; exact h.mul (pow n)
#align lipschitz_with.pow LipschitzWith.pow
end Emetric
@@ -718,9 +710,7 @@ theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded
#print LipschitzWith.dist_left /-
protected theorem dist_left (y : α) : LipschitzWith 1 fun x => dist x y :=
- LipschitzWith.of_le_add fun x z => by
- rw [add_comm]
- apply dist_triangle
+ LipschitzWith.of_le_add fun x z => by rw [add_comm]; apply dist_triangle
#align lipschitz_with.dist_left LipschitzWith.dist_left
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -190,7 +190,7 @@ protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : Lipschi
/- warning: lipschitz_with.edist_le_mul -> LipschitzWith.edist_le_mul is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mulₓ'. -/
@@ -200,7 +200,7 @@ theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤
/- warning: lipschitz_with.edist_le_mul_of_le -> LipschitzWith.edist_le_mul_of_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_leₓ'. -/
@@ -211,7 +211,7 @@ theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
/- warning: lipschitz_with.edist_lt_mul_of_lt -> LipschitzWith.edist_lt_mul_of_lt is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_ltₓ'. -/
@@ -242,7 +242,7 @@ theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r :
/- warning: lipschitz_with.edist_lt_top -> LipschitzWith.edist_lt_top is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_topₓ'. -/
@@ -253,7 +253,7 @@ theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤)
/- warning: lipschitz_with.mul_edist_le -> LipschitzWith.mul_edist_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (Inv.inv.{0} ENNReal ENNReal.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (Inv.inv.{0} ENNReal ENNReal.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (Inv.inv.{0} ENNReal ENNReal.instInvENNReal (ENNReal.some K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_leₓ'. -/
@@ -266,7 +266,7 @@ theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
/- warning: lipschitz_with.of_edist_le -> LipschitzWith.of_edist_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_edist_le LipschitzWith.of_edist_leₓ'. -/
@@ -274,15 +274,19 @@ protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : L
fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
-#print LipschitzWith.weaken /-
+/- warning: lipschitz_with.weaken -> LipschitzWith.weaken is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {K' : NNReal}, (LE.le.{0} NNReal (Preorder.toHasLe.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) K K') -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K' f))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {K' : NNReal}, (LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (StrictOrderedSemiring.toPartialOrder.{0} NNReal instNNRealStrictOrderedSemiring))) K K') -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K' f))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.weaken LipschitzWith.weakenₓ'. -/
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
#align lipschitz_with.weaken LipschitzWith.weaken
--/
/- warning: lipschitz_with.ediam_image_le -> LipschitzWith.ediam_image_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EMetric.diam.{u1} α _inst_1 s)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EMetric.diam.{u1} α _inst_1 s)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EMetric.diam.{u1} α _inst_1 s)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_leₓ'. -/
@@ -296,7 +300,7 @@ theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
/- warning: lipschitz_with.edist_lt_of_edist_lt_div -> LipschitzWith.edist_lt_of_edist_lt_div is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_divₓ'. -/
@@ -465,7 +469,7 @@ protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, Lips
/- warning: lipschitz_with.edist_iterate_succ_le_geometric -> LipschitzWith.edist_iterate_succ_le_geometric is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) n)))
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toHasLe.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) n)))
but is expected to have type
forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal))))))) (ENNReal.some K) n)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometricₓ'. -/
@@ -607,7 +611,7 @@ protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
/- warning: lipschitz_with.nndist_le -> LipschitzWith.nndist_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toHasLe.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (StrictOrderedSemiring.toPartialOrder.{0} NNReal instNNRealStrictOrderedSemiring))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.nndist_le LipschitzWith.nndist_leₓ'. -/
@@ -681,7 +685,7 @@ theorem coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBound
/- warning: lipschitz_with.comap_cobounded_le -> LipschitzWith.comap_cobounded_le is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toHasLe.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.instPartialOrderFilter.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
Case conversion may be inaccurate. Consider using '#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_leₓ'. -/
@@ -913,7 +917,7 @@ protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :
/- warning: lipschitz_on_with.edist_lt_of_edist_lt_div -> LipschitzOnWith.edist_lt_of_edist_lt_div is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d)))
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toHasLt.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d)))
but is expected to have type
forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d)))
Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_divₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -1125,7 +1125,7 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
rcases eq_empty_or_nonempty s with (rfl | hs)
· exact ⟨fun x => 0, (LipschitzWith.const _).weaken (zero_le _), eq_on_empty _ _⟩
have : Nonempty s := by simp only [hs, nonempty_coe_sort]
- let g := fun y : α => infᵢ fun x : s => f x + K * dist y x
+ let g := fun y : α => iInf fun x : s => f x + K * dist y x
have B : ∀ y : α, BddBelow (range fun x : s => f x + K * dist y x) :=
by
intro y
@@ -1141,15 +1141,15 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
have E : eq_on f g s := by
intro x hx
- refine' le_antisymm (le_cinfᵢ fun y => hf.le_add_mul hx y.2) _
+ refine' le_antisymm (le_ciInf fun y => hf.le_add_mul hx y.2) _
simpa only [add_zero, Subtype.coe_mk, MulZeroClass.mul_zero, dist_self] using
- cinfᵢ_le (B x) ⟨x, hx⟩
+ ciInf_le (B x) ⟨x, hx⟩
refine' ⟨g, LipschitzWith.of_le_add_mul K fun x y => _, E⟩
rw [← sub_le_iff_le_add]
- refine' le_cinfᵢ fun z => _
+ refine' le_ciInf fun z => _
rw [sub_le_iff_le_add]
calc
- g x ≤ f z + K * dist x z := cinfᵢ_le (B x) _
+ g x ≤ f z + K * dist x z := ciInf_le (B x) _
_ ≤ f z + K * dist y z + K * dist x y :=
by
rw [add_assoc, ← mul_add, add_comm (dist y z)]
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -1142,7 +1142,8 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
have E : eq_on f g s := by
intro x hx
refine' le_antisymm (le_cinfᵢ fun y => hf.le_add_mul hx y.2) _
- simpa only [add_zero, Subtype.coe_mk, mul_zero, dist_self] using cinfᵢ_le (B x) ⟨x, hx⟩
+ simpa only [add_zero, Subtype.coe_mk, MulZeroClass.mul_zero, dist_self] using
+ cinfᵢ_le (B x) ⟨x, hx⟩
refine' ⟨g, LipschitzWith.of_le_add_mul K fun x y => _, E⟩
rw [← sub_le_iff_le_add]
refine' le_cinfᵢ fun z => _
mathlib commit https://github.com/leanprover-community/mathlib/commit/21e3562c5e12d846c7def5eff8cdbc520d7d4936
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
! This file was ported from Lean 3 source module topology.metric_space.lipschitz
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit f47581155c818e6361af4e4fda60d27d020c226b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -17,6 +17,9 @@ import Mathbin.Topology.Bornology.Hom
/-!
# Lipschitz continuous functions
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
A map `f : α → β` between two (extended) metric spaces is called *Lipschitz continuous*
with constant `K ≥ 0` if for all `x, y` we have `edist (f x) (f y) ≤ K * edist x y`.
For a metric space, the latter inequality is equivalent to `dist (f x) (f y) ≤ K * dist x y`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/3b267e70a936eebb21ab546f49a8df34dd300b25
@@ -51,12 +51,20 @@ open Topology NNReal ENNReal
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
+#print LipschitzWith /-
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` if for all `x, y`
we have `dist (f x) (f y) ≤ K * dist x y` -/
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
+-/
+/- warning: lipschitz_with_iff_dist_le_mul -> lipschitzWith_iff_dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, Iff (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, Iff (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mulₓ'. -/
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y :=
by
@@ -64,27 +72,51 @@ theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace
norm_cast
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
+/- warning: lipschitz_with.dist_le_mul -> LipschitzWith.dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mulₓ'. -/
+/- warning: lipschitz_with.of_dist_le_mul -> LipschitzWith.of_dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mulₓ'. -/
alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.of_dist_le_mul
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
+#print LipschitzOnWith /-
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` on `s` if for all `x, y` in `s`
we have `dist (f x) (f y) ≤ K * dist x y` -/
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s), edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
+-/
+#print lipschitzOnWith_empty /-
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun x x_in y y_in => False.elim x_in
#align lipschitz_on_with_empty lipschitzOnWith_empty
+-/
+#print LipschitzOnWith.mono /-
theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun x x_in y y_in => hf (h x_in) (h y_in)
#align lipschitz_on_with.mono LipschitzOnWith.mono
+-/
+/- warning: lipschitz_on_with_iff_dist_le_mul -> lipschitzOnWith_iff_dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, Iff (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, Iff (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mulₓ'. -/
theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y :=
@@ -93,28 +125,46 @@ theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpac
norm_cast
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
+/- warning: lipschitz_on_with.dist_le_mul -> LipschitzOnWith.dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) -> (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s) -> (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mulₓ'. -/
+/- warning: lipschitz_on_with.of_dist_le_mul -> LipschitzOnWith.of_dist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mulₓ'. -/
alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzOnWith.of_dist_le_mul
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
+#print lipschitz_on_univ /-
@[simp]
theorem lipschitz_on_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
#align lipschitz_on_univ lipschitz_on_univ
+-/
+#print lipschitzOnWith_iff_restrict /-
theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
+-/
alias lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict _
#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
+#print MapsTo.lipschitzOnWith_iff_restrict /-
theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t) :
LipschitzOnWith K f s ↔ LipschitzWith K (h.restrict f s t) :=
lipschitzOnWith_iff_restrict
#align maps_to.lipschitz_on_with_iff_restrict MapsTo.lipschitzOnWith_iff_restrict
+-/
alias MapsTo.lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict_mapsTo _
#align lipschitz_on_with.to_restrict_maps_to LipschitzOnWith.to_restrict_mapsTo
@@ -129,37 +179,81 @@ variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
variable {K : ℝ≥0} {f : α → β} {x y : α} {r : ℝ≥0∞}
+#print LipschitzWith.lipschitzOnWith /-
protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : LipschitzOnWith K f s :=
fun x _ y _ => h x y
#align lipschitz_with.lipschitz_on_with LipschitzWith.lipschitzOnWith
+-/
+/- warning: lipschitz_with.edist_le_mul -> LipschitzWith.edist_le_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mulₓ'. -/
theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y :=
h x y
#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mul
+/- warning: lipschitz_with.edist_le_mul_of_le -> LipschitzWith.edist_le_mul_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_leₓ'. -/
theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
(h x y).trans <| ENNReal.mul_left_mono hr
#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
+/- warning: lipschitz_with.edist_lt_mul_of_lt -> LipschitzWith.edist_lt_mul_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : ENNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_ltₓ'. -/
theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
edist (f x) (f y) < K * r :=
(h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
+/- warning: lipschitz_with.maps_to_emetric_closed_ball -> LipschitzWith.mapsTo_emetric_closedBall is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.closedBall.{u1} α _inst_1 x r) (EMetric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.closedBall.{u1} α _inst_1 x r) (EMetric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBallₓ'. -/
theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
MapsTo f (closedBall x r) (closedBall (f x) (K * r)) := fun y hy => h.edist_le_mul_of_le hy
#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBall
+/- warning: lipschitz_with.maps_to_emetric_ball -> LipschitzWith.mapsTo_emetric_ball is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.ball.{u1} α _inst_1 x r) (EMetric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) r)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (forall (x : α) (r : ENNReal), Set.MapsTo.{u1, u2} α β f (EMetric.ball.{u1} α _inst_1 x r) (EMetric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) r)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ballₓ'. -/
theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
MapsTo f (ball x r) (ball (f x) (K * r)) := fun y hy => h.edist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ball
+/- warning: lipschitz_with.edist_lt_top -> LipschitzWith.edist_lt_top is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toHasTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder)))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α}, (Ne.{1} ENNReal (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (Top.top.{0} ENNReal (CompleteLattice.toTop.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal)))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_topₓ'. -/
theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
edist (f x) (f y) < ⊤ :=
(hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
+/- warning: lipschitz_with.mul_edist_le -> LipschitzWith.mul_edist_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (Inv.inv.{0} ENNReal ENNReal.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (Inv.inv.{0} ENNReal ENNReal.instInvENNReal (ENNReal.some K)) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_leₓ'. -/
theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
(K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y :=
by
@@ -167,14 +261,28 @@ theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
exact ENNReal.div_le_of_le_mul' (h x y)
#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_le
+/- warning: lipschitz_with.of_edist_le -> LipschitzWith.of_edist_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_edist_le LipschitzWith.of_edist_leₓ'. -/
protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : LipschitzWith 1 f :=
fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
+#print LipschitzWith.weaken /-
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
#align lipschitz_with.weaken LipschitzWith.weaken
+-/
+/- warning: lipschitz_with.ediam_image_le -> LipschitzWith.ediam_image_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) (EMetric.diam.{u1} α _inst_1 s)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall (s : Set.{u1} α), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EMetric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (ENNReal.some K) (EMetric.diam.{u1} α _inst_1 s)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_leₓ'. -/
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
EMetric.diam (f '' s) ≤ K * EMetric.diam s :=
by
@@ -183,6 +291,12 @@ theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_le
+/- warning: lipschitz_with.edist_lt_of_edist_lt_div -> LipschitzWith.edist_lt_of_edist_lt_div is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 K f) -> (forall {x : α} {y : α} {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_divₓ'. -/
theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥0∞}
(h : edist x y < d / K) : edist (f x) (f y) < d :=
calc
@@ -191,6 +305,7 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
+#print LipschitzWith.uniformContinuous /-
/-- A Lipschitz function is uniformly continuous -/
protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous f :=
by
@@ -198,42 +313,71 @@ protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous
use ε / K, ENNReal.div_pos_iff.2 ⟨ne_of_gt εpos, ENNReal.coe_ne_top⟩
exact fun x y => hf.edist_lt_of_edist_lt_div
#align lipschitz_with.uniform_continuous LipschitzWith.uniformContinuous
+-/
+#print LipschitzWith.continuous /-
/-- A Lipschitz function is continuous -/
protected theorem continuous (hf : LipschitzWith K f) : Continuous f :=
hf.UniformContinuous.Continuous
#align lipschitz_with.continuous LipschitzWith.continuous
+-/
+/- warning: lipschitz_with.const -> LipschitzWith.const is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] (b : β), LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (a : α) => b)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] (b : β), LipschitzWith.{u1, u2} α β _inst_1 _inst_2 (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero)) (fun (a : α) => b)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.const LipschitzWith.constₓ'. -/
protected theorem const (b : β) : LipschitzWith 0 fun a : α => b := fun x y => by
simp only [edist_self, zero_le]
#align lipschitz_with.const LipschitzWith.const
+#print LipschitzWith.id /-
protected theorem id : LipschitzWith 1 (@id α) :=
LipschitzWith.of_edist_le fun x y => le_rfl
#align lipschitz_with.id LipschitzWith.id
+-/
+#print LipschitzWith.subtype_val /-
protected theorem subtype_val (s : Set α) : LipschitzWith 1 (Subtype.val : s → α) :=
LipschitzWith.of_edist_le fun x y => le_rfl
#align lipschitz_with.subtype_val LipschitzWith.subtype_val
+-/
-protected theorem subtype_coe (s : Set α) : LipschitzWith 1 (coe : s → α) :=
+/- warning: lipschitz_with.subtype_coe clashes with lipschitz_with.subtype_val -> LipschitzWith.subtype_val
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.subtype_coe LipschitzWith.subtype_valₓ'. -/
+#print LipschitzWith.subtype_val /-
+protected theorem subtype_val (s : Set α) : LipschitzWith 1 (coe : s → α) :=
LipschitzWith.subtype_val s
-#align lipschitz_with.subtype_coe LipschitzWith.subtype_coe
+#align lipschitz_with.subtype_coe LipschitzWith.subtype_val
+-/
+#print LipschitzWith.subtype_mk /-
theorem subtype_mk (hf : LipschitzWith K f) {p : β → Prop} (hp : ∀ x, p (f x)) :
LipschitzWith K (fun x => ⟨f x, hp x⟩ : α → { y // p y }) :=
hf
#align lipschitz_with.subtype_mk LipschitzWith.subtype_mk
+-/
+#print LipschitzWith.eval /-
protected theorem eval {α : ι → Type u} [∀ i, PseudoEMetricSpace (α i)] [Fintype ι] (i : ι) :
LipschitzWith 1 (Function.eval i : (∀ i, α i) → α i) :=
LipschitzWith.of_edist_le fun f g => by convert edist_le_pi_edist f g i
#align lipschitz_with.eval LipschitzWith.eval
+-/
+#print LipschitzWith.restrict /-
protected theorem restrict (hf : LipschitzWith K f) (s : Set α) : LipschitzWith K (s.restrict f) :=
fun x y => hf x y
#align lipschitz_with.restrict LipschitzWith.restrict
+-/
+/- warning: lipschitz_with.comp -> LipschitzWith.comp is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kg g) -> (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kg g) -> (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.comp LipschitzWith.compₓ'. -/
protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
@@ -243,19 +387,35 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
#align lipschitz_with.comp LipschitzWith.comp
+/- warning: lipschitz_with.comp_lipschitz_on_with -> LipschitzWith.comp_lipschitzOnWith is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β} {s : Set.{u1} α}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 Kg g s) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g) s)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {Kf : NNReal} {Kg : NNReal} {f : β -> γ} {g : α -> β} {s : Set.{u1} α}, (LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kf f) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 Kg g s) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (Function.comp.{succ u1, succ u2, succ u3} α β γ f g) s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.comp_lipschitz_on_with LipschitzWith.comp_lipschitzOnWithₓ'. -/
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
(hf : LipschitzWith Kf f) (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (Kf * Kg) (f ∘ g) s :=
lipschitzOnWith_iff_restrict.mpr <| hf.comp hg.to_restrict
#align lipschitz_with.comp_lipschitz_on_with LipschitzWith.comp_lipschitzOnWith
+#print LipschitzWith.prod_fst /-
protected theorem prod_fst : LipschitzWith 1 (@Prod.fst α β) :=
LipschitzWith.of_edist_le fun x y => le_max_left _ _
#align lipschitz_with.prod_fst LipschitzWith.prod_fst
+-/
+#print LipschitzWith.prod_snd /-
protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β) :=
LipschitzWith.of_edist_le fun x y => le_max_right _ _
#align lipschitz_with.prod_snd LipschitzWith.prod_snd
+-/
+/- warning: lipschitz_with.prod -> LipschitzWith.prod is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β} {Kf : NNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kf f) -> (forall {g : α -> γ} {Kg : NNReal}, (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kg g) -> (LipschitzWith.{u1, max u2 u3} α (Prod.{u2, u3} β γ) _inst_1 (Prod.pseudoEMetricSpaceMax.{u2, u3} β γ _inst_2 _inst_3) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => Prod.mk.{u2, u3} β γ (f x) (g x))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β} {Kf : NNReal}, (LipschitzWith.{u1, u2} α β _inst_1 _inst_2 Kf f) -> (forall {g : α -> γ} {Kg : NNReal}, (LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kg g) -> (LipschitzWith.{u1, max u3 u2} α (Prod.{u2, u3} β γ) _inst_1 (Prod.pseudoEMetricSpaceMax.{u2, u3} β γ _inst_2 _inst_3) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Prod.mk.{u2, u3} β γ (f x) (g x))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.prod LipschitzWith.prodₓ'. -/
protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
(hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) :=
by
@@ -264,14 +424,24 @@ protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f)
exact max_le_max (hf x y) (hg x y)
#align lipschitz_with.prod LipschitzWith.prod
+#print LipschitzWith.prod_mk_left /-
protected theorem prod_mk_left (a : α) : LipschitzWith 1 (Prod.mk a : β → α × β) := by
simpa only [max_eq_right zero_le_one] using (LipschitzWith.const a).Prod LipschitzWith.id
#align lipschitz_with.prod_mk_left LipschitzWith.prod_mk_left
+-/
+#print LipschitzWith.prod_mk_right /-
protected theorem prod_mk_right (b : β) : LipschitzWith 1 fun a : α => (a, b) := by
simpa only [max_eq_left zero_le_one] using lipschitz_with.id.prod (LipschitzWith.const b)
#align lipschitz_with.prod_mk_right LipschitzWith.prod_mk_right
+-/
+/- warning: lipschitz_with.uncurry -> LipschitzWith.uncurry is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β -> γ} {Kα : NNReal} {Kβ : NNReal}, (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kα (fun (a : α) => f a b)) -> (forall (a : α), LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kβ (f a)) -> (LipschitzWith.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.pseudoEMetricSpaceMax.{u1, u2} α β _inst_1 _inst_2) _inst_3 (HAdd.hAdd.{0, 0, 0} NNReal NNReal NNReal (instHAdd.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kα Kβ) (Function.uncurry.{u1, u2, u3} α β γ f))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {f : α -> β -> γ} {Kα : NNReal} {Kβ : NNReal}, (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 Kα (fun (a : α) => f a b)) -> (forall (a : α), LipschitzWith.{u2, u3} β γ _inst_2 _inst_3 Kβ (f a)) -> (LipschitzWith.{max u2 u1, u3} (Prod.{u1, u2} α β) γ (Prod.pseudoEMetricSpaceMax.{u1, u2} α β _inst_1 _inst_2) _inst_3 (HAdd.hAdd.{0, 0, 0} NNReal NNReal NNReal (instHAdd.{0} NNReal (Distrib.toAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal instNNRealSemiring))))) Kα Kβ) (Function.uncurry.{u1, u2, u3} α β γ f))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.uncurry LipschitzWith.uncurryₓ'. -/
protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀ b, LipschitzWith Kα fun a => f a b)
(hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f) :=
by
@@ -283,11 +453,19 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
(le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
#align lipschitz_with.uncurry LipschitzWith.uncurry
+#print LipschitzWith.iterate /-
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) (f^[n])
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by rw [pow_succ'] <;> exact (iterate n).comp hf
#align lipschitz_with.iterate LipschitzWith.iterate
+-/
+/- warning: lipschitz_with.edist_iterate_succ_le_geometric -> LipschitzWith.edist_iterate_succ_le_geometric is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (Distrib.toHasMul.{0} ENNReal (NonUnitalNonAssocSemiring.toDistrib.{0} ENNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} ENNReal (Semiring.toNonAssocSemiring.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring)))))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.canonicallyOrderedCommSemiring))))))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K) n)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (x : α) (n : Nat), LE.le.{0} ENNReal (Preorder.toLE.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) x)) (HMul.hMul.{0, 0, 0} ENNReal ENNReal ENNReal (instHMul.{0} ENNReal (CanonicallyOrderedCommSemiring.toMul.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal)) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} ENNReal Nat ENNReal (instHPow.{0, 0} ENNReal Nat (Monoid.Pow.{0} ENNReal (MonoidWithZero.toMonoid.{0} ENNReal (Semiring.toMonoidWithZero.{0} ENNReal (OrderedSemiring.toSemiring.{0} ENNReal (OrderedCommSemiring.toOrderedSemiring.{0} ENNReal (CanonicallyOrderedCommSemiring.toOrderedCommSemiring.{0} ENNReal ENNReal.instCanonicallyOrderedCommSemiringENNReal))))))) (ENNReal.some K) n)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometricₓ'. -/
theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * K ^ n :=
by
@@ -295,11 +473,23 @@ theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
+/- warning: lipschitz_with.mul -> LipschitzWith.mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {g : Function.End.{u1} α} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kf f) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kg g) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kf Kg) (HMul.hMul.{u1, u1, u1} (Function.End.{u1} α) (Function.End.{u1} α) (Function.End.{u1} α) (instHMul.{u1} (Function.End.{u1} α) (MulOneClass.toHasMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α)))) f g))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {g : Function.End.{u1} α} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kf f) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 Kg g) -> (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kf Kg) (HMul.hMul.{u1, u1, u1} (Function.End.{u1} α) (Function.End.{u1} α) (Function.End.{u1} α) (instHMul.{u1} (Function.End.{u1} α) (MulOneClass.toMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α)))) f g))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.mul LipschitzWith.mulₓ'. -/
protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
hf.comp hg
#align lipschitz_with.mul LipschitzWith.mul
+/- warning: lipschitz_with.list_prod -> LipschitzWith.list_prod is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] (f : ι -> (Function.End.{u1} α)) (K : ι -> NNReal), (forall (i : ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (K i) (f i)) -> (forall (l : List.{u2} ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (List.prod.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (List.map.{u2, 0} ι NNReal K l)) (List.prod.{u1} (Function.End.{u1} α) (MulOneClass.toHasMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) (MulOneClass.toHasOne.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) (List.map.{u2, u1} ι (Function.End.{u1} α) f l)))
+but is expected to have type
+ forall {α : Type.{u1}} {ι : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] (f : ι -> (Function.End.{u1} α)) (K : ι -> NNReal), (forall (i : ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (K i) (f i)) -> (forall (l : List.{u2} ι), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (List.prod.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) instNNRealOne (List.map.{u2, 0} ι NNReal K l)) (List.prod.{u1} (Function.End.{u1} α) (MulOneClass.toMul.{u1} (Function.End.{u1} α) (Monoid.toMulOneClass.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α))) (Monoid.toOne.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α)) (List.map.{u2, u1} ι (Function.End.{u1} α) f l)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.list_prod LipschitzWith.list_prodₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
endomorphism. -/
@@ -311,6 +501,12 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
exact (h i).mul (list_prod l)
#align lipschitz_with.list_prod LipschitzWith.list_prod
+/- warning: lipschitz_with.pow -> LipschitzWith.pow is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {K : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (n : Nat), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HPow.hPow.{0, 0, 0} NNReal Nat NNReal (instHPow.{0, 0} NNReal Nat (Monoid.Pow.{0} NNReal (MonoidWithZero.toMonoid.{0} NNReal (Semiring.toMonoidWithZero.{0} NNReal NNReal.semiring)))) K n) (HPow.hPow.{u1, 0, u1} (Function.End.{u1} α) Nat (Function.End.{u1} α) (instHPow.{u1, 0} (Function.End.{u1} α) Nat (Monoid.Pow.{u1} (Function.End.{u1} α) (Function.End.monoid.{u1} α))) f n))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : Function.End.{u1} α} {K : NNReal}, (LipschitzWith.{u1, u1} α α _inst_1 _inst_1 K f) -> (forall (n : Nat), LipschitzWith.{u1, u1} α α _inst_1 _inst_1 (HPow.hPow.{0, 0, 0} NNReal Nat NNReal (instHPow.{0, 0} NNReal Nat (Monoid.Pow.{0} NNReal (MonoidWithZero.toMonoid.{0} NNReal (Semiring.toMonoidWithZero.{0} NNReal instNNRealSemiring)))) K n) (HPow.hPow.{u1, 0, u1} (Function.End.{u1} α) Nat (Function.End.{u1} α) (instHPow.{u1, 0} (Function.End.{u1} α) Nat (Monoid.Pow.{u1} (Function.End.{u1} α) (instMonoidEnd.{u1} α))) f n))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.pow LipschitzWith.powₓ'. -/
protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
@@ -326,16 +522,34 @@ section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ] {K : ℝ≥0} {f : α → β}
{x y : α} {r : ℝ}
+/- warning: lipschitz_with.of_dist_le' -> LipschitzWith.of_dist_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {K : Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {K : Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'ₓ'. -/
protected theorem of_dist_le' {K : ℝ} (h : ∀ x y, dist (f x) (f y) ≤ K * dist x y) :
LipschitzWith (Real.toNNReal K) f :=
of_dist_le_mul fun x y =>
le_trans (h x y) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'
+/- warning: lipschitz_with.mk_one -> LipschitzWith.mk_one is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)) -> (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.mk_one LipschitzWith.mk_oneₓ'. -/
protected theorem mk_one (h : ∀ x y, dist (f x) (f y) ≤ dist x y) : LipschitzWith 1 f :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_with.mk_one LipschitzWith.mk_one
+/- warning: lipschitz_with.of_le_add_mul' -> LipschitzWith.of_le_add_mul' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : Real), (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Real.toNNReal K) f)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : Real), (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Real.toNNReal K) f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add_mul' LipschitzWith.of_le_add_mul'ₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x ≤ f y + K * dist x y) :
@@ -344,48 +558,103 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x y, f x
LipschitzWith.of_dist_le' fun x y => abs_sub_le_iff.2 ⟨I x y, dist_comm y x ▸ I y x⟩
#align lipschitz_with.of_le_add_mul' LipschitzWith.of_le_add_mul'
+/- warning: lipschitz_with.of_le_add_mul -> LipschitzWith.of_le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : NNReal), (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} (K : NNReal), (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add_mul LipschitzWith.of_le_add_mulₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0) (h : ∀ x y, f x ≤ f y + K * dist x y) :
LipschitzWith K f := by simpa only [Real.toNNReal_coe] using LipschitzWith.of_le_add_mul' K h
#align lipschitz_with.of_le_add_mul LipschitzWith.of_le_add_mul
+/- warning: lipschitz_with.of_le_add -> LipschitzWith.of_le_add is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real}, (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))) -> (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.of_le_add LipschitzWith.of_le_addₓ'. -/
protected theorem of_le_add {f : α → ℝ} (h : ∀ x y, f x ≤ f y + dist x y) : LipschitzWith 1 f :=
LipschitzWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_with.of_le_add LipschitzWith.of_le_add
+/- warning: lipschitz_with.le_add_mul -> LipschitzWith.le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f) -> (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.le_add_mul LipschitzWith.le_add_mulₓ'. -/
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzWith K f) (x y) :
f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x y
#align lipschitz_with.le_add_mul LipschitzWith.le_add_mul
+/- warning: lipschitz_with.iff_le_add_mul -> LipschitzWith.iff_le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, Iff (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {f : α -> Real} {K : NNReal}, Iff (LipschitzWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f) (forall (x : α) (y : α), LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.iff_le_add_mul LipschitzWith.iff_le_add_mulₓ'. -/
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzWith K f ↔ ∀ x y, f x ≤ f y + K * dist x y :=
⟨LipschitzWith.le_add_mul, LipschitzWith.of_le_add_mul K⟩
#align lipschitz_with.iff_le_add_mul LipschitzWith.iff_le_add_mul
+/- warning: lipschitz_with.nndist_le -> LipschitzWith.nndist_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (OrderedCancelAddCommMonoid.toPartialOrder.{0} NNReal (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} NNReal NNReal.strictOrderedSemiring)))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (y : α), LE.le.{0} NNReal (Preorder.toLE.{0} NNReal (PartialOrder.toPreorder.{0} NNReal (StrictOrderedSemiring.toPartialOrder.{0} NNReal instNNRealStrictOrderedSemiring))) (NNDist.nndist.{u2} β (PseudoMetricSpace.toNNDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) K (NNDist.nndist.{u1} α (PseudoMetricSpace.toNNDist.{u1} α _inst_1) x y)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.nndist_le LipschitzWith.nndist_leₓ'. -/
theorem nndist_le (hf : LipschitzWith K f) (x y : α) : nndist (f x) (f y) ≤ K * nndist x y :=
hf.dist_le_mul x y
#align lipschitz_with.nndist_le LipschitzWith.nndist_le
+/- warning: lipschitz_with.dist_le_mul_of_le -> LipschitzWith.dist_le_mul_of_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_leₓ'. -/
theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r :=
(hf.dist_le_mul x y).trans <| mul_le_mul_of_nonneg_left hr K.coe_nonneg
#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_le
+/- warning: lipschitz_with.maps_to_closed_ball -> LipschitzWith.mapsTo_closedBall is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.closedBall.{u1} α _inst_1 x r) (Metric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.closedBall.{u1} α _inst_1 x r) (Metric.closedBall.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_closed_ball LipschitzWith.mapsTo_closedBallₓ'. -/
theorem mapsTo_closedBall (hf : LipschitzWith K f) (x : α) (r : ℝ) :
MapsTo f (Metric.closedBall x r) (Metric.closedBall (f x) (K * r)) := fun y hy =>
hf.dist_le_mul_of_le hy
#align lipschitz_with.maps_to_closed_ball LipschitzWith.mapsTo_closedBall
+/- warning: lipschitz_with.dist_lt_mul_of_lt -> LipschitzWith.dist_lt_mul_of_lt is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} Real Real.hasLt (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} {x : α} {y : α} {r : Real}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y) r) -> (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_lt_mul_of_lt LipschitzWith.dist_lt_mul_of_ltₓ'. -/
theorem dist_lt_mul_of_lt (hf : LipschitzWith K f) (hK : K ≠ 0) (hr : dist x y < r) :
dist (f x) (f y) < K * r :=
(hf.dist_le_mul x y).trans_lt <| (mul_lt_mul_left <| NNReal.coe_pos.2 hK.bot_lt).2 hr
#align lipschitz_with.dist_lt_mul_of_lt LipschitzWith.dist_lt_mul_of_lt
+/- warning: lipschitz_with.maps_to_ball -> LipschitzWith.mapsTo_ball is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (OfNat.mk.{0} NNReal 0 (Zero.zero.{0} NNReal (MulZeroClass.toHasZero.{0} NNReal (NonUnitalNonAssocSemiring.toMulZeroClass.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.ball.{u1} α _inst_1 x r) (Metric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) r)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (Ne.{1} NNReal K (OfNat.ofNat.{0} NNReal 0 (Zero.toOfNat0.{0} NNReal instNNRealZero))) -> (forall (x : α) (r : Real), Set.MapsTo.{u1, u2} α β f (Metric.ball.{u1} α _inst_1 x r) (Metric.ball.{u2} β _inst_2 (f x) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) r)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.maps_to_ball LipschitzWith.mapsTo_ballₓ'. -/
theorem mapsTo_ball (hf : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ) :
MapsTo f (Metric.ball x r) (Metric.ball (f x) (K * r)) := fun y hy => hf.dist_lt_mul_of_lt hK hy
#align lipschitz_with.maps_to_ball LipschitzWith.mapsTo_ball
+#print LipschitzWith.toLocallyBoundedMap /-
/-- A Lipschitz continuous map is a locally bounded map. -/
def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBoundedMap α β :=
LocallyBoundedMap.ofMapBounded f fun s hs =>
@@ -394,24 +663,45 @@ def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBounde
⟨K * C,
ball_image_iff.2 fun x hx => ball_image_iff.2 fun y hy => hf.dist_le_mul_of_le (hC hx hy)⟩
#align lipschitz_with.to_locally_bounded_map LipschitzWith.toLocallyBoundedMap
+-/
+/- warning: lipschitz_with.coe_to_locally_bounded_map -> LipschitzWith.coe_toLocallyBoundedMap is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} (hf : LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f), Eq.{max (succ u1) (succ u2)} (α -> β) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) (fun (_x : LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) => α -> β) (LocallyBoundedMap.hasCoeToFun.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) (LipschitzWith.toLocallyBoundedMap.{u1, u2} α β _inst_1 _inst_2 K f hf)) f
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β} (hf : LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f), Eq.{max (succ u1) (succ u2)} (forall (ᾰ : α), (fun (x._@.Mathlib.Topology.Bornology.Hom._hyg.92 : α) => β) ᾰ) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) α (fun (_x : α) => (fun (x._@.Mathlib.Topology.Bornology.Hom._hyg.92 : α) => β) _x) (LocallyBoundedMapClass.toFunLike.{max u1 u2, u1, u2} (LocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2)) α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2) (LocallyBoundedMap.instLocallyBoundedMapClassLocallyBoundedMap.{u1, u2} α β (PseudoMetricSpace.toBornology.{u1} α _inst_1) (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (LipschitzWith.toLocallyBoundedMap.{u1, u2} α β _inst_1 _inst_2 K f hf)) f
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.coe_to_locally_bounded_map LipschitzWith.coe_toLocallyBoundedMapₓ'. -/
@[simp]
theorem coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBoundedMap f) = f :=
rfl
#align lipschitz_with.coe_to_locally_bounded_map LipschitzWith.coe_toLocallyBoundedMap
+/- warning: lipschitz_with.comap_cobounded_le -> LipschitzWith.comap_cobounded_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.partialOrder.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (LE.le.{u1} (Filter.{u1} α) (Preorder.toLE.{u1} (Filter.{u1} α) (PartialOrder.toPreorder.{u1} (Filter.{u1} α) (Filter.instPartialOrderFilter.{u1} α))) (Filter.comap.{u1, u2} α β f (Bornology.cobounded.{u2} β (PseudoMetricSpace.toBornology.{u2} β _inst_2))) (Bornology.cobounded.{u1} α (PseudoMetricSpace.toBornology.{u1} α _inst_1)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_leₓ'. -/
theorem comap_cobounded_le (hf : LipschitzWith K f) :
comap f (Bornology.cobounded β) ≤ Bornology.cobounded α :=
(hf.toLocallyBoundedMap f).2
#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_le
+#print LipschitzWith.bounded_image /-
theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
Metric.Bounded (f '' s) :=
Metric.bounded_iff_ediam_ne_top.2 <|
ne_top_of_le_ne_top (ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top)
(hf.ediam_image_le s)
#align lipschitz_with.bounded_image LipschitzWith.bounded_image
+-/
+/- warning: lipschitz_with.diam_image_le -> LipschitzWith.diam_image_le is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (s : Set.{u1} α), (Metric.Bounded.{u1} α _inst_1 s) -> (LE.le.{0} Real Real.hasLe (Metric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Metric.diam.{u1} α _inst_1 s))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {K : NNReal} {f : α -> β}, (LipschitzWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) K f) -> (forall (s : Set.{u1} α), (Metric.Bounded.{u1} α _inst_1 s) -> (LE.le.{0} Real Real.instLEReal (Metric.diam.{u2} β _inst_2 (Set.image.{u1, u2} α β f s)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Metric.diam.{u1} α _inst_1 s))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.diam_image_le LipschitzWith.diam_image_leₓ'. -/
theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
@@ -419,20 +709,36 @@ theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded
ball_image_iff.2 fun y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
#align lipschitz_with.diam_image_le LipschitzWith.diam_image_le
+#print LipschitzWith.dist_left /-
protected theorem dist_left (y : α) : LipschitzWith 1 fun x => dist x y :=
LipschitzWith.of_le_add fun x z => by
rw [add_comm]
apply dist_triangle
#align lipschitz_with.dist_left LipschitzWith.dist_left
+-/
+#print LipschitzWith.dist_right /-
protected theorem dist_right (x : α) : LipschitzWith 1 (dist x) :=
LipschitzWith.of_le_add fun y z => dist_triangle_right _ _ _
#align lipschitz_with.dist_right LipschitzWith.dist_right
+-/
+/- warning: lipschitz_with.dist -> LipschitzWith.dist is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α α) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 2 (OfNat.mk.{0} NNReal 2 (bit0.{0} NNReal (Distrib.toHasAdd.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))) (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring)))))))) (Function.uncurry.{u1, u1, 0} α α Real (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α], LipschitzWith.{u1, 0} (Prod.{u1, u1} α α) Real (Prod.pseudoEMetricSpaceMax.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 2 (instOfNat.{0} NNReal 2 (CanonicallyOrderedCommSemiring.toNatCast.{0} NNReal instNNRealCanonicallyOrderedCommSemiring) (instAtLeastTwoHAddNatInstHAddInstAddNatOfNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))) (Function.uncurry.{u1, u1, 0} α α Real (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist LipschitzWith.distₓ'. -/
protected theorem dist : LipschitzWith 2 (Function.uncurry <| @dist α _) :=
LipschitzWith.uncurry LipschitzWith.dist_left LipschitzWith.dist_right
#align lipschitz_with.dist LipschitzWith.dist
+/- warning: lipschitz_with.dist_iterate_succ_le_geometric -> LipschitzWith.dist_iterate_succ_le_geometric is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) K f) -> (forall (x : α) (n : Nat), LE.le.{0} Real Real.hasLe (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.monoid)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) n)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {K : NNReal} {f : α -> α}, (LipschitzWith.{u1, u1} α α (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) K f) -> (forall (x : α) (n : Nat), LE.le.{0} Real Real.instLEReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) (Nat.iterate.{succ u1} α f n x) (Nat.iterate.{succ u1} α f (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x (f x)) (HPow.hPow.{0, 0, 0} Real Nat Real (instHPow.{0, 0} Real Nat (Monoid.Pow.{0} Real Real.instMonoidReal)) (NNReal.toReal K) n)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometricₓ'. -/
theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
dist ((f^[n]) x) ((f^[n + 1]) x) ≤ dist x (f x) * K ^ n :=
by
@@ -440,11 +746,23 @@ theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometric
+/- warning: lipschitz_with_max -> lipschitzWith_max is a dubious translation:
+lean 3 declaration is
+ LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (p : Prod.{0, 0} Real Real) => LinearOrder.max.{0} Real Real.linearOrder (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
+but is expected to have type
+ LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (fun (p : Prod.{0, 0} Real Real) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with_max lipschitzWith_maxₓ'. -/
theorem lipschitzWith_max : LipschitzWith 1 fun p : ℝ × ℝ => max p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_max_sub_max_le_max _ _ _ _)
#align lipschitz_with_max lipschitzWith_max
+/- warning: lipschitz_with_min -> lipschitzWith_min is a dubious translation:
+lean 3 declaration is
+ LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (fun (p : Prod.{0, 0} Real Real) => LinearOrder.min.{0} Real Real.linearOrder (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
+but is expected to have type
+ LipschitzWith.{0, 0} (Prod.{0, 0} Real Real) Real (Prod.pseudoEMetricSpaceMax.{0, 0} Real Real (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (fun (p : Prod.{0, 0} Real Real) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (Prod.fst.{0, 0} Real Real p) (Prod.snd.{0, 0} Real Real p))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with_min lipschitzWith_minₓ'. -/
theorem lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1 p.2 :=
LipschitzWith.of_le_add fun p₁ p₂ =>
sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_min_sub_min_le_max _ _ _ _)
@@ -456,34 +774,76 @@ section Emetric
variable {α} [PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : ℝ≥0}
+/- warning: lipschitz_with.max -> LipschitzWith.max is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder (f x) (g x)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (f x) (g x)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.max LipschitzWith.maxₓ'. -/
protected theorem max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => max (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_max.comp (hf.prod hg)
#align lipschitz_with.max LipschitzWith.max
+/- warning: lipschitz_with.min -> LipschitzWith.min is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (LinearOrder.max.{0} NNReal (ConditionallyCompleteLinearOrder.toLinearOrder.{0} NNReal (ConditionallyCompleteLinearOrderBot.toConditionallyCompleteLinearOrder.{0} NNReal NNReal.conditionallyCompleteLinearOrderBot)) Kf Kg) (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder (f x) (g x)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {g : α -> Real} {Kf : NNReal} {Kg : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kg g) -> (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Max.max.{0} NNReal (CanonicallyLinearOrderedSemifield.toMax.{0} NNReal NNReal.instCanonicallyLinearOrderedSemifieldNNReal) Kf Kg) (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (f x) (g x)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.min LipschitzWith.minₓ'. -/
protected theorem min (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => min (f x) (g x) := by
simpa only [(· ∘ ·), one_mul] using lipschitz_with_min.comp (hf.prod hg)
#align lipschitz_with.min LipschitzWith.min
+/- warning: lipschitz_with.max_const -> LipschitzWith.max_const is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder (f x) a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) (f x) a))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.max_const LipschitzWith.max_constₓ'. -/
theorem max_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.max (LipschitzWith.const a)
#align lipschitz_with.max_const LipschitzWith.max_const
+/- warning: lipschitz_with.const_max -> LipschitzWith.const_max is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.max.{0} Real Real.linearOrder a (f x)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Max.max.{0} Real (LinearOrderedRing.toMax.{0} Real Real.instLinearOrderedRingReal) a (f x)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.const_max LipschitzWith.const_maxₓ'. -/
theorem const_max (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max a (f x) := by
simpa only [max_comm] using hf.max_const a
#align lipschitz_with.const_max LipschitzWith.const_max
+/- warning: lipschitz_with.min_const -> LipschitzWith.min_const is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder (f x) a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) (f x) a))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.min_const LipschitzWith.min_constₓ'. -/
theorem min_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min (f x) a := by
simpa only [max_eq_left (zero_le Kf)] using hf.min (LipschitzWith.const a)
#align lipschitz_with.min_const LipschitzWith.min_const
+/- warning: lipschitz_with.const_min -> LipschitzWith.const_min is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) Kf (fun (x : α) => LinearOrder.min.{0} Real Real.linearOrder a (f x)))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoEMetricSpace.{u1} α] {f : α -> Real} {Kf : NNReal}, (LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf f) -> (forall (a : Real), LipschitzWith.{u1, 0} α Real _inst_1 (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) Kf (fun (x : α) => Min.min.{0} Real (LinearOrderedRing.toMin.{0} Real Real.instLinearOrderedRingReal) a (f x)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.const_min LipschitzWith.const_minₓ'. -/
theorem const_min (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min a (f x) := by
simpa only [min_comm] using hf.min_const a
#align lipschitz_with.const_min LipschitzWith.const_min
end Emetric
+/- warning: lipschitz_with.proj_Icc -> LipschitzWith.projIcc is a dubious translation:
+lean 3 declaration is
+ forall {a : Real} {b : Real} (h : LE.le.{0} Real Real.hasLe a b), LipschitzWith.{0, 0} Real (coeSort.{1, 2} (Set.{0} Real) Type (Set.hasCoeToSort.{0} Real) (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (LinearOrder.toLattice.{0} Real Real.linearOrder)))) a b)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Subtype.pseudoEmetricSpace.{0} Real (fun (x : Real) => Membership.Mem.{0, 0} Real (Set.{0} Real) (Set.hasMem.{0} Real) x (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (LinearOrder.toLattice.{0} Real Real.linearOrder)))) a b)) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace)) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) (Set.projIcc.{0} Real Real.linearOrder a b h)
+but is expected to have type
+ forall {a : Real} {b : Real} (h : LE.le.{0} Real Real.instLEReal a b), LipschitzWith.{0, 0} Real (Set.Elem.{0} Real (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (DistribLattice.toLattice.{0} Real (instDistribLattice.{0} Real Real.linearOrder))))) a b)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (instPseudoEMetricSpaceSubtype.{0} Real (fun (x : Real) => Membership.mem.{0, 0} Real (Set.{0} Real) (Set.instMembershipSet.{0} Real) x (Set.Icc.{0} Real (PartialOrder.toPreorder.{0} Real (SemilatticeInf.toPartialOrder.{0} Real (Lattice.toSemilatticeInf.{0} Real (DistribLattice.toLattice.{0} Real (instDistribLattice.{0} Real Real.linearOrder))))) a b)) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace))) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) (Set.projIcc.{0} Real Real.linearOrder a b h)
+Case conversion may be inaccurate. Consider using '#align lipschitz_with.proj_Icc LipschitzWith.projIccₓ'. -/
protected theorem projIcc {a b : ℝ} (h : a ≤ b) : LipschitzWith 1 (projIcc a b h) :=
((LipschitzWith.id.const_min _).const_max _).subtype_mk _
#align lipschitz_with.proj_Icc LipschitzWith.projIcc
@@ -495,28 +855,36 @@ namespace Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] {s : Set α} {t : Set β}
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Metric.Bounded.left_of_prod /-
theorem Bounded.left_of_prod (h : Bounded (s ×ˢ t)) (ht : t.Nonempty) : Bounded s := by
simpa only [fst_image_prod s ht] using (@LipschitzWith.prod_fst α β _ _).bounded_image h
#align metric.bounded.left_of_prod Metric.Bounded.left_of_prod
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Metric.Bounded.right_of_prod /-
theorem Bounded.right_of_prod (h : Bounded (s ×ˢ t)) (hs : s.Nonempty) : Bounded t := by
simpa only [snd_image_prod hs t] using (@LipschitzWith.prod_snd α β _ _).bounded_image h
#align metric.bounded.right_of_prod Metric.Bounded.right_of_prod
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Metric.bounded_prod_of_nonempty /-
theorem bounded_prod_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
Bounded (s ×ˢ t) ↔ Bounded s ∧ Bounded t :=
⟨fun h => ⟨h.left_of_prod ht, h.right_of_prod hs⟩, fun h => h.1.Prod h.2⟩
#align metric.bounded_prod_of_nonempty Metric.bounded_prod_of_nonempty
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Metric.bounded_prod /-
theorem bounded_prod : Bounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ Bounded s ∧ Bounded t :=
by
rcases s.eq_empty_or_nonempty with (rfl | hs); · simp
rcases t.eq_empty_or_nonempty with (rfl | ht); · simp
simp only [bounded_prod_of_nonempty hs ht, hs.ne_empty, ht.ne_empty, false_or_iff]
#align metric.bounded_prod Metric.bounded_prod
+-/
end Metric
@@ -528,20 +896,36 @@ variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
variable {K : ℝ≥0} {s : Set α} {f : α → β}
+#print LipschitzOnWith.uniformContinuousOn /-
protected theorem uniformContinuousOn (hf : LipschitzOnWith K f s) : UniformContinuousOn f s :=
uniformContinuousOn_iff_restrict.mpr (lipschitzOnWith_iff_restrict.mp hf).UniformContinuous
#align lipschitz_on_with.uniform_continuous_on LipschitzOnWith.uniformContinuousOn
+-/
+#print LipschitzOnWith.continuousOn /-
protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :=
hf.UniformContinuousOn.ContinuousOn
#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
+-/
+/- warning: lipschitz_on_with.edist_lt_of_edist_lt_div -> LipschitzOnWith.edist_lt_of_edist_lt_div is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toHasEdist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toHasDiv.{0} ENNReal ENNReal.divInvMonoid)) d ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal ENNReal (HasLiftT.mk.{1, 1} NNReal ENNReal (CoeTCₓ.coe.{1, 1} NNReal ENNReal (coeBase.{1, 1} NNReal ENNReal ENNReal.hasCoe))) K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.completeLinearOrder))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toHasEdist.{u2} β _inst_2) (f x) (f y)) d)))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] {K : NNReal} {s : Set.{u1} α} {f : α -> β}, (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (forall {x : α} {y : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (forall {d : ENNReal}, (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u1} α (PseudoEMetricSpace.toEDist.{u1} α _inst_1) x y) (HDiv.hDiv.{0, 0, 0} ENNReal ENNReal ENNReal (instHDiv.{0} ENNReal (DivInvMonoid.toDiv.{0} ENNReal ENNReal.instDivInvMonoidENNReal)) d (ENNReal.some K))) -> (LT.lt.{0} ENNReal (Preorder.toLT.{0} ENNReal (PartialOrder.toPreorder.{0} ENNReal (CompleteSemilatticeInf.toPartialOrder.{0} ENNReal (CompleteLattice.toCompleteSemilatticeInf.{0} ENNReal (CompleteLinearOrder.toCompleteLattice.{0} ENNReal ENNReal.instCompleteLinearOrderENNReal))))) (EDist.edist.{u2} β (PseudoEMetricSpace.toEDist.{u2} β _inst_2) (f x) (f y)) d)))
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_divₓ'. -/
theorem edist_lt_of_edist_lt_div (hf : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
{d : ℝ≥0∞} (hd : edist x y < d / K) : edist (f x) (f y) < d :=
(lipschitzOnWith_iff_restrict.mp hf).edist_lt_of_edist_lt_div <|
show edist (⟨x, hx⟩ : s) ⟨y, hy⟩ < d / K from hd
#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_div
+/- warning: lipschitz_on_with.comp -> LipschitzOnWith.comp is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {K : NNReal} {s : Set.{u1} α} {f : α -> β} {g : β -> γ} {t : Set.{u2} β} {Kg : NNReal}, (LipschitzOnWith.{u2, u3} β γ _inst_2 _inst_3 Kg g t) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (Set.MapsTo.{u1, u2} α β f s t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (Distrib.toHasMul.{0} NNReal (NonUnitalNonAssocSemiring.toDistrib.{0} NNReal (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))) Kg K) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) s)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : PseudoEMetricSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] {K : NNReal} {s : Set.{u1} α} {f : α -> β} {g : β -> γ} {t : Set.{u2} β} {Kg : NNReal}, (LipschitzOnWith.{u2, u3} β γ _inst_2 _inst_3 Kg g t) -> (LipschitzOnWith.{u1, u2} α β _inst_1 _inst_2 K f s) -> (Set.MapsTo.{u1, u2} α β f s t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 (HMul.hMul.{0, 0, 0} NNReal NNReal NNReal (instHMul.{0} NNReal (CanonicallyOrderedCommSemiring.toMul.{0} NNReal instNNRealCanonicallyOrderedCommSemiring)) Kg K) (Function.comp.{succ u1, succ u2, succ u3} α β γ g f) s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.comp LipschitzOnWith.compₓ'. -/
protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : LipschitzOnWith Kg g t)
(hf : LipschitzOnWith K f s) (hmaps : MapsTo f s t) : LipschitzOnWith (Kg * K) (g ∘ f) s :=
lipschitzOnWith_iff_restrict.mpr <| hg.to_restrict.comp (hf.to_restrict_mapsTo hmaps)
@@ -555,17 +939,35 @@ variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ]
variable {K : ℝ≥0} {s : Set α} {f : α → β}
+/- warning: lipschitz_on_with.of_dist_le' -> LipschitzOnWith.of_dist_le' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β} {K : Real}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f s)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β} {K : Real}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (Real.toNNReal K) f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'ₓ'. -/
protected theorem of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) :
LipschitzOnWith (Real.toNNReal K) f s :=
of_dist_le_mul fun x hx y hy =>
le_trans (h x hx y hy) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'
+/- warning: lipschitz_on_with.mk_one -> LipschitzOnWith.mk_one is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f s)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {s : Set.{u1} α} {f : α -> β}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f x) (f y)) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))) -> (LipschitzOnWith.{u1, u2} α β (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{u2} β _inst_2) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.mk_one LipschitzOnWith.mk_oneₓ'. -/
protected theorem mk_one (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) :
LipschitzOnWith 1 f s :=
of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
#align lipschitz_on_with.mk_one LipschitzOnWith.mk_one
+/- warning: lipschitz_on_with.of_le_add_mul' -> LipschitzOnWith.of_le_add_mul' is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : Real), (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (Real.toNNReal K) f s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : Real), (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (Real.toNNReal K) f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add_mul' LipschitzOnWith.of_le_add_mul'ₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
doesn't assume `0≤K`. -/
protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
@@ -576,6 +978,12 @@ protected theorem of_le_add_mul' {f : α → ℝ} (K : ℝ)
abs_sub_le_iff.2 ⟨I x hx y hy, dist_comm y x ▸ I y hy x hx⟩
#align lipschitz_on_with.of_le_add_mul' LipschitzOnWith.of_le_add_mul'
+/- warning: lipschitz_on_with.of_le_add_mul -> LipschitzOnWith.of_le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : NNReal), (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} (K : NNReal), (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y)))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add_mul LipschitzOnWith.of_le_add_mulₓ'. -/
/-- For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version
assumes `0≤K`. -/
protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0)
@@ -583,16 +991,34 @@ protected theorem of_le_add_mul {f : α → ℝ} (K : ℝ≥0)
simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
#align lipschitz_on_with.of_le_add_mul LipschitzOnWith.of_le_add_mul
+/- warning: lipschitz_on_with.of_le_add -> LipschitzOnWith.of_le_add is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real}, (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) (OfNat.ofNat.{0} NNReal 1 (OfNat.mk.{0} NNReal 1 (One.one.{0} NNReal (AddMonoidWithOne.toOne.{0} NNReal (AddCommMonoidWithOne.toAddMonoidWithOne.{0} NNReal (NonAssocSemiring.toAddCommMonoidWithOne.{0} NNReal (Semiring.toNonAssocSemiring.{0} NNReal NNReal.semiring))))))) f s)
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real}, (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))) -> (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) (OfNat.ofNat.{0} NNReal 1 (One.toOfNat1.{0} NNReal instNNRealOne)) f s)
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.of_le_add LipschitzOnWith.of_le_addₓ'. -/
protected theorem of_le_add {f : α → ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) :
LipschitzOnWith 1 f s :=
LipschitzOnWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
#align lipschitz_on_with.of_le_add LipschitzOnWith.of_le_add
+/- warning: lipschitz_on_with.le_add_mul -> LipschitzOnWith.le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s) -> (forall {x : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall {y : α}, (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s) -> (forall {x : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall {y : α}, (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.le_add_mul LipschitzOnWith.le_add_mulₓ'. -/
protected theorem le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzOnWith K f s) {x : α} (hx : x ∈ s)
{y : α} (hy : y ∈ s) : f x ≤ f y + K * dist x y :=
sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x hx y hy
#align lipschitz_on_with.le_add_mul LipschitzOnWith.le_add_mul
+/- warning: lipschitz_on_with.iff_le_add_mul -> LipschitzOnWith.iff_le_add_mul is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, Iff (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (PseudoMetricSpace.toPseudoEMetricSpace.{0} Real Real.pseudoMetricSpace) K f s) (forall (x : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x s) -> (forall (y : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) y s) -> (LE.le.{0} Real Real.hasLe (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.hasAdd) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) NNReal Real (HasLiftT.mk.{1, 1} NNReal Real (CoeTCₓ.coe.{1, 1} NNReal Real (coeBase.{1, 1} NNReal Real NNReal.Real.hasCoe))) K) (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) x y))))))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : PseudoMetricSpace.{u1} α] {s : Set.{u1} α} {f : α -> Real} {K : NNReal}, Iff (LipschitzOnWith.{u1, 0} α Real (PseudoMetricSpace.toPseudoEMetricSpace.{u1} α _inst_1) (EMetricSpace.toPseudoEMetricSpace.{0} Real (MetricSpace.toEMetricSpace.{0} Real Real.metricSpace)) K f s) (forall (x : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) x s) -> (forall (y : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) y s) -> (LE.le.{0} Real Real.instLEReal (f x) (HAdd.hAdd.{0, 0, 0} Real Real Real (instHAdd.{0} Real Real.instAddReal) (f y) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) (NNReal.toReal K) (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) x y))))))
+Case conversion may be inaccurate. Consider using '#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mulₓ'. -/
protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y :=
⟨LipschitzOnWith.le_add_mul, LipschitzOnWith.of_le_add_mul K⟩
@@ -602,6 +1028,12 @@ end Metric
end LipschitzOnWith
+/- warning: continuous_on_prod_of_continuous_on_lipschitz_on -> continuousOn_prod_of_continuousOn_lipschitz_on is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) {s : Set.{u1} α} {t : Set.{u2} β} (K : NNReal), (forall (a : α), (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) a s) -> (ContinuousOn.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y)) t)) -> (forall (b : β), (Membership.Mem.{u2, u2} β (Set.{u2} β) (Set.hasMem.{u2} β) b t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b)) s)) -> (ContinuousOn.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.topologicalSpace.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f (Set.prod.{u1, u2} α β s t))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) {s : Set.{u1} α} {t : Set.{u2} β} (K : NNReal), (forall (a : α), (Membership.mem.{u1, u1} α (Set.{u1} α) (Set.instMembershipSet.{u1} α) a s) -> (ContinuousOn.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y)) t)) -> (forall (b : β), (Membership.mem.{u2, u2} β (Set.{u2} β) (Set.instMembershipSet.{u2} β) b t) -> (LipschitzOnWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b)) s)) -> (ContinuousOn.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (instTopologicalSpaceProd.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f (Set.prod.{u1, u2} α β s t))
+Case conversion may be inaccurate. Consider using '#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_onₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
@@ -634,6 +1066,12 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
+/- warning: continuous_prod_of_continuous_lipschitz -> continuous_prod_of_continuous_lipschitz is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) (K : NNReal), (forall (a : α), Continuous.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y))) -> (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b))) -> (Continuous.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (Prod.topologicalSpace.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f)
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} [_inst_1 : PseudoEMetricSpace.{u1} α] [_inst_2 : TopologicalSpace.{u2} β] [_inst_3 : PseudoEMetricSpace.{u3} γ] (f : (Prod.{u1, u2} α β) -> γ) (K : NNReal), (forall (a : α), Continuous.{u2, u3} β γ _inst_2 (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) (fun (y : β) => f (Prod.mk.{u1, u2} α β a y))) -> (forall (b : β), LipschitzWith.{u1, u3} α γ _inst_1 _inst_3 K (fun (x : α) => f (Prod.mk.{u1, u2} α β x b))) -> (Continuous.{max u1 u2, u3} (Prod.{u1, u2} α β) γ (instTopologicalSpaceProd.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoEMetricSpace.toUniformSpace.{u1} α _inst_1)) _inst_2) (UniformSpace.toTopologicalSpace.{u3} γ (PseudoEMetricSpace.toUniformSpace.{u3} γ _inst_3)) f)
+Case conversion may be inaccurate. Consider using '#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzₓ'. -/
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
@@ -650,6 +1088,12 @@ theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [Topolog
open Metric
+/- warning: continuous_at_of_locally_lipschitz -> continuousAt_of_locally_lipschitz is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {x : α} {r : Real}, (LT.lt.{0} Real Real.hasLt (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero))) r) -> (forall (K : Real), (forall (y : α), (LT.lt.{0} Real Real.hasLt (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) y x) r) -> (LE.le.{0} Real Real.hasLe (Dist.dist.{u2} β (PseudoMetricSpace.toHasDist.{u2} β _inst_2) (f y) (f x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.hasMul) K (Dist.dist.{u1} α (PseudoMetricSpace.toHasDist.{u1} α _inst_1) y x)))) -> (ContinuousAt.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α _inst_1)) (UniformSpace.toTopologicalSpace.{u2} β (PseudoMetricSpace.toUniformSpace.{u2} β _inst_2)) f x))
+but is expected to have type
+ forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : PseudoMetricSpace.{u1} α] [_inst_2 : PseudoMetricSpace.{u2} β] {f : α -> β} {x : α} {r : Real}, (LT.lt.{0} Real Real.instLTReal (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal)) r) -> (forall (K : Real), (forall (y : α), (LT.lt.{0} Real Real.instLTReal (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) y x) r) -> (LE.le.{0} Real Real.instLEReal (Dist.dist.{u2} β (PseudoMetricSpace.toDist.{u2} β _inst_2) (f y) (f x)) (HMul.hMul.{0, 0, 0} Real Real Real (instHMul.{0} Real Real.instMulReal) K (Dist.dist.{u1} α (PseudoMetricSpace.toDist.{u1} α _inst_1) y x)))) -> (ContinuousAt.{u1, u2} α β (UniformSpace.toTopologicalSpace.{u1} α (PseudoMetricSpace.toUniformSpace.{u1} α _inst_1)) (UniformSpace.toTopologicalSpace.{u2} β (PseudoMetricSpace.toUniformSpace.{u2} β _inst_2)) f x))
+Case conversion may be inaccurate. Consider using '#align continuous_at_of_locally_lipschitz continuousAt_of_locally_lipschitzₓ'. -/
/-- If a function is locally Lipschitz around a point, then it is continuous at this point. -/
theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSpace β] {f : α → β}
{x : α} {r : ℝ} (hr : 0 < r) (K : ℝ) (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) :
@@ -665,6 +1109,7 @@ theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSp
simp
#align continuous_at_of_locally_lipschitz continuousAt_of_locally_lipschitz
+#print LipschitzOnWith.extend_real /-
/-- A function `f : α → ℝ` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension
to the whole space. -/
theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s : Set α} {K : ℝ≥0}
@@ -707,7 +1152,9 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
exact add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle _ _ _) K.2) _
#align lipschitz_on_with.extend_real LipschitzOnWith.extend_real
+-/
+#print LipschitzOnWith.extend_pi /-
/-- A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
extension to the whole space.
TODO: state the same result (with the same proof) for the space `ℓ^∞ (ι, ℝ)` over a possibly
@@ -730,4 +1177,5 @@ theorem LipschitzOnWith.extend_pi [PseudoMetricSpace α] [Fintype ι] {f : α
ext1 i
exact (hg i).2 hx
#align lipschitz_on_with.extend_pi LipschitzOnWith.extend_pi
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/195fcd60ff2bfe392543bceb0ec2adcdb472db4c
@@ -53,7 +53,7 @@ variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` if for all `x, y`
we have `dist (f x) (f y) ≤ K * dist x y` -/
-def LipschitzWith [PseudoEmetricSpace α] [PseudoEmetricSpace β] (K : ℝ≥0) (f : α → β) :=
+def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
@@ -70,17 +70,17 @@ alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` on `s` if for all `x, y` in `s`
we have `dist (f x) (f y) ≤ K * dist x y` -/
-def LipschitzOnWith [PseudoEmetricSpace α] [PseudoEmetricSpace β] (K : ℝ≥0) (f : α → β)
+def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄ (hx : x ∈ s) ⦃y⦄ (hy : y ∈ s), edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
@[simp]
-theorem lipschitzOnWith_empty [PseudoEmetricSpace α] [PseudoEmetricSpace β] (K : ℝ≥0) (f : α → β) :
+theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun x x_in y y_in => False.elim x_in
#align lipschitz_on_with_empty lipschitzOnWith_empty
-theorem LipschitzOnWith.mono [PseudoEmetricSpace α] [PseudoEmetricSpace β] {K : ℝ≥0} {s t : Set α}
+theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun x x_in y y_in => hf (h x_in) (h y_in)
#align lipschitz_on_with.mono LipschitzOnWith.mono
@@ -98,11 +98,11 @@ alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzO
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
@[simp]
-theorem lipschitz_on_univ [PseudoEmetricSpace α] [PseudoEmetricSpace β] {K : ℝ≥0} {f : α → β} :
+theorem lipschitz_on_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
#align lipschitz_on_univ lipschitz_on_univ
-theorem lipschitzOnWith_iff_restrict [PseudoEmetricSpace α] [PseudoEmetricSpace β] {K : ℝ≥0}
+theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
@@ -110,7 +110,7 @@ theorem lipschitzOnWith_iff_restrict [PseudoEmetricSpace α] [PseudoEmetricSpace
alias lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict _
#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
-theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEmetricSpace α] [PseudoEmetricSpace β] {K : ℝ≥0}
+theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t) :
LipschitzOnWith K f s ↔ LipschitzWith K (h.restrict f s t) :=
lipschitzOnWith_iff_restrict
@@ -125,7 +125,7 @@ section Emetric
open Emetric
-variable [PseudoEmetricSpace α] [PseudoEmetricSpace β] [PseudoEmetricSpace γ]
+variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
variable {K : ℝ≥0} {f : α → β} {x y : α} {r : ℝ≥0∞}
@@ -176,11 +176,11 @@ protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K')
#align lipschitz_with.weaken LipschitzWith.weaken
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
- Emetric.diam (f '' s) ≤ K * Emetric.diam s :=
+ EMetric.diam (f '' s) ≤ K * EMetric.diam s :=
by
- apply Emetric.diam_le
+ apply EMetric.diam_le
rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩
- exact hf.edist_le_mul_of_le (Emetric.edist_le_diam_of_mem hx hy)
+ exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_le
theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥0∞}
@@ -194,7 +194,7 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
/-- A Lipschitz function is uniformly continuous -/
protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous f :=
by
- refine' Emetric.uniformContinuous_iff.2 fun ε εpos => _
+ refine' EMetric.uniformContinuous_iff.2 fun ε εpos => _
use ε / K, ENNReal.div_pos_iff.2 ⟨ne_of_gt εpos, ENNReal.coe_ne_top⟩
exact fun x y => hf.edist_lt_of_edist_lt_div
#align lipschitz_with.uniform_continuous LipschitzWith.uniformContinuous
@@ -225,7 +225,7 @@ theorem subtype_mk (hf : LipschitzWith K f) {p : β → Prop} (hp : ∀ x, p (f
hf
#align lipschitz_with.subtype_mk LipschitzWith.subtype_mk
-protected theorem eval {α : ι → Type u} [∀ i, PseudoEmetricSpace (α i)] [Fintype ι] (i : ι) :
+protected theorem eval {α : ι → Type u} [∀ i, PseudoEMetricSpace (α i)] [Fintype ι] (i : ι) :
LipschitzWith 1 (Function.eval i : (∀ i, α i) → α i) :=
LipschitzWith.of_edist_le fun f g => by convert edist_le_pi_edist f g i
#align lipschitz_with.eval LipschitzWith.eval
@@ -454,7 +454,7 @@ end Metric
section Emetric
-variable {α} [PseudoEmetricSpace α] {f g : α → ℝ} {Kf Kg : ℝ≥0}
+variable {α} [PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : ℝ≥0}
protected theorem max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) :
LipschitzWith (max Kf Kg) fun x => max (f x) (g x) := by
@@ -524,7 +524,7 @@ namespace LipschitzOnWith
section Emetric
-variable [PseudoEmetricSpace α] [PseudoEmetricSpace β] [PseudoEmetricSpace γ]
+variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
variable {K : ℝ≥0} {s : Set α} {f : α → β}
@@ -609,19 +609,19 @@ with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
of continuity of `f` on subsets of the product space. -/
-theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEmetricSpace α] [TopologicalSpace β]
- [PseudoEmetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
+theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [TopologicalSpace β]
+ [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
(ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
(hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) :=
by
rintro ⟨x, y⟩ ⟨hx : x ∈ s, hy : y ∈ t⟩
- refine' Emetric.tendsto_nhds.2 fun ε (ε0 : 0 < ε) => _
+ refine' EMetric.tendsto_nhds.2 fun ε (ε0 : 0 < ε) => _
replace ε0 : 0 < ε / 2 := ENNReal.half_pos (ne_of_gt ε0)
have εK : 0 < ε / 2 / K := ENNReal.div_pos_iff.2 ⟨ε0.ne', ENNReal.coe_ne_top⟩
- have A : s ∩ Emetric.ball x (ε / 2 / K) ∈ 𝓝[s] x :=
- inter_mem_nhdsWithin _ (Emetric.ball_mem_nhds _ εK)
+ have A : s ∩ EMetric.ball x (ε / 2 / K) ∈ 𝓝[s] x :=
+ inter_mem_nhdsWithin _ (EMetric.ball_mem_nhds _ εK)
have B : { b : β | b ∈ t ∧ edist (f (x, b)) (f (x, y)) < ε / 2 } ∈ 𝓝[t] y :=
- inter_mem self_mem_nhdsWithin (ha x hx y hy (Emetric.ball_mem_nhds _ ε0))
+ inter_mem self_mem_nhdsWithin (ha x hx y hy (EMetric.ball_mem_nhds _ ε0))
filter_upwards [nhdsWithin_prod A B]
rintro ⟨a, b⟩
⟨⟨has : a ∈ s, hax : edist a x < ε / 2 / K⟩, hbt : b ∈ t, hby :
@@ -640,8 +640,8 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEmetricSpace α] [
The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
of continuity of `f` on subsets of the product space. -/
-theorem continuous_prod_of_continuous_lipschitz [PseudoEmetricSpace α] [TopologicalSpace β]
- [PseudoEmetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
+theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [TopologicalSpace β]
+ [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
(hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f :=
by
simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -238,7 +238,7 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
- _ ≤ Kf * (Kg * edist x y) := ENNReal.mul_left_mono (hg _ _)
+ _ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
#align lipschitz_with.comp LipschitzWith.comp
@@ -629,7 +629,7 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEmetricSpace α] [
calc
edist (f (a, b)) (f (x, y)) ≤ edist (f (a, b)) (f (x, b)) + edist (f (x, b)) (f (x, y)) :=
edist_triangle _ _ _
- _ < ε / 2 + ε / 2 := ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby
+ _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
mathlib commit https://github.com/leanprover-community/mathlib/commit/eb0cb4511aaef0da2462207b67358a0e1fe1e2ee
@@ -47,7 +47,7 @@ universe u v w x
open Filter Function Set
-open Topology NNReal Ennreal
+open Topology NNReal ENNReal
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
@@ -139,12 +139,12 @@ theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤
theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
- (h x y).trans <| Ennreal.mul_left_mono hr
+ (h x y).trans <| ENNReal.mul_left_mono hr
#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
edist (f x) (f y) < K * r :=
- (h x y).trans_lt <| (Ennreal.mul_lt_mul_left (Ennreal.coe_ne_zero.2 hK) Ennreal.coe_ne_top).2 hr
+ (h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
@@ -157,22 +157,22 @@ theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r :
theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
edist (f x) (f y) < ⊤ :=
- (hf x y).trans_lt <| Ennreal.mul_lt_top Ennreal.coe_ne_top h
+ (hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
(K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y :=
by
rw [mul_comm, ← div_eq_mul_inv]
- exact Ennreal.div_le_of_le_mul' (h x y)
+ exact ENNReal.div_le_of_le_mul' (h x y)
#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_le
protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : LipschitzWith 1 f :=
- fun x y => by simp only [Ennreal.coe_one, one_mul, h]
+ fun x y => by simp only [ENNReal.coe_one, one_mul, h]
#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
- fun x y => le_trans (hf x y) <| Ennreal.mul_right_mono (Ennreal.coe_le_coe.2 h)
+ fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
#align lipschitz_with.weaken LipschitzWith.weaken
theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
@@ -187,7 +187,7 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
(h : edist x y < d / K) : edist (f x) (f y) < d :=
calc
edist (f x) (f y) ≤ K * edist x y := hf x y
- _ < d := Ennreal.mul_lt_of_lt_div' h
+ _ < d := ENNReal.mul_lt_of_lt_div' h
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
@@ -195,7 +195,7 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous f :=
by
refine' Emetric.uniformContinuous_iff.2 fun ε εpos => _
- use ε / K, Ennreal.div_pos_iff.2 ⟨ne_of_gt εpos, Ennreal.coe_ne_top⟩
+ use ε / K, ENNReal.div_pos_iff.2 ⟨ne_of_gt εpos, ENNReal.coe_ne_top⟩
exact fun x y => hf.edist_lt_of_edist_lt_div
#align lipschitz_with.uniform_continuous LipschitzWith.uniformContinuous
@@ -238,8 +238,8 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
- _ ≤ Kf * (Kg * edist x y) := Ennreal.mul_left_mono (hg _ _)
- _ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, Ennreal.coe_mul]
+ _ ≤ Kf * (Kg * edist x y) := ENNReal.mul_left_mono (hg _ _)
+ _ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
#align lipschitz_with.comp LipschitzWith.comp
@@ -260,7 +260,7 @@ protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) :=
by
intro x y
- rw [ennreal.coe_mono.map_max, Prod.edist_eq, Ennreal.max_mul]
+ rw [ennreal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
exact max_le_max (hf x y) (hg x y)
#align lipschitz_with.prod LipschitzWith.prod
@@ -276,11 +276,11 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
(hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f) :=
by
rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩
- simp only [Function.uncurry, Ennreal.coe_add, add_mul]
+ simp only [Function.uncurry, ENNReal.coe_add, add_mul]
apply le_trans (edist_triangle _ (f a₂ b₁) _)
exact
- add_le_add (le_trans (hα _ _ _) <| Ennreal.mul_left_mono <| le_max_left _ _)
- (le_trans (hβ _ _ _) <| Ennreal.mul_left_mono <| le_max_right _ _)
+ add_le_add (le_trans (hα _ _ _) <| ENNReal.mul_left_mono <| le_max_left _ _)
+ (le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
#align lipschitz_with.uncurry LipschitzWith.uncurry
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) (f^[n])
@@ -292,7 +292,7 @@ theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * K ^ n :=
by
rw [iterate_succ, mul_comm]
- simpa only [Ennreal.coe_pow] using (hf.iterate n) x (f x)
+ simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
@@ -408,7 +408,7 @@ theorem comap_cobounded_le (hf : LipschitzWith K f) :
theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
Metric.Bounded (f '' s) :=
Metric.bounded_iff_ediam_ne_top.2 <|
- ne_top_of_le_ne_top (Ennreal.mul_ne_top Ennreal.coe_ne_top hs.ediam_ne_top)
+ ne_top_of_le_ne_top (ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top)
(hf.ediam_image_le s)
#align lipschitz_with.bounded_image LipschitzWith.bounded_image
@@ -616,8 +616,8 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEmetricSpace α] [
by
rintro ⟨x, y⟩ ⟨hx : x ∈ s, hy : y ∈ t⟩
refine' Emetric.tendsto_nhds.2 fun ε (ε0 : 0 < ε) => _
- replace ε0 : 0 < ε / 2 := Ennreal.half_pos (ne_of_gt ε0)
- have εK : 0 < ε / 2 / K := Ennreal.div_pos_iff.2 ⟨ε0.ne', Ennreal.coe_ne_top⟩
+ replace ε0 : 0 < ε / 2 := ENNReal.half_pos (ne_of_gt ε0)
+ have εK : 0 < ε / 2 / K := ENNReal.div_pos_iff.2 ⟨ε0.ne', ENNReal.coe_ne_top⟩
have A : s ∩ Emetric.ball x (ε / 2 / K) ∈ 𝓝[s] x :=
inter_mem_nhdsWithin _ (Emetric.ball_mem_nhds _ εK)
have B : { b : β | b ∈ t ∧ edist (f (x, b)) (f (x, y)) < ε / 2 } ∈ 𝓝[t] y :=
@@ -629,8 +629,8 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEmetricSpace α] [
calc
edist (f (a, b)) (f (x, y)) ≤ edist (f (a, b)) (f (x, b)) + edist (f (x, b)) (f (x, y)) :=
edist_triangle _ _ _
- _ < ε / 2 + ε / 2 := Ennreal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby
- _ = ε := Ennreal.add_halves ε
+ _ < ε / 2 + ε / 2 := ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby
+ _ = ε := ENNReal.add_halves ε
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -3,7 +3,7 @@ Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-/
-import Mathlib.Data.Set.Intervals.ProjIcc
+import Mathlib.Order.Interval.Set.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Bornology.Hom
import Mathlib.Topology.EMetricSpace.Lipschitz
@@ -216,7 +216,7 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
- _ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
+ _ ≤ Kf * (Kg * edist x y) := ENNReal.mul_left_mono (hg _ _)
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
#align lipschitz_with.comp LipschitzWith.comp
Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.
@@ -416,7 +416,7 @@ theorem LipschitzOnWith.extend_real {f : α → ℝ} {s : Set α} {K : ℝ≥0}
/-- A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
extension to the whole space. The same result for the space `ℓ^∞ (ι, ℝ)` over a possibly infinite
-type `ι` is implemented in `LipschitzOnWith.extend_lp_infty`.-/
+type `ι` is implemented in `LipschitzOnWith.extend_lp_infty`. -/
theorem LipschitzOnWith.extend_pi [Fintype ι] {f : α → ι → ℝ} {s : Set α}
{K : ℝ≥0} (hf : LipschitzOnWith K f s) : ∃ g : α → ι → ℝ, LipschitzWith K g ∧ EqOn f g s := by
have : ∀ i, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s := fun i => by
When computing the integral of a function taking values in a noncomplete space, we use the junk value 0
. This means that several theorems about integrals hold without completeness assumptions for trivial reasons. We use this to drop several completeness assumptions here and there in mathlib. This involves one nontrivial mathematical fact, that E →L[𝕜] F
is complete iff F
is complete, for which we add the missing direction (from left to right) in this PR.
@@ -193,6 +193,15 @@ lemma _root_.Real.lipschitzWith_toNNReal : LipschitzWith 1 Real.toNNReal := by
simpa only [ge_iff_le, NNReal.coe_one, dist_prod_same_right, one_mul, Real.dist_eq] using
lipschitzWith_iff_dist_le_mul.mp lipschitzWith_max (x, 0) (y, 0)
+lemma cauchySeq_comp (hf : LipschitzWith K f) {u : ℕ → α} (hu : CauchySeq u) :
+ CauchySeq (f ∘ u) := by
+ rcases cauchySeq_iff_le_tendsto_0.1 hu with ⟨b, b_nonneg, hb, blim⟩
+ refine cauchySeq_iff_le_tendsto_0.2 ⟨fun n ↦ K * b n, ?_, ?_, ?_⟩
+ · exact fun n ↦ mul_nonneg (by positivity) (b_nonneg n)
+ · exact fun n m N hn hm ↦ hf.dist_le_mul_of_le (hb n m N hn hm)
+ · rw [← mul_zero (K : ℝ)]
+ exact blim.const_mul _
+
end Metric
section EMetric
@@ -306,6 +315,19 @@ theorem isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set
(ediam_image2_le _ _ _ hf₁ hf₂)
#align lipschitz_on_with.bounded_image2 LipschitzOnWith.isBounded_image2
+lemma cauchySeq_comp (hf : LipschitzOnWith K f s)
+ {u : ℕ → α} (hu : CauchySeq u) (h'u : range u ⊆ s) :
+ CauchySeq (f ∘ u) := by
+ rcases cauchySeq_iff_le_tendsto_0.1 hu with ⟨b, b_nonneg, hb, blim⟩
+ refine cauchySeq_iff_le_tendsto_0.2 ⟨fun n ↦ K * b n, ?_, ?_, ?_⟩
+ · exact fun n ↦ mul_nonneg (by positivity) (b_nonneg n)
+ · intro n m N hn hm
+ have A n : u n ∈ s := h'u (mem_range_self _)
+ apply (hf.dist_le_mul _ (A n) _ (A m)).trans
+ exact mul_le_mul_of_nonneg_left (hb n m N hn hm) K.2
+ · rw [← mul_zero (K : ℝ)]
+ exact blim.const_mul _
+
end Metric
end LipschitzOnWith
We change the following field in the definition of an additive commutative monoid:
nsmul_succ : ∀ (n : ℕ) (x : G),
- AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
+ AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
where the latter is more natural
We adjust the definitions of ^
in monoids, groups, etc.
Originally there was a warning comment about why this natural order was preferred
use
x * npowRec n x
and notnpowRec n x * x
in the definition to make sure that definitional unfolding ofnpowRec
is blocked, to avoid deep recursion issues.
but it seems to no longer apply.
Remarks on the PR :
pow_succ
and pow_succ'
have switched their meanings.Ideal.IsPrime.mul_mem_pow
which is defined in [Mathlib/RingTheory/DedekindDomain/Ideal.lean]. Changing the order of operation forced me to add the symmetric lemma Ideal.IsPrime.mem_pow_mul
.@@ -262,7 +262,7 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
/-- Iterates of a Lipschitz function are Lipschitz. -/
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) f^[n]
| 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by rw [pow_succ']; exact (LipschitzWith.iterate hf n).comp hf
+ | n + 1 => by rw [pow_succ]; exact (LipschitzWith.iterate hf n).comp hf
#align lipschitz_with.iterate LipschitzWith.iterate
theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
@@ -291,7 +291,7 @@ protected theorem pow_end {f : Function.End α} {K} (h : LipschitzWith K f) :
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by
rw [pow_succ, pow_succ]
- exact h.mul_end (LipschitzWith.pow_end h n)
+ exact (LipschitzWith.pow_end h n).mul_end h
#align lipschitz_with.pow LipschitzWith.pow_end
end LipschitzWith
@@ -407,7 +407,7 @@ protected theorem pow_end {f : Function.End α} (h : LocallyLipschitz f) :
| 0 => by simpa only [pow_zero] using LocallyLipschitz.id
| n + 1 => by
rw [pow_succ]
- exact h.mul_end (h.pow_end n)
+ exact (h.pow_end n).mul_end h
end LocallyLipschitz
apply foo.mpr
by rw [foo]
(#11515)
Sometimes, that line can be golfed into the next line. Inspired by a comment of @loefflerd; any decisions are my own.
@@ -364,7 +364,7 @@ protected lemma const (b : β) : LocallyLipschitz (fun _ : α ↦ b) :=
/-- A locally Lipschitz function is continuous. (The converse is false: for example,
$x ↦ \sqrt{x}$ is continuous, but not locally Lipschitz at 0.) -/
protected theorem continuous {f : α → β} (hf : LocallyLipschitz f) : Continuous f := by
- apply continuous_iff_continuousAt.mpr
+ rw [continuous_iff_continuousAt]
intro x
rcases (hf x) with ⟨K, t, ht, hK⟩
exact (hK.continuousOn).continuousAt ht
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -249,7 +249,6 @@ namespace LipschitzOnWith
section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ]
-
variable {K : ℝ≥0} {s : Set α} {f : α → β}
protected theorem of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) :
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -105,7 +105,6 @@ namespace LipschitzWith
open EMetric
variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
-
variable {K : ℝ≥0} {f : α → β} {x y : α} {r : ℝ≥0∞}
protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : LipschitzOnWith K f s :=
@@ -300,7 +299,6 @@ end LipschitzWith
namespace LipschitzOnWith
variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
-
variable {K : ℝ≥0} {s : Set α} {f : α → β}
protected theorem uniformContinuousOn (hf : LipschitzOnWith K f s) : UniformContinuousOn f s :=
ball
and bex
from lemma names (#10816)
ball
for "bounded forall" and bex
for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem
and exists_mem
in the few Set
lemma names that mention them.
Also deprecate ball_image_of_ball
, mem_image_elim
, mem_image_elim_on
since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image
semi-implicit), have obscure names and are completely unused.
@@ -132,7 +132,7 @@ theorem mapsTo_ball (hf : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ) :
def toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBoundedMap α β :=
LocallyBoundedMap.ofMapBounded f fun _s hs =>
let ⟨C, hC⟩ := Metric.isBounded_iff.1 hs
- Metric.isBounded_iff.2 ⟨K * C, ball_image_iff.2 fun _x hx => ball_image_iff.2 fun _y hy =>
+ Metric.isBounded_iff.2 ⟨K * C, forall_mem_image.2 fun _x hx => forall_mem_image.2 fun _y hy =>
hf.dist_le_mul_of_le (hC hx hy)⟩
#align lipschitz_with.to_locally_bounded_map LipschitzWith.toLocallyBoundedMap
@@ -155,8 +155,8 @@ theorem isBounded_image (hf : LipschitzWith K f) {s : Set α} (hs : IsBounded s)
theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : IsBounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
- ball_image_iff.2 fun _x hx =>
- ball_image_iff.2 fun _y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
+ forall_mem_image.2 fun _x hx =>
+ forall_mem_image.2 fun _y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
#align lipschitz_with.diam_image_le LipschitzWith.diam_image_le
protected theorem dist_left (y : α) : LipschitzWith 1 (dist · y) :=
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -443,7 +443,7 @@ theorem continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith [Pseudo
_ ≤ K * (δ + δ) + ε / 2 + K * δ := by
gcongr
· refine (hb b hbt).edist_le_mul_of_le has (hs' hx') ?_
- refine (edist_triangle _ _ _).trans (add_le_add (le_of_lt hax) hxx'.le)
+ exact (edist_triangle _ _ _).trans (add_le_add (le_of_lt hax) hxx'.le)
· exact hby
· exact (hb y hy).edist_le_mul_of_le (hs' hx') hx ((edist_comm _ _).trans_le hxx'.le)
_ = δ * ↑(3 * K) + ε / 2 := by push_cast; ring
@@ -32,8 +32,6 @@ coercions both to `ℝ` and `ℝ≥0∞`. Constructors whose names end with `'`
argument, and return `LipschitzWith (Real.toNNReal K) f`.
-/
-set_option autoImplicit true
-
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
@@ -41,8 +41,6 @@ coercions both to `ℝ` and `ℝ≥0∞`. Constructors whose names end with `'`
argument, and return `LipschitzWith (Real.toNNReal K) f`.
-/
-set_option autoImplicit true
-
universe u v w x
open Filter Function Set Topology NNReal ENNReal Bornology
@@ -313,8 +311,8 @@ protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :
hf.uniformContinuousOn.continuousOn
#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
-theorem edist_le_mul_of_le (h : LipschitzOnWith K f s) (hx : x ∈ s) (hy : y ∈ s)
- (hr : edist x y ≤ r) :
+theorem edist_le_mul_of_le (h : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
+ {r : ℝ≥0∞} (hr : edist x y ≤ r) :
edist (f x) (f y) ≤ K * r :=
(h hx hy).trans <| ENNReal.mul_left_mono hr
Set.image2
etc (#9275)
Set.image2
to use ∃ a ∈ s, ∃ b ∈ t, f a b = c
instead of ∃ a b, a ∈ s ∧ b ∈ t ∧ f a b = c
.Set.seq
as Set.image2
. The new definition is equal to the old one but rw [Set.seq]
gives a different result.Filter.map₂
to use ∃ u ∈ f, ∃ v ∈ g, image2 m u v ⊆ s
instead of ∃ u v, u ∈ f ∧ v ∈ g ∧ ...
Set.mem_image2
, Finset.mem_image₂
, Set.mem_mul
, Finset.mem_div
etcThe two reasons to make the change are:
∃ a ∈ s, ∃ b ∈ t, _
is a simp
-normal form, and@@ -337,12 +337,11 @@ protected theorem prod {g : α → γ} {Kf Kg : ℝ≥0} (hf : LipschitzOnWith K
exact max_le_max (hf hx hy) (hg hx hy)
theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
- (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
- (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
+ (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (f · b) s) (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
EMetric.diam (Set.image2 f s t) ≤ ↑K₁ * EMetric.diam s + ↑K₂ * EMetric.diam t := by
- apply EMetric.diam_le
- rintro _ ⟨a₁, b₁, ha₁, hb₁, rfl⟩ _ ⟨a₂, b₂, ha₂, hb₂, rfl⟩
- refine' (edist_triangle _ (f a₂ b₁) _).trans _
+ simp only [EMetric.diam_le_iff, forall_image2_iff]
+ intro a₁ ha₁ b₁ hb₁ a₂ ha₂ b₂ hb₂
+ refine (edist_triangle _ (f a₂ b₁) _).trans ?_
exact
add_le_add
((hf₁ b₁ hb₁ ha₁ ha₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem ha₁ ha₂)
This PR adds the last missing implication of the general case of portmanteau equivalent characterizations of convergence in distribution: a sufficient condition for convergence in distribution of a sequence of probability measures is that for all open sets the candidate limit measure is at most the liminf of the measures.
Co-authored-by: Kalle <kalle.kytola@aalto.fi> Co-authored-by: kkytola <39528102+kkytola@users.noreply.github.com>
@@ -190,6 +190,11 @@ theorem _root_.lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1
(le_abs_self _).trans (abs_min_sub_min_le_max _ _ _ _)
#align lipschitz_with_min lipschitzWith_min
+lemma _root_.Real.lipschitzWith_toNNReal : LipschitzWith 1 Real.toNNReal := by
+ refine lipschitzWith_iff_dist_le_mul.mpr (fun x y ↦ ?_)
+ simpa only [ge_iff_le, NNReal.coe_one, dist_prod_same_right, one_mul, Real.dist_eq] using
+ lipschitzWith_iff_dist_le_mul.mp lipschitzWith_max (x, 0) (y, 0)
+
end Metric
section EMetric
@@ -6,6 +6,7 @@ Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudr
import Mathlib.Data.Set.Intervals.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Bornology.Hom
+import Mathlib.Topology.EMetricSpace.Lipschitz
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
@@ -21,20 +22,8 @@ There is also a version asserting this inequality only for `x` and `y` in some s
Finally, `f : α → β` is called *locally Lipschitz continuous* if each `x : α` has a neighbourhood
on which `f` is Lipschitz continuous (with some constant).
-In this file we provide various ways to prove that various combinations of Lipschitz continuous
-functions are Lipschitz continuous. We also prove that Lipschitz continuous functions are
-uniformly continuous, and that locally Lipschitz functions are continuous.
-
-## Main definitions and lemmas
-
-* `LipschitzWith K f`: states that `f` is Lipschitz with constant `K : ℝ≥0`
-* `LipschitzOnWith K f s`: states that `f` is Lipschitz with constant `K : ℝ≥0` on a set `s`
-* `LipschitzWith.uniformContinuous`: a Lipschitz function is uniformly continuous
-* `LipschitzOnWith.uniformContinuousOn`: a function which is Lipschitz on a set `s` is uniformly
- continuous on `s`.
-* `LocallyLipschitz f`: states that `f` is locally Lipschitz
-* `LocallyLipschitz.continuous`: a locally Lipschitz function is continuous.
-
+In this file we specialize various facts about Lipschitz continuous maps
+to the case of (pseudo) metric spaces.
## Implementation notes
@@ -51,12 +40,6 @@ open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
-/-- A function `f` is **Lipschitz continuous** with constant `K ≥ 0` if for all `x, y`
-we have `dist (f x) (f y) ≤ K * dist x y`. -/
-def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
- ∀ x y, edist (f x) (f y) ≤ K * edist x y
-#align lipschitz_with LipschitzWith
-
theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{f : α → β} : LipschitzWith K f ↔ ∀ x y, dist (f x) (f y) ≤ K * dist x y := by
simp only [LipschitzWith, edist_nndist, dist_nndist]
@@ -67,30 +50,6 @@ alias ⟨LipschitzWith.dist_le_mul, LipschitzWith.of_dist_le_mul⟩ := lipschitz
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
-/-- A function `f` is **Lipschitz continuous** with constant `K ≥ 0` **on `s`** if
-for all `x, y` in `s` we have `dist (f x) (f y) ≤ K * dist x y`. -/
-def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
- (s : Set α) :=
- ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
-#align lipschitz_on_with LipschitzOnWith
-
-/-- `f : α → β` is called **locally Lipschitz continuous** iff every point `x`
-has a neighourhood on which `f` is Lipschitz. -/
-def LocallyLipschitz [PseudoEMetricSpace α] [PseudoEMetricSpace β] (f : α → β) : Prop :=
- ∀ x : α, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
-
-/-- Every function is Lipschitz on the empty set (with any Lipschitz constant). -/
-@[simp]
-theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
- LipschitzOnWith K f ∅ := fun _ => False.elim
-#align lipschitz_on_with_empty lipschitzOnWith_empty
-
-/-- Being Lipschitz on a set is monotone w.r.t. that set. -/
-theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
- {f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
- fun _x x_in _y y_in => hf (h x_in) (h y_in)
-#align lipschitz_on_with.mono LipschitzOnWith.mono
-
theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace β] {K : ℝ≥0}
{s : Set α} {f : α → β} :
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y := by
@@ -103,228 +62,8 @@ alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
-/-- `f` is Lipschitz iff it is Lipschitz on the entire space. -/
-@[simp]
-theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
- LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
-#align lipschitz_on_univ lipschitzOn_univ
-
-theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
- {f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
- simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
-#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
-
-alias ⟨LipschitzOnWith.to_restrict, _⟩ := lipschitzOnWith_iff_restrict
-#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
-
-theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
- {f : α → β} {s : Set α} {t : Set β} (h : MapsTo f s t) :
- LipschitzOnWith K f s ↔ LipschitzWith K (h.restrict f s t) :=
- _root_.lipschitzOnWith_iff_restrict
-#align maps_to.lipschitz_on_with_iff_restrict MapsTo.lipschitzOnWith_iff_restrict
-
-alias ⟨LipschitzOnWith.to_restrict_mapsTo, _⟩ := MapsTo.lipschitzOnWith_iff_restrict
-#align lipschitz_on_with.to_restrict_maps_to LipschitzOnWith.to_restrict_mapsTo
-
namespace LipschitzWith
-section EMetric
-
-open EMetric
-
-variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
-
-variable {K : ℝ≥0} {f : α → β} {x y : α} {r : ℝ≥0∞}
-
-protected theorem lipschitzOnWith (h : LipschitzWith K f) (s : Set α) : LipschitzOnWith K f s :=
- fun x _ y _ => h x y
-#align lipschitz_with.lipschitz_on_with LipschitzWith.lipschitzOnWith
-
-theorem edist_le_mul (h : LipschitzWith K f) (x y : α) : edist (f x) (f y) ≤ K * edist x y :=
- h x y
-#align lipschitz_with.edist_le_mul LipschitzWith.edist_le_mul
-
-theorem edist_le_mul_of_le (h : LipschitzWith K f) (hr : edist x y ≤ r) :
- edist (f x) (f y) ≤ K * r :=
- (h x y).trans <| ENNReal.mul_left_mono hr
-#align lipschitz_with.edist_le_mul_of_le LipschitzWith.edist_le_mul_of_le
-
-theorem edist_lt_mul_of_lt (h : LipschitzWith K f) (hK : K ≠ 0) (hr : edist x y < r) :
- edist (f x) (f y) < K * r :=
- (h x y).trans_lt <| (ENNReal.mul_lt_mul_left (ENNReal.coe_ne_zero.2 hK) ENNReal.coe_ne_top).2 hr
-#align lipschitz_with.edist_lt_mul_of_lt LipschitzWith.edist_lt_mul_of_lt
-
-theorem mapsTo_emetric_closedBall (h : LipschitzWith K f) (x : α) (r : ℝ≥0∞) :
- MapsTo f (closedBall x r) (closedBall (f x) (K * r)) := fun _y hy => h.edist_le_mul_of_le hy
-#align lipschitz_with.maps_to_emetric_closed_ball LipschitzWith.mapsTo_emetric_closedBall
-
-theorem mapsTo_emetric_ball (h : LipschitzWith K f) (hK : K ≠ 0) (x : α) (r : ℝ≥0∞) :
- MapsTo f (ball x r) (ball (f x) (K * r)) := fun _y hy => h.edist_lt_mul_of_lt hK hy
-#align lipschitz_with.maps_to_emetric_ball LipschitzWith.mapsTo_emetric_ball
-
-theorem edist_lt_top (hf : LipschitzWith K f) {x y : α} (h : edist x y ≠ ⊤) :
- edist (f x) (f y) < ⊤ :=
- (hf x y).trans_lt <| ENNReal.mul_lt_top ENNReal.coe_ne_top h
-#align lipschitz_with.edist_lt_top LipschitzWith.edist_lt_top
-
-theorem mul_edist_le (h : LipschitzWith K f) (x y : α) :
- (K⁻¹ : ℝ≥0∞) * edist (f x) (f y) ≤ edist x y := by
- rw [mul_comm, ← div_eq_mul_inv]
- exact ENNReal.div_le_of_le_mul' (h x y)
-#align lipschitz_with.mul_edist_le LipschitzWith.mul_edist_le
-
-protected theorem of_edist_le (h : ∀ x y, edist (f x) (f y) ≤ edist x y) : LipschitzWith 1 f :=
- fun x y => by simp only [ENNReal.coe_one, one_mul, h]
-#align lipschitz_with.of_edist_le LipschitzWith.of_edist_le
-
-protected theorem weaken (hf : LipschitzWith K f) {K' : ℝ≥0} (h : K ≤ K') : LipschitzWith K' f :=
- fun x y => le_trans (hf x y) <| ENNReal.mul_right_mono (ENNReal.coe_le_coe.2 h)
-#align lipschitz_with.weaken LipschitzWith.weaken
-
-theorem ediam_image_le (hf : LipschitzWith K f) (s : Set α) :
- EMetric.diam (f '' s) ≤ K * EMetric.diam s := by
- apply EMetric.diam_le
- rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩
- exact hf.edist_le_mul_of_le (EMetric.edist_le_diam_of_mem hx hy)
-#align lipschitz_with.ediam_image_le LipschitzWith.ediam_image_le
-
-theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥0∞}
- (h : edist x y < d / K) : edist (f x) (f y) < d :=
- calc
- edist (f x) (f y) ≤ K * edist x y := hf x y
- _ < d := ENNReal.mul_lt_of_lt_div' h
-#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
-
-/-- A Lipschitz function is uniformly continuous. -/
-protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous f :=
- EMetric.uniformContinuous_iff.2 fun ε εpos =>
- ⟨ε / K, ENNReal.div_pos_iff.2 ⟨ne_of_gt εpos, ENNReal.coe_ne_top⟩, hf.edist_lt_of_edist_lt_div⟩
-#align lipschitz_with.uniform_continuous LipschitzWith.uniformContinuous
-
-/-- A Lipschitz function is continuous. -/
-protected theorem continuous (hf : LipschitzWith K f) : Continuous f :=
- hf.uniformContinuous.continuous
-#align lipschitz_with.continuous LipschitzWith.continuous
-
-/-- Constant functions are Lipschitz (with any constant). -/
-protected theorem const (b : β) : LipschitzWith 0 fun _ : α => b := fun x y => by
- simp only [edist_self, zero_le]
-#align lipschitz_with.const LipschitzWith.const
-
-protected theorem const' (b : β) {K : ℝ≥0} : LipschitzWith K fun _ : α => b := fun x y => by
- simp only [edist_self, zero_le]
-
-/-- The identity is 1-Lipschitz. -/
-protected theorem id : LipschitzWith 1 (@id α) :=
- LipschitzWith.of_edist_le fun _ _ => le_rfl
-#align lipschitz_with.id LipschitzWith.id
-
-/-- The inclusion of a subset is 1-Lipschitz. -/
-protected theorem subtype_val (s : Set α) : LipschitzWith 1 (Subtype.val : s → α) :=
- LipschitzWith.of_edist_le fun _ _ => le_rfl
-#align lipschitz_with.subtype_val LipschitzWith.subtype_val
-#align lipschitz_with.subtype_coe LipschitzWith.subtype_val
-
-theorem subtype_mk (hf : LipschitzWith K f) {p : β → Prop} (hp : ∀ x, p (f x)) :
- LipschitzWith K (fun x => ⟨f x, hp x⟩ : α → { y // p y }) :=
- hf
-#align lipschitz_with.subtype_mk LipschitzWith.subtype_mk
-
-protected theorem eval {α : ι → Type u} [∀ i, PseudoEMetricSpace (α i)] [Fintype ι] (i : ι) :
- LipschitzWith 1 (Function.eval i : (∀ i, α i) → α i) :=
- LipschitzWith.of_edist_le fun f g => by convert edist_le_pi_edist f g i
-#align lipschitz_with.eval LipschitzWith.eval
-
-/-- The restriction of a `K`-Lipschitz function is `K`-Lipschitz. -/
-protected theorem restrict (hf : LipschitzWith K f) (s : Set α) : LipschitzWith K (s.restrict f) :=
- fun x y => hf x y
-#align lipschitz_with.restrict LipschitzWith.restrict
-
-/-- The composition of Lipschitz functions is Lipschitz. -/
-protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
- (hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
- calc
- edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
- _ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
- _ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
-#align lipschitz_with.comp LipschitzWith.comp
-
-theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
- (hf : LipschitzWith Kf f) (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (Kf * Kg) (f ∘ g) s :=
- lipschitzOnWith_iff_restrict.mpr <| hf.comp hg.to_restrict
-#align lipschitz_with.comp_lipschitz_on_with LipschitzWith.comp_lipschitzOnWith
-
-protected theorem prod_fst : LipschitzWith 1 (@Prod.fst α β) :=
- LipschitzWith.of_edist_le fun _ _ => le_max_left _ _
-#align lipschitz_with.prod_fst LipschitzWith.prod_fst
-
-protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β) :=
- LipschitzWith.of_edist_le fun _ _ => le_max_right _ _
-#align lipschitz_with.prod_snd LipschitzWith.prod_snd
-
-/-- If `f` and `g` are Lipschitz functions, so is the induced map `f × g` to the product type. -/
-protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
- (hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) := by
- intro x y
- rw [ENNReal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
- exact max_le_max (hf x y) (hg x y)
-#align lipschitz_with.prod LipschitzWith.prod
-
-protected theorem prod_mk_left (a : α) : LipschitzWith 1 (Prod.mk a : β → α × β) := by
- simpa only [max_eq_right zero_le_one] using (LipschitzWith.const a).prod LipschitzWith.id
-#align lipschitz_with.prod_mk_left LipschitzWith.prod_mk_left
-
-protected theorem prod_mk_right (b : β) : LipschitzWith 1 fun a : α => (a, b) := by
- simpa only [max_eq_left zero_le_one] using LipschitzWith.id.prod (LipschitzWith.const b)
-#align lipschitz_with.prod_mk_right LipschitzWith.prod_mk_right
-
-protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀ b, LipschitzWith Kα fun a => f a b)
- (hβ : ∀ a, LipschitzWith Kβ (f a)) : LipschitzWith (Kα + Kβ) (Function.uncurry f) := by
- rintro ⟨a₁, b₁⟩ ⟨a₂, b₂⟩
- simp only [Function.uncurry, ENNReal.coe_add, add_mul]
- apply le_trans (edist_triangle _ (f a₂ b₁) _)
- exact
- add_le_add (le_trans (hα _ _ _) <| ENNReal.mul_left_mono <| le_max_left _ _)
- (le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
-#align lipschitz_with.uncurry LipschitzWith.uncurry
-
-/-- Iterates of a Lipschitz function are Lipschitz. -/
-protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) f^[n]
- | 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by rw [pow_succ']; exact (LipschitzWith.iterate hf n).comp hf
-#align lipschitz_with.iterate LipschitzWith.iterate
-
-theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
- edist (f^[n] x) (f^[n + 1] x) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n := by
- rw [iterate_succ, mul_comm]
- simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
-#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
-
-protected theorem mul_end {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
- (hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
- hf.comp hg
-#align lipschitz_with.mul LipschitzWith.mul_end
-
-/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
-endomorphism. -/
-protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
- (h : ∀ i, LipschitzWith (K i) (f i)) : ∀ l : List ι, LipschitzWith (l.map K).prod (l.map f).prod
- | [] => by simpa using LipschitzWith.id
- | i::l => by
- simp only [List.map_cons, List.prod_cons]
- exact (h i).mul_end (LipschitzWith.list_prod f K h l)
-#align lipschitz_with.list_prod LipschitzWith.list_prod
-
-protected theorem pow_end {f : Function.End α} {K} (h : LipschitzWith K f) :
- ∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
- | 0 => by simpa only [pow_zero] using LipschitzWith.id
- | n + 1 => by
- rw [pow_succ, pow_succ]
- exact h.mul_end (LipschitzWith.pow_end h n)
-#align lipschitz_with.pow LipschitzWith.pow_end
-
-end EMetric
-
section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ] {K : ℝ≥0} {f : α → β}
@@ -504,58 +243,6 @@ end Metric
namespace LipschitzOnWith
-section EMetric
-
-variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ]
-
-variable {K : ℝ≥0} {s : Set α} {f : α → β}
-
-protected theorem uniformContinuousOn (hf : LipschitzOnWith K f s) : UniformContinuousOn f s :=
- uniformContinuousOn_iff_restrict.mpr (lipschitzOnWith_iff_restrict.mp hf).uniformContinuous
-#align lipschitz_on_with.uniform_continuous_on LipschitzOnWith.uniformContinuousOn
-
-protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :=
- hf.uniformContinuousOn.continuousOn
-#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
-
-theorem edist_le_mul_of_le (h : LipschitzOnWith K f s) (hx : x ∈ s) (hy : y ∈ s)
- (hr : edist x y ≤ r) :
- edist (f x) (f y) ≤ K * r :=
- (h hx hy).trans <| ENNReal.mul_left_mono hr
-
-theorem edist_lt_of_edist_lt_div (hf : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
- {d : ℝ≥0∞} (hd : edist x y < d / K) : edist (f x) (f y) < d :=
- hf.to_restrict.edist_lt_of_edist_lt_div <|
- show edist (⟨x, hx⟩ : s) ⟨y, hy⟩ < d / K from hd
-#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_div
-
-protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : LipschitzOnWith Kg g t)
- (hf : LipschitzOnWith K f s) (hmaps : MapsTo f s t) : LipschitzOnWith (Kg * K) (g ∘ f) s :=
- lipschitzOnWith_iff_restrict.mpr <| hg.to_restrict.comp (hf.to_restrict_mapsTo hmaps)
-#align lipschitz_on_with.comp LipschitzOnWith.comp
-
-/-- If `f` and `g` are Lipschitz on `s`, so is the induced map `f × g` to the product type. -/
-protected theorem prod {g : α → γ} {Kf Kg : ℝ≥0} (hf : LipschitzOnWith Kf f s)
- (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (max Kf Kg) (fun x => (f x, g x)) s := by
- intro _ hx _ hy
- rw [ENNReal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
- exact max_le_max (hf hx hy) (hg hx hy)
-
-theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
- (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
- (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
- EMetric.diam (Set.image2 f s t) ≤ ↑K₁ * EMetric.diam s + ↑K₂ * EMetric.diam t := by
- apply EMetric.diam_le
- rintro _ ⟨a₁, b₁, ha₁, hb₁, rfl⟩ _ ⟨a₂, b₂, ha₂, hb₂, rfl⟩
- refine' (edist_triangle _ (f a₂ b₁) _).trans _
- exact
- add_le_add
- ((hf₁ b₁ hb₁ ha₁ ha₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem ha₁ ha₂)
- ((hf₂ a₂ ha₂ hb₁ hb₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem hb₁ hb₂)
-#align lipschitz_on_with.ediam_image2_le LipschitzOnWith.ediam_image2_le
-
-end EMetric
-
section Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ]
@@ -622,70 +309,11 @@ end Metric
end LipschitzOnWith
namespace LocallyLipschitz
-variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ] {f : α → β}
-
-/-- A Lipschitz function is locally Lipschitz. -/
-protected lemma _root_.LipschitzWith.locallyLipschitz {K : ℝ≥0} (hf : LipschitzWith K f) :
- LocallyLipschitz f :=
- fun _ ↦ ⟨K, univ, Filter.univ_mem, lipschitzOn_univ.mpr hf⟩
-
-/-- The identity function is locally Lipschitz. -/
-protected lemma id : LocallyLipschitz (@id α) := LipschitzWith.id.locallyLipschitz
-
-/-- Constant functions are locally Lipschitz. -/
-protected lemma const (b : β) : LocallyLipschitz (fun _ : α ↦ b) :=
- (LipschitzWith.const b).locallyLipschitz
-
-/-- A locally Lipschitz function is continuous. (The converse is false: for example,
-$x ↦ \sqrt{x}$ is continuous, but not locally Lipschitz at 0.) -/
-protected theorem continuous {f : α → β} (hf : LocallyLipschitz f) : Continuous f := by
- apply continuous_iff_continuousAt.mpr
- intro x
- rcases (hf x) with ⟨K, t, ht, hK⟩
- exact (hK.continuousOn).continuousAt ht
-
-/-- The composition of locally Lipschitz functions is locally Lipschitz. --/
-protected lemma comp {f : β → γ} {g : α → β}
- (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) : LocallyLipschitz (f ∘ g) := by
- intro x
- -- g is Lipschitz on t ∋ x, f is Lipschitz on u ∋ g(x)
- rcases hg x with ⟨Kg, t, ht, hgL⟩
- rcases hf (g x) with ⟨Kf, u, hu, hfL⟩
- refine ⟨Kf * Kg, t ∩ g⁻¹' u, inter_mem ht (hg.continuous.continuousAt hu), ?_⟩
- exact hfL.comp (hgL.mono (inter_subset_left _ _))
- ((mapsTo_preimage g u).mono_left (inter_subset_right _ _))
-
-/-- If `f` and `g` are locally Lipschitz, so is the induced map `f × g` to the product type. -/
-protected lemma prod {f : α → β} (hf : LocallyLipschitz f) {g : α → γ} (hg : LocallyLipschitz g) :
- LocallyLipschitz fun x => (f x, g x) := by
- intro x
- rcases hf x with ⟨Kf, t₁, h₁t, hfL⟩
- rcases hg x with ⟨Kg, t₂, h₂t, hgL⟩
- refine ⟨max Kf Kg, t₁ ∩ t₂, Filter.inter_mem h₁t h₂t, ?_⟩
- exact (hfL.mono (inter_subset_left t₁ t₂)).prod (hgL.mono (inter_subset_right t₁ t₂))
-
-protected theorem prod_mk_left (a : α) : LocallyLipschitz (Prod.mk a : β → α × β) :=
- (LipschitzWith.prod_mk_left a).locallyLipschitz
-
-protected theorem prod_mk_right (b : β) : LocallyLipschitz (fun a : α => (a, b)) :=
- (LipschitzWith.prod_mk_right b).locallyLipschitz
-
-protected theorem iterate {f : α → α} (hf : LocallyLipschitz f) : ∀ n, LocallyLipschitz f^[n]
- | 0 => by simpa only [pow_zero] using LocallyLipschitz.id
- | n + 1 => by rw [iterate_add, iterate_one]; exact (hf.iterate n).comp hf
-
-protected theorem mul_end {f g : Function.End α} (hf : LocallyLipschitz f)
- (hg : LocallyLipschitz g) : LocallyLipschitz (f * g : Function.End α) := hf.comp hg
-
-protected theorem pow_end {f : Function.End α} (h : LocallyLipschitz f) :
- ∀ n : ℕ, LocallyLipschitz (f ^ n : Function.End α)
- | 0 => by simpa only [pow_zero] using LocallyLipschitz.id
- | n + 1 => by
- rw [pow_succ]
- exact h.mul_end (h.pow_end n)
section Real
-variable {f g : α → ℝ}
+
+variable [PseudoEMetricSpace α] {f g : α → ℝ}
+
/-- The minimum of locally Lipschitz functions is locally Lipschitz. -/
protected lemma min (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) :
LocallyLipschitz (fun x => min (f x) (g x)) :=
@@ -711,90 +339,13 @@ theorem const_min (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x =
end Real
end LocallyLipschitz
-/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
-`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
-with the same Lipschitz constant `K`. Then it is continuous on `s × t`. Moreover, it suffices
-to require continuity on vertical fibers for `a` from a subset `s' ⊆ s` that is dense in `s`.
-
-The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
-instead of continuity of `f` on subsets of the product space. -/
-theorem continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
- [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s s' : Set α} {t : Set β}
- (hs' : s' ⊆ s) (hss' : s ⊆ closure s') (K : ℝ≥0)
- (ha : ∀ a ∈ s', ContinuousOn (fun y => f (a, y)) t)
- (hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) := by
- rintro ⟨x, y⟩ ⟨hx : x ∈ s, hy : y ∈ t⟩
- refine' EMetric.nhds_basis_closed_eball.tendsto_right_iff.2 fun ε (ε0 : 0 < ε) => _
- replace ε0 : 0 < ε / 2 := ENNReal.half_pos ε0.ne'
- obtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ≥0, 0 < δ ∧ (δ : ℝ≥0∞) * ↑(3 * K) < ε / 2 :=
- ENNReal.exists_nnreal_pos_mul_lt ENNReal.coe_ne_top ε0.ne'
- rw [← ENNReal.coe_pos] at δpos
- rcases EMetric.mem_closure_iff.1 (hss' hx) δ δpos with ⟨x', hx', hxx'⟩
- have A : s ∩ EMetric.ball x δ ∈ 𝓝[s] x :=
- inter_mem_nhdsWithin _ (EMetric.ball_mem_nhds _ δpos)
- have B : t ∩ { b | edist (f (x', b)) (f (x', y)) ≤ ε / 2 } ∈ 𝓝[t] y :=
- inter_mem self_mem_nhdsWithin (ha x' hx' y hy (EMetric.closedBall_mem_nhds (f (x', y)) ε0))
- filter_upwards [nhdsWithin_prod A B] with ⟨a, b⟩ ⟨⟨has, hax⟩, ⟨hbt, hby⟩⟩
- calc
- edist (f (a, b)) (f (x, y)) ≤ edist (f (a, b)) (f (x', b)) + edist (f (x', b)) (f (x', y)) +
- edist (f (x', y)) (f (x, y)) := edist_triangle4 _ _ _ _
- _ ≤ K * (δ + δ) + ε / 2 + K * δ := by
- gcongr
- · refine (hb b hbt).edist_le_mul_of_le has (hs' hx') ?_
- refine (edist_triangle _ _ _).trans (add_le_add (le_of_lt hax) hxx'.le)
- · exact hby
- · exact (hb y hy).edist_le_mul_of_le (hs' hx') hx ((edist_comm _ _).trans_le hxx'.le)
- _ = δ * ↑(3 * K) + ε / 2 := by push_cast; ring
- _ ≤ ε / 2 + ε / 2 := by gcongr
- _ = ε := ENNReal.add_halves _
-
-/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
-`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
-with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
-
-The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
-instead of continuity of `f` on subsets of the product space. -/
-theorem continuousOn_prod_of_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
- [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
- (ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
- (hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) :=
- continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith
- f Subset.rfl subset_closure K ha hb
-#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitzOnWith
-
-/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
-`{a} × univ` for `a : α` from a dense set. Suppose that it is Lipschitz continuous on each
-“horizontal section” `univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is
-continuous.
-
-The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
-instead of continuity of `f` on subsets of the product space. -/
-theorem continuous_prod_of_dense_continuous_lipschitzWith [PseudoEMetricSpace α]
- [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) {s : Set α}
- (hs : Dense s) (ha : ∀ a ∈ s, Continuous fun y => f (a, y))
- (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f := by
- simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitzOn_univ] at *
- exact continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith f (subset_univ _)
- hs.closure_eq.ge K ha fun b _ => hb b
-
-/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
-`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
-`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
-
-The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
-instead of continuity of `f` on subsets of the product space. -/
-theorem continuous_prod_of_continuous_lipschitzWith [PseudoEMetricSpace α] [TopologicalSpace β]
- [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
- (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f :=
- continuous_prod_of_dense_continuous_lipschitzWith f K dense_univ (fun _ _ ↦ ha _) hb
-#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzWith
-
open Metric
+variable [PseudoMetricSpace α] [PseudoMetricSpace β] {f : α → β}
+
/-- If a function is locally Lipschitz around a point, then it is continuous at this point. -/
-theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSpace β] {f : α → β}
- {x : α} {r : ℝ} (hr : 0 < r) (K : ℝ) (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) :
- ContinuousAt f x := by
+theorem continuousAt_of_locally_lipschitz {x : α} {r : ℝ} (hr : 0 < r) (K : ℝ)
+ (h : ∀ y, dist y x < r → dist (f y) (f x) ≤ K * dist y x) : ContinuousAt f x := by
-- We use `h` to squeeze `dist (f y) (f x)` between `0` and `K * dist y x`
refine tendsto_iff_dist_tendsto_zero.2 (squeeze_zero' (eventually_of_forall fun _ => dist_nonneg)
(mem_of_superset (ball_mem_nhds _ hr) h) ?_)
@@ -805,8 +356,8 @@ theorem continuousAt_of_locally_lipschitz [PseudoMetricSpace α] [PseudoMetricSp
/-- A function `f : α → ℝ` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension
to the whole space. -/
-theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s : Set α} {K : ℝ≥0}
- (hf : LipschitzOnWith K f s) : ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn f g s := by
+theorem LipschitzOnWith.extend_real {f : α → ℝ} {s : Set α} {K : ℝ≥0} (hf : LipschitzOnWith K f s) :
+ ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn f g s := by
/- An extension is given by `g y = Inf {f x + K * dist y x | x ∈ s}`. Taking `x = y`, one has
`g y ≤ f y` for `y ∈ s`, and the other inequality holds because `f` is `K`-Lipschitz, so that it
can not counterbalance the growth of `K * dist y x`. One readily checks from the formula that
@@ -842,7 +393,7 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
/-- A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
extension to the whole space. The same result for the space `ℓ^∞ (ι, ℝ)` over a possibly infinite
type `ι` is implemented in `LipschitzOnWith.extend_lp_infty`.-/
-theorem LipschitzOnWith.extend_pi [PseudoMetricSpace α] [Fintype ι] {f : α → ι → ℝ} {s : Set α}
+theorem LipschitzOnWith.extend_pi [Fintype ι] {f : α → ι → ℝ} {s : Set α}
{K : ℝ≥0} (hf : LipschitzOnWith K f s) : ∃ g : α → ι → ℝ, LipschitzWith K g ∧ EqOn f g s := by
have : ∀ i, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s := fun i => by
have : LipschitzOnWith K (fun x : α => f x i) s :=
@@ -850,9 +401,8 @@ theorem LipschitzOnWith.extend_pi [PseudoMetricSpace α] [Fintype ι] {f : α
(dist_le_pi_dist _ _ i).trans (hf.dist_le_mul x hx y hy)
exact this.extend_real
choose g hg using this
- refine' ⟨fun x i => g i x, LipschitzWith.of_dist_le_mul fun x y => _, _⟩
+ refine ⟨fun x i => g i x, LipschitzWith.of_dist_le_mul fun x y => ?_, fun x hx ↦ ?_⟩
· exact (dist_pi_le_iff (mul_nonneg K.2 dist_nonneg)).2 fun i => (hg i).1.dist_le_mul x y
- · intro x hx
- ext1 i
+ · ext1 i
exact (hg i).2 hx
#align lipschitz_on_with.extend_pi LipschitzOnWith.extend_pi
This was "feat(topology/metric_space): diameter of pointwise zero and addition"
@@ -9,7 +9,7 @@ import Mathlib.Topology.Bornology.Hom
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.MetricSpace.Bounded
-#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"c8f305514e0d47dfaa710f5a52f0d21b588e6328"
/-!
# Lipschitz continuous functions
@@ -541,6 +541,19 @@ protected theorem prod {g : α → γ} {Kf Kg : ℝ≥0} (hf : LipschitzOnWith K
rw [ENNReal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
exact max_le_max (hf hx hy) (hg hx hy)
+theorem ediam_image2_le (f : α → β → γ) {K₁ K₂ : ℝ≥0} (s : Set α) (t : Set β)
+ (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
+ (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) :
+ EMetric.diam (Set.image2 f s t) ≤ ↑K₁ * EMetric.diam s + ↑K₂ * EMetric.diam t := by
+ apply EMetric.diam_le
+ rintro _ ⟨a₁, b₁, ha₁, hb₁, rfl⟩ _ ⟨a₂, b₂, ha₂, hb₂, rfl⟩
+ refine' (edist_triangle _ (f a₂ b₁) _).trans _
+ exact
+ add_le_add
+ ((hf₁ b₁ hb₁ ha₁ ha₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem ha₁ ha₂)
+ ((hf₂ a₂ ha₂ hb₁ hb₂).trans <| ENNReal.mul_left_mono <| EMetric.edist_le_diam_of_mem hb₁ hb₂)
+#align lipschitz_on_with.ediam_image2_le LipschitzOnWith.ediam_image2_le
+
end EMetric
section Metric
@@ -592,6 +605,18 @@ protected theorem iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} :
⟨LipschitzOnWith.le_add_mul, LipschitzOnWith.of_le_add_mul K⟩
#align lipschitz_on_with.iff_le_add_mul LipschitzOnWith.iff_le_add_mul
+theorem isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set α} {t : Set β}
+ (hs : Bornology.IsBounded s) (ht : Bornology.IsBounded t)
+ (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s)
+ (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) : Bornology.IsBounded (Set.image2 f s t) :=
+ Metric.isBounded_iff_ediam_ne_top.2 <|
+ ne_top_of_le_ne_top
+ (ENNReal.add_ne_top.mpr
+ ⟨ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top,
+ ENNReal.mul_ne_top ENNReal.coe_ne_top ht.ediam_ne_top⟩)
+ (ediam_image2_le _ _ _ hf₁ hf₂)
+#align lipschitz_on_with.bounded_image2 LipschitzOnWith.isBounded_image2
+
end Metric
end LipschitzOnWith
This reduces the main file from 3340 to 2220 lines. The remaining file is somewhat entangled, so splitting is less obvious. Help is welcome, though a follow-up PR is probably better :-)
I've kept copyright and authors as they were originally.
@@ -7,6 +7,7 @@ import Mathlib.Data.Set.Intervals.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.Bornology.Hom
import Mathlib.Topology.MetricSpace.Basic
+import Mathlib.Topology.MetricSpace.Bounded
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
For faster build times and clearer dependencies. No attempt at being exhaustive.
The new import in Clopen.lean
had been transitively imported before.
@@ -3,12 +3,10 @@ Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-/
-import Mathlib.Logic.Function.Iterate
import Mathlib.Data.Set.Intervals.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
-import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.Bornology.Hom
-import Mathlib.Tactic.GCongr
+import Mathlib.Topology.MetricSpace.Basic
#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
@@ -19,10 +19,12 @@ A map `f : α → β` between two (extended) metric spaces is called *Lipschitz
with constant `K ≥ 0` if for all `x, y` we have `edist (f x) (f y) ≤ K * edist x y`.
For a metric space, the latter inequality is equivalent to `dist (f x) (f y) ≤ K * dist x y`.
There is also a version asserting this inequality only for `x` and `y` in some set `s`.
+Finally, `f : α → β` is called *locally Lipschitz continuous* if each `x : α` has a neighbourhood
+on which `f` is Lipschitz continuous (with some constant).
In this file we provide various ways to prove that various combinations of Lipschitz continuous
functions are Lipschitz continuous. We also prove that Lipschitz continuous functions are
-uniformly continuous.
+uniformly continuous, and that locally Lipschitz functions are continuous.
## Main definitions and lemmas
@@ -31,6 +33,8 @@ uniformly continuous.
* `LipschitzWith.uniformContinuous`: a Lipschitz function is uniformly continuous
* `LipschitzOnWith.uniformContinuousOn`: a function which is Lipschitz on a set `s` is uniformly
continuous on `s`.
+* `LocallyLipschitz f`: states that `f` is locally Lipschitz
+* `LocallyLipschitz.continuous`: a locally Lipschitz function is continuous.
## Implementation notes
@@ -48,7 +52,7 @@ open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
-/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` if for all `x, y`
+/-- A function `f` is **Lipschitz continuous** with constant `K ≥ 0` if for all `x, y`
we have `dist (f x) (f y) ≤ K * dist x y`. -/
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
@@ -64,13 +68,18 @@ alias ⟨LipschitzWith.dist_le_mul, LipschitzWith.of_dist_le_mul⟩ := lipschitz
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
-/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` on `s` if for all `x, y` in `s`
-we have `dist (f x) (f y) ≤ K * dist x y`. -/
+/-- A function `f` is **Lipschitz continuous** with constant `K ≥ 0` **on `s`** if
+for all `x, y` in `s` we have `dist (f x) (f y) ≤ K * dist x y`. -/
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
+/-- `f : α → β` is called **locally Lipschitz continuous** iff every point `x`
+has a neighourhood on which `f` is Lipschitz. -/
+def LocallyLipschitz [PseudoEMetricSpace α] [PseudoEMetricSpace β] (f : α → β) : Prop :=
+ ∀ x : α, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t
+
/-- Every function is Lipschitz on the empty set (with any Lipschitz constant). -/
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
@@ -292,10 +301,10 @@ theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f)
simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
-protected theorem mul {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
+protected theorem mul_end {f g : Function.End α} {Kf Kg} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f * g : Function.End α) :=
hf.comp hg
-#align lipschitz_with.mul LipschitzWith.mul
+#align lipschitz_with.mul LipschitzWith.mul_end
/-- The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous
endomorphism. -/
@@ -304,16 +313,16 @@ protected theorem list_prod (f : ι → Function.End α) (K : ι → ℝ≥0)
| [] => by simpa using LipschitzWith.id
| i::l => by
simp only [List.map_cons, List.prod_cons]
- exact (h i).mul (LipschitzWith.list_prod f K h l)
+ exact (h i).mul_end (LipschitzWith.list_prod f K h l)
#align lipschitz_with.list_prod LipschitzWith.list_prod
-protected theorem pow {f : Function.End α} {K} (h : LipschitzWith K f) :
+protected theorem pow_end {f : Function.End α} {K} (h : LipschitzWith K f) :
∀ n : ℕ, LipschitzWith (K ^ n) (f ^ n : Function.End α)
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by
rw [pow_succ, pow_succ]
- exact h.mul (LipschitzWith.pow h n)
-#align lipschitz_with.pow LipschitzWith.pow
+ exact h.mul_end (LipschitzWith.pow_end h n)
+#align lipschitz_with.pow LipschitzWith.pow_end
end EMetric
@@ -526,6 +535,13 @@ protected theorem comp {g : β → γ} {t : Set β} {Kg : ℝ≥0} (hg : Lipschi
lipschitzOnWith_iff_restrict.mpr <| hg.to_restrict.comp (hf.to_restrict_mapsTo hmaps)
#align lipschitz_on_with.comp LipschitzOnWith.comp
+/-- If `f` and `g` are Lipschitz on `s`, so is the induced map `f × g` to the product type. -/
+protected theorem prod {g : α → γ} {Kf Kg : ℝ≥0} (hf : LipschitzOnWith Kf f s)
+ (hg : LipschitzOnWith Kg g s) : LipschitzOnWith (max Kf Kg) (fun x => (f x, g x)) s := by
+ intro _ hx _ hy
+ rw [ENNReal.coe_mono.map_max, Prod.edist_eq, ENNReal.max_mul]
+ exact max_le_max (hf hx hy) (hg hx hy)
+
end EMetric
section Metric
@@ -581,6 +597,96 @@ end Metric
end LipschitzOnWith
+namespace LocallyLipschitz
+variable [PseudoEMetricSpace α] [PseudoEMetricSpace β] [PseudoEMetricSpace γ] {f : α → β}
+
+/-- A Lipschitz function is locally Lipschitz. -/
+protected lemma _root_.LipschitzWith.locallyLipschitz {K : ℝ≥0} (hf : LipschitzWith K f) :
+ LocallyLipschitz f :=
+ fun _ ↦ ⟨K, univ, Filter.univ_mem, lipschitzOn_univ.mpr hf⟩
+
+/-- The identity function is locally Lipschitz. -/
+protected lemma id : LocallyLipschitz (@id α) := LipschitzWith.id.locallyLipschitz
+
+/-- Constant functions are locally Lipschitz. -/
+protected lemma const (b : β) : LocallyLipschitz (fun _ : α ↦ b) :=
+ (LipschitzWith.const b).locallyLipschitz
+
+/-- A locally Lipschitz function is continuous. (The converse is false: for example,
+$x ↦ \sqrt{x}$ is continuous, but not locally Lipschitz at 0.) -/
+protected theorem continuous {f : α → β} (hf : LocallyLipschitz f) : Continuous f := by
+ apply continuous_iff_continuousAt.mpr
+ intro x
+ rcases (hf x) with ⟨K, t, ht, hK⟩
+ exact (hK.continuousOn).continuousAt ht
+
+/-- The composition of locally Lipschitz functions is locally Lipschitz. --/
+protected lemma comp {f : β → γ} {g : α → β}
+ (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) : LocallyLipschitz (f ∘ g) := by
+ intro x
+ -- g is Lipschitz on t ∋ x, f is Lipschitz on u ∋ g(x)
+ rcases hg x with ⟨Kg, t, ht, hgL⟩
+ rcases hf (g x) with ⟨Kf, u, hu, hfL⟩
+ refine ⟨Kf * Kg, t ∩ g⁻¹' u, inter_mem ht (hg.continuous.continuousAt hu), ?_⟩
+ exact hfL.comp (hgL.mono (inter_subset_left _ _))
+ ((mapsTo_preimage g u).mono_left (inter_subset_right _ _))
+
+/-- If `f` and `g` are locally Lipschitz, so is the induced map `f × g` to the product type. -/
+protected lemma prod {f : α → β} (hf : LocallyLipschitz f) {g : α → γ} (hg : LocallyLipschitz g) :
+ LocallyLipschitz fun x => (f x, g x) := by
+ intro x
+ rcases hf x with ⟨Kf, t₁, h₁t, hfL⟩
+ rcases hg x with ⟨Kg, t₂, h₂t, hgL⟩
+ refine ⟨max Kf Kg, t₁ ∩ t₂, Filter.inter_mem h₁t h₂t, ?_⟩
+ exact (hfL.mono (inter_subset_left t₁ t₂)).prod (hgL.mono (inter_subset_right t₁ t₂))
+
+protected theorem prod_mk_left (a : α) : LocallyLipschitz (Prod.mk a : β → α × β) :=
+ (LipschitzWith.prod_mk_left a).locallyLipschitz
+
+protected theorem prod_mk_right (b : β) : LocallyLipschitz (fun a : α => (a, b)) :=
+ (LipschitzWith.prod_mk_right b).locallyLipschitz
+
+protected theorem iterate {f : α → α} (hf : LocallyLipschitz f) : ∀ n, LocallyLipschitz f^[n]
+ | 0 => by simpa only [pow_zero] using LocallyLipschitz.id
+ | n + 1 => by rw [iterate_add, iterate_one]; exact (hf.iterate n).comp hf
+
+protected theorem mul_end {f g : Function.End α} (hf : LocallyLipschitz f)
+ (hg : LocallyLipschitz g) : LocallyLipschitz (f * g : Function.End α) := hf.comp hg
+
+protected theorem pow_end {f : Function.End α} (h : LocallyLipschitz f) :
+ ∀ n : ℕ, LocallyLipschitz (f ^ n : Function.End α)
+ | 0 => by simpa only [pow_zero] using LocallyLipschitz.id
+ | n + 1 => by
+ rw [pow_succ]
+ exact h.mul_end (h.pow_end n)
+
+section Real
+variable {f g : α → ℝ}
+/-- The minimum of locally Lipschitz functions is locally Lipschitz. -/
+protected lemma min (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) :
+ LocallyLipschitz (fun x => min (f x) (g x)) :=
+ lipschitzWith_min.locallyLipschitz.comp (hf.prod hg)
+
+/-- The maximum of locally Lipschitz functions is locally Lipschitz. -/
+protected lemma max (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) :
+ LocallyLipschitz (fun x => max (f x) (g x)) :=
+ lipschitzWith_max.locallyLipschitz.comp (hf.prod hg)
+
+theorem max_const (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => max (f x) a :=
+ hf.max (LocallyLipschitz.const a)
+
+theorem const_max (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => max a (f x) := by
+ simpa [max_comm] using (hf.max_const a)
+
+theorem min_const (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => min (f x) a :=
+ hf.min (LocallyLipschitz.const a)
+
+theorem const_min (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => min a (f x) := by
+ simpa [min_comm] using (hf.min_const a)
+
+end Real
+end LocallyLipschitz
+
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
with the same Lipschitz constant `K`. Then it is continuous on `s × t`. Moreover, it suffices
Metric.Bounded
(#7240)
Use Bornology.IsBounded
instead.
@@ -42,10 +42,9 @@ argument, and return `LipschitzWith (Real.toNNReal K) f`.
set_option autoImplicit true
-
universe u v w x
-open Filter Function Set Topology NNReal ENNReal
+open Filter Function Set Topology NNReal ENNReal Bornology
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
@@ -403,14 +402,12 @@ theorem comap_cobounded_le (hf : LipschitzWith K f) :
#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_le
/-- The image of a bounded set under a Lipschitz map is bounded. -/
-theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
- Metric.Bounded (f '' s) :=
- Metric.bounded_iff_ediam_ne_top.2 <|
- ne_top_of_le_ne_top (ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top)
- (hf.ediam_image_le s)
-#align lipschitz_with.bounded_image LipschitzWith.bounded_image
-
-theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : Metric.Bounded s) :
+theorem isBounded_image (hf : LipschitzWith K f) {s : Set α} (hs : IsBounded s) :
+ IsBounded (f '' s) :=
+ hs.image (toLocallyBoundedMap f hf)
+#align lipschitz_with.bounded_image LipschitzWith.isBounded_image
+
+theorem diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : IsBounded s) :
Metric.diam (f '' s) ≤ K * Metric.diam s :=
Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <|
ball_image_iff.2 fun _x hx =>
@@ -490,22 +487,10 @@ namespace Metric
variable [PseudoMetricSpace α] [PseudoMetricSpace β] {s : Set α} {t : Set β}
-theorem Bounded.left_of_prod (h : Bounded (s ×ˢ t)) (ht : t.Nonempty) : Bounded s := by
- simpa only [fst_image_prod s ht] using (@LipschitzWith.prod_fst α β _ _).bounded_image h
-#align metric.bounded.left_of_prod Metric.Bounded.left_of_prod
-
-theorem Bounded.right_of_prod (h : Bounded (s ×ˢ t)) (hs : s.Nonempty) : Bounded t := by
- simpa only [snd_image_prod hs t] using (@LipschitzWith.prod_snd α β _ _).bounded_image h
-#align metric.bounded.right_of_prod Metric.Bounded.right_of_prod
-
-theorem bounded_prod_of_nonempty (hs : s.Nonempty) (ht : t.Nonempty) :
- Bounded (s ×ˢ t) ↔ Bounded s ∧ Bounded t :=
- ⟨fun h => ⟨h.left_of_prod ht, h.right_of_prod hs⟩, fun h => h.1.prod h.2⟩
-#align metric.bounded_prod_of_nonempty Metric.bounded_prod_of_nonempty
-
-theorem bounded_prod : Bounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ Bounded s ∧ Bounded t := by
- simp only [bounded_iff_isBounded, Bornology.isBounded_prod]
-#align metric.bounded_prod Metric.bounded_prod
+#align metric.bounded.left_of_prod Bornology.IsBounded.fst_of_prod
+#align metric.bounded.right_of_prod Bornology.IsBounded.snd_of_prod
+#align metric.bounded_prod_of_nonempty Bornology.isBounded_prod_of_nonempty
+#align metric.bounded_prod Bornology.isBounded_prod
end Metric
@@ -212,6 +212,7 @@ protected theorem id : LipschitzWith 1 (@id α) :=
LipschitzWith.of_edist_le fun _ _ => le_rfl
#align lipschitz_with.id LipschitzWith.id
+/-- The inclusion of a subset is 1-Lipschitz. -/
protected theorem subtype_val (s : Set α) : LipschitzWith 1 (Subtype.val : s → α) :=
LipschitzWith.of_edist_le fun _ _ => le_rfl
#align lipschitz_with.subtype_val LipschitzWith.subtype_val
@@ -254,6 +255,7 @@ protected theorem prod_snd : LipschitzWith 1 (@Prod.snd α β) :=
LipschitzWith.of_edist_le fun _ _ => le_max_right _ _
#align lipschitz_with.prod_snd LipschitzWith.prod_snd
+/-- If `f` and `g` are Lipschitz functions, so is the induced map `f × g` to the product type. -/
protected theorem prod {f : α → β} {Kf : ℝ≥0} (hf : LipschitzWith Kf f) {g : α → γ} {Kg : ℝ≥0}
(hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => (f x, g x) := by
intro x y
@@ -279,6 +281,7 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
(le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
#align lipschitz_with.uncurry LipschitzWith.uncurry
+/-- Iterates of a Lipschitz function are Lipschitz. -/
protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) f^[n]
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by rw [pow_succ']; exact (LipschitzWith.iterate hf n).comp hf
@@ -399,6 +402,7 @@ theorem comap_cobounded_le (hf : LipschitzWith K f) :
(hf.toLocallyBoundedMap f).2
#align lipschitz_with.comap_cobounded_le LipschitzWith.comap_cobounded_le
+/-- The image of a bounded set under a Lipschitz map is bounded. -/
theorem bounded_image (hf : LipschitzWith K f) {s : Set α} (hs : Metric.Bounded s) :
Metric.Bounded (f '' s) :=
Metric.bounded_iff_ediam_ne_top.2 <|
@@ -27,10 +27,10 @@ uniformly continuous.
## Main definitions and lemmas
* `LipschitzWith K f`: states that `f` is Lipschitz with constant `K : ℝ≥0`
-* `LipschitzOnWith K f`: states that `f` is Lipschitz with constant `K : ℝ≥0` on a set `s`
+* `LipschitzOnWith K f s`: states that `f` is Lipschitz with constant `K : ℝ≥0` on a set `s`
* `LipschitzWith.uniformContinuous`: a Lipschitz function is uniformly continuous
-* `LipschitzOnWith.uniformContinuousOn`: a function which is Lipschitz on a set is uniformly
- continuous on that set.
+* `LipschitzOnWith.uniformContinuousOn`: a function which is Lipschitz on a set `s` is uniformly
+ continuous on `s`.
## Implementation notes
@@ -50,7 +50,7 @@ open Filter Function Set Topology NNReal ENNReal
variable {α : Type u} {β : Type v} {γ : Type w} {ι : Type x}
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` if for all `x, y`
-we have `dist (f x) (f y) ≤ K * dist x y` -/
+we have `dist (f x) (f y) ≤ K * dist x y`. -/
def LipschitzWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :=
∀ x y, edist (f x) (f y) ≤ K * edist x y
#align lipschitz_with LipschitzWith
@@ -66,17 +66,19 @@ alias ⟨LipschitzWith.dist_le_mul, LipschitzWith.of_dist_le_mul⟩ := lipschitz
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
/-- A function `f` is Lipschitz continuous with constant `K ≥ 0` on `s` if for all `x, y` in `s`
-we have `dist (f x) (f y) ≤ K * dist x y` -/
+we have `dist (f x) (f y) ≤ K * dist x y`. -/
def LipschitzOnWith [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β)
(s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y
#align lipschitz_on_with LipschitzOnWith
+/-- Every function is Lipschitz on the empty set (with any Lipschitz constant). -/
@[simp]
theorem lipschitzOnWith_empty [PseudoEMetricSpace α] [PseudoEMetricSpace β] (K : ℝ≥0) (f : α → β) :
LipschitzOnWith K f ∅ := fun _ => False.elim
#align lipschitz_on_with_empty lipschitzOnWith_empty
+/-- Being Lipschitz on a set is monotone w.r.t. that set. -/
theorem LipschitzOnWith.mono [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {s t : Set α}
{f : α → β} (hf : LipschitzOnWith K f t) (h : s ⊆ t) : LipschitzOnWith K f s :=
fun _x x_in _y y_in => hf (h x_in) (h y_in)
@@ -94,6 +96,7 @@ alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
+/-- `f` is Lipschitz iff it is Lipschitz on the entire space. -/
@[simp]
theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
@@ -185,17 +188,18 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
_ < d := ENNReal.mul_lt_of_lt_div' h
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
-/-- A Lipschitz function is uniformly continuous -/
+/-- A Lipschitz function is uniformly continuous. -/
protected theorem uniformContinuous (hf : LipschitzWith K f) : UniformContinuous f :=
EMetric.uniformContinuous_iff.2 fun ε εpos =>
⟨ε / K, ENNReal.div_pos_iff.2 ⟨ne_of_gt εpos, ENNReal.coe_ne_top⟩, hf.edist_lt_of_edist_lt_div⟩
#align lipschitz_with.uniform_continuous LipschitzWith.uniformContinuous
-/-- A Lipschitz function is continuous -/
+/-- A Lipschitz function is continuous. -/
protected theorem continuous (hf : LipschitzWith K f) : Continuous f :=
hf.uniformContinuous.continuous
#align lipschitz_with.continuous LipschitzWith.continuous
+/-- Constant functions are Lipschitz (with any constant). -/
protected theorem const (b : β) : LipschitzWith 0 fun _ : α => b := fun x y => by
simp only [edist_self, zero_le]
#align lipschitz_with.const LipschitzWith.const
@@ -203,6 +207,7 @@ protected theorem const (b : β) : LipschitzWith 0 fun _ : α => b := fun x y =>
protected theorem const' (b : β) {K : ℝ≥0} : LipschitzWith K fun _ : α => b := fun x y => by
simp only [edist_self, zero_le]
+/-- The identity is 1-Lipschitz. -/
protected theorem id : LipschitzWith 1 (@id α) :=
LipschitzWith.of_edist_le fun _ _ => le_rfl
#align lipschitz_with.id LipschitzWith.id
@@ -222,10 +227,12 @@ protected theorem eval {α : ι → Type u} [∀ i, PseudoEMetricSpace (α i)] [
LipschitzWith.of_edist_le fun f g => by convert edist_le_pi_edist f g i
#align lipschitz_with.eval LipschitzWith.eval
+/-- The restriction of a `K`-Lipschitz function is `K`-Lipschitz. -/
protected theorem restrict (hf : LipschitzWith K f) (s : Set α) : LipschitzWith K (s.restrict f) :=
fun x y => hf x y
#align lipschitz_with.restrict LipschitzWith.restrict
+/-- The composition of Lipschitz functions is Lipschitz. -/
protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : LipschitzWith Kf f)
(hg : LipschitzWith Kg g) : LipschitzWith (Kf * Kg) (f ∘ g) := fun x y =>
calc
Also rename dimH_image_le_of_locally_lipschitz_on
to dimH_image_le_of_locally_lipschitzOn
.
@@ -95,9 +95,9 @@ alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
@[simp]
-theorem lipschitz_on_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
+theorem lipschitzOn_univ [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0} {f : α → β} :
LipschitzOnWith K f univ ↔ LipschitzWith K f := by simp [LipschitzOnWith, LipschitzWith]
-#align lipschitz_on_univ lipschitz_on_univ
+#align lipschitz_on_univ lipschitzOn_univ
theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
{f : α → β} {s : Set α} : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
@@ -647,7 +647,7 @@ theorem continuous_prod_of_dense_continuous_lipschitzWith [PseudoEMetricSpace α
[TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) {s : Set α}
(hs : Dense s) (ha : ∀ a ∈ s, Continuous fun y => f (a, y))
(hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f := by
- simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
+ simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitzOn_univ] at *
exact continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith f (subset_univ _)
hs.closure_eq.ge K ha fun b _ => hb b
@@ -61,7 +61,7 @@ theorem lipschitzWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpace
norm_cast
#align lipschitz_with_iff_dist_le_mul lipschitzWith_iff_dist_le_mul
-alias lipschitzWith_iff_dist_le_mul ↔ LipschitzWith.dist_le_mul LipschitzWith.of_dist_le_mul
+alias ⟨LipschitzWith.dist_le_mul, LipschitzWith.of_dist_le_mul⟩ := lipschitzWith_iff_dist_le_mul
#align lipschitz_with.dist_le_mul LipschitzWith.dist_le_mul
#align lipschitz_with.of_dist_le_mul LipschitzWith.of_dist_le_mul
@@ -89,7 +89,8 @@ theorem lipschitzOnWith_iff_dist_le_mul [PseudoMetricSpace α] [PseudoMetricSpac
norm_cast
#align lipschitz_on_with_iff_dist_le_mul lipschitzOnWith_iff_dist_le_mul
-alias lipschitzOnWith_iff_dist_le_mul ↔ LipschitzOnWith.dist_le_mul LipschitzOnWith.of_dist_le_mul
+alias ⟨LipschitzOnWith.dist_le_mul, LipschitzOnWith.of_dist_le_mul⟩ :=
+ lipschitzOnWith_iff_dist_le_mul
#align lipschitz_on_with.dist_le_mul LipschitzOnWith.dist_le_mul
#align lipschitz_on_with.of_dist_le_mul LipschitzOnWith.of_dist_le_mul
@@ -103,7 +104,7 @@ theorem lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace
simp only [LipschitzOnWith, LipschitzWith, SetCoe.forall', restrict, Subtype.edist_eq]
#align lipschitz_on_with_iff_restrict lipschitzOnWith_iff_restrict
-alias lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict _
+alias ⟨LipschitzOnWith.to_restrict, _⟩ := lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict LipschitzOnWith.to_restrict
theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetricSpace β] {K : ℝ≥0}
@@ -112,7 +113,7 @@ theorem MapsTo.lipschitzOnWith_iff_restrict [PseudoEMetricSpace α] [PseudoEMetr
_root_.lipschitzOnWith_iff_restrict
#align maps_to.lipschitz_on_with_iff_restrict MapsTo.lipschitzOnWith_iff_restrict
-alias MapsTo.lipschitzOnWith_iff_restrict ↔ LipschitzOnWith.to_restrict_mapsTo _
+alias ⟨LipschitzOnWith.to_restrict_mapsTo, _⟩ := MapsTo.lipschitzOnWith_iff_restrict
#align lipschitz_on_with.to_restrict_maps_to LipschitzOnWith.to_restrict_mapsTo
namespace LipschitzWith
Autoimplicits are highly controversial and also defeat the performance-improving work in #6474.
The intent of this PR is to make autoImplicit
opt-in on a per-file basis, by disabling it in the lakefile and enabling it again with set_option autoImplicit true
in the few files that rely on it.
That also keeps this PR small, as opposed to attempting to "fix" files to not need it any more.
I claim that many of the uses of autoImplicit
in these files are accidental; situations such as:
variables
are in scope, but pasting the lemma in the wrong sectionHaving set_option autoImplicit false
as the default prevents these types of mistake being made in the 90% of files where autoImplicit
s are not used at all, and causes them to be caught by CI during review.
I think there were various points during the port where we encouraged porters to delete the universes u v
lines; I think having autoparams for universe variables only would cover a lot of the cases we actually use them, while avoiding any real shortcomings.
A Zulip poll (after combining overlapping votes accordingly) was in favor of this change with 5:5:18
as the no:dontcare:yes
vote ratio.
While this PR was being reviewed, a handful of files gained some more likely-accidental autoImplicits. In these places, set_option autoImplicit true
has been placed locally within a section, rather than at the top of the file.
@@ -40,6 +40,8 @@ coercions both to `ℝ` and `ℝ≥0∞`. Constructors whose names end with `'`
argument, and return `LipschitzWith (Real.toNNReal K) f`.
-/
+set_option autoImplicit true
+
universe u v w x
@@ -2,11 +2,6 @@
Copyright (c) 2018 Rohan Mitta. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Rohan Mitta, Kevin Buzzard, Alistair Tucker, Johannes Hölzl, Yury Kudryashov
-
-! This file was ported from Lean 3 source module topology.metric_space.lipschitz
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Logic.Function.Iterate
import Mathlib.Data.Set.Intervals.ProjIcc
@@ -15,6 +10,8 @@ import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.Bornology.Hom
import Mathlib.Tactic.GCongr
+#align_import topology.metric_space.lipschitz from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
/-!
# Lipschitz continuous functions
@@ -272,13 +272,13 @@ protected theorem uncurry {f : α → β → γ} {Kα Kβ : ℝ≥0} (hα : ∀
(le_trans (hβ _ _ _) <| ENNReal.mul_left_mono <| le_max_right _ _)
#align lipschitz_with.uncurry LipschitzWith.uncurry
-protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) (f^[n])
+protected theorem iterate {f : α → α} (hf : LipschitzWith K f) : ∀ n, LipschitzWith (K ^ n) f^[n]
| 0 => by simpa only [pow_zero] using LipschitzWith.id
| n + 1 => by rw [pow_succ']; exact (LipschitzWith.iterate hf n).comp hf
#align lipschitz_with.iterate LipschitzWith.iterate
theorem edist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
- edist ((f^[n]) x) ((f^[n + 1]) x) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n := by
+ edist (f^[n] x) (f^[n + 1] x) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n := by
rw [iterate_succ, mul_comm]
simpa only [ENNReal.coe_pow] using (hf.iterate n) x (f x)
#align lipschitz_with.edist_iterate_succ_le_geometric LipschitzWith.edist_iterate_succ_le_geometric
@@ -420,7 +420,7 @@ protected theorem dist : LipschitzWith 2 (Function.uncurry <| @dist α _) := by
#align lipschitz_with.dist LipschitzWith.dist
theorem dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) :
- dist ((f^[n]) x) ((f^[n + 1]) x) ≤ dist x (f x) * (K : ℝ) ^ n := by
+ dist (f^[n] x) (f^[n + 1] x) ≤ dist x (f x) * (K : ℝ) ^ n := by
rw [iterate_succ, mul_comm]
simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
#align lipschitz_with.dist_iterate_succ_le_geometric LipschitzWith.dist_iterate_succ_le_geometric
continuousOn_prod_of_continuousOn_lipschitz_on
etc (#5308)
lipschitzWith
/lipschitzWithOn
.@@ -514,9 +514,14 @@ protected theorem continuousOn (hf : LipschitzOnWith K f s) : ContinuousOn f s :
hf.uniformContinuousOn.continuousOn
#align lipschitz_on_with.continuous_on LipschitzOnWith.continuousOn
+theorem edist_le_mul_of_le (h : LipschitzOnWith K f s) (hx : x ∈ s) (hy : y ∈ s)
+ (hr : edist x y ≤ r) :
+ edist (f x) (f y) ≤ K * r :=
+ (h hx hy).trans <| ENNReal.mul_left_mono hr
+
theorem edist_lt_of_edist_lt_div (hf : LipschitzOnWith K f s) {x y : α} (hx : x ∈ s) (hy : y ∈ s)
{d : ℝ≥0∞} (hd : edist x y < d / K) : edist (f x) (f y) < d :=
- (lipschitzOnWith_iff_restrict.mp hf).edist_lt_of_edist_lt_div <|
+ hf.to_restrict.edist_lt_of_edist_lt_div <|
show edist (⟨x, hx⟩ : s) ⟨y, hy⟩ < d / K from hd
#align lipschitz_on_with.edist_lt_of_edist_lt_div LipschitzOnWith.edist_lt_of_edist_lt_div
@@ -582,44 +587,81 @@ end LipschitzOnWith
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
-with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
-
-The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
-of continuity of `f` on subsets of the product space. -/
-theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [TopologicalSpace β]
- [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
- (ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
+with the same Lipschitz constant `K`. Then it is continuous on `s × t`. Moreover, it suffices
+to require continuity on vertical fibers for `a` from a subset `s' ⊆ s` that is dense in `s`.
+
+The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
+instead of continuity of `f` on subsets of the product space. -/
+theorem continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
+ [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s s' : Set α} {t : Set β}
+ (hs' : s' ⊆ s) (hss' : s ⊆ closure s') (K : ℝ≥0)
+ (ha : ∀ a ∈ s', ContinuousOn (fun y => f (a, y)) t)
(hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) := by
rintro ⟨x, y⟩ ⟨hx : x ∈ s, hy : y ∈ t⟩
- refine' EMetric.tendsto_nhds.2 fun ε (ε0 : 0 < ε) => _
- replace ε0 : 0 < ε / 2 := ENNReal.half_pos (ne_of_gt ε0)
- have εK : 0 < ε / 2 / K := ENNReal.div_pos_iff.2 ⟨ε0.ne', ENNReal.coe_ne_top⟩
- have A : s ∩ EMetric.ball x (ε / 2 / K) ∈ 𝓝[s] x :=
- inter_mem_nhdsWithin _ (EMetric.ball_mem_nhds _ εK)
- have B : { b : β | b ∈ t ∧ edist (f (x, b)) (f (x, y)) < ε / 2 } ∈ 𝓝[t] y :=
- inter_mem self_mem_nhdsWithin (ha x hx y hy (EMetric.ball_mem_nhds _ ε0))
- filter_upwards [nhdsWithin_prod A B]
- rintro ⟨a, b⟩ ⟨⟨has : a ∈ s, hax : edist a x < ε / 2 / K⟩, hbt : b ∈ t,
- hby : edist (f (x, b)) (f (x, y)) < ε / 2⟩
+ refine' EMetric.nhds_basis_closed_eball.tendsto_right_iff.2 fun ε (ε0 : 0 < ε) => _
+ replace ε0 : 0 < ε / 2 := ENNReal.half_pos ε0.ne'
+ obtain ⟨δ, δpos, hδ⟩ : ∃ δ : ℝ≥0, 0 < δ ∧ (δ : ℝ≥0∞) * ↑(3 * K) < ε / 2 :=
+ ENNReal.exists_nnreal_pos_mul_lt ENNReal.coe_ne_top ε0.ne'
+ rw [← ENNReal.coe_pos] at δpos
+ rcases EMetric.mem_closure_iff.1 (hss' hx) δ δpos with ⟨x', hx', hxx'⟩
+ have A : s ∩ EMetric.ball x δ ∈ 𝓝[s] x :=
+ inter_mem_nhdsWithin _ (EMetric.ball_mem_nhds _ δpos)
+ have B : t ∩ { b | edist (f (x', b)) (f (x', y)) ≤ ε / 2 } ∈ 𝓝[t] y :=
+ inter_mem self_mem_nhdsWithin (ha x' hx' y hy (EMetric.closedBall_mem_nhds (f (x', y)) ε0))
+ filter_upwards [nhdsWithin_prod A B] with ⟨a, b⟩ ⟨⟨has, hax⟩, ⟨hbt, hby⟩⟩
calc
- edist (f (a, b)) (f (x, y)) ≤ edist (f (a, b)) (f (x, b)) + edist (f (x, b)) (f (x, y)) :=
- edist_triangle _ _ _
- _ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
- _ = ε := ENNReal.add_halves ε
-#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
+ edist (f (a, b)) (f (x, y)) ≤ edist (f (a, b)) (f (x', b)) + edist (f (x', b)) (f (x', y)) +
+ edist (f (x', y)) (f (x, y)) := edist_triangle4 _ _ _ _
+ _ ≤ K * (δ + δ) + ε / 2 + K * δ := by
+ gcongr
+ · refine (hb b hbt).edist_le_mul_of_le has (hs' hx') ?_
+ refine (edist_triangle _ _ _).trans (add_le_add (le_of_lt hax) hxx'.le)
+ · exact hby
+ · exact (hb y hy).edist_le_mul_of_le (hs' hx') hx ((edist_comm _ _).trans_le hxx'.le)
+ _ = δ * ↑(3 * K) + ε / 2 := by push_cast; ring
+ _ ≤ ε / 2 + ε / 2 := by gcongr
+ _ = ε := ENNReal.add_halves _
+
+/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical fiber”
+`{a} × t`, `a ∈ s`, and is Lipschitz continuous on each “horizontal fiber” `s × {b}`, `b ∈ t`
+with the same Lipschitz constant `K`. Then it is continuous on `s × t`.
+
+The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
+instead of continuity of `f` on subsets of the product space. -/
+theorem continuousOn_prod_of_continuousOn_lipschitzOnWith [PseudoEMetricSpace α]
+ [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) {s : Set α} {t : Set β} (K : ℝ≥0)
+ (ha : ∀ a ∈ s, ContinuousOn (fun y => f (a, y)) t)
+ (hb : ∀ b ∈ t, LipschitzOnWith K (fun x => f (x, b)) s) : ContinuousOn f (s ×ˢ t) :=
+ continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith
+ f Subset.rfl subset_closure K ha hb
+#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitzOnWith
+
+/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
+`{a} × univ` for `a : α` from a dense set. Suppose that it is Lipschitz continuous on each
+“horizontal section” `univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is
+continuous.
+
+The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
+instead of continuity of `f` on subsets of the product space. -/
+theorem continuous_prod_of_dense_continuous_lipschitzWith [PseudoEMetricSpace α]
+ [TopologicalSpace β] [PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) {s : Set α}
+ (hs : Dense s) (ha : ∀ a ∈ s, Continuous fun y => f (a, y))
+ (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f := by
+ simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
+ exact continuousOn_prod_of_subset_closure_continuousOn_lipschitzOnWith f (subset_univ _)
+ hs.closure_eq.ge K ha fun b _ => hb b
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
`{a} × univ`, `a : α`, and is Lipschitz continuous on each “horizontal section”
`univ × {b}`, `b : β` with the same Lipschitz constant `K`. Then it is continuous.
-The actual statement uses (Lipschitz) continuity of `λ y, f (a, y)` and `λ x, f (x, b)` instead
-of continuity of `f` on subsets of the product space. -/
-theorem continuous_prod_of_continuous_lipschitz [PseudoEMetricSpace α] [TopologicalSpace β]
+The actual statement uses (Lipschitz) continuity of `fun y ↦ f (a, y)` and `fun x ↦ f (x, b)`
+instead of continuity of `f` on subsets of the product space. -/
+theorem continuous_prod_of_continuous_lipschitzWith [PseudoEMetricSpace α] [TopologicalSpace β]
[PseudoEMetricSpace γ] (f : α × β → γ) (K : ℝ≥0) (ha : ∀ a, Continuous fun y => f (a, y))
- (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f := by
- simp only [continuous_iff_continuousOn_univ, ← univ_prod_univ, ← lipschitz_on_univ] at *
- exact continuousOn_prod_of_continuousOn_lipschitz_on f K (fun a _ => ha a) fun b _ => hb b
-#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitz
+ (hb : ∀ b, LipschitzWith K fun x => f (x, b)) : Continuous f :=
+ continuous_prod_of_dense_continuous_lipschitzWith f K dense_univ (fun _ _ ↦ ha _) hb
+#align continuous_prod_of_continuous_lipschitz continuous_prod_of_continuous_lipschitzWith
open Metric
A function f : α → ℓ^∞(ι, ℝ)
which is K
-Lipschitz on a subset s
admits a K
-Lipschitz extension to the whole space.
Co-authored-by: Ian Bunner <31334766+ian-bunner@users.noreply.github.com>
Co-authored-by: Chris Camano <53490775+chriscamano@users.noreply.github.com>
@@ -200,6 +200,9 @@ protected theorem const (b : β) : LipschitzWith 0 fun _ : α => b := fun x y =>
simp only [edist_self, zero_le]
#align lipschitz_with.const LipschitzWith.const
+protected theorem const' (b : β) {K : ℝ≥0} : LipschitzWith K fun _ : α => b := fun x y => by
+ simp only [edist_self, zero_le]
+
protected theorem id : LipschitzWith 1 (@id α) :=
LipschitzWith.of_edist_le fun _ _ => le_rfl
#align lipschitz_with.id LipschitzWith.id
@@ -669,9 +672,8 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
#align lipschitz_on_with.extend_real LipschitzOnWith.extend_real
/-- A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
-extension to the whole space.
-TODO: state the same result (with the same proof) for the space `ℓ^∞ (ι, ℝ)` over a possibly
-infinite type `ι`. -/
+extension to the whole space. The same result for the space `ℓ^∞ (ι, ℝ)` over a possibly infinite
+type `ι` is implemented in `LipschitzOnWith.extend_lp_infty`.-/
theorem LipschitzOnWith.extend_pi [PseudoMetricSpace α] [Fintype ι] {f : α → ι → ℝ} {s : Set α}
{K : ℝ≥0} (hf : LipschitzOnWith K f s) : ∃ g : α → ι → ℝ, LipschitzWith K g ∧ EqOn f g s := by
have : ∀ i, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s := fun i => by
@@ -13,6 +13,7 @@ import Mathlib.Data.Set.Intervals.ProjIcc
import Mathlib.Topology.Algebra.Order.Field
import Mathlib.Topology.MetricSpace.Basic
import Mathlib.Topology.Bornology.Hom
+import Mathlib.Tactic.GCongr
/-!
# Lipschitz continuous functions
@@ -312,7 +313,7 @@ variable [PseudoMetricSpace α] [PseudoMetricSpace β] [PseudoMetricSpace γ] {K
protected theorem of_dist_le' {K : ℝ} (h : ∀ x y, dist (f x) (f y) ≤ K * dist x y) :
LipschitzWith (Real.toNNReal K) f :=
of_dist_le_mul fun x y =>
- le_trans (h x y) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
+ le_trans (h x y) <| by gcongr; apply Real.le_coe_toNNReal
#align lipschitz_with.of_dist_le' LipschitzWith.of_dist_le'
protected theorem mk_one (h : ∀ x y, dist (f x) (f y) ≤ dist x y) : LipschitzWith 1 f :=
@@ -352,7 +353,7 @@ theorem nndist_le (hf : LipschitzWith K f) (x y : α) : nndist (f x) (f y) ≤ K
#align lipschitz_with.nndist_le LipschitzWith.nndist_le
theorem dist_le_mul_of_le (hf : LipschitzWith K f) (hr : dist x y ≤ r) : dist (f x) (f y) ≤ K * r :=
- (hf.dist_le_mul x y).trans <| mul_le_mul_of_nonneg_left hr K.coe_nonneg
+ (hf.dist_le_mul x y).trans <| by gcongr
#align lipschitz_with.dist_le_mul_of_le LipschitzWith.dist_le_mul_of_le
theorem mapsTo_closedBall (hf : LipschitzWith K f) (x : α) (r : ℝ) :
@@ -532,7 +533,7 @@ variable {K : ℝ≥0} {s : Set α} {f : α → β}
protected theorem of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) :
LipschitzOnWith (Real.toNNReal K) f s :=
of_dist_le_mul fun x hx y hy =>
- le_trans (h x hx y hy) <| mul_le_mul_of_nonneg_right (Real.le_coe_toNNReal K) dist_nonneg
+ le_trans (h x hx y hy) <| by gcongr; apply Real.le_coe_toNNReal
#align lipschitz_on_with.of_dist_le' LipschitzOnWith.of_dist_le'
protected theorem mk_one (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) :
@@ -651,8 +652,7 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
rw [sub_le_iff_le_add, add_assoc, ← mul_add, add_comm (dist y t)]
calc
f z ≤ f t + K * dist z t := hf.le_add_mul hz t.2
- _ ≤ f t + K * (dist y z + dist y t) :=
- add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle_left _ _ _) K.2) _
+ _ ≤ f t + K * (dist y z + dist y t) := by gcongr; apply dist_triangle_left
have E : EqOn f g s := fun x hx => by
refine' le_antisymm (le_ciInf fun y => hf.le_add_mul hx y.2) _
simpa only [add_zero, Subtype.coe_mk, mul_zero, dist_self] using ciInf_le (B x) ⟨x, hx⟩
@@ -664,7 +664,8 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
g x ≤ f z + K * dist x z := ciInf_le (B x) _
_ ≤ f z + K * dist y z + K * dist x y := by
rw [add_assoc, ← mul_add, add_comm (dist y z)]
- exact add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle _ _ _) K.2) _
+ gcongr
+ apply dist_triangle
#align lipschitz_on_with.extend_real LipschitzOnWith.extend_real
/-- A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz
@@ -37,7 +37,7 @@ uniformly continuous.
## Implementation notes
-The parameter `K` has type `ℝ≥0`. This way we avoid conjuction in the definition and have
+The parameter `K` has type `ℝ≥0`. This way we avoid conjunction in the definition and have
coercions both to `ℝ` and `ℝ≥0∞`. Constructors whose names end with `'` take `K : ℝ` as an
argument, and return `LipschitzWith (Real.toNNReal K) f`.
-/
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -642,7 +642,7 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
rcases eq_empty_or_nonempty s with (rfl | hs)
· exact ⟨fun _ => 0, (LipschitzWith.const _).weaken (zero_le _), eqOn_empty _ _⟩
have : Nonempty s := by simp only [hs, nonempty_coe_sort]
- let g := fun y : α => infᵢ fun x : s => f x + K * dist y x
+ let g := fun y : α => iInf fun x : s => f x + K * dist y x
have B : ∀ y : α, BddBelow (range fun x : s => f x + K * dist y x) := fun y => by
rcases hs with ⟨z, hz⟩
refine' ⟨f z - K * dist y z, _⟩
@@ -654,14 +654,14 @@ theorem LipschitzOnWith.extend_real [PseudoMetricSpace α] {f : α → ℝ} {s :
_ ≤ f t + K * (dist y z + dist y t) :=
add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle_left _ _ _) K.2) _
have E : EqOn f g s := fun x hx => by
- refine' le_antisymm (le_cinfᵢ fun y => hf.le_add_mul hx y.2) _
- simpa only [add_zero, Subtype.coe_mk, mul_zero, dist_self] using cinfᵢ_le (B x) ⟨x, hx⟩
+ refine' le_antisymm (le_ciInf fun y => hf.le_add_mul hx y.2) _
+ simpa only [add_zero, Subtype.coe_mk, mul_zero, dist_self] using ciInf_le (B x) ⟨x, hx⟩
refine' ⟨g, LipschitzWith.of_le_add_mul K fun x y => _, E⟩
rw [← sub_le_iff_le_add]
- refine' le_cinfᵢ fun z => _
+ refine' le_ciInf fun z => _
rw [sub_le_iff_le_add]
calc
- g x ≤ f z + K * dist x z := cinfᵢ_le (B x) _
+ g x ≤ f z + K * dist x z := ciInf_le (B x) _
_ ≤ f z + K * dist y z + K * dist x y := by
rw [add_assoc, ← mul_add, add_comm (dist y z)]
exact add_le_add_left (mul_le_mul_of_nonneg_left (dist_triangle _ _ _) K.2) _
This PR fixes two things:
align
statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align
). This is often seen in the mathport output after ending calc
blocks.#align
statements. (This was needed for a script I wrote for #3630.)@@ -182,7 +182,6 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
calc
edist (f x) (f y) ≤ K * edist x y := hf x y
_ < d := ENNReal.mul_lt_of_lt_div' h
-
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
/-- A Lipschitz function is uniformly continuous -/
@@ -229,7 +228,6 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
_ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
-
#align lipschitz_with.comp LipschitzWith.comp
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
@@ -604,7 +602,6 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
edist_triangle _ _ _
_ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
-
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
vscode is already configured by .vscode/settings.json
to trim these on save. It's not clear how they've managed to stick around.
By doing this all in one PR now, it avoids getting random whitespace diffs in PRs later.
This was done with a regex search in vscode,
@@ -182,7 +182,7 @@ theorem edist_lt_of_edist_lt_div (hf : LipschitzWith K f) {x y : α} {d : ℝ≥
calc
edist (f x) (f y) ≤ K * edist x y := hf x y
_ < d := ENNReal.mul_lt_of_lt_div' h
-
+
#align lipschitz_with.edist_lt_of_edist_lt_div LipschitzWith.edist_lt_of_edist_lt_div
/-- A Lipschitz function is uniformly continuous -/
@@ -229,7 +229,7 @@ protected theorem comp {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} (hf : L
edist (f (g x)) (f (g y)) ≤ Kf * edist (g x) (g y) := hf _ _
_ ≤ Kf * (Kg * edist x y) := (ENNReal.mul_left_mono (hg _ _))
_ = (Kf * Kg : ℝ≥0) * edist x y := by rw [← mul_assoc, ENNReal.coe_mul]
-
+
#align lipschitz_with.comp LipschitzWith.comp
theorem comp_lipschitzOnWith {Kf Kg : ℝ≥0} {f : β → γ} {g : α → β} {s : Set α}
@@ -604,7 +604,7 @@ theorem continuousOn_prod_of_continuousOn_lipschitz_on [PseudoEMetricSpace α] [
edist_triangle _ _ _
_ < ε / 2 + ε / 2 := (ENNReal.add_lt_add ((hb _ hbt).edist_lt_of_edist_lt_div has hx hax) hby)
_ = ε := ENNReal.add_halves ε
-
+
#align continuous_on_prod_of_continuous_on_lipschitz_on continuousOn_prod_of_continuousOn_lipschitz_on
/-- Consider a function `f : α × β → γ`. Suppose that it is continuous on each “vertical section”
The unported dependencies are
algebra.order.module
init.core
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file