Documentation

ReflectiveSubsystems.GrowingCappedPool

The capped-pool learner grown with its misses #

[Discovery] §3.4. The capped-pool learner (Learner.cappedPoolLearner) over C candidates keeps its size b fixed. Here its size grows with its number of misses μ, counted up to C: with L₂ = ⌈log₂ ((C + 1) ^ 2)⌉ and a parameter n at least L₂ + 11, the size after μ misses is the largest power of two at most (n - L₂ + 2 μ) / 5.5 (Learner.growingCappedPoolSize), and the age scale m is the size. The learner is Learner.growingCappedPoolLearner; its states are the pairs of a count of misses and a state of the capped-pool learner, and it moves by Learner.cappedPoolStep at the size that the step's miss leaves.

Main results #

The size of the growing capped-pool learner after μ misses. With L₂ = ⌈log₂ ((C + 1) ^ 2)⌉, the largest power of two at most (n - L₂ + 2 min (μ, C)) / 5.5; once L₂ + 11 ≤ n it is a power of two at least 2, and it is monotone in μ.

Equations
Instances For
    @[reducible]

    The capped-pool learner started at a given state: cappedPoolLearner C b m with its start replaced by s.

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

      The growing capped-pool learner. A state is the number of misses so far, capped at C, and a state of the capped-pool learner; with b μ = growingCappedPoolSize C n μ the learner starts at the start of the capped-pool learner at the size b 0, predicts the majority of the voters of its state at the size b μ (CappedPoolState.predict), and at an outcome counts a miss (up to C) and moves by cappedPoolStep at the size the count then gives.

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

        The sets holding the states of the growing capped-pool learner: at time t, the pairs of a count μ ≤ min (t, C) and a state of the capped-pool learner at the size growingCappedPoolSize C n μ, with m equal to the size (mem_growingCappedPoolFiber).

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

          Membership in the set holding the states of the growing capped-pool learner.

          theorem ReflectiveSubsystems.Learner.cappedPoolCapped_mul_pow {C b q : ℕ} (k : ℕ) {W : Finset (Fin C)} (h : CappedPoolCapped b b q W) :
          CappedPoolCapped (b * 2 ^ k) (b * 2 ^ k) q W

          A doubling loosens the caps: a set that meets the caps at the size b and the age scale b meets them at b * 2 ^ k for both. The members of age above b * 2 ^ k * 2 ^ j are those of age above b * 2 ^ (j + k), at most b / 2 ^ (j + k + 1) ≤ b * 2 ^ k / 2 ^ (j + 1).

          A doubling loosens the sets of ages: every set of ages that meets the caps at the size b and the age scale b meets them at b * 2 ^ k for both.

          The start of the growing capped-pool learner lies in the set holding its states at time 0. [Discovery] §3.4 Proposition 3.19(ii).

          Every transition of the growing capped-pool learner carries the set holding its states at time t into the set at time t + 1, at every vector and outcome: the count rises by at most 1 and stays at most C, the size at the larger count loosens the caps, and the transition is the capped-pool learner's at that size. [Discovery] §3.4 Proposition 3.19(ii).

          The set holding the states of the growing capped-pool learner at time t has at most (C + 1) ^ 2 * P states, P the number of sets of ages that meet the caps at the size after t misses (cappedPoolProfiles): each of the at most C + 1 counts holds at most (C + 1) * P' states, P' that number at the size after the count, which is at most P. [Discovery] §3.4 Proposition 3.19(ii).

          The estimate of the number of sets of ages, [Discovery] §3.4 Proposition 3.18(ii)'s log₂ P < 5.5 b: at the size b = 2 ^ k and the age scale b, the number P of sets of ages that meet the caps (cappedPoolProfiles) has P ^ 2 ≤ 2 ^ (11 b). Proved as Learner.cappedPoolProfilesEstimate in ReflectiveSubsystems/CappedPoolOrder.lean.

          Equations
          Instances For

            The set holding the states of the growing capped-pool learner has at most 2 ^ (n + 2 t) states at time t, under the estimate of the number of sets of ages (CappedPoolProfilesEstimate) and L₂ + 11 ≤ n, L₂ = ⌈log₂ ((C + 1) ^ 2)⌉. Squaring, (C + 1) ^ 4 ≤ 2 ^ (2 L₂) and 11 b ≤ 2 (n - L₂ + 2 min (t, C)) by the definition of the size. [Discovery] §3.4 Proposition 3.19(ii).

            A segment of a run of the capped-pool learner, with b = m held fixed: [Discovery] §3.4 Proposition 3.19(i), the count of the learner read from any state s of the learner at the size b that is maximal (a state with a candidate left and fewer than b members is blocked) and holds the realizing candidate p once p is admitted. b times the misses over any horizon is at most 12 times the candidates admitted and b * (4 + 9 * ⌊log₂ b⌋). cappedPoolSegmentBound proves it.

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

              The segment bound of the capped-pool learner, [Discovery] §3.4 Proposition 3.19(i). From any state of the learner at the size b, with b the age scale, that meets the caps, is blocked wherever it has a candidate left and fewer than b members, and holds the realizing candidate once admitted, b times the misses over any horizon is at most 12 times the candidates admitted and b * (4 + 9 * ⌊log₂ b⌋). The removable candidates are the ones admitted and at most b members at the start, so b times the misses at a full pool or blocked at level 0 is at most 4 (b + Δq); at each level i < ⌊log₂ b⌋ the blockers removed together with the mature members at the scale L = b * 2 ^ i start at most one cap and gain one cap each time ⌊q / L⌋ rises, so b times that level's misses is at most 4 Δq / 2 ^ i + 8 b; once q = C every miss at least halves the pool, at most ⌊log₂ b⌋ misses.

              theorem ReflectiveSubsystems.Learner.growingCappedPoolLearner_missCount_le {C n : ℕ} (hn : Nat.clog 2 ((C + 1) ^ 2) + 11 ≤ n) {v : ℕ → Fin C → Bool} {y : ℕ → Bool} (hr : FiniteLearner.Realizable v y) {B : ℕ} (hB : 1 ≤ B) (k : ℕ) :
              2 * B * (growingCappedPoolLearner C n).missCount v y k ≤ 11 * B ^ 2 + 24 * C + 2 * B * ((Nat.log 2 (n + 2 * C) + 1) * (9 * Nat.log 2 (n + 2 * C) + 5))

              The count of the growing capped-pool learner, from the segment bound (cappedPoolSegmentBound). Over every realizable stream and at every horizon, for every B ≥ 1, 2 B times the count is at most 11 B ^ 2 + 24 C + 2 B * ((⌊log₂ (n + 2 C)⌋ + 1) * (9 ⌊log₂ (n + 2 C)⌋ + 5)). The run splits at the changes of the size into epochs; every miss removes a candidate, so the count never reaches its cap; an epoch at the size b holds at most (11 b + 3) / 4 misses, and the sizes at most B are distinct powers of two summing below 2 B; an epoch at a size above B costs at most 12 Δq / B + 4 + 9 ⌊log₂ b⌋ misses by the segment bound, Δq its rise of the pointer, and the rises sum to at most C. [Discovery] §3.4 Proposition 3.19(iii).

              theorem ReflectiveSubsystems.Learner.growingCappedPoolLearner_missCount_le_sqrt {C n : ℕ} (hn : Nat.clog 2 ((C + 1) ^ 2) + 11 ≤ n) {v : ℕ → Fin C → Bool} {y : ℕ → Bool} (hr : FiniteLearner.Realizable v y) (k : ℕ) :
              (growingCappedPoolLearner C n).missCount v y k ≤ 2 * (66 * C).sqrt + (Nat.log 2 (n + 2 * C) + 1) * (9 * Nat.log 2 (n + 2 * C) + 5) + 8

              The count of the growing capped-pool learner is of order √C: over every realizable stream and at every horizon it is at most 2 ⌊√(66 C)⌋ + (⌊log₂ (n + 2 C)⌋ + 1) * (9 ⌊log₂ (n + 2 C)⌋ + 5) + 8, from the count at B = ⌈2 (⌊√(66 C)⌋ + 1) / 11⌉, where 11 B ^ 2 + 24 C ≤ 4 B ⌊√(66 C)⌋ + 16 B. [Discovery] §3.4 Proposition 3.19(iii).

              theorem ReflectiveSubsystems.Learner.exists_missCount_le_sqrt_of_fibers_card_le_pow (hP : CappedPoolProfilesEstimate) {C n : ℕ} (hn : Nat.clog 2 ((C + 1) ^ 2) + 11 ≤ n) :
              ∃ (L : Learner C) (Ω : ℕ → Finset L.S), L.start ∈ Ω 0 ∧ (∀ (t : ℕ), ∀ s ∈ Ω t, ∀ (v : Fin C → Bool) (y : Bool), L.step s v y ∈ Ω (t + 1)) ∧ (∀ (t : ℕ), (Ω t).card ≤ 2 ^ (n + 2 * t)) ∧ ∀ (v : ℕ → Fin C → Bool) (y : ℕ → Bool), FiniteLearner.Realizable v y → ∀ (k : ℕ), L.missCount v y k ≤ 2 * (66 * C).sqrt + (Nat.log 2 (n + 2 * C) + 1) * (9 * Nat.log 2 (n + 2 * C) + 5) + 8

              The assembly of the growing capped-pool learner in the shape of the fiber bill: under the named hypothesis CappedPoolProfilesEstimate, for n at least L₂ + 11, a learner and finsets Ω t of at most 2 ^ (n + 2 t) states, holding the start and carried along by every transition, whose count on every realizable stream at every horizon is at most 2 ⌊√(66 C)⌋ + (⌊log₂ (n + 2 C)⌋ + 1) * (9 ⌊log₂ (n + 2 C)⌋ + 5) + 8. [Discovery] §3.4 Proposition 3.19(ii) and (iii).

              theorem ReflectiveSubsystems.Learner.growingCappedPoolLearner_missCount_le_sqrt_nonvacuous :
              ∃ (C : ℕ) (n : ℕ), Nat.clog 2 ((C + 1) ^ 2) + 11 ≤ n ∧ 2 * (66 * C).sqrt + (Nat.log 2 (n + 2 * C) + 1) * (9 * Nat.log 2 (n + 2 * C) + 5) + 8 < C - 1

              The bound of the growing capped-pool learner is below C - 1 for some parameters meeting its hypotheses. At 2 ^ 16 candidates and n = 44, ⌈log₂ ((C + 1) ^ 2)⌉ = 33, ⌊log₂ (n + 2 C)⌋ = 17 and the bound is 7010, below C - 1 = 65535, so the count improves on the count C - 1 of a learner with a state for each candidate. [Discovery] §3.4 Proposition 3.19(iii).