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 ⌀ |
|---|---|---|---|---|---|---|
Closeds.edist_eq {s t : Closeds α} : edist s t = hausdorffEdist (s : Set α) t :=
rfl | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | Closeds.edist_eq | By definition, the edistance on `Closeds α` is given by the Hausdorff edistance |
Closeds.completeSpace [CompleteSpace α] : CompleteSpace (Closeds α) := by
/- We will show that, if a sequence of sets `s n` satisfies
`edist (s n) (s (n+1)) < 2^{-n}`, then it converges. This is enough to guarantee
completeness, by a standard completeness criterion.
We use the shorthand `B n = 2^{-n}` in ennreal. -/
let B : ℕ → ℝ≥0∞ := fun n => 2⁻¹ ^ n
have B_pos : ∀ n, (0 : ℝ≥0∞) < B n := by simp [B, ENNReal.pow_pos]
have B_ne_top : ∀ n, B n ≠ ⊤ := by finiteness
/- Consider a sequence of closed sets `s n` with `edist (s n) (s (n+1)) < B n`.
We will show that it converges. The limit set is `t0 = ⋂n, closure (⋃m≥n, s m)`.
We will have to show that a point in `s n` is close to a point in `t0`, and a point
in `t0` is close to a point in `s n`. The completeness then follows from a
standard criterion. -/
refine complete_of_convergent_controlled_sequences B B_pos fun s hs => ?_
let t0 := ⋂ n, closure (⋃ m ≥ n, s m : Set α)
let t : Closeds α := ⟨t0, isClosed_iInter fun _ => isClosed_closure⟩
use t
have I1 : ∀ n, ∀ x ∈ s n, ∃ y ∈ t0, edist x y ≤ 2 * B n := by
/- This is the main difficulty of the proof. Starting from `x ∈ s n`, we want
to find a point in `t0` which is close to `x`. Define inductively a sequence of
points `z m` with `z n = x` and `z m ∈ s m` and `edist (z m) (z (m+1)) ≤ B m`. This is
possible since the Hausdorff distance between `s m` and `s (m+1)` is at most `B m`.
This sequence is a Cauchy sequence, therefore converging as the space is complete, to
a limit which satisfies the required properties. -/
intro n x hx
obtain ⟨z, hz₀, hz⟩ :
∃ z : ∀ l, s (n + l), (z 0 : α) = x ∧ ∀ k, edist (z k : α) (z (k + 1) : α) ≤ B n / 2 ^ k := by
have : ∀ (l) (z : s (n + l)), ∃ z' : s (n + l + 1), edist (z : α) z' ≤ B n / 2 ^ l := by
intro l z
obtain ⟨z', z'_mem, hz'⟩ : ∃ z' ∈ s (n + l + 1), edist (z : α) z' < B n / 2 ^ l := by
refine exists_edist_lt_of_hausdorffEdist_lt (s := s (n + l)) z.2 ?_
simp only [ENNReal.inv_pow, div_eq_mul_inv]
rw [← pow_add]
apply hs <;> simp
exact ⟨⟨z', z'_mem⟩, le_of_lt hz'⟩
use fun k => Nat.recOn k ⟨x, hx⟩ fun l z => (this l z).choose
simp only [Nat.add_zero, Nat.rec_zero, true_and]
exact fun k => (this k _).choose_spec
have : CauchySeq fun k => (z k : α) := cauchySeq_of_edist_le_geometric_two (B n) (B_ne_top n) hz
rcases cauchySeq_tendsto_of_complete this with ⟨y, y_lim⟩
use y
have : y ∈ t0 :=
mem_iInter.2 fun k =>
mem_closure_of_tendsto y_lim
(by
simp only [exists_prop, Set.mem_iUnion, Filter.eventually_atTop]
exact ⟨k, fun m hm => ⟨n + m, by cutsat, (z m).2⟩⟩)
use this
rw [← hz₀]
exact edist_le_of_edist_le_geometric_two_of_tendsto₀ (B n) hz y_lim
have I2 : ∀ n, ∀ x ∈ t0, ∃ y ∈ s n, edist x y ≤ 2 * B n := by
... | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | Closeds.completeSpace | In a complete space, the type of closed subsets is complete for the
Hausdorff edistance. |
Closeds.compactSpace [CompactSpace α] : CompactSpace (Closeds α) :=
⟨by
/- by completeness, it suffices to show that it is totally bounded,
i.e., for all ε>0, there is a finite set which is ε-dense.
start from a set `s` which is ε-dense in α. Then the subsets of `s`
are finitely many, and ε-dense for the Hausdorff distance. -/
refine
(EMetric.totallyBounded_iff.2 fun ε εpos => ?_).isCompact_of_isClosed isClosed_univ
rcases exists_between εpos with ⟨δ, δpos, δlt⟩
obtain ⟨s : Set α, fs : s.Finite, hs : univ ⊆ ⋃ y ∈ s, ball y δ⟩ :=
EMetric.totallyBounded_iff.1
(isCompact_iff_totallyBounded_isComplete.1 (@isCompact_univ α _ _)).1 δ δpos
have main : ∀ u : Set α, ∃ v ⊆ s, hausdorffEdist u v ≤ δ := by
intro u
let v := { x : α | x ∈ s ∧ ∃ y ∈ u, edist x y < δ }
exists v, (fun x hx => hx.1 : v ⊆ s)
refine hausdorffEdist_le_of_mem_edist ?_ ?_
· intro x hx
have : x ∈ ⋃ y ∈ s, ball y δ := hs (by simp)
rcases mem_iUnion₂.1 this with ⟨y, ys, dy⟩
have : edist y x < δ := by simpa [edist_comm]
exact ⟨y, ⟨ys, ⟨x, hx, this⟩⟩, le_of_lt dy⟩
· rintro x ⟨_, ⟨y, yu, hy⟩⟩
exact ⟨y, yu, le_of_lt hy⟩
let F := { f : Closeds α | (f : Set α) ⊆ s }
refine ⟨F, ?_, fun u _ => ?_⟩
· apply @Finite.of_finite_image _ _ F _
· apply fs.finite_subsets.subset fun b => _
· exact fun s => (s : Set α)
simp only [F, and_imp, Set.mem_image, Set.mem_setOf_eq, exists_imp]
intro _ x hx hx'
rwa [hx'] at hx
· exact SetLike.coe_injective.injOn
· obtain ⟨t0, t0s, Dut0⟩ := main u
have : IsClosed t0 := (fs.subset t0s).isCompact.isClosed
let t : Closeds α := ⟨t0, this⟩
have : t ∈ F := t0s
have : edist u t < ε := lt_of_le_of_lt Dut0 δlt
apply mem_iUnion₂.2
exact ⟨t, ‹t ∈ F›, this⟩⟩ | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | Closeds.compactSpace | In a compact space, the type of closed subsets is compact. |
emetricSpace : EMetricSpace (NonemptyCompacts α) where
edist s t := hausdorffEdist (s : Set α) t
edist_self _ := hausdorffEdist_self
edist_comm _ _ := hausdorffEdist_comm
edist_triangle _ _ _ := hausdorffEdist_triangle
eq_of_edist_eq_zero {s t} h := NonemptyCompacts.ext <| by
have : closure (s : Set α) = closure t := hausdorffEdist_zero_iff_closure_eq_closure.1 h
rwa [s.isCompact.isClosed.closure_eq, t.isCompact.isClosed.closure_eq] at this | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | emetricSpace | In an emetric space, the type of non-empty compact subsets is an emetric space,
where the edistance is the Hausdorff edistance |
isometry_toCloseds : Isometry (@NonemptyCompacts.toCloseds α _ _) :=
fun _ _ => rfl | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | isometry_toCloseds | `NonemptyCompacts.toCloseds` is an isometry |
isUniformEmbedding_toCloseds :
IsUniformEmbedding (@NonemptyCompacts.toCloseds α _ _) :=
isometry_toCloseds.isUniformEmbedding
@[deprecated (since := "2025-08-20")]
alias ToCloseds.isUniformEmbedding := isUniformEmbedding_toCloseds | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | isUniformEmbedding_toCloseds | `NonemptyCompacts.toCloseds` is a uniform embedding (as it is an isometry) |
@[fun_prop]
continuous_toCloseds : Continuous (@NonemptyCompacts.toCloseds α _ _) :=
isometry_toCloseds.continuous | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | continuous_toCloseds | `NonemptyCompacts.toCloseds` is continuous (as it is an isometry) |
isClosed_subsets_of_isClosed (hs : IsClosed s) :
IsClosed {A : NonemptyCompacts α | (A : Set α) ⊆ s} :=
(Closeds.isClosed_subsets_of_isClosed hs).preimage continuous_toCloseds | lemma | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | isClosed_subsets_of_isClosed | null |
isClosed_in_closeds [CompleteSpace α] :
IsClosed (range <| @NonemptyCompacts.toCloseds α _ _) := by
have :
range NonemptyCompacts.toCloseds =
{ s : Closeds α | (s : Set α).Nonempty ∧ IsCompact (s : Set α) } := by
ext s
refine ⟨?_, fun h => ⟨⟨⟨s, h.2⟩, h.1⟩, Closeds.ext rfl⟩⟩
rintro ⟨s, hs, rfl⟩
exact ⟨s.nonempty, s.isCompact⟩
rw [this]
refine isClosed_of_closure_subset fun s hs => ⟨?_, ?_⟩
· -- take a set t which is nonempty and at a finite distance of s
rcases mem_closure_iff.1 hs ⊤ ENNReal.coe_lt_top with ⟨t, ht, Dst⟩
rw [edist_comm] at Dst
exact nonempty_of_hausdorffEdist_ne_top ht.1 (ne_of_lt Dst)
· refine isCompact_iff_totallyBounded_isComplete.2 ⟨?_, s.isClosed.isComplete⟩
refine totallyBounded_iff.2 fun ε (εpos : 0 < ε) => ?_
rcases mem_closure_iff.1 hs (ε / 2) (ENNReal.half_pos εpos.ne') with ⟨t, ht, Dst⟩
rcases totallyBounded_iff.1 (isCompact_iff_totallyBounded_isComplete.1 ht.2).1 (ε / 2)
(ENNReal.half_pos εpos.ne') with
⟨u, fu, ut⟩
refine ⟨u, ⟨fu, fun x hx => ?_⟩⟩
rcases exists_edist_lt_of_hausdorffEdist_lt hx Dst with ⟨z, hz, Dxz⟩
rcases mem_iUnion₂.1 (ut hz) with ⟨y, hy, Dzy⟩
have : edist x y < ε :=
calc
edist x y ≤ edist x z + edist z y := edist_triangle _ _ _
_ < ε / 2 + ε / 2 := ENNReal.add_lt_add Dxz Dzy
_ = ε := ENNReal.add_halves _
exact mem_biUnion hy this | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | isClosed_in_closeds | The range of `NonemptyCompacts.toCloseds` is closed in a complete space |
completeSpace [CompleteSpace α] : CompleteSpace (NonemptyCompacts α) :=
(completeSpace_iff_isComplete_range
isometry_toCloseds.isUniformInducing).2 <|
isClosed_in_closeds.isComplete | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | completeSpace | In a complete space, the type of nonempty compact subsets is complete. This follows
from the same statement for closed subsets |
compactSpace [CompactSpace α] : CompactSpace (NonemptyCompacts α) :=
⟨by
rw [isometry_toCloseds.isEmbedding.isCompact_iff, image_univ]
exact isClosed_in_closeds.isCompact⟩ | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | compactSpace | In a compact space, the type of nonempty compact subsets is compact. This follows from
the same statement for closed subsets |
secondCountableTopology [SecondCountableTopology α] :
SecondCountableTopology (NonemptyCompacts α) :=
haveI : SeparableSpace (NonemptyCompacts α) := by
/- To obtain a countable dense subset of `NonemptyCompacts α`, start from
a countable dense subset `s` of α, and then consider all its finite nonempty subsets.
This set is countable and made of nonempty compact sets. It turns out to be dense:
by total boundedness, any compact set `t` can be covered by finitely many small balls, and
approximations in `s` of the centers of these balls give the required finite approximation
of `t`. -/
rcases exists_countable_dense α with ⟨s, cs, s_dense⟩
let v0 := { t : Set α | t.Finite ∧ t ⊆ s }
let v : Set (NonemptyCompacts α) := { t : NonemptyCompacts α | (t : Set α) ∈ v0 }
refine ⟨⟨v, ?_, ?_⟩⟩
· have : v0.Countable := countable_setOf_finite_subset cs
exact this.preimage SetLike.coe_injective
· refine fun t => mem_closure_iff.2 fun ε εpos => ?_
rcases exists_between εpos with ⟨δ, δpos, δlt⟩
have δpos' : 0 < δ / 2 := ENNReal.half_pos δpos.ne'
have Exy : ∀ x, ∃ y, y ∈ s ∧ edist x y < δ / 2 := by
intro x
rcases mem_closure_iff.1 (s_dense x) (δ / 2) δpos' with ⟨y, ys, hy⟩
exact ⟨y, ⟨ys, hy⟩⟩
let F x := (Exy x).choose
have Fspec : ∀ x, F x ∈ s ∧ edist x (F x) < δ / 2 := fun x => (Exy x).choose_spec
have : TotallyBounded (t : Set α) := t.isCompact.totallyBounded
obtain ⟨a : Set α, af : Set.Finite a, ta : (t : Set α) ⊆ ⋃ y ∈ a, ball y (δ / 2)⟩ :=
totallyBounded_iff.1 this (δ / 2) δpos'
let b := F '' a
have : b.Finite := af.image _
have tb : ∀ x ∈ t, ∃ y ∈ b, edist x y < δ := by
intro x hx
rcases mem_iUnion₂.1 (ta hx) with ⟨z, za, Dxz⟩
exists F z, mem_image_of_mem _ za
calc
edist x (F z) ≤ edist x z + edist z (F z) := edist_triangle _ _ _
_ < δ / 2 + δ / 2 := ENNReal.add_lt_add Dxz (Fspec z).2
_ = δ := ENNReal.add_halves _
let c := { y ∈ b | ∃ x ∈ t, edist x y < δ }
have : c.Finite := ‹b.Finite›.subset fun x hx => hx.1
have tc : ∀ x ∈ t, ∃ y ∈ c, edist x y ≤ δ := by
intro x hx
rcases tb x hx with ⟨y, yv, Dxy⟩
have : y ∈ c := by simpa [c, -mem_image] using ⟨yv, ⟨x, hx, Dxy⟩⟩
exact ⟨y, this, le_of_lt Dxy⟩
have ct : ∀ y ∈ c, ∃ x ∈ t, edist y x ≤ δ := by
rintro y ⟨_, x, xt, Dyx⟩
have : edist y x ≤ δ :=
calc
edist y x = edist x y := edist_comm _ _
_ ≤ δ := le_of_lt Dyx
exact ⟨x, xt, this⟩
... | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | secondCountableTopology | In a second countable space, the type of nonempty compact subsets is second countable |
NonemptyCompacts.metricSpace : MetricSpace (NonemptyCompacts α) :=
EMetricSpace.toMetricSpace fun x y =>
hausdorffEdist_ne_top_of_nonempty_of_bounded x.nonempty y.nonempty x.isCompact.isBounded
y.isCompact.isBounded | instance | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | NonemptyCompacts.metricSpace | `NonemptyCompacts α` inherits a metric space structure, as the Hausdorff
edistance between two such sets is finite. |
NonemptyCompacts.dist_eq {x y : NonemptyCompacts α} :
dist x y = hausdorffDist (x : Set α) y :=
rfl | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | NonemptyCompacts.dist_eq | The distance on `NonemptyCompacts α` is the Hausdorff distance, by construction |
lipschitz_infDist_set (x : α) : LipschitzWith 1 fun s : NonemptyCompacts α => infDist x s :=
LipschitzWith.of_le_add fun s t => by
rw [dist_comm]
exact infDist_le_infDist_add_hausdorffDist (edist_ne_top t s) | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | lipschitz_infDist_set | null |
lipschitz_infDist : LipschitzWith 2 fun p : α × NonemptyCompacts α => infDist p.1 p.2 := by
rw [← one_add_one_eq_two]
exact LipschitzWith.uncurry
(fun s : NonemptyCompacts α => lipschitz_infDist_pt (s : Set α)) lipschitz_infDist_set | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | lipschitz_infDist | null |
uniformContinuous_infDist_Hausdorff_dist :
UniformContinuous fun p : α × NonemptyCompacts α => infDist p.1 p.2 :=
lipschitz_infDist.uniformContinuous | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Topology.MetricSpace.HausdorffDistance",
"Mathlib.Topology.Sets.Compacts"
] | Mathlib/Topology/MetricSpace/Closeds.lean | uniformContinuous_infDist_Hausdorff_dist | null |
protected uniformContinuous_dist :
UniformContinuous fun p : Completion α × Completion α ↦ dist p.1 p.2 :=
uniformContinuous_extension₂ dist | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | uniformContinuous_dist | The distance on the completion is obtained by extending the distance on the original space,
by uniform continuity. -/
instance : Dist (Completion α) :=
⟨Completion.extension₂ dist⟩
/-- The new distance is uniformly continuous. |
protected continuous_dist [TopologicalSpace β] {f g : β → Completion α} (hf : Continuous f)
(hg : Continuous g) : Continuous fun x ↦ dist (f x) (g x) :=
Completion.uniformContinuous_dist.continuous.comp (hf.prodMk hg :) | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | continuous_dist | The new distance is continuous. |
@[simp]
protected dist_eq (x y : α) : dist (x : Completion α) y = dist x y :=
Completion.extension₂_coe_coe uniformContinuous_dist _ _
/- Let us check that the new distance satisfies the axioms of a distance, by starting from the
properties on α and extending them to `Completion α` by continuity. -/ | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | dist_eq | The new distance is an extension of the original distance. |
protected dist_self (x : Completion α) : dist x x = 0 := by
refine induction_on x ?_ ?_
· refine isClosed_eq ?_ continuous_const
exact Completion.continuous_dist continuous_id continuous_id
· intro a
rw [Completion.dist_eq, dist_self] | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | dist_self | null |
protected dist_comm (x y : Completion α) : dist x y = dist y x := by
refine induction_on₂ x y ?_ ?_
· exact isClosed_eq (Completion.continuous_dist continuous_fst continuous_snd)
(Completion.continuous_dist continuous_snd continuous_fst)
· intro a b
rw [Completion.dist_eq, Completion.dist_eq, dist_comm] | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | dist_comm | null |
protected dist_triangle (x y z : Completion α) : dist x z ≤ dist x y + dist y z := by
refine induction_on₃ x y z ?_ ?_
· refine isClosed_le ?_ (Continuous.add ?_ ?_) <;>
apply_rules [Completion.continuous_dist, Continuous.fst, Continuous.snd, continuous_id]
· intro a b c
rw [Completion.dist_eq, Completion.dist_eq, Completion.dist_eq]
exact dist_triangle a b c | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | dist_triangle | null |
protected mem_uniformity_dist (s : Set (Completion α × Completion α)) :
s ∈ 𝓤 (Completion α) ↔ ∃ ε > 0, ∀ {a b}, dist a b < ε → (a, b) ∈ s := by
constructor
· /- Start from an entourage `s`. It contains a closed entourage `t`. Its pullback in `α` is an
entourage, so it contains an `ε`-neighborhood of the diagonal by definition of the entourages
in metric spaces. Then `t` contains an `ε`-neighborhood of the diagonal in `Completion α`, as
closed properties pass to the completion. -/
intro hs
rcases mem_uniformity_isClosed hs with ⟨t, ht, ⟨tclosed, ts⟩⟩
have A : { x : α × α | (↑x.1, ↑x.2) ∈ t } ∈ uniformity α :=
uniformContinuous_def.1 (uniformContinuous_coe α) t ht
rcases mem_uniformity_dist.1 A with ⟨ε, εpos, hε⟩
refine ⟨ε, εpos, @fun x y hxy ↦ ?_⟩
have : ε ≤ dist x y ∨ (x, y) ∈ t := by
refine induction_on₂ x y ?_ ?_
· have : { x : Completion α × Completion α | ε ≤ dist x.fst x.snd ∨ (x.fst, x.snd) ∈ t } =
{ p : Completion α × Completion α | ε ≤ dist p.1 p.2 } ∪ t := by ext; simp
rw [this]
apply IsClosed.union _ tclosed
exact isClosed_le continuous_const Completion.uniformContinuous_dist.continuous
· intro x y
rw [Completion.dist_eq]
by_cases h : ε ≤ dist x y
· exact Or.inl h
· have Z := hε (not_le.1 h)
simp only [Set.mem_setOf_eq] at Z
exact Or.inr Z
simp only [not_le.mpr hxy, false_or] at this
exact ts this
· /- Start from a set `s` containing an ε-neighborhood of the diagonal in `Completion α`. To show
that it is an entourage, we use the fact that `dist` is uniformly continuous on
`Completion α × Completion α` (this is a general property of the extension of uniformly
continuous functions). Therefore, the preimage of the ε-neighborhood of the diagonal in ℝ
is an entourage in `Completion α × Completion α`. Massaging this property, it follows that
the ε-neighborhood of the diagonal is an entourage in `Completion α`, and therefore this is
also the case of `s`. -/
rintro ⟨ε, εpos, hε⟩
let r : Set (ℝ × ℝ) := { p | dist p.1 p.2 < ε }
have : r ∈ uniformity ℝ := Metric.dist_mem_uniformity εpos
have T := uniformContinuous_def.1 (@Completion.uniformContinuous_dist α _) r this
simp only [uniformity_prod_eq_prod, mem_prod_iff, Filter.mem_map] at T
rcases T with ⟨t1, ht1, t2, ht2, ht⟩
refine mem_of_superset ht1 ?_
have A : ∀ a b : Completion α, (a, b) ∈ t1 → dist a b < ε := by
intro a b hab
have : ((a, b), (a, a)) ∈ t1 ×ˢ t2 := ⟨hab, refl_mem_uniformity ht2⟩
exact lt_of_le_of_lt (le_abs_self _)
(by simpa [r, Completion.dist_self, Real.dist_eq, Completion.dist_comm] using ht this)
grind | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | mem_uniformity_dist | Elements of the uniformity (defined generally for completions) can be characterized in terms
of the distance. |
protected uniformity_dist' :
𝓤 (Completion α) = ⨅ ε : { ε : ℝ // 0 < ε }, 𝓟 { p | dist p.1 p.2 < ε.val } := by
ext s; rw [mem_iInf_of_directed]
· simp [Completion.mem_uniformity_dist, subset_def]
· rintro ⟨r, hr⟩ ⟨p, hp⟩
use ⟨min r p, lt_min hr hp⟩
simp +contextual | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | uniformity_dist' | Reformulate `Completion.mem_uniformity_dist` in terms that are suitable for the definition
of the metric space structure. |
protected uniformity_dist : 𝓤 (Completion α) = ⨅ ε > 0, 𝓟 { p | dist p.1 p.2 < ε } := by
simpa [iInf_subtype] using @Completion.uniformity_dist' α _ | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | uniformity_dist | null |
instMetricSpace : MetricSpace (Completion α) :=
@MetricSpace.ofT0PseudoMetricSpace _
{ dist_self := Completion.dist_self
dist_comm := Completion.dist_comm
dist_triangle := Completion.dist_triangle
dist := dist
toUniformSpace := inferInstance
uniformity_dist := Completion.uniformity_dist } _ | instance | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | instMetricSpace | Metric space structure on the completion of a pseudo_metric space. |
coe_isometry : Isometry ((↑) : α → Completion α) :=
Isometry.of_dist_eq Completion.dist_eq
@[simp] | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | coe_isometry | The embedding of a metric space in its completion is an isometry. |
protected edist_eq (x y : α) : edist (x : Completion α) y = edist x y :=
coe_isometry x y | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | edist_eq | null |
LipschitzWith.completion_extension [MetricSpace β] [CompleteSpace β] {f : α → β}
{K : ℝ≥0} (h : LipschitzWith K f) : LipschitzWith K (Completion.extension f) :=
LipschitzWith.of_dist_le_mul fun x y => induction_on₂ x y
(isClosed_le (by fun_prop) (by fun_prop)) <| by
simpa only [extension_coe h.uniformContinuous, Completion.dist_eq] using h.dist_le_mul | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | LipschitzWith.completion_extension | null |
LipschitzWith.completion_map [PseudoMetricSpace β] {f : α → β} {K : ℝ≥0}
(h : LipschitzWith K f) : LipschitzWith K (Completion.map f) :=
one_mul K ▸ (coe_isometry.lipschitz.comp h).completion_extension | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | LipschitzWith.completion_map | null |
Isometry.completion_extension [MetricSpace β] [CompleteSpace β] {f : α → β}
(h : Isometry f) : Isometry (Completion.extension f) :=
Isometry.of_dist_eq fun x y => induction_on₂ x y
(isClosed_eq (by fun_prop) (by fun_prop)) fun _ _ ↦ by
simp only [extension_coe h.uniformContinuous, Completion.dist_eq, h.dist_eq] | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | Isometry.completion_extension | null |
Isometry.completion_map [PseudoMetricSpace β] {f : α → β}
(h : Isometry f) : Isometry (Completion.map f) :=
(coe_isometry.comp h).completion_extension | theorem | Topology | [
"Mathlib.Topology.Algebra.GroupCompletion",
"Mathlib.Topology.Algebra.Ring.Real",
"Mathlib.Topology.MetricSpace.Algebra",
"Mathlib.Topology.MetricSpace.Isometry",
"Mathlib.Topology.MetricSpace.Lipschitz",
"Mathlib.Topology.UniformSpace.Completion"
] | Mathlib/Topology/MetricSpace/Completion.lean | Isometry.completion_map | null |
Congruent (v₁ : ι → P₁) (v₂ : ι → P₂) : Prop :=
∀ i₁ i₂, edist (v₁ i₁) (v₁ i₂) = edist (v₂ i₁) (v₂ i₂)
@[inherit_doc]
scoped[Congruent] infixl:25 " ≅ " => Congruent | def | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | Congruent | A congruence between indexed sets of vertices v₁ and v₂.
Use `open scoped Congruent` to access the `v₁ ≅ v₂` notation. |
congruent_iff_edist_eq :
Congruent v₁ v₂ ↔ ∀ i₁ i₂, edist (v₁ i₁) (v₁ i₂) = edist (v₂ i₁) (v₂ i₂) :=
Iff.rfl | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_edist_eq | Congruence holds if and only if all extended distances are the same. |
congruent_iff_pairwise_edist_eq :
Congruent v₁ v₂ ↔ Pairwise fun i₁ i₂ ↦ edist (v₁ i₁) (v₁ i₂) = edist (v₂ i₁) (v₂ i₂) := by
refine ⟨fun h ↦ fun _ _ _ ↦ h _ _, fun h ↦ fun i₁ i₂ ↦ ?_⟩
by_cases hi : i₁ = i₂
· simp [hi]
· exact h hi | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_pairwise_edist_eq | Congruence holds if and only if all extended distances between points with different
indices are the same. |
index_map (h : v₁ ≅ v₂) (f : ι' → ι) : (v₁ ∘ f) ≅ (v₂ ∘ f) :=
fun i₁ i₂ ↦ edist_eq h (f i₁) (f i₂) | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | index_map | A congruence preserves extended distance. Forward direction of `congruent_iff_edist_eq`. -/
alias ⟨edist_eq, _⟩ := congruent_iff_edist_eq
/-- Congruence follows from preserved extended distance. Backward direction of
`congruent_iff_edist_eq`. -/
alias ⟨_, of_edist_eq⟩ := congruent_iff_edist_eq
/-- A congruence pairwise preserves extended distance. Forward direction of
`congruent_iff_pairwise_edist_eq`. -/
alias ⟨pairwise_edist_eq, _⟩ := congruent_iff_pairwise_edist_eq
/-- Congruence follows from pairwise preserved extended distance. Backward direction of
`congruent_iff_pairwise_edist_eq`. -/
alias ⟨_, of_pairwise_edist_eq⟩ := congruent_iff_pairwise_edist_eq
@[refl] protected lemma refl (v₁ : ι → P₁) : v₁ ≅ v₁ := fun _ _ ↦ rfl
@[symm] protected lemma symm (h : v₁ ≅ v₂) : v₂ ≅ v₁ := fun i₁ i₂ ↦ (h i₁ i₂).symm
lemma _root_.congruent_comm : v₁ ≅ v₂ ↔ v₂ ≅ v₁ :=
⟨Congruent.symm, Congruent.symm⟩
@[trans] protected lemma trans (h₁₂ : v₁ ≅ v₂) (h₂₃ : v₂ ≅ v₃) : v₁ ≅ v₃ :=
fun i₁ i₂ ↦ (h₁₂ i₁ i₂).trans (h₂₃ i₁ i₂)
/-- Change the index set ι to an index ι' that maps to ι. |
@[simp] index_equiv {E : Type*} [EquivLike E ι' ι] (f : E) (v₁ : ι → P₁) (v₂ : ι → P₂) :
v₁ ∘ f ≅ v₂ ∘ f ↔ v₁ ≅ v₂ := by
refine ⟨fun h i₁ i₂ ↦ ?_, fun h ↦ index_map h f⟩
simpa [(EquivLike.toEquiv f).right_inv i₁, (EquivLike.toEquiv f).right_inv i₂]
using edist_eq h ((EquivLike.toEquiv f).symm i₁) ((EquivLike.toEquiv f).symm i₂) | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | index_equiv | Change between equivalent index sets ι and ι'. |
congruent_iff_nndist_eq :
Congruent v₁ v₂ ↔ ∀ i₁ i₂, nndist (v₁ i₁) (v₁ i₂) = nndist (v₂ i₁) (v₂ i₂) :=
forall₂_congr (fun _ _ ↦ by rw [edist_nndist, edist_nndist]; norm_cast) | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_nndist_eq | Congruence holds if and only if all non-negative distances are the same. |
congruent_iff_pairwise_nndist_eq :
Congruent v₁ v₂ ↔ Pairwise fun i₁ i₂ ↦ nndist (v₁ i₁) (v₁ i₂) = nndist (v₂ i₁) (v₂ i₂) := by
simp_rw [congruent_iff_pairwise_edist_eq, edist_nndist]
exact_mod_cast Iff.rfl | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_pairwise_nndist_eq | Congruence holds if and only if all non-negative distances between points with different
indices are the same. |
congruent_iff_dist_eq :
Congruent v₁ v₂ ↔ ∀ i₁ i₂, dist (v₁ i₁) (v₁ i₂) = dist (v₂ i₁) (v₂ i₂) :=
congruent_iff_nndist_eq.trans
(forall₂_congr (fun _ _ ↦ by rw [dist_nndist, dist_nndist]; norm_cast)) | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_dist_eq | Congruence holds if and only if all distances are the same. |
congruent_iff_pairwise_dist_eq :
Congruent v₁ v₂ ↔ Pairwise fun i₁ i₂ ↦ dist (v₁ i₁) (v₁ i₂) = dist (v₂ i₁) (v₂ i₂) := by
simp_rw [congruent_iff_pairwise_nndist_eq, dist_nndist]
exact_mod_cast Iff.rfl | lemma | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Congruence.lean | congruent_iff_pairwise_dist_eq | Congruence holds if and only if all non-negative distances between points with different
indices are the same. |
ContractingWith [EMetricSpace α] (K : ℝ≥0) (f : α → α) :=
K < 1 ∧ LipschitzWith K f | def | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | ContractingWith | A map is said to be `ContractingWith K`, if `K < 1` and `f` is `LipschitzWith K`. |
toLipschitzWith (hf : ContractingWith K f) : LipschitzWith K f := hf.2 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | toLipschitzWith | null |
one_sub_K_pos' (hf : ContractingWith K f) : (0 : ℝ≥0∞) < 1 - K := by simp [hf.1] | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | one_sub_K_pos' | null |
one_sub_K_ne_zero (hf : ContractingWith K f) : (1 : ℝ≥0∞) - K ≠ 0 :=
ne_of_gt hf.one_sub_K_pos' | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | one_sub_K_ne_zero | null |
one_sub_K_ne_top : (1 : ℝ≥0∞) - K ≠ ∞ := by
norm_cast
exact ENNReal.coe_ne_top | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | one_sub_K_ne_top | null |
edist_inequality (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞) :
edist x y ≤ (edist x (f x) + edist y (f y)) / (1 - K) :=
suffices edist x y ≤ edist x (f x) + edist y (f y) + K * edist x y by
rwa [ENNReal.le_div_iff_mul_le (Or.inl hf.one_sub_K_ne_zero) (Or.inl one_sub_K_ne_top),
mul_comm, ENNReal.sub_mul fun _ _ ↦ h, one_mul, tsub_le_iff_right]
calc
edist x y ≤ edist x (f x) + edist (f x) (f y) + edist (f y) y := edist_triangle4 _ _ _ _
_ = edist x (f x) + edist y (f y) + edist (f x) (f y) := by rw [edist_comm y, add_right_comm]
_ ≤ edist x (f x) + edist y (f y) + K * edist x y := add_le_add le_rfl (hf.2 _ _) | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_inequality | null |
edist_le_of_fixedPoint (hf : ContractingWith K f) {x y} (h : edist x y ≠ ∞)
(hy : IsFixedPt f y) : edist x y ≤ edist x (f x) / (1 - K) := by
simpa only [hy.eq, edist_self, add_zero] using hf.edist_inequality h | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_le_of_fixedPoint | null |
eq_or_edist_eq_top_of_fixedPoints (hf : ContractingWith K f) {x y} (hx : IsFixedPt f x)
(hy : IsFixedPt f y) : x = y ∨ edist x y = ∞ := by
refine or_iff_not_imp_right.2 fun h ↦ edist_le_zero.1 ?_
simpa only [hx.eq, edist_self, add_zero, ENNReal.zero_div] using hf.edist_le_of_fixedPoint h hy | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | eq_or_edist_eq_top_of_fixedPoints | null |
restrict (hf : ContractingWith K f) {s : Set α} (hs : MapsTo f s s) :
ContractingWith K (hs.restrict f s s) :=
⟨hf.1, fun x y ↦ hf.2 x y⟩ | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | restrict | If a map `f` is `ContractingWith K`, and `s` is a forward-invariant set, then
restriction of `f` to `s` is `ContractingWith K` as well. |
exists_fixedPoint (hf : ContractingWith K f) (x : α) (hx : edist x (f x) ≠ ∞) :
∃ y, IsFixedPt f y ∧ Tendsto (fun n ↦ f^[n] x) atTop (𝓝 y) ∧
∀ n : ℕ, edist (f^[n] x) y ≤ edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K) :=
have : CauchySeq fun n ↦ f^[n] x :=
cauchySeq_of_edist_le_geometric K (edist x (f x)) (ENNReal.coe_lt_one_iff.2 hf.1) hx
(hf.toLipschitzWith.edist_iterate_succ_le_geometric x)
let ⟨y, hy⟩ := cauchySeq_tendsto_of_complete this
⟨y, isFixedPt_of_tendsto_iterate hy hf.2.continuous.continuousAt, hy,
edist_le_of_edist_le_geometric_of_tendsto K (edist x (f x))
(hf.toLipschitzWith.edist_iterate_succ_le_geometric x) hy⟩
variable (f) in | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | exists_fixedPoint | Banach fixed-point theorem, contraction mapping theorem, `EMetricSpace` version.
A contracting map on a complete metric space has a fixed point.
We include more conclusions in this theorem to avoid proving them again later.
The main API for this theorem are the functions `efixedPoint` and `fixedPoint`,
and lemmas about these functions. |
noncomputable efixedPoint (hf : ContractingWith K f) (x : α) (hx : edist x (f x) ≠ ∞) : α :=
Classical.choose <| hf.exists_fixedPoint x hx | def | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint | Let `x` be a point of a complete emetric space. Suppose that `f` is a contracting map,
and `edist x (f x) ≠ ∞`. Then `efixedPoint` is the unique fixed point of `f`
in `EMetric.ball x ∞`. |
efixedPoint_isFixedPt (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
IsFixedPt f (efixedPoint f hf x hx) :=
(Classical.choose_spec <| hf.exists_fixedPoint x hx).1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint_isFixedPt | null |
tendsto_iterate_efixedPoint (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| efixedPoint f hf x hx) :=
(Classical.choose_spec <| hf.exists_fixedPoint x hx).2.1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | tendsto_iterate_efixedPoint | null |
apriori_edist_iterate_efixedPoint_le (hf : ContractingWith K f) {x : α}
(hx : edist x (f x) ≠ ∞) (n : ℕ) :
edist (f^[n] x) (efixedPoint f hf x hx) ≤ edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K) :=
(Classical.choose_spec <| hf.exists_fixedPoint x hx).2.2 n | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | apriori_edist_iterate_efixedPoint_le | null |
edist_efixedPoint_le (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
edist x (efixedPoint f hf x hx) ≤ edist x (f x) / (1 - K) := by
convert hf.apriori_edist_iterate_efixedPoint_le hx 0
simp only [pow_zero, mul_one] | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_efixedPoint_le | null |
edist_efixedPoint_lt_top (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞) :
edist x (efixedPoint f hf x hx) < ∞ :=
(hf.edist_efixedPoint_le hx).trans_lt
(ENNReal.mul_ne_top hx <| ENNReal.inv_ne_top.2 hf.one_sub_K_ne_zero).lt_top | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_efixedPoint_lt_top | null |
efixedPoint_eq_of_edist_lt_top (hf : ContractingWith K f) {x : α} (hx : edist x (f x) ≠ ∞)
{y : α} (hy : edist y (f y) ≠ ∞) (h : edist x y ≠ ∞) :
efixedPoint f hf x hx = efixedPoint f hf y hy := by
refine (hf.eq_or_edist_eq_top_of_fixedPoints ?_ ?_).elim id fun h' ↦ False.elim (ne_of_lt ?_ h')
<;> try apply efixedPoint_isFixedPt
change edistLtTopSetoid _ _
trans x
· apply Setoid.symm'
exact hf.edist_efixedPoint_lt_top hx
trans y
exacts [lt_top_iff_ne_top.2 h, hf.edist_efixedPoint_lt_top hy] | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint_eq_of_edist_lt_top | null |
exists_fixedPoint' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
∃ y ∈ s, IsFixedPt f y ∧ Tendsto (fun n ↦ f^[n] x) atTop (𝓝 y) ∧
∀ n : ℕ, edist (f^[n] x) y ≤ edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K) := by
haveI := hsc.completeSpace_coe
rcases hf.exists_fixedPoint ⟨x, hxs⟩ hx with ⟨y, hfy, h_tendsto, hle⟩
refine ⟨y, y.2, Subtype.ext_iff.1 hfy, ?_, fun n ↦ ?_⟩
· convert (continuous_subtype_val.tendsto _).comp h_tendsto
simp only [(· ∘ ·), MapsTo.iterate_restrict, MapsTo.val_restrict_apply]
· convert hle n
rw [MapsTo.iterate_restrict]
rfl
variable (f) in | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | exists_fixedPoint' | Banach fixed-point theorem for maps contracting on a complete subset. |
noncomputable efixedPoint' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) (x : α) (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
α :=
Classical.choose <| hf.exists_fixedPoint' hsc hsf hxs hx | def | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint' | Let `s` be a complete forward-invariant set of a self-map `f`. If `f` contracts on `s`
and `x ∈ s` satisfies `edist x (f x) ≠ ∞`, then `efixedPoint'` is the unique fixed point
of the restriction of `f` to `s ∩ EMetric.ball x ∞`. |
efixedPoint_mem' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
efixedPoint' f hsc hsf hf x hxs hx ∈ s :=
(Classical.choose_spec <| hf.exists_fixedPoint' hsc hsf hxs hx).1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint_mem' | null |
efixedPoint_isFixedPt' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
IsFixedPt f (efixedPoint' f hsc hsf hf x hxs hx) :=
(Classical.choose_spec <| hf.exists_fixedPoint' hsc hsf hxs hx).2.1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint_isFixedPt' | null |
tendsto_iterate_efixedPoint' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| efixedPoint' f hsc hsf hf x hxs hx) :=
(Classical.choose_spec <| hf.exists_fixedPoint' hsc hsf hxs hx).2.2.1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | tendsto_iterate_efixedPoint' | null |
apriori_edist_iterate_efixedPoint_le' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞)
(n : ℕ) :
edist (f^[n] x) (efixedPoint' f hsc hsf hf x hxs hx) ≤
edist x (f x) * (K : ℝ≥0∞) ^ n / (1 - K) :=
(Classical.choose_spec <| hf.exists_fixedPoint' hsc hsf hxs hx).2.2.2 n | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | apriori_edist_iterate_efixedPoint_le' | null |
edist_efixedPoint_le' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
edist x (efixedPoint' f hsc hsf hf x hxs hx) ≤ edist x (f x) / (1 - K) := by
convert hf.apriori_edist_iterate_efixedPoint_le' hsc hsf hxs hx 0
rw [pow_zero, mul_one] | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_efixedPoint_le' | null |
edist_efixedPoint_lt_top' {s : Set α} (hsc : IsComplete s) (hsf : MapsTo f s s)
(hf : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s) (hx : edist x (f x) ≠ ∞) :
edist x (efixedPoint' f hsc hsf hf x hxs hx) < ∞ :=
(hf.edist_efixedPoint_le' hsc hsf hxs hx).trans_lt
(ENNReal.mul_ne_top hx <| ENNReal.inv_ne_top.2 hf.one_sub_K_ne_zero).lt_top | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | edist_efixedPoint_lt_top' | null |
efixedPoint_eq_of_edist_lt_top' (hf : ContractingWith K f) {s : Set α} (hsc : IsComplete s)
(hsf : MapsTo f s s) (hfs : ContractingWith K <| hsf.restrict f s s) {x : α} (hxs : x ∈ s)
(hx : edist x (f x) ≠ ∞) {t : Set α} (htc : IsComplete t) (htf : MapsTo f t t)
(hft : ContractingWith K <| htf.restrict f t t) {y : α} (hyt : y ∈ t) (hy : edist y (f y) ≠ ∞)
(hxy : edist x y ≠ ∞) :
efixedPoint' f hsc hsf hfs x hxs hx = efixedPoint' f htc htf hft y hyt hy := by
refine (hf.eq_or_edist_eq_top_of_fixedPoints ?_ ?_).elim id fun h' ↦ False.elim (ne_of_lt ?_ h')
<;> try apply efixedPoint_isFixedPt'
change edistLtTopSetoid _ _
trans x
· apply Setoid.symm'
apply edist_efixedPoint_lt_top'
trans y
· exact lt_top_iff_ne_top.2 hxy
· apply edist_efixedPoint_lt_top' | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | efixedPoint_eq_of_edist_lt_top' | If a globally contracting map `f` has two complete forward-invariant sets `s`, `t`,
and `x ∈ s` is at a finite distance from `y ∈ t`, then the `efixedPoint'` constructed by `x`
is the same as the `efixedPoint'` constructed by `y`.
This lemma takes additional arguments stating that `f` contracts on `s` and `t` because this way
it can be used to prove the desired equality with non-trivial proofs of these facts. |
one_sub_K_pos (hf : ContractingWith K f) : (0 : ℝ) < 1 - K :=
sub_pos.2 hf.1 | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | one_sub_K_pos | null |
dist_le_mul (x y : α) : dist (f x) (f y) ≤ K * dist x y :=
hf.toLipschitzWith.dist_le_mul x y | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | dist_le_mul | null |
dist_inequality (x y) : dist x y ≤ (dist x (f x) + dist y (f y)) / (1 - K) :=
suffices dist x y ≤ dist x (f x) + dist y (f y) + K * dist x y by
rwa [le_div_iff₀ hf.one_sub_K_pos, mul_comm, _root_.sub_mul, one_mul, sub_le_iff_le_add]
calc
dist x y ≤ dist x (f x) + dist y (f y) + dist (f x) (f y) := dist_triangle4_right _ _ _ _
_ ≤ dist x (f x) + dist y (f y) + K * dist x y := add_le_add_left (hf.dist_le_mul _ _) _ | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | dist_inequality | null |
dist_le_of_fixedPoint (x) {y} (hy : IsFixedPt f y) : dist x y ≤ dist x (f x) / (1 - K) := by
simpa only [hy.eq, dist_self, add_zero] using hf.dist_inequality x y | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | dist_le_of_fixedPoint | null |
fixedPoint_unique' {x y} (hx : IsFixedPt f x) (hy : IsFixedPt f y) : x = y :=
(hf.eq_or_edist_eq_top_of_fixedPoints hx hy).resolve_right (edist_ne_top _ _) | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | fixedPoint_unique' | null |
dist_fixedPoint_fixedPoint_of_dist_le' (g : α → α) {x y} (hx : IsFixedPt f x)
(hy : IsFixedPt g y) {C} (hfg : ∀ z, dist (f z) (g z) ≤ C) : dist x y ≤ C / (1 - K) :=
calc
dist x y = dist y x := dist_comm x y
_ ≤ dist y (f y) / (1 - K) := hf.dist_le_of_fixedPoint y hx
_ = dist (f y) (g y) / (1 - K) := by rw [hy.eq, dist_comm]
_ ≤ C / (1 - K) := (div_le_div_iff_of_pos_right hf.one_sub_K_pos).2 (hfg y)
variable [Nonempty α] [CompleteSpace α]
variable (f) in | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | dist_fixedPoint_fixedPoint_of_dist_le' | Let `f` be a contracting map with constant `K`; let `g` be another map uniformly
`C`-close to `f`. If `x` and `y` are their fixed points, then `dist x y ≤ C / (1 - K)`. |
noncomputable fixedPoint : α :=
efixedPoint f hf _ (edist_ne_top (Classical.choice ‹Nonempty α›) _) | def | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | fixedPoint | The unique fixed point of a contracting map in a nonempty complete metric space. |
fixedPoint_isFixedPt : IsFixedPt f (fixedPoint f hf) :=
hf.efixedPoint_isFixedPt _ | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | fixedPoint_isFixedPt | The point provided by `ContractingWith.fixedPoint` is actually a fixed point. |
fixedPoint_unique {x} (hx : IsFixedPt f x) : x = fixedPoint f hf :=
hf.fixedPoint_unique' hx hf.fixedPoint_isFixedPt | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | fixedPoint_unique | null |
dist_fixedPoint_le (x) : dist x (fixedPoint f hf) ≤ dist x (f x) / (1 - K) :=
hf.dist_le_of_fixedPoint x hf.fixedPoint_isFixedPt | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | dist_fixedPoint_le | null |
aposteriori_dist_iterate_fixedPoint_le (x n) :
dist (f^[n] x) (fixedPoint f hf) ≤ dist (f^[n] x) (f^[n+1] x) / (1 - K) := by
rw [iterate_succ']
apply hf.dist_fixedPoint_le | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | aposteriori_dist_iterate_fixedPoint_le | A posteriori estimates on the convergence of iterates to the fixed point. |
apriori_dist_iterate_fixedPoint_le (x n) :
dist (f^[n] x) (fixedPoint f hf) ≤ dist x (f x) * (K : ℝ) ^ n / (1 - K) :=
calc
_ ≤ dist (f^[n] x) (f^[n+1] x) / (1 - K) := hf.aposteriori_dist_iterate_fixedPoint_le x n
_ ≤ _ := by
gcongr; exacts [hf.one_sub_K_pos.le, hf.toLipschitzWith.dist_iterate_succ_le_geometric x n] | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | apriori_dist_iterate_fixedPoint_le | null |
tendsto_iterate_fixedPoint (x) :
Tendsto (fun n ↦ f^[n] x) atTop (𝓝 <| fixedPoint f hf) := by
convert tendsto_iterate_efixedPoint hf (edist_ne_top x _)
refine (fixedPoint_unique _ ?_).symm
apply efixedPoint_isFixedPt | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | tendsto_iterate_fixedPoint | null |
fixedPoint_lipschitz_in_map {g : α → α} (hg : ContractingWith K g) {C}
(hfg : ∀ z, dist (f z) (g z) ≤ C) : dist (fixedPoint f hf) (fixedPoint g hg) ≤ C / (1 - K) :=
hf.dist_fixedPoint_fixedPoint_of_dist_le' g hf.fixedPoint_isFixedPt hg.fixedPoint_isFixedPt hfg | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | fixedPoint_lipschitz_in_map | null |
isFixedPt_fixedPoint_iterate {n : ℕ} (hf : ContractingWith K f^[n]) :
IsFixedPt f (hf.fixedPoint f^[n]) := by
set x := hf.fixedPoint f^[n]
have hx : f^[n] x = x := hf.fixedPoint_isFixedPt
have := hf.toLipschitzWith.dist_le_mul x (f x)
rw [← iterate_succ_apply, iterate_succ_apply', hx] at this
contrapose! this
simpa using mul_lt_mul_of_pos_right (NNReal.coe_lt_one.2 hf.left) <| dist_pos.2 (Ne.symm this) | theorem | Topology | [
"Mathlib.Analysis.SpecificLimits.Basic",
"Mathlib.Data.Setoid.Basic",
"Mathlib.Dynamics.FixedPoints.Topology",
"Mathlib.Topology.MetricSpace.Lipschitz"
] | Mathlib/Topology/MetricSpace/Contracting.lean | isFixedPt_fixedPoint_iterate | If a map `f` has a contracting iterate `f^[n]`, then the fixed point of `f^[n]` is also a fixed
point of `f`. |
MetricSpace (α : Type u) : Type u extends PseudoMetricSpace α where
eq_of_dist_eq_zero : ∀ {x y : α}, dist x y = 0 → x = y | class | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | MetricSpace | A metric space is a type endowed with a `ℝ`-valued distance `dist` satisfying
`dist x y = 0 ↔ x = y`, commutativity `dist x y = dist y x`, and the triangle inequality
`dist x z ≤ dist x y + dist y z`.
See pseudometric spaces (`PseudoMetricSpace`) for the similar class with the `dist x y = 0 ↔ x = y`
assumption weakened to `dist x x = 0`.
Any 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
`[MetricSpace α] [MetricSpace β] : TopologicalSpace (α × β)`:
The product metric and product topology agree, but not definitionally so.
See Note [forgetful inheritance]. |
@[ext]
MetricSpace.ext {α : Type*} {m m' : MetricSpace α} (h : m.toDist = m'.toDist) :
m = m' := by
cases m; cases m'; congr; ext1; assumption | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | MetricSpace.ext | Two metric space structures with the same distance coincide. |
MetricSpace.ofDistTopology {α : Type u} [TopologicalSpace α] (dist : α → α → ℝ)
(dist_self : ∀ x : α, dist x x = 0) (dist_comm : ∀ x y : α, dist x y = dist y x)
(dist_triangle : ∀ x y z : α, dist x z ≤ dist x y + dist y z)
(H : ∀ s : Set α, IsOpen s ↔ ∀ x ∈ s, ∃ ε > 0, ∀ y, dist x y < ε → y ∈ s)
(eq_of_dist_eq_zero : ∀ x y : α, dist x y = 0 → x = y) : MetricSpace α :=
{ PseudoMetricSpace.ofDistTopology dist dist_self dist_comm dist_triangle H with
eq_of_dist_eq_zero := eq_of_dist_eq_zero _ _ }
variable {γ : Type w} [MetricSpace γ] | def | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | MetricSpace.ofDistTopology | Construct a metric space structure whose underlying topological space structure
(definitionally) agrees which a pre-existing topology which is compatible with a given distance
function. |
eq_of_dist_eq_zero {x y : γ} : dist x y = 0 → x = y :=
MetricSpace.eq_of_dist_eq_zero
@[simp] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | eq_of_dist_eq_zero | null |
dist_eq_zero {x y : γ} : dist x y = 0 ↔ x = y :=
Iff.intro eq_of_dist_eq_zero fun this => this ▸ dist_self _
@[simp] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | dist_eq_zero | null |
zero_eq_dist {x y : γ} : 0 = dist x y ↔ x = y := by rw [eq_comm, dist_eq_zero] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | zero_eq_dist | null |
dist_ne_zero {x y : γ} : dist x y ≠ 0 ↔ x ≠ y := by
simpa only [not_iff_not] using dist_eq_zero
@[simp] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | dist_ne_zero | null |
dist_le_zero {x y : γ} : dist x y ≤ 0 ↔ x = y := by
simpa [le_antisymm_iff, dist_nonneg] using @dist_eq_zero _ _ x y
@[simp] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | dist_le_zero | null |
dist_pos {x y : γ} : 0 < dist x y ↔ x ≠ y := by
simpa only [not_le] using not_congr dist_le_zero | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | dist_pos | null |
eq_of_forall_dist_le {x y : γ} (h : ∀ ε > 0, dist x y ≤ ε) : x = y :=
eq_of_dist_eq_zero (eq_of_le_of_forall_lt_imp_le_of_dense dist_nonneg h) | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | eq_of_forall_dist_le | null |
eq_of_nndist_eq_zero {x y : γ} : nndist x y = 0 → x = y := by
simp only [NNReal.eq_iff, ← dist_nndist, imp_self, NNReal.coe_zero, dist_eq_zero] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | eq_of_nndist_eq_zero | Deduce the equality of points from the vanishing of the nonnegative distance |
@[simp]
nndist_eq_zero {x y : γ} : nndist x y = 0 ↔ x = y := by
simp only [NNReal.eq_iff, ← dist_nndist, NNReal.coe_zero, dist_eq_zero]
@[simp] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | nndist_eq_zero | Characterize the equality of points as the vanishing of the nonnegative distance |
zero_eq_nndist {x y : γ} : 0 = nndist x y ↔ x = y := by
simp only [NNReal.eq_iff, ← dist_nndist, NNReal.coe_zero, zero_eq_dist] | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | zero_eq_nndist | null |
@[simp] closedBall_zero : closedBall x 0 = {x} := Set.ext fun _ => dist_le_zero
@[simp] theorem sphere_zero : sphere x 0 = {x} := Set.ext fun _ => dist_eq_zero | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | closedBall_zero | null |
subsingleton_closedBall (x : γ) {r : ℝ} (hr : r ≤ 0) : (closedBall x r).Subsingleton := by
rcases hr.lt_or_eq with (hr | rfl)
· rw [closedBall_eq_empty.2 hr]
exact subsingleton_empty
· rw [closedBall_zero]
exact subsingleton_singleton | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | subsingleton_closedBall | null |
subsingleton_sphere (x : γ) {r : ℝ} (hr : r ≤ 0) : (sphere x r).Subsingleton :=
(subsingleton_closedBall x hr).anti sphere_subset_closedBall | theorem | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | subsingleton_sphere | null |
MetricSpace.replaceUniformity {γ} [U : UniformSpace γ] (m : MetricSpace γ)
(H : 𝓤[U] = 𝓤[PseudoEMetricSpace.toUniformSpace]) : MetricSpace γ where
toPseudoMetricSpace := PseudoMetricSpace.replaceUniformity m.toPseudoMetricSpace H
eq_of_dist_eq_zero := @eq_of_dist_eq_zero _ _ | abbrev | Topology | [
"Mathlib.Topology.MetricSpace.Pseudo.Defs"
] | Mathlib/Topology/MetricSpace/Defs.lean | MetricSpace.replaceUniformity | Build a new metric space from an old one where the bundled uniform structure is provably
(but typically non-definitionaly) equal to some given uniform structure.
See Note [forgetful inheritance].
See Note [reducible non-instances]. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.