Documentation

ReflectiveSubsystems.RegisterClass

The register class: the capacity bound over any step of a level vector #

LogMassEvent proves the floored mixture's capacity threshold (floorErrorTimesFrom_card_add_le_capacity, [Discovery] Proposition 3.5(i), row FV-37) by a potential argument that reads the mixture's step expStep through three step lemmas and nothing else. This file names what those lemmas use — a handful of properties of an arbitrary update step : (Fin C → Bool) → (Fin C → ℕ) → (Fin C → ℕ) of a level vector capped at a budget b, driven by a miss vector — and proves the bound once, over every step with those properties. The mixture is one member; a reset learner whose miss rule is no likelihood ratio is another; a saturating register is not a member, and its count is not bounded by the potential. The file is registered as [Discovery] §3 Proposition 3.6, rows FV-39 (the class, the bound, the members) and FV-40 (the two non-members).

The class #

A step is at a rescale at a level vector e and a miss vector m when some hitting candidate sits at the cap: ∃ j, e j = b ∧ m j = false. Throughout, the truth iR never misses. The capacity argument reads five properties of the step at every level vector inside the register:

The first four are RegisterCore; RegisterClass adds the fifth. The fifth is load-bearing and not implied by the four: the four constrain the step only at level vectors inside the register, and they let a missing candidate at the cap rise above it off a rescale — after which nothing constrains the step at all. liftStep is such a member of RegisterCore, and from a start inside the register its error count is the whole horizon (liftStep_registerCore_unbounded).

Main results #

The set of error times is the strict one of floorErrorTimesFrom: a step counts when the missing mass, two to the level, exceeds θ of the total.

The class #

structure ReflectiveSubsystems.RegisterCore {C : ℕ} (b : ℕ) (step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ) (iR : Fin C) :

The four step properties. A step of a level vector e : Fin C → ℕ, capped at b, driven by a miss vector m, with the truth iR never missing, is at a rescale at e and m when some hitting candidate is at the cap. At a rescale the truth's level does not fall; off a rescale the truth's level rises by exactly one and no level rises by more than one; at a rescale no level rises; at a rescale every missing candidate above the floor loses at least one level. Every property is read at level vectors inside the register only.

Instances For
    structure ReflectiveSubsystems.RegisterClass {C : ℕ} (b : ℕ) (step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ) (iR : Fin C) extends ReflectiveSubsystems.RegisterCore b step iR :

    The register class. The four step properties of RegisterCore, and the step keeps the run inside the register: from a level vector inside it, with the truth hitting, every level stays at most b. The capacity argument uses these five properties and nothing else.

    Instances For
      def ReflectiveSubsystems.stepRun {C : ℕ} (step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ) (e₀ : Fin C → ℕ) (M : ℕ → Fin C → Bool) :
      ℕ → Fin C → ℕ

      The run of a step from a start.

      Equations
      Instances For
        def ReflectiveSubsystems.stepErrorTimes {C : ℕ} (step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ) (e₀ : Fin C → ℕ) (M : ℕ → Fin C → Bool) (θ : ℚ) (n : ℕ) :

        The set of error times of a run: the steps before n at which the missing mass, two to the level, exceeds θ of the total.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem ReflectiveSubsystems.stepRun_le {C b : ℕ} {step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ} {iR : Fin C} (hcls : RegisterClass b step iR) {e₀ : Fin C → ℕ} (he₀ : ∀ (i : Fin C), e₀ i ≤ b) (M : ℕ → Fin C → Bool) (hR : ∀ (t : ℕ), M t iR = false) (t : ℕ) (i : Fin C) :
          stepRun step e₀ M t i ≤ b

          The run stays inside the register.

          The potential #

          The capacity bound over the class #

          theorem ReflectiveSubsystems.RegisterClass.card_add_le_capacity {C b : ℕ} {step : (Fin C → Bool) → (Fin C → ℕ) → Fin C → ℕ} {iR : Fin C} (hcls : RegisterClass b step iR) {e₀ : Fin C → ℕ} (he₀ : ∀ (i : Fin C), e₀ i ≤ b) (M : ℕ → Fin C → Bool) (hR : ∀ (t : ℕ), M t iR = false) (θ : ℚ) (hfloor : ↑C - 1 ≤ θ * (2 ^ b + (↑C - 1))) (n : ℕ) :
          (stepErrorTimes step e₀ M θ n).card + C * e₀ iR ≤ C * b + ∑ i ∈ Finset.univ.erase iR, e₀ i

          The capacity bound over the class ([Discovery] Proposition 3.6(i), row FV-39, at every member; Proposition 3.5(i) is the statement at the mixture it generalizes): under the floor condition, from every start inside the register, along every stream on which the truth never misses, the error count over the whole run plus C times the truth's start is at most C · b plus the competitors' start — the potential argument at the class's properties and nothing else.

          The members #

          The floored mixture is a member: expStep at every budget, every candidate count and every truth.

          def ReflectiveSubsystems.resetStep {C : ℕ} (b : ℕ) (m : Fin C → Bool) (e : Fin C → ℕ) :
          Fin C → ℕ

          The reset learner: off a rescale as the mixture; at a rescale every hitter keeps its level and every missing candidate returns to the floor. Its miss rule is no likelihood ratio.

          Equations
          Instances For

            The reset learner is a member.

            theorem ReflectiveSubsystems.stepRun_expStep {C : ℕ} (b : ℕ) (e₀ : Fin C → ℕ) (M : ℕ → Fin C → Bool) (t : ℕ) :
            stepRun (expStep b) e₀ M t = expRunFrom e₀ M b t

            At expStep the class's run is the landed expRunFrom.

            theorem ReflectiveSubsystems.stepErrorTimes_expStep {C : ℕ} {e₀ : Fin C → ℕ} {b : ℕ} (he₀ : ∀ (i : Fin C), e₀ i ≤ b) (M : ℕ → Fin C → Bool) (θ : ℚ) (n : ℕ) :
            stepErrorTimes (expStep b) e₀ M θ n = floorErrorTimesFrom e₀ M b θ n

            At expStep the class's set of error times is the landed floorErrorTimesFrom, from every start inside the register, so RegisterClass.card_add_le_capacity at the mixture is floorErrorTimesFrom_card_add_le_capacity. The start's bound is what the mass identity raw_wRunFrom_eq_pow_expRunFrom needs.

            theorem ReflectiveSubsystems.RegisterClass.card_add_le_capacity_nonvacuous :
            RegisterClass 2 (expStep 2) 0 ∧ (∀ (i : Fin 2), deficitSeed 2 2 i ≤ 2) ∧ (∀ (t : ℕ), deficitMiss t 0 = false) ∧ 2 - 1 ≤ 1 / 4 * (2 ^ 2 + (2 - 1)) ∧ (stepErrorTimes (expStep 2) (deficitSeed 2 2) deficitMiss (1 / 4) 2).card + 2 * deficitSeed 2 2 0 ≤ 2 * 2 + ∑ i ∈ Finset.univ.erase 0, deficitSeed 2 2 i

            Non-vacuity — for RegisterClass.card_add_le_capacity: the mixture at two candidates, budget 2, threshold 1/4, the deficit start (0, 2) with the truth first and the stream on which candidate 1 always misses. The class, the start, the truth and the floor condition all hold, and the bound at horizon 2 reads card + 0 ≤ 4 + 2.

            The guards #

            The no-rise property is load-bearing #

            A register that saturates — a hitter one up, capped at b; a misser one down, floored at 0 — lets a competitor climb back at a rescale, since a hitter at the cap stays put and nothing else moves at that step. It fails the class's no-rise property, and its count is not bounded by the potential: at the cap, a competitor alternating miss and hit is an error time every other step, and nothing ever lowers it.

            def ReflectiveSubsystems.saturateStep {C : ℕ} (b : ℕ) (m : Fin C → Bool) (e : Fin C → ℕ) :
            Fin C → ℕ

            The saturating register: hit one up, capped at b, miss one down, floored at 0; a hitter at the cap stays, and nothing else moves at that step.

            Equations
            Instances For
              theorem ReflectiveSubsystems.saturateStep_not_registerClass :
              ¬RegisterClass 2 (saturateStep 2) 0 ∧ ∀ (n : ℕ), (stepErrorTimes (saturateStep 2) ![2, 2] (fun (t : ℕ) (i : Fin (Nat.succ 0).succ) => decide (i = 1 ∧ t % 2 = 0)) (1 / 4) (2 * n)).card = n

              Guard: the no-rise property is load-bearing (row FV-40). At two candidates and budget 2, from the start (2, 2) on the stream where candidate 1 misses at even steps and hits at odd ones, the saturating register is at a rescale at every step, its competitor rises at every odd step, and every even step is an error time at threshold 1/4: the count at horizon 2n is n, which exceeds the potential 2 · (2 − 2) + 2 = 2 from n = 3 on.

              The register-keeping property is load-bearing #

              The four properties of RegisterCore are read at level vectors inside the register only, and they do not keep the run there: off a rescale a missing candidate at the cap may rise by one, which none of the four forbids, and at the level vector that results none of them says anything. The lifting step below is the mixture inside the register except for exactly that rise, and the identity outside; from the start (1, 2) on the stream where candidate 1 always misses, the competitor is lifted to 3 at the first step and the run is frozen there with two thirds of the mass on the competitor, so every step is an error time.

              def ReflectiveSubsystems.liftStep {C : ℕ} (b : ℕ) (m : Fin C → Bool) (e : Fin C → ℕ) :
              Fin C → ℕ

              The lifting step: inside the register the floored mixture, except that off a rescale a missing candidate at the cap rises by one; outside the register nothing moves.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Guard: the register-keeping property is load-bearing (row FV-40). At two candidates and budget 2, the lifting step has the four step properties and is not a member, and from the start (1, 2) inside the register, on the stream where candidate 1 always misses, every step is an error time at threshold 1/4: the count at horizon n is n, where the potential is 2 · (2 − 1) + 2 = 4.