Mathlib.Topology
Topology helpers for subsequential limits, mapped cluster points, and compact cluster sets.
CompactExclusion 4 core · 9 supporting This module provides the non-effective compactness argument that turns "the only zero of a residual is the reference point" into a positive residual margin away from that point. ★ uniformCompactCorrespondence_dichotomy
Compact exclusion away from an isolated zero
This module provides the non-effective compactness argument that turns "the only zero of a residual is the reference point" into a positive residual margin away from that point.
* For a single problem: a continuous residual that is nonnegative on a compact candidate set and
vanishes there only at a reference point has a strictly positive, attained minimum on the
candidates outside any open neighborhood of that point, provided such candidates exist
(PositiveExclusionRadius, exists_positiveExclusionRadius).
* Uniformly over a compact correspondence of parameter--candidate pairs with a continuous
reference section and a continuous positive radius function: either no feasible pair is far
from its reference, or a single strictly positive residual tolerance forces every feasible pair
with smaller residual into its own reference ball (farFeasibleSet,
UniformPositiveExclusionRadius, uniformCompactCorrespondence_dichotomy,
exists_uniformExclusionTolerance_lt, exists_uniformExclusionTolerance_le).
The statements quantify over arbitrary topological parameter spaces and (pseudo)metric candidate
spaces; matrix specializations live in
Causalean.Discovery.LinearDisentanglement.Quantitative.CompactExclusion.
A positive exclusion radius is a positive lower bound for a residual on the part of K outside U, together with a candidate where that lower bound is attained.
Definition (Lean source)
For a parameter space, a candidate pseudometric space, a set of feasible parameter--candidate pairs, a reference candidate assigned to each parameter, and a real-valued radius assigned to each parameter, the far feasible set consists exactly of the feasible pairs whose candidate is at least that parameter's assigned radius from its reference candidate.
Definition (Lean source)
A uniform positive exclusion radius records a far feasible pair where the residual reaches a strictly positive value that lower-bounds its value at every far feasible pair.
Definition (Lean source)
Given a feasible correspondence, a reference section, a residual, and a radius function, if the correspondence is compact, the reference section is continuous, the residual is continuous, the radius function is continuous, every radius is strictly positive, the residual is nonnegative on feasible pairs, and only the reference candidate has zero residual among feasible pairs, then either no far feasible pair exists or one attains a strictly positive uniform residual minimum.
Formal statement
Proof (Lean source)
9 supporting declarations (lemmas, instances)
-
exists_positiveExclusionRadiustheorem — For a compact candidate set, an open local neighborhood, a continuous residual, and a reference point, if the candidate set is compact, the neighborhood is open, the reference belongs to the candidate set, the reference belongs to the neighborhood, the far set is nonempty, the residual is continuous, the residual is nonnegative on candidates, and its only zero among candidates is the reference, then the far set has a strictly positive attained residual minimum.hypothesesX :Type*K U :Set Xr :X → ℝx₀ :XhK :hU :IsOpen UhxK :x₀ ∈ KhxU :x₀ ∈ Uhfar :(K \ U).Nonemptyhr_cont :hr_nonneg :∀ x ∈ K, 0 ≤ r xhr_zero :∀ x ∈ Kifr x = 0thenx = x₀conclusionNonempty (PositiveExclusionRadius K U r)Proof (Lean source)
-- Proof route: `K \ U = K ∩ Uᶜ` is compact. Apply `IsCompact.exists_isMinOn` to `r` -- on this nonempty far set. Nonnegativity makes the minimum nonnegative; equality to -- zero forces its minimizer to be `x₀`, contradicting `x₀ ∈ U`. theorem exists_positiveExclusionRadius {X : Type*} [TopologicalSpace X] (K U : Set X) (r : X → ℝ) (x₀ : X) (hK : IsCompact K) (hU : IsOpen U) (hxK : x₀ ∈ K) (hxU : x₀ ∈ U) (hfar : (K \ U).Nonempty) (hr_cont : Continuous r) (hr_nonneg : ∀ x ∈ K, 0 ≤ r x) (hr_zero : ∀ x ∈ K, r x = 0 → x = x₀) : Nonempty (PositiveExclusionRadius K U r) := by have hcompact : IsCompact (K \ U) := by rw [Set.sdiff_eq] exact hK.inter_right hU.isClosed_compl obtain ⟨x, hx, hmin⟩ := hcompact.exists_isMinOn hfar hr_cont.continuousOn have hxK' : x ∈ K := hx.1 have hxU' : x ∉ U := hx.2 have hnonneg : 0 ≤ r x := hr_nonneg x hxK' have hpos : 0 < r x := lt_of_le_of_ne hnonneg fun hzero => by have heq : x = x₀ := hr_zero x hxK' hzero.symm exact hxU' (heq ▸ hxU) exact ⟨{ radius := r x radius_pos := hpos lower_bound := by intro y hyK hyU exact hmin ⟨hyK, hyU⟩ attained := ⟨x, hxK', hxU', rfl⟩ }⟩ -
isClosed_farFeasibleSettheorem — Given a feasible correspondence, a reference section, and a radius function, if the correspondence is compact, the reference section is continuous, and the radius function is continuous, then the parameter-dependent far feasible set is closed.hypothesesconclusionIsClosed (farFeasibleSet K x₀ ρ)Proof (Lean source)
theorem isClosed_farFeasibleSet {P X : Type*} [TopologicalSpace P] [T2Space P] [MetricSpace X] (K : Set (P × X)) (x₀ : P → X) (ρ : P → ℝ) (hK : IsCompact K) (hx₀ : Continuous x₀) (hρ : Continuous ρ) : IsClosed (farFeasibleSet K x₀ ρ) := by exact hK.isClosed.inter <| isClosed_le (hρ.comp continuous_fst) <| continuous_snd.dist (hx₀.comp continuous_fst) -
isCompact_farFeasibleSet_of_isClosedtheorem — Given a feasible correspondence, a reference section, and a radius function, if the correspondence is compact and its far feasible set is closed, then the far feasible set is compact.hypothesesconclusionIsCompact (farFeasibleSet K x₀ ρ)Proof (Lean source)
theorem isCompact_farFeasibleSet_of_isClosed {P X : Type*} [TopologicalSpace P] [PseudoMetricSpace X] (K : Set (P × X)) (x₀ : P → X) (ρ : P → ℝ) (hK : IsCompact K) (hfar : IsClosed (farFeasibleSet K x₀ ρ)) : IsCompact (farFeasibleSet K x₀ ρ) := by exact hK.of_isClosed_subset hfar fun _ hz => hz.1 -
exists_uniformPositiveExclusionRadius_of_isClosedtheorem — Given a feasible correspondence, a reference section, a residual, and a positive-radius function, if the correspondence is compact, the far feasible set is closed, the far feasible set is nonempty, the residual is continuous, the residual is nonnegative on feasible pairs, only the reference candidate has zero residual among feasible pairs, and every radius is strictly positive, then some far pair attains a strictly positive residual minimum on the far feasible set.hypothesesP X :K :Set (P × X)x₀ :P → Xr :P × X → ℝρ :P → ℝhK :hfar_closed :IsClosed (farFeasibleSet K x₀ ρ)hfar_nonempty :(farFeasibleSet K x₀ ρ).Nonemptyhr_cont :hr_nonneg :∀ z ∈ K, 0 ≤ r zhr_zero :∀ p xif(p, x) ∈ Kandr (p, x) = 0thenx = x₀ phρ_pos :∀ p, 0 < ρ pconclusionNonempty (UniformPositiveExclusionRadius K x₀ ρ r)Proof (Lean source)
theorem exists_uniformPositiveExclusionRadius_of_isClosed {P X : Type*} [TopologicalSpace P] [PseudoMetricSpace X] (K : Set (P × X)) (x₀ : P → X) (r : P × X → ℝ) (ρ : P → ℝ) (hK : IsCompact K) (hfar_closed : IsClosed (farFeasibleSet K x₀ ρ)) (hfar_nonempty : (farFeasibleSet K x₀ ρ).Nonempty) (hr_cont : Continuous r) (hr_nonneg : ∀ z ∈ K, 0 ≤ r z) (hr_zero : ∀ p x, (p, x) ∈ K → r (p, x) = 0 → x = x₀ p) (hρ_pos : ∀ p, 0 < ρ p) : Nonempty (UniformPositiveExclusionRadius K x₀ ρ r) := by have hcompact : IsCompact (farFeasibleSet K x₀ ρ) := isCompact_farFeasibleSet_of_isClosed K x₀ ρ hK hfar_closed obtain ⟨⟨p, x⟩, hx, hmin⟩ := hcompact.exists_isMinOn hfar_nonempty hr_cont.continuousOn have hnonneg : 0 ≤ r (p, x) := hr_nonneg (p, x) hx.1 have hpos : 0 < r (p, x) := lt_of_le_of_ne hnonneg fun hzero => by have heq : x = x₀ p := hr_zero p x hx.1 hzero.symm have hnonpos : ρ p ≤ 0 := by simpa [heq] using hx.2 exact (not_lt_of_ge hnonpos) (hρ_pos p) exact ⟨{ parameter := p candidate := x mem_far := hx radius := r (p, x) radius_pos := hpos attained := rfl lower_bound := fun z hz => hmin hz }⟩ -
uniformCompactCorrespondence_dichotomy_explicittheorem — Given a feasible correspondence, a reference section, a residual, and a radius function, if the correspondence is compact, the reference section is continuous, the residual is continuous, the radius function is continuous, every radius is strictly positive, the residual is nonnegative on feasible pairs, and only the reference candidate has zero residual among feasible pairs, then either the far feasible set is empty or a far pair and its strictly positive attained residual minimum can be exhibited explicitly.hypothesesP X :K :Set (P × X)x₀ :P → Xr :P × X → ℝρ :P → ℝhK :hx₀ :Continuous x₀hr_cont :hρ_cont :hρ_pos :∀ p, 0 < ρ phr_nonneg :∀ z ∈ K, 0 ≤ r zhr_zero :∀ p xif(p, x) ∈ Kandr (p, x) = 0thenx = x₀ pconclusionfarFeasibleSet K x₀ ρ= ∅ ∨ ∃ pStar xStar ε₀, (pStar, xStar) ∈ farFeasibleSet K x₀ ρ ∧ 0 < ε₀ ∧ r (pStar, xStar) = ε₀ ∧ ∀ z ∈ farFeasibleSet K x₀ ρ, ε₀ ≤ r zProof (Lean source)
theorem uniformCompactCorrespondence_dichotomy_explicit {P X : Type*} [TopologicalSpace P] [T2Space P] [MetricSpace X] (K : Set (P × X)) (x₀ : P → X) (r : P × X → ℝ) (ρ : P → ℝ) (hK : IsCompact K) (hx₀ : Continuous x₀) (hr_cont : Continuous r) (hρ_cont : Continuous ρ) (hρ_pos : ∀ p, 0 < ρ p) (hr_nonneg : ∀ z ∈ K, 0 ≤ r z) (hr_zero : ∀ p x, (p, x) ∈ K → r (p, x) = 0 → x = x₀ p) : farFeasibleSet K x₀ ρ = ∅ ∨ ∃ pStar xStar ε₀, (pStar, xStar) ∈ farFeasibleSet K x₀ ρ ∧ 0 < ε₀ ∧ r (pStar, xStar) = ε₀ ∧ ∀ z ∈ farFeasibleSet K x₀ ρ, ε₀ ≤ r z := by rcases uniformCompactCorrespondence_dichotomy K x₀ r ρ hK hx₀ hr_cont hρ_cont hρ_pos hr_nonneg hr_zero with hfar | hnonempty · exact inl hfar · obtain ⟨h⟩ := hnonempty exact inr ⟨h.parameter, h.candidate, h.radius, h.mem_far, h.radius_pos, h.attained, h.lower_bound⟩ -
dist_lt_of_residual_lttheorem — Given a uniform positive exclusion radius, a feasible pair, and a residual strictly below that radius, then the candidate lies strictly inside its parameter-dependent reference neighborhood.hypothesesP X :h :UniformPositiveExclusionRadius K x₀ ρ rp :Px :XhK :(p, x) ∈ Khr :r (p, x) < h.radiusconclusiondist x (x₀ p) < ρ pProof (Lean source)
theorem UniformPositiveExclusionRadius.dist_lt_of_residual_lt {P X : Type*} [TopologicalSpace P] [PseudoMetricSpace X] {K : Set (P × X)} {x₀ : P → X} {ρ : P → ℝ} {r : P × X → ℝ} (h : UniformPositiveExclusionRadius K x₀ ρ r) {p : P} {x : X} (hK : (p, x) ∈ K) (hr : r (p, x) < h.radius) : dist x (x₀ p) < ρ p := by by_contra hdist have hfar : (p, x) ∈ farFeasibleSet K x₀ ρ := ⟨hK, le_of_not_gt hdist⟩ exact (not_lt_of_ge (h.lower_bound (p, x) hfar)) hr -
dist_lt_of_residual_le_halftheorem — Given a uniform positive exclusion radius, a feasible pair, and a residual at most half that radius, then the candidate lies strictly inside its parameter-dependent reference neighborhood.hypothesesP X :h :UniformPositiveExclusionRadius K x₀ ρ rp :Px :XhK :(p, x) ∈ Khr :r (p, x) ≤ h.radius / 2conclusiondist x (x₀ p) < ρ pProof (Lean source)
theorem UniformPositiveExclusionRadius.dist_lt_of_residual_le_half {P X : Type*} [TopologicalSpace P] [PseudoMetricSpace X] {K : Set (P × X)} {x₀ : P → X} {ρ : P → ℝ} {r : P × X → ℝ} (h : UniformPositiveExclusionRadius K x₀ ρ r) {p : P} {x : X} (hK : (p, x) ∈ K) (hr : r (p, x) ≤ h.radius / 2) : dist x (x₀ p) < ρ p := by apply h.dist_lt_of_residual_lt hK exact lt_of_le_of_lt hr (div_lt_self h.radius_pos (by norm_num)) -
exists_uniformExclusionTolerance_lttheorem — Given a feasible correspondence, a reference section, a residual, and a radius function, if the correspondence is compact, the reference section is continuous, the residual is continuous, the radius function is continuous, every radius is strictly positive, the residual is nonnegative on feasible pairs, and only the reference candidate has zero residual among feasible pairs, then one strictly positive tolerance sends every feasible pair with smaller residual inside its own reference neighborhood.hypothesesP X :K :Set (P × X)x₀ :P → Xr :P × X → ℝρ :P → ℝhK :hx₀ :Continuous x₀hr_cont :hρ_cont :hρ_pos :∀ p, 0 < ρ phr_nonneg :∀ z ∈ K, 0 ≤ r zhr_zero :∀ p xif(p, x) ∈ Kandr (p, x) = 0thenx = x₀ pProof (Lean source)
theorem exists_uniformExclusionTolerance_lt {P X : Type*} [TopologicalSpace P] [T2Space P] [MetricSpace X] (K : Set (P × X)) (x₀ : P → X) (r : P × X → ℝ) (ρ : P → ℝ) (hK : IsCompact K) (hx₀ : Continuous x₀) (hr_cont : Continuous r) (hρ_cont : Continuous ρ) (hρ_pos : ∀ p, 0 < ρ p) (hr_nonneg : ∀ z ∈ K, 0 ≤ r z) (hr_zero : ∀ p x, (p, x) ∈ K → r (p, x) = 0 → x = x₀ p) : ∃ ε₀ : ℝ, 0 < ε₀ ∧ ∀ p x, (p, x) ∈ K → r (p, x) < ε₀ → dist x (x₀ p) < ρ p := by rcases uniformCompactCorrespondence_dichotomy K x₀ r ρ hK hx₀ hr_cont hρ_cont hρ_pos hr_nonneg hr_zero with hfar | hnonempty · refine ⟨1, by norm_num, ?_⟩ intro p x hpx _ by_contra hdist have hx : (p, x) ∈ farFeasibleSet K x₀ ρ := ⟨hpx, le_of_not_gt hdist⟩ rw [hfar] at hx exact hx.elim · obtain ⟨h⟩ := hnonempty exact ⟨h.radius, h.radius_pos, fun p x hpx hr => h.dist_lt_of_residual_lt hpx hr⟩ -
exists_uniformExclusionTolerance_letheorem — Given a feasible correspondence, a reference section, a residual, and a radius function, if the correspondence is compact, the reference section is continuous, the residual is continuous, the radius function is continuous, every radius is strictly positive, the residual is nonnegative on feasible pairs, and only the reference candidate has zero residual among feasible pairs, then one strictly positive tolerance sends every feasible pair with residual at most that tolerance inside its own reference neighborhood.hypothesesP X :K :Set (P × X)x₀ :P → Xr :P × X → ℝρ :P → ℝhK :hx₀ :Continuous x₀hr_cont :hρ_cont :hρ_pos :∀ p, 0 < ρ phr_nonneg :∀ z ∈ K, 0 ≤ r zhr_zero :∀ p xif(p, x) ∈ Kandr (p, x) = 0thenx = x₀ pProof (Lean source)
theorem exists_uniformExclusionTolerance_le {P X : Type*} [TopologicalSpace P] [T2Space P] [MetricSpace X] (K : Set (P × X)) (x₀ : P → X) (r : P × X → ℝ) (ρ : P → ℝ) (hK : IsCompact K) (hx₀ : Continuous x₀) (hr_cont : Continuous r) (hρ_cont : Continuous ρ) (hρ_pos : ∀ p, 0 < ρ p) (hr_nonneg : ∀ z ∈ K, 0 ≤ r z) (hr_zero : ∀ p x, (p, x) ∈ K → r (p, x) = 0 → x = x₀ p) : ∃ ε₀ : ℝ, 0 < ε₀ ∧ ∀ p x, (p, x) ∈ K → r (p, x) ≤ ε₀ → dist x (x₀ p) < ρ p := by rcases uniformCompactCorrespondence_dichotomy K x₀ r ρ hK hx₀ hr_cont hρ_cont hρ_pos hr_nonneg hr_zero with hfar | hnonempty · refine ⟨1, by norm_num, ?_⟩ intro p x hpx _ by_contra hdist have hx : (p, x) ∈ farFeasibleSet K x₀ ρ := ⟨hpx, le_of_not_gt hdist⟩ rw [hfar] at hx exact hx.elim · obtain ⟨h⟩ := hnonempty refine ⟨h.radius / 2, half_pos h.radius_pos, ?_⟩ intro p x hpx hr exact h.dist_lt_of_residual_le_half hpx hr
SubsequentialLimits 1 core · 1 supporting This module relates limits along strictly increasing subsequences to mapped cluster points and proves compactness of the subsequential-limit set when a sequence is eventually contained in a compact set. ★ subsequentialLimitSet_nonempty_compact_of_eventually_mem_compact
Subsequential limits
This module relates limits along strictly increasing subsequences to mapped cluster points and proves compactness of the subsequential-limit set when a sequence is eventually contained in a compact set.
If a sequence is eventually contained in a compact set, then its set of limits along strictly increasing subsequences is nonempty and compact.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
isSubsequentialLimit_iff_mapClusterPttheorem — For a sequence in a first-countable space, a point is the limit along a strictly increasing subsequence exactly when it is a mapped cluster point at infinity.hypothesesX :sharedType u_1x :ℕ → Xa :XconclusionProof (Lean source)
theorem isSubsequentialLimit_iff_mapClusterPt (x : ℕ → X) (a : X) : (∃ φ : ℕ → ℕ, StrictMono φ ∧ Tendsto (x ∘ φ) atTop (nhds a)) ↔ MapClusterPt a atTop x := by constructor · rintro ⟨φ, hφ, hlim⟩ exact hlim.mapClusterPt.of_comp hφ.tendsto_atTop · exact fun h ↦ h.tendsto_subseq