Mercer's theorem — eigenexpansion of a continuous PSD kernel (Theorem 12.20), full-support measure
ProvedHighDimStat.Rkhs.thm12_20_mercer_v2Theorem 12.20 (Mercer's theorem). A deeper structural result the RKHS correspondence builds toward: under compactness and continuity, a PSD kernel admits an explicit eigenfunction expansion, generalizing the spectral decomposition of a PSD matrix.
Suppose is a compact metric space, a finite Borel measure on with full support (every nonempty open set has positive measure), the kernel is continuous and positive semidefinite, and satisfies the Hilbert–Schmidt condition (12.11b), , so that the integral operator (Eq. 12.11a) is a bounded linear operator on . Then there is a countable index set , an orthonormal basis of , and non-negative eigenvalues with
such that every eigenfunction with has a continuous representative ( -a.e.), and with these representatives the kernel has the expansion
where the series converges absolutely (for every fixed ) and, along every enumeration of by , uniformly on .
Formalization Note. The retired version (thm12_20_mercer) allowed any finite measure,
including , for which , the Hilbert basis is empty and the
expansion sums to (accepted disproof); and it asserted the pointwise expansion "for
all " for the canonical a.e.-defined representatives, whose values on
-null sets are arbitrary, so the statement could not hold even for a probability
measure without full support (with on the representative's value
at is unconstrained; and off the support the kernel is genuinely not determined by the
operator). The new statement (i) requires P.IsOpenPosMeasure (full support), the standard
hypothesis under which Mercer's expansion holds at every point of — tacit in the source,
which treats as the sampling distribution on — which excludes the zero measure
on a nonempty ; (ii) states the expansion for continuous representatives of the
eigenfunctions with positive eigenvalue (as the source does: "the eigenfunctions ... taken
continuous"); the terms with vanish identically, so is unconstrained there.
As before, is a linear map on Lp ℝ 2 P pinned down (uniquely as an element)
by the integral formula hTK; the index type is existential and countable; absolute
convergence is HasSum of the real series; uniform convergence is quantified over every
bijection ℕ ≃ ι (vacuous when is finite). The finite-measure (rather than
probability-measure) generality of the retired version is kept.
import Mathlib import Definitions.Def_HighDimStat_Rkhs_Core
namespace HighDimStat.Rkhs
open scoped RealInnerProductSpace
open MeasureTheory
/-- Theorem 12.20 (Mercer's theorem, p. 395): suppose `X` is a compact metric space, `P` is a
finite measure on `X` with **full support** (every nonempty open set has positive measure, so
`L²(X;P)` separates points of `X` and `P ≠ 0` when `X ≠ ∅`), the kernel `K` is continuous,
positive semidefinite, and satisfies the Hilbert–Schmidt condition (12.11b) (the associated
integral operator `TK` of (12.11a) is represented by a linear map on `L²(X;P)` pinned down —
uniquely, as an element of `L²` — by the integral formula `hTK`). Then there is a countable
orthonormal basis `(φⱼ)_{j∈ι}` of `L²(X;P)` and non-negative eigenvalues `(μⱼ)` with
`TK(φⱼ) = μⱼφⱼ` for every `j` (Eq. 12.13a); the eigenfunctions with `μⱼ > 0` admit continuous
representatives `ψⱼ` (`ψⱼ = φⱼ` `P`-a.e.), and with these representatives the kernel has the
expansion `K(x,z) = Σⱼ μⱼψⱼ(x)ψⱼ(z)` for **all** `x, z ∈ X`, converging absolutely (pointwise
`HasSum`) and, along every enumeration of `ι` by `ℕ`, uniformly on `X × X` (Eq. 12.13b).
Corrections relative to the retired version: (i) the zero measure was admitted
(`IsFiniteMeasure` alone), for which `L²(P) = {0}`, the basis is empty and the expansion sums
to `0 ≠ K`; the full-support hypothesis `IsOpenPosMeasure P` (the standard hypothesis under
which Mercer's expansion holds at every point of `X`, tacit in the source) excludes it;
(ii) the pointwise expansion was stated for the canonical a.e.-defined `Lp` representatives,
whose values on `P`-null sets are arbitrary, so "for all `x z`" could not hold; it is now
stated for continuous representatives of the eigenfunctions with positive eigenvalue
(the `μⱼ = 0` terms vanish identically), as in the source's statement that the expansion holds
pointwise with continuous eigenfunctions. -/
theorem thm12_20_mercer_v2 {X : Type*} [MetricSpace X] [CompactSpace X] [MeasurableSpace X]
[BorelSpace X] (P : Measure X) [IsFiniteMeasure P] [P.IsOpenPosMeasure]
(K : X → X → ℝ) (hKcont : Continuous (Function.uncurry K)) (hKpsd : IsPSDKernel K)
(hHS : Integrable (fun p : X × X => (K p.1 p.2) ^ 2) (P.prod P))
(TK : Lp ℝ 2 P →ₗ[ℝ] Lp ℝ 2 P)
(hTK : ∀ f : Lp ℝ 2 P, (TK f : X → ℝ) =ᵐ[P] fun x => ∫ z, K x z * (f z) ∂P) :
∃ (ι : Type) (_ : Countable ι) (φ : HilbertBasis ι ℝ (Lp ℝ 2 P)) (μ : ι → ℝ)
(ψ : ι → X → ℝ),
(∀ j, 0 ≤ μ j) ∧
(∀ j, TK (φ j) = μ j • (φ j : Lp ℝ 2 P)) ∧
(∀ j, (φ j : X → ℝ) =ᵐ[P] ψ j) ∧
(∀ j, 0 < μ j → Continuous (ψ j)) ∧
(∀ x z, HasSum (fun j => μ j * ψ j x * ψ j z) (K x z)) ∧
(∀ e : ℕ ≃ ι, TendstoUniformly (fun n : ℕ => fun p : X × X =>
∑ k ∈ Finset.range n, μ (e k) * ψ (e k) p.1 * ψ (e k) p.2)
(Function.uncurry K) Filter.atTop) := by sorry
end HighDimStat.Rkhs