Lemma 5 — pointwise convergence of Ĉ_N(·|x) is uniform on compact subsets of 𝒵
ProvedPrescAnalytics.KNN.lemma_5_uniform_on_compactsFix a covariate value and one sample path of data: weights that are nonnegative and sum to for all large , and observations . Suppose is integrable under for every (Assumption 3 at ), is equicontinuous in (Assumption 4), , and for every ,
Then for every compact ,
This upgrade from pointwise to locally uniform convergence is what lets Lemma 6 pass from convergence of the objectives to convergence of their minima and minimizers.
Formalization Note The paper's "Assumptions 3 and 4 hold" at the fixed is read as: is -integrable for every (Assumption 3 gives this only for a.e. , so it is a hypothesis at the fixed ), and Assumption 4 on , together with and for every . The weights being eventually nonnegative and summing to is the reading of the paper's notation. is μ.condKernel x. Uniform convergence is Mathlib's TendstoUniformlyOn.
import Mathlib import Definitions.Def_PrescAnalytics_KNN_Basic open MeasureTheory ProbabilityTheory Filter Topology
namespace PrescAnalytics.KNN
/-- **Lemma 5** (arXiv:1402.5481v4, p. 45). Fix `x` and one sample path: weights `w N i` that are
eventually nonnegative and sum to 1, and observations `ys i ∈ 𝒴`. Suppose `c(z; ·)` is integrable
under `μ_{Y|x}` for every `z ∈ 𝒵` (Assumption 3 at `x`), `c` is equicontinuous in `z` on `𝒴`
(Assumption 4) with `μ_{Y|x}(𝒴) = 1`, and `Ĉ_N(z|x) → C(z|x)` for every `z ∈ 𝒵`. Then the
convergence is uniform in `z` over every compact subset of `𝒵`. -/
theorem lemma_5_uniform_on_compacts
{dx dy dz : ℕ}
(μ : Measure (EuclideanSpace ℝ (Fin dx) × EuclideanSpace ℝ (Fin dy))) [IsProbabilityMeasure μ]
(c : EuclideanSpace ℝ (Fin dz) → EuclideanSpace ℝ (Fin dy) → ℝ)
(Z : Set (EuclideanSpace ℝ (Fin dz))) (Ys : Set (EuclideanSpace ℝ (Fin dy)))
(x : EuclideanSpace ℝ (Fin dx))
(w : ℕ → ℕ → ℝ) (ys : ℕ → EuclideanSpace ℝ (Fin dy))
(hys : ∀ i, ys i ∈ Ys) (hYx : ∀ᵐ y ∂(μ.condKernel x), y ∈ Ys)
(hw : ∀ᶠ N in atTop, (∀ i < N, 0 ≤ w N i) ∧ ∑ i ∈ Finset.range N, w N i = 1)
(h3x : ∀ z ∈ Z, Integrable (c z) (μ.condKernel x))
(h4 : Assumption4 c Z Ys)
(hconv : ∀ z ∈ Z, Tendsto (fun N => weightedCost c w ys N z) atTop (𝓝 (condCost μ c z x)))
(K : Set (EuclideanSpace ℝ (Fin dz))) (hK : IsCompact K) (hKZ : K ⊆ Z) :
TendstoUniformlyOn (fun N z => weightedCost c w ys N z) (fun z => condCost μ c z x) atTop K := by sorry
end PrescAnalytics.KNN
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.