fact stringlengths 6 3.84k | type stringclasses 11 values | library stringclasses 32 values | imports listlengths 1 14 | filename stringlengths 20 95 | symbolic_name stringlengths 1 90 | docstring stringlengths 7 20k ⌀ |
|---|---|---|---|---|---|---|
PseudoEMetricSpace.induced {α β} (f : α → β) (m : PseudoEMetricSpace β) :
PseudoEMetricSpace α where
edist x y := edist (f x) (f y)
edist_self _ := edist_self _
edist_comm _ _ := edist_comm _ _
edist_triangle _ _ _ := edist_triangle _ _ _
toUniformSpace := UniformSpace.comap f m.toUniformSpace
uniformity_edist := (uniformity_basis_edist.comap (Prod.map f f)).eq_biInf | abbrev | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | PseudoEMetricSpace.induced | The extended pseudometric induced by a function taking values in a pseudoemetric space.
See note [reducible non-instances]. |
Subtype.edist_eq {p : α → Prop} (x y : Subtype p) : edist x y = edist (x : α) y := rfl | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | Subtype.edist_eq | Pseudoemetric space instance on subsets of pseudoemetric spaces -/
instance {α : Type*} {p : α → Prop} [PseudoEMetricSpace α] : PseudoEMetricSpace (Subtype p) :=
PseudoEMetricSpace.induced Subtype.val ‹_›
/-- The extended pseudodistance on a subset of a pseudoemetric space is the restriction of
the original pseudodistance, by definition. |
@[simp]
Subtype.edist_mk_mk {p : α → Prop} {x y : α} (hx : p x) (hy : p y) :
edist (⟨x, hx⟩ : Subtype p) ⟨y, hy⟩ = edist x y :=
rfl | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | Subtype.edist_mk_mk | The extended pseudodistance on a subtype of a pseudoemetric space is the restriction of
the original pseudodistance, by definition. |
@[reducible] noncomputable PseudoEmetricSpace.ofEdistOfTopology {α : Type*} [TopologicalSpace α]
(d : α → α → ℝ≥0∞) (h_self : ∀ x, d x x = 0) (h_comm : ∀ x y, d x y = d y x)
(h_triangle : ∀ x y z, d x z ≤ d x y + d y z)
(h_basis : ∀ x, (𝓝 x).HasBasis (fun c ↦ 0 < c) (fun c ↦ {y | d x y < c})) :
PseudoEMetricSpace α where
edist := d
edist_self := h_self
edist_comm := h_comm
edist_triangle := h_triangle
toUniformSpace := uniformSpaceOfEDistOfHasBasis d h_self h_comm h_triangle h_basis
uniformity_edist := rfl | def | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | PseudoEmetricSpace.ofEdistOfTopology | Consider an extended distance on a topological space, for which the neighborhoods can be
expressed in terms of the distance. Then we define the emetric space structure associated to this
distance, with a topology defeq to the initial one. |
Prod.pseudoEMetricSpaceMax [PseudoEMetricSpace β] :
PseudoEMetricSpace (α × β) where
edist x y := edist x.1 y.1 ⊔ edist x.2 y.2
edist_self x := by simp
edist_comm x y := by simp [edist_comm]
edist_triangle _ _ _ :=
max_le (le_trans (edist_triangle _ _ _) (add_le_add (le_max_left _ _) (le_max_left _ _)))
(le_trans (edist_triangle _ _ _) (add_le_add (le_max_right _ _) (le_max_right _ _)))
uniformity_edist := uniformity_prod.trans <| by
simp [PseudoEMetricSpace.uniformity_edist, ← iInf_inf_eq, setOf_and]
toUniformSpace := inferInstance | instance | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | Prod.pseudoEMetricSpaceMax | Pseudoemetric space instance on the multiplicative opposite of a pseudoemetric space. -/
@[to_additive
/-- Pseudoemetric space instance on the additive opposite of a pseudoemetric space. -/]
instance {α : Type*} [PseudoEMetricSpace α] : PseudoEMetricSpace αᵐᵒᵖ :=
PseudoEMetricSpace.induced unop ‹_›
@[to_additive]
theorem edist_unop (x y : αᵐᵒᵖ) : edist (unop x) (unop y) = edist x y := rfl
@[to_additive]
theorem edist_op (x y : α) : edist (op x) (op y) = edist x y := rfl
end MulOpposite
section ULift
instance : PseudoEMetricSpace (ULift α) := PseudoEMetricSpace.induced ULift.down ‹_›
theorem ULift.edist_eq (x y : ULift α) : edist x y = edist x.down y.down := rfl
@[simp]
theorem ULift.edist_up_up (x y : α) : edist (ULift.up x) (ULift.up y) = edist x y := rfl
end ULift
/-- The product of two pseudoemetric spaces, with the max distance, is an extended
pseudometric spaces. We make sure that the uniform structure thus constructed is the one
corresponding to the product of uniform spaces, to avoid diamond problems. |
Prod.edist_eq [PseudoEMetricSpace β] (x y : α × β) :
edist x y = max (edist x.1 y.1) (edist x.2 y.2) :=
rfl | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | Prod.edist_eq | null |
ball (x : α) (ε : ℝ≥0∞) : Set α :=
{ y | edist y x < ε }
@[simp] theorem mem_ball : y ∈ ball x ε ↔ edist y x < ε := Iff.rfl | def | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball | `EMetric.ball x ε` is the set of all points `y` with `edist y x < ε` |
mem_ball' : y ∈ ball x ε ↔ edist x y < ε := by rw [edist_comm, mem_ball] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_ball' | null |
closedBall (x : α) (ε : ℝ≥0∞) :=
{ y | edist y x ≤ ε }
@[simp] theorem mem_closedBall : y ∈ closedBall x ε ↔ edist y x ≤ ε := Iff.rfl | def | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | closedBall | `EMetric.closedBall x ε` is the set of all points `y` with `edist y x ≤ ε` |
mem_closedBall' : y ∈ closedBall x ε ↔ edist x y ≤ ε := by rw [edist_comm, mem_closedBall]
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_closedBall' | null |
closedBall_top (x : α) : closedBall x ∞ = univ :=
eq_univ_of_forall fun _ => mem_setOf.2 le_top | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | closedBall_top | null |
ball_subset_closedBall : ball x ε ⊆ closedBall x ε := fun _ h => le_of_lt h.out | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_subset_closedBall | null |
pos_of_mem_ball (hy : y ∈ ball x ε) : 0 < ε :=
lt_of_le_of_lt (zero_le _) hy | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | pos_of_mem_ball | null |
mem_ball_self (h : 0 < ε) : x ∈ ball x ε := by
rwa [mem_ball, edist_self] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_ball_self | null |
mem_closedBall_self : x ∈ closedBall x ε := by
rw [mem_closedBall, edist_self]; apply zero_le | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_closedBall_self | null |
mem_ball_comm : x ∈ ball y ε ↔ y ∈ ball x ε := by rw [mem_ball', mem_ball] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_ball_comm | null |
mem_closedBall_comm : x ∈ closedBall y ε ↔ y ∈ closedBall x ε := by
rw [mem_closedBall', mem_closedBall]
@[gcongr] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_closedBall_comm | null |
ball_subset_ball (h : ε₁ ≤ ε₂) : ball x ε₁ ⊆ ball x ε₂ := fun _y (yx : _ < ε₁) =>
lt_of_lt_of_le yx h
@[gcongr] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_subset_ball | null |
closedBall_subset_closedBall (h : ε₁ ≤ ε₂) : closedBall x ε₁ ⊆ closedBall x ε₂ :=
fun _y (yx : _ ≤ ε₁) => le_trans yx h | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | closedBall_subset_closedBall | null |
ball_disjoint (h : ε₁ + ε₂ ≤ edist x y) : Disjoint (ball x ε₁) (ball y ε₂) :=
Set.disjoint_left.mpr fun z h₁ h₂ =>
(edist_triangle_left x y z).not_gt <| (ENNReal.add_lt_add h₁ h₂).trans_le h | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_disjoint | null |
ball_subset (h : edist x y + ε₁ ≤ ε₂) (h' : edist x y ≠ ∞) : ball x ε₁ ⊆ ball y ε₂ :=
fun z zx =>
calc
edist z y ≤ edist z x + edist x y := edist_triangle _ _ _
_ = edist x y + edist z x := add_comm _ _
_ < edist x y + ε₁ := ENNReal.add_lt_add_left h' zx
_ ≤ ε₂ := h | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_subset | null |
exists_ball_subset_ball (h : y ∈ ball x ε) : ∃ ε' > 0, ball y ε' ⊆ ball x ε := by
have : 0 < ε - edist y x := by simpa using h
refine ⟨ε - edist y x, this, ball_subset ?_ (ne_top_of_lt h)⟩
exact (add_tsub_cancel_of_le (mem_ball.mp h).le).le | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | exists_ball_subset_ball | null |
ball_eq_empty_iff : ball x ε = ∅ ↔ ε = 0 :=
eq_empty_iff_forall_notMem.trans
⟨fun h => le_bot_iff.1 (le_of_not_gt fun ε0 => h _ (mem_ball_self ε0)), fun ε0 _ h =>
not_lt_of_ge (le_of_eq ε0) (pos_of_mem_ball h)⟩ | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_eq_empty_iff | null |
ordConnected_setOf_closedBall_subset (x : α) (s : Set α) :
OrdConnected { r | closedBall x r ⊆ s } :=
⟨fun _ _ _ h₁ _ h₂ => (closedBall_subset_closedBall h₂.2).trans h₁⟩ | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ordConnected_setOf_closedBall_subset | null |
ordConnected_setOf_ball_subset (x : α) (s : Set α) : OrdConnected { r | ball x r ⊆ s } :=
⟨fun _ _ _ h₁ _ h₂ => (ball_subset_ball h₂.2).trans h₁⟩ | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ordConnected_setOf_ball_subset | null |
edistLtTopSetoid : Setoid α where
r x y := edist x y < ⊤
iseqv :=
⟨fun x => by rw [edist_self]; exact ENNReal.coe_lt_top,
fun h => by rwa [edist_comm], fun hxy hyz =>
lt_of_le_of_lt (edist_triangle _ _ _) (ENNReal.add_lt_top.2 ⟨hxy, hyz⟩)⟩
@[simp] | def | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edistLtTopSetoid | Relation “two points are at a finite edistance” is an equivalence relation. |
ball_zero : ball x 0 = ∅ := by rw [EMetric.ball_eq_empty_iff] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_zero | null |
nhds_basis_eball : (𝓝 x).HasBasis (fun ε : ℝ≥0∞ => 0 < ε) (ball x) :=
nhds_basis_uniformity uniformity_basis_edist | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | nhds_basis_eball | null |
nhdsWithin_basis_eball : (𝓝[s] x).HasBasis (fun ε : ℝ≥0∞ => 0 < ε) fun ε => ball x ε ∩ s :=
nhdsWithin_hasBasis nhds_basis_eball s | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | nhdsWithin_basis_eball | null |
nhds_basis_closed_eball : (𝓝 x).HasBasis (fun ε : ℝ≥0∞ => 0 < ε) (closedBall x) :=
nhds_basis_uniformity uniformity_basis_edist_le | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | nhds_basis_closed_eball | null |
nhdsWithin_basis_closed_eball :
(𝓝[s] x).HasBasis (fun ε : ℝ≥0∞ => 0 < ε) fun ε => closedBall x ε ∩ s :=
nhdsWithin_hasBasis nhds_basis_closed_eball s | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | nhdsWithin_basis_closed_eball | null |
nhds_eq : 𝓝 x = ⨅ ε > 0, 𝓟 (ball x ε) :=
nhds_basis_eball.eq_biInf | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | nhds_eq | null |
mem_nhds_iff : s ∈ 𝓝 x ↔ ∃ ε > 0, ball x ε ⊆ s :=
nhds_basis_eball.mem_iff | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_nhds_iff | null |
mem_nhdsWithin_iff : s ∈ 𝓝[t] x ↔ ∃ ε > 0, ball x ε ∩ t ⊆ s :=
nhdsWithin_basis_eball.mem_iff | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_nhdsWithin_iff | null |
tendsto_nhdsWithin_nhdsWithin {t : Set β} {a b} :
Tendsto f (𝓝[s] a) (𝓝[t] b) ↔
∀ ε > 0, ∃ δ > 0, ∀ ⦃x⦄, x ∈ s → edist x a < δ → f x ∈ t ∧ edist (f x) b < ε :=
(nhdsWithin_basis_eball.tendsto_iff nhdsWithin_basis_eball).trans <|
forall₂_congr fun ε _ => exists_congr fun δ => and_congr_right fun _ =>
forall_congr' fun x => by simp; tauto | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | tendsto_nhdsWithin_nhdsWithin | null |
tendsto_nhdsWithin_nhds {a b} :
Tendsto f (𝓝[s] a) (𝓝 b) ↔
∀ ε > 0, ∃ δ > 0, ∀ {x : α}, x ∈ s → edist x a < δ → edist (f x) b < ε := by
rw [← nhdsWithin_univ b, tendsto_nhdsWithin_nhdsWithin]
simp only [mem_univ, true_and] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | tendsto_nhdsWithin_nhds | null |
tendsto_nhds_nhds {a b} :
Tendsto f (𝓝 a) (𝓝 b) ↔ ∀ ε > 0, ∃ δ > 0, ∀ ⦃x⦄, edist x a < δ → edist (f x) b < ε :=
nhds_basis_eball.tendsto_iff nhds_basis_eball | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | tendsto_nhds_nhds | null |
isOpen_iff : IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ball x ε ⊆ s := by
simp [isOpen_iff_nhds, mem_nhds_iff]
@[simp] theorem isOpen_ball : IsOpen (ball x ε) :=
isOpen_iff.2 fun _ => exists_ball_subset_ball | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | isOpen_iff | null |
isClosed_ball_top : IsClosed (ball x ⊤) :=
isOpen_compl_iff.1 <| isOpen_iff.2 fun _y hy =>
⟨⊤, ENNReal.coe_lt_top, fun _z hzy hzx =>
hy (edistLtTopSetoid.trans (edistLtTopSetoid.symm hzy) hzx)⟩ | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | isClosed_ball_top | null |
ball_mem_nhds (x : α) {ε : ℝ≥0∞} (ε0 : 0 < ε) : ball x ε ∈ 𝓝 x :=
isOpen_ball.mem_nhds (mem_ball_self ε0) | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_mem_nhds | null |
closedBall_mem_nhds (x : α) {ε : ℝ≥0∞} (ε0 : 0 < ε) : closedBall x ε ∈ 𝓝 x :=
mem_of_superset (ball_mem_nhds x ε0) ball_subset_closedBall | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | closedBall_mem_nhds | null |
ball_prod_same [PseudoEMetricSpace β] (x : α) (y : β) (r : ℝ≥0∞) :
ball x r ×ˢ ball y r = ball (x, y) r :=
ext fun z => by simp [Prod.edist_eq] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | ball_prod_same | null |
closedBall_prod_same [PseudoEMetricSpace β] (x : α) (y : β) (r : ℝ≥0∞) :
closedBall x r ×ˢ closedBall y r = closedBall (x, y) r :=
ext fun z => by simp [Prod.edist_eq] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | closedBall_prod_same | null |
mem_closure_iff : x ∈ closure s ↔ ∀ ε > 0, ∃ y ∈ s, edist x y < ε :=
(mem_closure_iff_nhds_basis nhds_basis_eball).trans <| by simp only [mem_ball, edist_comm x] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | mem_closure_iff | ε-characterization of the closure in pseudoemetric spaces |
tendsto_nhds {f : Filter β} {u : β → α} {a : α} :
Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ x in f, edist (u x) a < ε :=
nhds_basis_eball.tendsto_right_iff | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | tendsto_nhds | null |
tendsto_atTop [Nonempty β] [SemilatticeSup β] {u : β → α} {a : α} :
Tendsto u atTop (𝓝 a) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, edist (u n) a < ε :=
(atTop_basis.tendsto_iff nhds_basis_eball).trans <| by
simp only [true_and, mem_Ici, mem_ball] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | tendsto_atTop | null |
subset_countable_closure_of_almost_dense_set (s : Set α)
(hs : ∀ ε > 0, ∃ t : Set α, t.Countable ∧ s ⊆ ⋃ x ∈ t, closedBall x ε) :
∃ t, t ⊆ s ∧ t.Countable ∧ s ⊆ closure t := by
rcases s.eq_empty_or_nonempty with (rfl | ⟨x₀, hx₀⟩)
· exact ⟨∅, empty_subset _, countable_empty, empty_subset _⟩
choose! T hTc hsT using fun n : ℕ => hs n⁻¹ (by simp)
have : ∀ r x, ∃ y ∈ s, closedBall x r ∩ s ⊆ closedBall y (r * 2) := fun r x => by
rcases (closedBall x r ∩ s).eq_empty_or_nonempty with (he | ⟨y, hxy, hys⟩)
· refine ⟨x₀, hx₀, ?_⟩
rw [he]
exact empty_subset _
· refine ⟨y, hys, fun z hz => ?_⟩
calc
edist z y ≤ edist z x + edist y x := edist_triangle_right _ _ _
_ ≤ r + r := add_le_add hz.1 hxy
_ = r * 2 := (mul_two r).symm
choose f hfs hf using this
refine
⟨⋃ n : ℕ, f n⁻¹ '' T n, iUnion_subset fun n => image_subset_iff.2 fun z _ => hfs _ _,
countable_iUnion fun n => (hTc n).image _, ?_⟩
refine fun x hx => mem_closure_iff.2 fun ε ε0 => ?_
rcases ENNReal.exists_inv_nat_lt (ENNReal.half_pos ε0.lt.ne').ne' with ⟨n, hn⟩
rcases mem_iUnion₂.1 (hsT n hx) with ⟨y, hyn, hyx⟩
refine ⟨f n⁻¹ y, mem_iUnion.2 ⟨n, mem_image_of_mem _ hyn⟩, ?_⟩
calc
edist x (f n⁻¹ y) ≤ (n : ℝ≥0∞)⁻¹ * 2 := hf _ _ ⟨hyx, hx⟩
_ < ε := ENNReal.mul_lt_of_lt_div hn | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | subset_countable_closure_of_almost_dense_set | For a set `s` in a pseudo emetric space, if for every `ε > 0` there exists a countable
set that is `ε`-dense in `s`, then there exists a countable subset `t ⊆ s` that is dense in `s`. |
EMetricSpace (α : Type u) : Type u extends PseudoEMetricSpace α where
eq_of_edist_eq_zero : ∀ {x y : α}, edist x y = 0 → x = y
@[ext] | class | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | EMetricSpace | An extended metric space is a type endowed with a `ℝ≥0∞`-valued distance `edist` satisfying
`edist x y = 0 ↔ x = y`, commutativity `edist x y = edist y x`, and the triangle inequality
`edist x z ≤ edist x y + edist y z`.
See pseudo extended metric spaces (`PseudoEMetricSpace`) for the similar class with the
`edist x y = 0 ↔ x = y` assumption weakened to `edist x x = 0`.
Any extended metric space is a T1 topological space and a uniform space (see `TopologicalSpace`,
`T1Space`, `UniformSpace`), where the topology and uniformity come from the metric.
We make the uniformity/topology part of the data instead of deriving it from the metric.
This e.g. ensures that we do not get a diamond when doing
`[EMetricSpace α] [EMetricSpace β] : TopologicalSpace (α × β)`:
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance]. |
protected EMetricSpace.ext
{α : Type*} {m m' : EMetricSpace α} (h : m.toEDist = m'.toEDist) : m = m' := by
cases m
cases m'
congr
ext1
assumption
variable {γ : Type w} [EMetricSpace γ]
export EMetricSpace (eq_of_edist_eq_zero) | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | EMetricSpace.ext | null |
@[simp]
edist_eq_zero {x y : γ} : edist x y = 0 ↔ x = y :=
⟨eq_of_edist_eq_zero, fun h => h ▸ edist_self _⟩
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_eq_zero | Characterize the equality of points by the vanishing of their extended distance |
zero_eq_edist {x y : γ} : 0 = edist x y ↔ x = y := eq_comm.trans edist_eq_zero | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | zero_eq_edist | null |
edist_le_zero {x y : γ} : edist x y ≤ 0 ↔ x = y :=
nonpos_iff_eq_zero.trans edist_eq_zero
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_le_zero | null |
edist_pos {x y : γ} : 0 < edist x y ↔ x ≠ y := by simp [← not_le]
@[simp] lemma EMetric.closedBall_zero (x : γ) : closedBall x 0 = {x} := by ext; simp | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_pos | null |
eq_of_forall_edist_le {x y : γ} (h : ∀ ε > 0, edist x y ≤ ε) : x = y :=
eq_of_edist_eq_zero (eq_of_le_of_forall_lt_imp_le_of_dense bot_le h) | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | eq_of_forall_edist_le | Two points coincide if their distance is `< ε` for all positive ε |
EMetricSpace.replaceUniformity {γ} [U : UniformSpace γ] (m : EMetricSpace γ)
(H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : EMetricSpace γ where
edist := @edist _ m.toEDist
edist_self := edist_self
eq_of_edist_eq_zero := @eq_of_edist_eq_zero _ _
edist_comm := edist_comm
edist_triangle := edist_triangle
toUniformSpace := U
uniformity_edist := H.trans (@PseudoEMetricSpace.uniformity_edist γ _) | abbrev | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | EMetricSpace.replaceUniformity | Auxiliary function to replace the uniformity on an emetric space with
a uniformity which is equal to the original one, but maybe not defeq.
This is useful if one wants to construct an emetric space with a
specified uniformity. See Note [forgetful inheritance] explaining why having definitionally
the right uniformity is often important.
See note [reducible non-instances]. |
EMetricSpace.replaceTopology {γ} [T : TopologicalSpace γ] (m : EMetricSpace γ)
(H : T = m.toUniformSpace.toTopologicalSpace) : EMetricSpace γ where
edist := @edist _ m.toEDist
edist_self := edist_self
eq_of_edist_eq_zero := @eq_of_edist_eq_zero _ _
edist_comm := edist_comm
edist_triangle := edist_triangle
toUniformSpace := m.toUniformSpace.replaceTopology H
uniformity_edist := PseudoEMetricSpace.uniformity_edist | abbrev | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | EMetricSpace.replaceTopology | Auxiliary function to replace the topology on an emetric space with
a topology which is equal to the original one, but maybe not defeq.
This is useful if one wants to construct an emetric space with a
specified topology. See Note [forgetful inheritance] explaining why having definitionally
the right topology is often important.
See note [reducible non-instances]. |
EMetricSpace.induced {γ β} (f : γ → β) (hf : Function.Injective f) (m : EMetricSpace β) :
EMetricSpace γ :=
{ PseudoEMetricSpace.induced f m.toPseudoEMetricSpace with
eq_of_edist_eq_zero := fun h => hf (edist_eq_zero.1 h) } | abbrev | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | EMetricSpace.induced | The extended metric induced by an injective function taking values in an emetric space.
See Note [reducible non-instances]. |
uniformity_edist : 𝓤 γ = ⨅ ε > 0, 𝓟 { p : γ × γ | edist p.1 p.2 < ε } :=
PseudoEMetricSpace.uniformity_edist
/-! | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | uniformity_edist | EMetric space instance on subsets of emetric spaces -/
instance {α : Type*} {p : α → Prop} [EMetricSpace α] : EMetricSpace (Subtype p) :=
EMetricSpace.induced Subtype.val Subtype.coe_injective ‹_›
/-- EMetric space instance on the multiplicative opposite of an emetric space. -/
@[to_additive /-- EMetric space instance on the additive opposite of an emetric space. -/]
instance {α : Type*} [EMetricSpace α] : EMetricSpace αᵐᵒᵖ :=
EMetricSpace.induced MulOpposite.unop MulOpposite.unop_injective ‹_›
instance {α : Type*} [EMetricSpace α] : EMetricSpace (ULift α) :=
EMetricSpace.induced ULift.down ULift.down_injective ‹_›
/-- Reformulation of the uniform structure in terms of the extended distance |
@[simp]
edist_ofMul (a b : X) : edist (ofMul a) (ofMul b) = edist a b :=
rfl
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_ofMul | null |
edist_ofAdd (a b : X) : edist (ofAdd a) (ofAdd b) = edist a b :=
rfl
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_ofAdd | null |
edist_toMul (a b : Additive X) : edist a.toMul b.toMul = edist a b :=
rfl
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_toMul | null |
edist_toAdd (a b : Multiplicative X) : edist a.toAdd b.toAdd = edist a b :=
rfl | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_toAdd | null |
@[simp]
edist_toDual (a b : X) : edist (toDual a) (toDual b) = edist a b :=
rfl
@[simp] | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_toDual | null |
edist_ofDual (a b : Xᵒᵈ) : edist (ofDual a) (ofDual b) = edist a b :=
rfl | theorem | Topology | [
"Mathlib.Data.ENNReal.Inv",
"Mathlib.Topology.UniformSpace.Basic",
"Mathlib.Topology.UniformSpace.OfFun"
] | Mathlib/Topology/EMetricSpace/Defs.lean | edist_ofDual | null |
noncomputable diam (s : Set α) :=
⨆ (x ∈ s) (y ∈ s), edist x y | def | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam | The diameter of a set in a pseudoemetric space, named `EMetric.diam` |
diam_eq_sSup (s : Set α) : diam s = sSup (image2 edist s s) := sSup_image2.symm | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_eq_sSup | null |
diam_le_iff {d : ℝ≥0∞} : diam s ≤ d ↔ ∀ x ∈ s, ∀ y ∈ s, edist x y ≤ d := by
simp only [diam, iSup_le_iff] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_le_iff | null |
diam_image_le_iff {d : ℝ≥0∞} {f : β → α} {s : Set β} :
diam (f '' s) ≤ d ↔ ∀ x ∈ s, ∀ y ∈ s, edist (f x) (f y) ≤ d := by
simp only [diam_le_iff, forall_mem_image] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_image_le_iff | null |
edist_le_of_diam_le {d} (hx : x ∈ s) (hy : y ∈ s) (hd : diam s ≤ d) : edist x y ≤ d :=
diam_le_iff.1 hd x hx y hy | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | edist_le_of_diam_le | null |
edist_le_diam_of_mem (hx : x ∈ s) (hy : y ∈ s) : edist x y ≤ diam s :=
edist_le_of_diam_le hx hy le_rfl | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | edist_le_diam_of_mem | If two points belong to some set, their edistance is bounded by the diameter of the set |
diam_le {d : ℝ≥0∞} (h : ∀ x ∈ s, ∀ y ∈ s, edist x y ≤ d) : diam s ≤ d :=
diam_le_iff.2 h | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_le | If the distance between any two points in a set is bounded by some constant, this constant
bounds the diameter. |
diam_subsingleton (hs : s.Subsingleton) : diam s = 0 :=
nonpos_iff_eq_zero.1 <| diam_le fun _x hx y hy => (hs hx hy).symm ▸ edist_self y ▸ le_rfl | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_subsingleton | The diameter of a subsingleton vanishes. |
@[simp]
diam_empty : diam (∅ : Set α) = 0 :=
diam_subsingleton subsingleton_empty | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_empty | The diameter of the empty set vanishes |
@[simp]
diam_singleton : diam ({x} : Set α) = 0 :=
diam_subsingleton subsingleton_singleton
@[to_additive (attr := simp)] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_singleton | The diameter of a singleton vanishes |
diam_one [One α] : diam (1 : Set α) = 0 :=
diam_singleton | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_one | null |
diam_iUnion_mem_option {ι : Type*} (o : Option ι) (s : ι → Set α) :
diam (⋃ i ∈ o, s i) = ⨆ i ∈ o, diam (s i) := by cases o <;> simp | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_iUnion_mem_option | null |
diam_insert : diam (insert x s) = max (⨆ y ∈ s, edist x y) (diam s) :=
eq_of_forall_ge_iff fun d => by
simp only [diam_le_iff, forall_mem_insert, edist_self, edist_comm x, max_le_iff, iSup_le_iff,
zero_le, true_and, forall_and, and_self_iff, ← and_assoc] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_insert | null |
diam_pair : diam ({x, y} : Set α) = edist x y := by
simp only [iSup_singleton, diam_insert, diam_singleton, ENNReal.max_zero_right] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_pair | null |
diam_triple : diam ({x, y, z} : Set α) = max (max (edist x y) (edist x z)) (edist y z) := by
simp only [diam_insert, iSup_insert, iSup_singleton, diam_singleton, ENNReal.max_zero_right] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_triple | null |
@[gcongr]
diam_mono {s t : Set α} (h : s ⊆ t) : diam s ≤ diam t :=
diam_le fun _x hx _y hy => edist_le_diam_of_mem (h hx) (h hy) | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_mono | The diameter is monotonous with respect to inclusion |
diam_union {t : Set α} (xs : x ∈ s) (yt : y ∈ t) :
diam (s ∪ t) ≤ diam s + edist x y + diam t := by
have A : ∀ a ∈ s, ∀ b ∈ t, edist a b ≤ diam s + edist x y + diam t := fun a ha b hb =>
calc
edist a b ≤ edist a x + edist x y + edist y b := edist_triangle4 _ _ _ _
_ ≤ diam s + edist x y + diam t :=
add_le_add (add_le_add (edist_le_diam_of_mem ha xs) le_rfl) (edist_le_diam_of_mem yt hb)
refine diam_le fun a ha b hb => ?_
rcases (mem_union _ _ _).1 ha with h'a | h'a <;> rcases (mem_union _ _ _).1 hb with h'b | h'b
· calc
edist a b ≤ diam s := edist_le_diam_of_mem h'a h'b
_ ≤ diam s + (edist x y + diam t) := le_self_add
_ = diam s + edist x y + diam t := (add_assoc _ _ _).symm
· exact A a h'a b h'b
· have Z := A b h'b a h'a
rwa [edist_comm] at Z
· calc
edist a b ≤ diam t := edist_le_diam_of_mem h'a h'b
_ ≤ diam s + edist x y + diam t := le_add_self | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_union | The diameter of a union is controlled by the diameter of the sets, and the edistance
between two points in the sets. |
diam_union' {t : Set α} (h : (s ∩ t).Nonempty) : diam (s ∪ t) ≤ diam s + diam t := by
let ⟨x, ⟨xs, xt⟩⟩ := h
simpa using diam_union xs xt | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_union' | null |
diam_closedBall {r : ℝ≥0∞} : diam (closedBall x r) ≤ 2 * r :=
diam_le fun a ha b hb =>
calc
edist a b ≤ edist a x + edist b x := edist_triangle_right _ _ _
_ ≤ r + r := add_le_add ha hb
_ = 2 * r := (two_mul r).symm | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_closedBall | null |
diam_ball {r : ℝ≥0∞} : diam (ball x r) ≤ 2 * r :=
le_trans (diam_mono ball_subset_closedBall) diam_closedBall | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_ball | null |
diam_pi_le_of_le {X : β → Type*} [Fintype β] [∀ b, PseudoEMetricSpace (X b)]
{s : ∀ b : β, Set (X b)} {c : ℝ≥0∞} (h : ∀ b, diam (s b) ≤ c) : diam (Set.pi univ s) ≤ c := by
refine diam_le fun x hx y hy => edist_pi_le_iff.mpr ?_
rw [mem_univ_pi] at hx hy
exact fun b => diam_le_iff.1 (h b) (x b) (hx b) (y b) (hy b) | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_pi_le_of_le | null |
diam_eq_zero_iff : diam s = 0 ↔ s.Subsingleton :=
⟨fun h _x hx _y hy => edist_le_zero.1 <| h ▸ edist_le_diam_of_mem hx hy, diam_subsingleton⟩ | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_eq_zero_iff | null |
diam_pos_iff : 0 < diam s ↔ s.Nontrivial := by
simp only [pos_iff_ne_zero, Ne, diam_eq_zero_iff, Set.not_subsingleton_iff] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_pos_iff | null |
diam_pos_iff' : 0 < diam s ↔ ∃ x ∈ s, ∃ y ∈ s, x ≠ y := by
simp only [diam_pos_iff, Set.Nontrivial] | theorem | Topology | [
"Mathlib.Topology.EMetricSpace.Pi"
] | Mathlib/Topology/EMetricSpace/Diam.lean | diam_pos_iff' | null |
LipschitzWith (K : ℝ≥0) (f : α → β) := ∀ x y, edist (f x) (f y) ≤ K * edist x y | def | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | 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`. |
LipschitzOnWith (K : ℝ≥0) (f : α → β) (s : Set α) :=
∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄, y ∈ s → edist (f x) (f y) ≤ K * edist x y | def | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | 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`. |
LocallyLipschitz (f : α → β) : Prop := ∀ x, ∃ K, ∃ t ∈ 𝓝 x, LipschitzOnWith K f t | def | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | LocallyLipschitz | `f : α → β` is called **locally Lipschitz continuous** iff every point `x`
has a neighbourhood on which `f` is Lipschitz. |
LocallyLipschitzOn (s : Set α) (f : α → β) : Prop :=
∀ ⦃x⦄, x ∈ s → ∃ K, ∃ t ∈ 𝓝[s] x, LipschitzOnWith K f t | def | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | LocallyLipschitzOn | `f : α → β` is called **locally Lipschitz continuous** on `s` iff every point `x` of `s`
has a neighbourhood within `s` on which `f` is Lipschitz. |
@[simp]
lipschitzOnWith_empty (K : ℝ≥0) (f : α → β) : LipschitzOnWith K f ∅ := fun _ => False.elim
@[simp] lemma locallyLipschitzOn_empty (f : α → β) : LocallyLipschitzOn ∅ f := fun _ ↦ False.elim | theorem | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | lipschitzOnWith_empty | Every function is Lipschitz on the empty set (with any Lipschitz constant). |
LipschitzOnWith.mono (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) | theorem | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | LipschitzOnWith.mono | Being Lipschitz on a set is monotone w.r.t. that set. |
LocallyLipschitzOn.mono (hf : LocallyLipschitzOn t f) (h : s ⊆ t) : LocallyLipschitzOn s f :=
fun x hx ↦ by obtain ⟨K, u, hu, hfu⟩ := hf (h hx); exact ⟨K, u, nhdsWithin_mono _ h hu, hfu⟩ | lemma | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | LocallyLipschitzOn.mono | null |
@[simp] lipschitzOnWith_univ : LipschitzOnWith K f univ ↔ LipschitzWith K f := by
simp [LipschitzOnWith, LipschitzWith]
@[simp] lemma locallyLipschitzOn_univ : LocallyLipschitzOn univ f ↔ LocallyLipschitz f := by
simp [LocallyLipschitzOn, LocallyLipschitz] | lemma | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | lipschitzOnWith_univ | `f` is Lipschitz iff it is Lipschitz on the entire space. |
protected LocallyLipschitz.locallyLipschitzOn (h : LocallyLipschitz f) :
LocallyLipschitzOn s f := (locallyLipschitzOn_univ.2 h).mono s.subset_univ | lemma | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | LocallyLipschitz.locallyLipschitzOn | null |
lipschitzOnWith_iff_restrict : LipschitzOnWith K f s ↔ LipschitzWith K (s.restrict f) := by
simp [LipschitzOnWith, LipschitzWith] | theorem | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | lipschitzOnWith_iff_restrict | null |
lipschitzOnWith_restrict {t : Set s} :
LipschitzOnWith K (s.restrict f) t ↔ LipschitzOnWith K f (s ∩ Subtype.val '' t) := by
simp [LipschitzOnWith] | lemma | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | lipschitzOnWith_restrict | null |
locallyLipschitzOn_iff_restrict :
LocallyLipschitzOn s f ↔ LocallyLipschitz (s.restrict f) := by
simp only [LocallyLipschitzOn, LocallyLipschitz, SetCoe.forall',
lipschitzOnWith_restrict,
nhds_subtype_eq_comap_nhdsWithin, mem_comap]
congr! with x K
constructor
· rintro ⟨t, ht, hft⟩
exact ⟨_, ⟨t, ht, Subset.rfl⟩, hft.mono <| inter_subset_right.trans <| image_preimage_subset ..⟩
· rintro ⟨t, ⟨u, hu, hut⟩, hft⟩
exact ⟨s ∩ u, Filter.inter_mem self_mem_nhdsWithin hu,
hft.mono fun x hx ↦ ⟨hx.1, ⟨x, hx.1⟩, hut hx.2, rfl⟩⟩
alias ⟨LipschitzOnWith.to_restrict, _⟩ := lipschitzOnWith_iff_restrict
alias ⟨LocallyLipschitzOn.restrict, _⟩ := locallyLipschitzOn_iff_restrict | lemma | Topology | [
"Mathlib.Algebra.Group.End",
"Mathlib.Tactic.Finiteness",
"Mathlib.Topology.EMetricSpace.Diam"
] | Mathlib/Topology/EMetricSpace/Lipschitz.lean | locallyLipschitzOn_iff_restrict | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.