Documentation

ReflectiveSubsystems.CommitmentSeam

The commitment step's selector: which rule the learner commits to ([Discovery] §5) #

Provenance: [Discovery] Theorem 5.1(iv), the commitment step — the bridge from the §3 posterior to the §4 read-only code.

The boundary this file draws, and does not cross #

[Discovery] Theorem 5.1(iv) says: once the posterior mass on R reaches 1 − δ/2 (after T_discover), the rule R is written into the persistent code s_code. The paper is explicit that this is an architectural assumption — it is not derived in §3, where the learner's state is the full mixture rather than a single rule — and that the residual stochastic failure mode is s_code corruption, charged the separate δ/2 budget.

What is machine-checked here is the step's selector, and only that:

What remains an architectural assumption, exactly as the paper states it:

So this file hardens the discovery side of the hand-off (the posterior determines a unique, true, stable rule) and leaves the retention side (writing it, and keeping it) where the paper leaves it.

The objects #

Everything is stated over the algorithm object of [SQ] §4 / Appendix A (FV-K) — alive, the survivor set, and the pruned posterior that ReflectiveSubsystems.algorithm_discovery bounds below by 1 − δ/2. That quotient is unnamed there (it appears inline in the conclusion); prunedPosterior names it and nothing more, so algorithm_discovery's conclusion is 1 − δ/2 ≤ prunedPosterior … iR definitionally.

Commits p S δ i is a predicate rather than an Option-valued selector: the posterior is real-valued, so a Finset.filter at the threshold would have to bake classical decidability into the definition and carry that instance through every membership rewrite, and extracting an element from the resulting Finset ι — ι unordered — would need a further arbitrary choice. The predicate says the same thing, and the capstone's ↔ i = iR form states existence, uniqueness and the identity of the selected rule in a single equivalence.

Where δ < 1 is load-bearing #

Uniqueness is a normalization argument: the pruned posterior sums to 1 over the survivor set (prunedPosterior_sum_alive), so two candidates both at mass ≥ 1 − δ/2 force 2 − δ ≤ 1. That is a contradiction exactly when δ < 1. The hypothesis is therefore not cosmetic and is not weakened to δ ≤ 1: at δ = 1 the threshold is 1/2, two candidates can tie there, and the committed rule is genuinely undefined.

The threshold is stated in the non-strict form 1 − δ/2 ≤ p i. That is what algorithm_discovery delivers, and it is the easier trigger — it commits at least as often — so uniqueness, the load-bearing direction, is proved against the harder case.

The posterior the commitment step reads, and the threshold it applies #

noncomputable def ReflectiveSubsystems.prunedPosterior {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (sched : ℕ → Finset Q) (w : ι → ℝ) (n : ℕ) (ω : ℕ → X) (i : ι) :

The pruned posterior of the [SQ] §4 algorithm: the Bayes posterior with the normalizer restricted to the survivor set alive … n ω. This is the quantity ReflectiveSubsystems.algorithm_discovery bounds below by 1 − δ/2; naming it changes nothing (the two are definitionally equal), it only makes the commitment step's input citable.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    def ReflectiveSubsystems.Commits {ι : Type u_2} (p : ι → ℝ) (S : Finset ι) (δ : ℝ) (i : ι) :

    The commitment predicate ([Discovery] §5, Theorem 5.1(iv)): candidate i is one the learner would commit to when it is still alive and its posterior mass has reached the threshold 1 − δ/2. This is the selector of the commitment step — the write into the persistent code is the architectural assumption the module docstring records, and is not modelled.

    Equations
    Instances For

      The selector is well defined #

      theorem ReflectiveSubsystems.Commits.unique {ι : Type u_2} {p : ι → ℝ} {S : Finset ι} {δ : ℝ} (hδ : δ < 1) (hnn : ∀ i ∈ S, 0 ≤ p i) (hsum : ∑ i ∈ S, p i ≤ 1) {i j : ι} (hi : Commits p S δ i) (hj : Commits p S δ j) :
      i = j

      At most one candidate is ever committed. A normalization argument, and the only place the posterior's total mass enters: two candidates at mass ≥ 1 − δ/2 would together carry 2 − δ, which exceeds the available mass 1 precisely because δ < 1.

      Stated for an arbitrary real-valued mass p on a finite candidate set S with total mass at most 1, so it applies to the pruned posterior (whose mass over the survivor set is exactly 1) without assuming anything else about the algorithm.

      The pruned posterior is a probability on the survivor set #

      theorem ReflectiveSubsystems.alive_mass_pos {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (hτ : 0 ≤ τ) (sched : ℕ → Finset Q) (w : ι → ℝ) (ω : ℕ → X) (iR : ι) (hw : ∀ (i : ι), 0 ≤ w i) (hwiR : 0 < w iR) (hreal : ∀ (s : ℕ), (pred iR s fun (k : Fin s) => ω ↑k) = ω s) (hclose : ∀ (t : ℕ), ∀ φ ∈ sched t, |oracleAns φ - stat iR φ| ≤ τ) (n : ℕ) :
      0 < ∑ j ∈ alive pred stat oracleAns τ sched Finset.univ n ω, w j * L (detFactor pred) j n ω

      The survivor set carries positive mass: the truth is alive (ReflectiveSubsystems.truth_survives) and, being realizable, contributes its full prior weight w iR > 0. This is the nonemptiness the pruned posterior is conditioned on — carried as a hypothesis chain rather than assumed.

      theorem ReflectiveSubsystems.prunedPosterior_nonneg {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (sched : ℕ → Finset Q) (w : ι → ℝ) (n : ℕ) (ω : ℕ → X) (hw : ∀ (i : ι), 0 ≤ w i) (i : ι) :
      0 ≤ prunedPosterior pred stat oracleAns τ sched w n ω i

      The pruned posterior is nonnegative.

      theorem ReflectiveSubsystems.prunedPosterior_sum_alive {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (sched : ℕ → Finset Q) (w : ι → ℝ) (n : ℕ) (ω : ℕ → X) (hden : 0 < ∑ j ∈ alive pred stat oracleAns τ sched Finset.univ n ω, w j * L (detFactor pred) j n ω) :
      ∑ i ∈ alive pred stat oracleAns τ sched Finset.univ n ω, prunedPosterior pred stat oracleAns τ sched w n ω i = 1

      The pruned posterior has total mass 1 on the survivor set — it is a genuine probability there, which is what makes Commits.unique applicable. (Over the whole candidate set the same quotient sums to at least 1, the normalizer running over survivors only; the survivor set is the right domain for the commitment step, and the one the paper's "posterior mass on R" refers to.)

      The selector returns the truth #

      theorem ReflectiveSubsystems.commits_truth {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype X] [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (hτ : 0 ≤ τ) (sched : ℕ → Finset Q) (w : ι → ℝ) (ω : ℕ → X) (iR : ι) (hw : ∀ (i : ι), 0 ≤ w i) (k : ℕ) (hwR : w iR = 2 ^ (-↑k)) (hsumw : ∑ i : ι, w i ≤ 1) (hreal : ∀ (s : ℕ), (pred iR s fun (k : Fin s) => ω ↑k) = ω s) (hclose : ∀ (t : ℕ), ∀ φ ∈ sched t, |oracleAns φ - stat iR φ| ≤ τ) (δ ε₀ : ℝ) (hδ : 0 < δ) (hε : 0 < ε₀) (n : ℕ) (hsep : ∀ (i : ι), i ≠ iR → ∀ t ∈ Finset.range n, ε₀ ≤ BayesRedundancy.sqHellinger (fun (x : X) => if x = ω t then 1 else 0) fun (x : X) => if (pred i t fun (j : Fin t) => ω ↑j) = x then 1 else 0) (hT : (↑k * Real.log 2 + Real.log (2 / δ)) / (2 * ε₀) ≤ ↑n) :
      Commits (prunedPosterior pred stat oracleAns τ sched w n ω) (alive pred stat oracleAns τ sched Finset.univ n ω) δ iR

      The truth is committed. Past the discovery horizon the true rule is alive (ReflectiveSubsystems.truth_survives) and its pruned posterior has reached the threshold (ReflectiveSubsystems.algorithm_discovery) — so it satisfies the commitment predicate.

      The capstone: a well-defined, true, time-stable commitment #

      theorem ReflectiveSubsystems.commitment_seam {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype X] [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (hτ : 0 ≤ τ) (sched : ℕ → Finset Q) (w : ι → ℝ) (ω : ℕ → X) (iR : ι) (hw : ∀ (i : ι), 0 ≤ w i) (k : ℕ) (hwR : w iR = 2 ^ (-↑k)) (hsumw : ∑ i : ι, w i ≤ 1) (hreal : ∀ (s : ℕ), (pred iR s fun (k : Fin s) => ω ↑k) = ω s) (hclose : ∀ (t : ℕ), ∀ φ ∈ sched t, |oracleAns φ - stat iR φ| ≤ τ) (δ ε₀ : ℝ) (hδ : 0 < δ) (hδ1 : δ < 1) (hε : 0 < ε₀) (hsep : ∀ (i : ι), i ≠ iR → ∀ (t : ℕ), ε₀ ≤ BayesRedundancy.sqHellinger (fun (x : X) => if x = ω t then 1 else 0) fun (x : X) => if (pred i t fun (j : Fin t) => ω ↑j) = x then 1 else 0) (n : ℕ) :
      (↑k * Real.log 2 + Real.log (2 / δ)) / (2 * ε₀) ≤ ↑n → ∀ (i : ι), Commits (prunedPosterior pred stat oracleAns τ sched w n ω) (alive pred stat oracleAns τ sched Finset.univ n ω) δ i ↔ i = iR

      The commitment step's selector ([Discovery] §5, Theorem 5.1(iv)). Past the discovery horizon, the candidates satisfying the commitment predicate are exactly the true rule — at every such time. The single equivalence carries all three claims the seam needs:

      • existence — the truth commits (← direction),
      • well-definedness — nothing else does (→ direction, via Commits.unique),
      • time-stability — the right-hand side i = iR does not depend on n, so the committed rule is the same at every time past the horizon (spelled out in Commits.stable).

      δ < 1 is required, not cosmetic: it is exactly what makes the threshold 1 − δ/2 exceed half the available mass, and hence what makes the selection unique. The separation hypothesis is taken at all times rather than below a fixed horizon, since a per-time hypothesis would make the stability claim vacuous — a fresh premise for every n is not a statement about the same learner over time.

      The remaining clauses of Theorem 5.1(iv) — that the selected rule is written into the persistent code s_code, and the δ/2 corruption budget for keeping it there — are the architectural assumptions the paper states as such. They are not established here, and nothing below refers to a code region.

      theorem ReflectiveSubsystems.Commits.stable {X : Type u_1} [DecidableEq X] {ι : Type u_2} {Q : Type u_3} [Fintype X] [Fintype ι] (pred : ι → (s : ℕ) → (Fin s → X) → X) (stat : ι → Q → ℝ) (oracleAns : Q → ℝ) (τ : ℝ) (hτ : 0 ≤ τ) (sched : ℕ → Finset Q) (w : ι → ℝ) (ω : ℕ → X) (iR : ι) (hw : ∀ (i : ι), 0 ≤ w i) (k : ℕ) (hwR : w iR = 2 ^ (-↑k)) (hsumw : ∑ i : ι, w i ≤ 1) (hreal : ∀ (s : ℕ), (pred iR s fun (k : Fin s) => ω ↑k) = ω s) (hclose : ∀ (t : ℕ), ∀ φ ∈ sched t, |oracleAns φ - stat iR φ| ≤ τ) (δ ε₀ : ℝ) (hδ : 0 < δ) (hδ1 : δ < 1) (hε : 0 < ε₀) (hsep : ∀ (i : ι), i ≠ iR → ∀ (t : ℕ), ε₀ ≤ BayesRedundancy.sqHellinger (fun (x : X) => if x = ω t then 1 else 0) fun (x : X) => if (pred i t fun (j : Fin t) => ω ↑j) = x then 1 else 0) {m n : ℕ} (hm : (↑k * Real.log 2 + Real.log (2 / δ)) / (2 * ε₀) ≤ ↑m) (hn : (↑k * Real.log 2 + Real.log (2 / δ)) / (2 * ε₀) ≤ ↑n) {i j : ι} (hi : Commits (prunedPosterior pred stat oracleAns τ sched w m ω) (alive pred stat oracleAns τ sched Finset.univ m ω) δ i) (hj : Commits (prunedPosterior pred stat oracleAns τ sched w n ω) (alive pred stat oracleAns τ sched Finset.univ n ω) δ j) :
      i = j

      The commitment is time-stable. Two commitments made at any two times past the discovery horizon are to the same rule. This is not a separate argument: commitment_seam already identifies the committed candidate as iR at each time independently, so stability is that identification applied twice. Recording it as its own statement is what makes "the learner does not re-commit" a citable fact rather than a reading of the capstone.