The prequential-MDL-with-SQ-pruning algorithm as a Lean object ([SQ] §4 / App A, FV-K) #
Provenance: [SQ], §4 Theorem 4.1 + proof sketch (a)–(c) and
Appendix A "The adaptation". The algorithm carries a posterior over deterministic candidate rules;
at each step it (Bayes-)filters candidates inconsistent with the observed symbol, and on scheduled
queries it prunes every candidate whose predicted statistic deviates from the oracle answer by more
than 2τ. FV-K makes THIS algorithm a genuine Lean object and proves the identification theorems
that tie the standing FV artifacts to it — closing the ledger's outstanding identifications:
- which
pred/gthe algorithm emits (FV-I) —alive_mass_eq_Z_det; - App-A Claim 1 ("the truth survives") for the algorithm itself —
truth_survives, with the FV-A4 converseseparated_impostor_pruned_alg; - which
ε_tFV-H'saccumulated_perturbation_leconsumes —algorithm_damage_le.
This file is Finset-level: the object is a family of Finset ι operations (Bayes consistency
filter + SQ pruning), with NO filtration/measurability content. The measure-theoretic inputs enter
only as the (already-proved) FV-E/FV-I/FV-H artifacts it cites.
Constants (matched to FV-A4 SQVersionSpace.lean exactly) #
- prune threshold
2τ(sqPrunekeeps|stat i φ − oracleAns φ| ≤ 2τ) — FV-A4's2τrule; - truth-survival closeness
|oracleAns φ − stat iR φ| ≤ τ(theemp − predRorder of FV-A4'shemp, which is exactlySQOracle.empirical_isSQOracle's|emp − tru| ≤ τatanswer = oracleAns,truth = stat iR); - impostor separation
3τ < |stat j φ − stat iR φ|— FV-A4'sseparated_impostor_prunedhsep.
Schedule encoding #
sched : ℕ → Finset Q, with sched t the query set active by step t; the per-step alive set is
alive … t ω = sqPrune stat oracleAns τ (sched t) (consistent pred cands t ω) — sq-prune (over the
queries scheduled by t) of the time-t Bayes-consistent set.
What this DOES establish #
consistent,sqPrune,alive,prunedAt— the algorithm as a compositionalFinsetobject.alive_mass_eq_Z_det(FV-I identification): the UNpruned Bayes-consistent mass is FV-I's mixture,∑_{consistent} w = Z cands w (detFactor pred)— this is the "identifygwith the algorithm" item.truth_survives(App A Claim 1 for the object): a realizable,τ-close truth index stays inalive … t ωfor everyt(reusing FV-A4'struth_survives_pruningat the2τrule).separated_impostor_pruned_alg(FV-A4 converse for the object): a candidate3τ-separated from the truth on a scheduled query is pruned (reusing FV-A4'sseparated_impostor_pruned).algorithm_damage_le(FV-Hε_tidentification): FV-H's accumulated predictive damage instantiated at the algorithm's OWN step families — survivorsalive … (t+1)vs the step-tpruned-away setprunedAt … t— soε_tis the algorithm's literal normalized pruned fraction.posterior_concentration_transfer: the algorithm's Dirac pmf instantiates [Discovery]'sdeterministic_discovery, giving Theorem-3.1 concentration for the UNpruned Bayes posterior.algorithm_discovery(Theorem 4.1(i) for the PRUNED algorithm): the pruned posterior on the truthiRis≥ 1 − δ/2. The composition is MONOTONICITY, not "concentration ∘ damage": the pruned posterior is the Bayes posterior with the summation restricted toalive n ⊆ cands; sinceiR ∈ alive n(truth_survives), shrinking the summation set only shrinks the denominator, so the pruned quotient DOMINATES the unpruned one, which is≥ 1 − δ/2byposterior_concentration_transfer. The damage bound (algorithm_damage_le) keeps its SEPARATE role — bounding the predictive distribution's perturbation — and does NOT enter part (i). ([SQ] §4(i) writesw(R ∣ o_{1:T}) ≥ 1 − δ; the machinery delivers the stronger1 − δ/2, matching [Discovery] Theorem 3.1's form — kept as1 − δ/2.)
What this does NOT establish (out of scope here; no overclaiming) #
- Not the query-schedule CONSTRUCTION for a concrete class (BFJKMR enumeration):
schedandstat/oracleAnsare abstract data. - Not the collector /
evaln/H_Tepiplexity layer (Prop 2.2 — seeCollector.lean). - Not the per-step COST accounting beyond FV-B1's arithmetic (Lemma 4.2 stays prose).
- Not the countable candidate class (
candsis aFinset;algorithm_discoveryinstantiatescands = Finset.univ, matchingdeterministic_discovery's full-Fintype ιnormalizer).
Bayes consistency filter (§4 sketch (a)): the candidates whose deterministic rule predicts
every observed symbol up to time t.
Equations
- ReflectiveSubsystems.consistent pred cands t ω = {i ∈ cands | ∀ s ∈ Finset.range t, (pred i s fun (k : Fin s) => ω ↑k) = ω s}
Instances For
SQ pruning step (§4 sketch (b) / App A "the SQ handle"): from S, keep only the candidates
whose statistic is within 2τ of the oracle answer on every scheduled query φ ∈ Qs.
Equations
Instances For
The per-step alive set: sq-prune (over the queries scheduled by time t, sched t) of the
time-t Bayes-consistent set.
Equations
- ReflectiveSubsystems.alive pred stat oracleAns τ sched cands t ω = ReflectiveSubsystems.sqPrune stat oracleAns τ (sched t) (ReflectiveSubsystems.consistent pred cands t ω)
Instances For
The step-t pruned-away set: candidates alive at t but removed by step t+1.
Equations
- One or more equations did not get rendered due to their size.
Instances For
FV-I identification ("identify g with the algorithm"): the UNpruned Bayes-consistent
posterior mass is exactly FV-I's mixture Z cands w (detFactor pred) at time t. From
L_det_eq_indicator (each deterministic likelihood is the consistency indicator) and
Finset.sum_filter.
App A Claim 1 for the object — the truth survives. A truth index iR ∈ cands that is (a)
realizable (pred iR predicts every symbol) and (b) τ-close to every scheduled oracle answer
(|oracleAns φ − stat iR φ| ≤ τ, the FV-A4 hemp order, supplied w.h.p. by
SQOracle.empirical_isSQOracle) is in alive … t ω for every t. Reuses FV-A4's
truth_survives_pruning for the τ ⇒ 2τ step.
FV-A4 converse for the object — separated impostors are pruned. A candidate j whose
statistic is 3τ-separated from the truth iR on some scheduled query φ ∈ sched t, while the
oracle is τ-close to the truth there, is NOT in alive … t ω — its deviation exceeds the 2τ
threshold (FV-A4's separated_impostor_pruned).
FV-H ε_t identification. FV-H's accumulated one-step predictive damage
(ReflectiveSubsystems.accumulated_perturbation_le) instantiated at the algorithm's OWN step
families: survivors alive … (t+1) ω and the step-t pruned-away set prunedAt … t ω. The bound's
ε_t = (∑ prunedAt … t) / (∑ alive … (t+1) ∪ prunedAt … t) is the algorithm's literal normalized
pruned fraction — turning FV-H's abstract accounting into a statement about THE algorithm.
(stretch) Unpruned posterior concentration via the algorithm's Dirac pmf. Instantiating
Paper II's ReflectiveSubsystems.deterministic_discovery at the algorithm's own deterministic
predictor — the Dirac pmf q i s x = 𝟙[pred i s (ω|_{<s}) = x] — gives Theorem-3.1 concentration
for the algorithm's UNpruned Bayes posterior: for n ≥ (K(iR)·ln2 + ln(2/δ))/(2ε₀) under per-step
separation hsep, the posterior on the true rule iR is ≥ 1 − δ/2. This is the pmf-indexing
identification ([Discovery] ↔ the algorithm); composing it with algorithm_damage_le into a full
Theorem-4.1(i) statement for the PRUNED algorithm is the assembly residue (see module docstring).
Posterior monotonicity under restriction (the part-(i) composition principle): for weights
v ≥ 0 on S with the truth iR ∈ S' ⊆ S carrying positive weight, restricting the normalizer to
S' can only shrink the denominator, so the restricted quotient dominates: v iR / ∑_S v ≤ v iR / ∑_{S'} v. Elementary; the denominator positivity on S' comes from iR ∈ S', v iR > 0.
Bridge (FV-I ↔ [Discovery]): the algorithm's Dirac pmf Lik in
posterior_concentration_transfer IS FV-I's likelihood L (detFactor pred) — both are
∏_{s<n} 𝟙[pred i s (ω|_{<s}) = ω s], so the identification is definitional (rfl).
Theorem 4.1(i) for the PRUNED algorithm. Under realizability, the 2^{−k} prior, per-step
separation hsep, the discovery horizon hT, and the truth's oracle-closeness hclose, the pruned
posterior on the true rule iR — the Bayes posterior with the normalizer restricted to the survivor
set alive … n — is ≥ 1 − δ/2. Proof: truth_survives puts iR ∈ alive n ⊆ univ; the truth's
weight w iR · L iR = w iR > 0 (realizability ⇒ L iR = 1); posterior_mono_of_subset then makes
the pruned quotient dominate the unpruned one, which is ≥ 1 − δ/2 by
posterior_concentration_transfer (Dirac bridge). The damage bound does NOT enter (see docstring).
cands = Finset.univ matches deterministic_discovery's full-Fintype ι normalizer.