Documentation

ReflectiveSubsystems.CountableDiscovery

Countable discovery — [Discovery] Theorem 3.1 over a countable hypothesis class #

Provenance: [Discovery] §1.1, §3. ReflectiveSubsystems/DeterministicDiscovery.lean proves the unconditional realizable-deterministic discovery theorem for a finite hypothesis class (ι : Fintype). The paper's actual setting (§1.1) is a countable class with the Kolmogorov-weighted prior w(R') = 2^{−K(R')} over all programs. This file lifts the discovery theorem to a countable ι: the sums over the hypothesis index become tsum/∑', the prior is a Kraft-summable sub-distribution (Summable w, ∑' w ≤ 1), and the observation alphabet A stays genuinely finite ([Fintype A]).

What carries over and what is re-proved #

The mathematics is the finite argument with ∑' for ∑ over ι; the finite deterministic_discovery is untouched and still builds (this file is strictly additive). The genuinely index-free ingredient Lik (Learning/BayesRedundancy.lean) and the alphabet-only facts sqHellinger, hellinger_point_mass are reused as-is. The small per-hypothesis facts (lik_nonneg, lik_realizable, q_self_le_exp_countable, competitor_likelihood_decay_countable) are re-proved here verbatim: their finite-file counterparts sit under that file's [Fintype ι] section variable, which Lean's section-variable auto-inclusion bakes into their signatures (the unusedSectionVars linter is off there), so they are not directly applicable to a non-finite ι. The proofs are unchanged — only the ambient [Fintype ι] is dropped. (The interpretive companions telescope / cumulative_hellinger, eq. 4, are off the discovery critical path and are left in the finite file.)

What is PROVED (no sorry, no deep import) #

The countability ingredients (everything else is the finite argument verbatim) #

Per-hypothesis facts (re-proved without [Fintype ι]; proofs identical to the finite file) #

theorem ReflectiveSubsystems.lik_nonneg {A : Type u_1} {ι : Type u_2} {q : ι → ℕ → A → ℝ} {ω : ℕ → A} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (i : ι) (n : ℕ) :

0 ≤ Lik i n (every factor is a probability). Verbatim BayesRedundancy.Lik_nonneg, without the ambient [Fintype ι].

theorem ReflectiveSubsystems.lik_realizable {A : Type u_1} {ι : Type u_2} {q : ι → ℕ → A → ℝ} {ω : ℕ → A} {R : ι} (hreal : ∀ (s : ℕ), q R s (ω s) = 1) (n : ℕ) :

Realizable-deterministic: the true rule's likelihood is identically 1. Verbatim BayesRedundancy.Lik_realizable, without the ambient [Fintype ι].

theorem ReflectiveSubsystems.q_self_le_exp_countable {A : Type u_1} [Fintype A] [DecidableEq A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {ω : ℕ → A} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (i : ι) (t : ℕ) :
q i t (ω t) ≤ Real.exp (-2 * BayesRedundancy.sqHellinger (fun (x : A) => if x = ω t then 1 else 0) (q i t))

Per-step likelihood decay. q_i(ω_t) ≤ exp(−2·D_H²_{i,t}). Verbatim ReflectiveSubsystems.q_self_le_exp, without the ambient [Fintype ι].

theorem ReflectiveSubsystems.competitor_likelihood_decay_countable {A : Type u_1} [Fintype A] [DecidableEq A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {ω : ℕ → A} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (i : ι) (n : ℕ) :
BayesRedundancy.Lik q ω i n ≤ Real.exp (-2 * ∑ t ∈ Finset.range n, BayesRedundancy.sqHellinger (fun (x : A) => if x = ω t then 1 else 0) (q i t))

Competitor likelihood decay. Lik i n ≤ exp(−2 ∑_{t<n} D_H²_{i,t}). Verbatim ReflectiveSubsystems.competitor_likelihood_decay, without the ambient [Fintype ι].

Countable mixture mass and the discovery theorem #

theorem ReflectiveSubsystems.Lik_le_one {A : Type u_1} [Fintype A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {ω : ℕ → A} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (i : ι) (n : ℕ) :

Each prefix likelihood is ≤ 1. Every factor q_i(ω_s | ω_{<s}) is a pmf value, hence ≤ 1 (Finset.single_le_sum against ∑_x q = 1); the product over s < n is therefore ≤ 1 (Finset.prod_le_one₀). This is the only new fact the countable comparison test needs.

noncomputable def ReflectiveSubsystems.Pbarₚ' {A : Type u_1} {ι : Type u_2} (q : ι → ℕ → A → ℝ) (w : ι → ℝ) (ω : ℕ → A) (t : ℕ) :

Countable mixture prefix mass P̄(t) = ∑'_i w_i L_i(t) over a countable hypothesis class. The countable analogue of BayesRedundancy.Pbarₚ (a tsum over ι in place of the Finset sum).

Equations
Instances For
    theorem ReflectiveSubsystems.summable_w_lik {A : Type u_1} [Fintype A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {w : ι → ℝ} {ω : ℕ → A} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (hw : ∀ (i : ι), 0 ≤ w i) (hsumw : Summable w) (n : ℕ) :
    Summable fun (i : ι) => w i * BayesRedundancy.Lik q ω i n

    The mixture summand is summable. 0 ≤ w_i · L_i(n) ≤ w_i (since 0 ≤ L_i ≤ 1, Lik_le_one), so summability follows from the Kraft-summable prior Summable w by comparison (Summable.of_nonneg_of_le).

    theorem ReflectiveSubsystems.countable_posterior_lower_bound {A : Type u_1} [Fintype A] [DecidableEq A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {w : ι → ℝ} {ω : ℕ → A} {R : ι} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (hw : ∀ (i : ι), 0 ≤ w i) (k : ℕ) (hwR : w R = 2 ^ (-↑k)) (hsumw : Summable w) (hsumw1 : ∑' (i : ι), w i ≤ 1) (hreal : ∀ (s : ℕ), q R s (ω s) = 1) (n : ℕ) (S : ℝ) (hsep : ∀ (i : ι), i ≠ R → S ≤ ∑ t ∈ Finset.range n, BayesRedundancy.sqHellinger (fun (x : A) => if x = ω t then 1 else 0) (q i t)) :
    1 - w R * BayesRedundancy.Lik q ω R n / Pbarₚ' q w ω n ≤ 2 ^ ↑k * Real.exp (-2 * S)

    Posterior lower bound (countable). The countable analogue of ReflectiveSubsystems.posterior_lower_bound: under realizability and a cumulative separation S of every competitor, the posterior shortfall is exponentially small, 1 − wpost ≤ 2^{K(R)}·exp(−2 S). The proof is the finite one with ∑' for ∑: the true term is split off by Summable.tsum_eq_add_tsum_ite (giving P̄(n) = w_R + N with N ≥ 0, so P̄(n) ≥ w_R), and the competitor tail N is bounded termwise by w_i·exp(−2 S) and summed (Summable.tsum_le_tsum, tsum_mul_right, ∑' w ≤ 1).

    theorem ReflectiveSubsystems.countable_discovery {A : Type u_1} [Fintype A] [DecidableEq A] {ι : Type u_2} {q : ι → ℕ → A → ℝ} {w : ι → ℝ} {ω : ℕ → A} {R : ι} (hnn : ∀ (i : ι) (s : ℕ) (x : A), 0 ≤ q i s x) (hpmf : ∀ (i : ι) (s : ℕ), ∑ x : A, q i s x = 1) (hw : ∀ (i : ι), 0 ≤ w i) (k : ℕ) (hwR : w R = 2 ^ (-↑k)) (hsumw : Summable w) (hsumw1 : ∑' (i : ι), w i ≤ 1) (hreal : ∀ (s : ℕ), q R s (ω s) = 1) (δ ε₀ : ℝ) (hδ : 0 < δ) (hε : 0 < ε₀) (n : ℕ) (hsep : ∀ (i : ι), i ≠ R → ∀ t ∈ Finset.range n, ε₀ ≤ BayesRedundancy.sqHellinger (fun (x : A) => if x = ω t then 1 else 0) (q i t)) (hT : (↑k * Real.log 2 + Real.log (2 / δ)) / (2 * ε₀) ≤ ↑n) :
    1 - δ / 2 ≤ w R * BayesRedundancy.Lik q ω R n / Pbarₚ' q w ω n

    Theorem 3.1 (unconditional, realizable-deterministic) — countable hypothesis class. The countable analogue of ReflectiveSubsystems.deterministic_discovery, over the Kolmogorov-weighted prior w(R') = 2^{−K(R')} of §1.1 (Summable w, ∑' w ≤ 1). For per-step separation ε₀ and n ≥ T_discover = (K(R)·ln 2 + ln(2/δ)) / (2 ε₀), the prequential posterior concentrates on the true rule: wpost = w R · Lik R n / P̄(n) ≥ 1 − δ/2. Hypotheses are only the model + realizability + separation — no Grünwald–Mehta, no Markov, no posterior-of-close.