OAI/Combinatorics/UniformKServer/EpochShadow.lean
19 declarations, 0 contain sorry, 0 declared as axioms
- abbrev
OAI.UniformKServer.EpochShadow.Selectorline 10 - def
OAI.UniformKServer.EpochShadow.StronglyLazyline 12 - def
OAI.UniformKServer.EpochShadow.shadowTraceline 16 - def
OAI.UniformKServer.EpochShadow.bookStepline 21 - def
OAI.UniformKServer.EpochShadow.blockCountline 25Source documentation
Number of portions, including an inherited nonempty raw block.
def blockCount {n k : ℕ} : Finset (Fin n) → List (Fin n) → ℕ | seen, [] => if seen.Nonempty then 1 else 0 | seen, r :: w => (if k < (insert r seen).card then 1 else 0) + blockCount (k:=k) (bookStep (k:=k) seen r) wMentions: OAI.UniformKServer.EpochShadow.bookStep
- def
OAI.UniformKServer.EpochShadow.keptTailline 30 - def
OAI.UniformKServer.EpochShadow.nextEntryline 35 - def
OAI.UniformKServer.EpochShadow.traceline 41Source documentation
The literal one-epoch virtual routine. The deterministic filter continues independently through fallback; its discarded final state has no effect on service. Its full kept word is provided separately by
keptTail.def trace {n k : ℕ} (hk : 0 < k) (M : ℕ) (T : Selector n k) : FilterState n k → Entry n k → Finset (Fin n) → List (Fin n) → History n k | _, _, _, [] => [] | f, e, seen, r :: w => let seen' := bookStep (k:=k) seen r …Mentions: OAI.UniformKServer.EpochShadow.Selector, OAI.UniformKServer.FilterState, OAI.UniformKServer.Entry, OAI.UniformKServer.History, OAI.UniformKServer.EpochShadow.bookStep
- theorem
OAI.UniformKServer.EpochShadow.raw_countline 58 - theorem
OAI.UniformKServer.EpochShadow.book_cardline 68 - theorem
OAI.UniformKServer.EpochShadow.block_tail_leline 75 - theorem
OAI.UniformKServer.EpochShadow.kept_tail_snocline 80 - theorem
OAI.UniformKServer.EpochShadow.kept_tail_fullline 90 - theorem
OAI.UniformKServer.EpochShadow.next_lazyline 94 - theorem
OAI.UniformKServer.EpochShadow.next_costline 109 - theorem
OAI.UniformKServer.EpochShadow.fallback_boundline 120 - theorem
OAI.UniformKServer.EpochShadow.trace_ledgerline 134Source documentation
Paying for fallback by an already accumulated unconditioned shadow prefix; the comparison never conditions on the event of reaching the cap.
theorem trace_ledger {n k : ℕ} (hk : 0 < k) (d : RationalMetric n) (T : Selector n k) (hT : StronglyLazy T) (u : Configuration n k) (hu : Function.Injective u) (M R : ℕ) (D δ : ℝ) (hD : 0 ≤ D) (hδ : 0 ≤ δ) (hdiam : ∀ x y, (d.distance x y : ℝ) ≤ D) (hsep : ∀ x y, x ≠ y → δ ≤ (d.distance x y : ℝ)) (hcap : R * (k+1) * D ≤ (M+1) * δ) (raw : List (Fin n)) (f : FilterState n k) (e : Entry n k) (seen : Finset (Fin n)) (paid : ℝ) (hf : Represents M u f) (hp : LazyPath u f.kept e) (hm : e.moves ≤ M) (hs : seen.card ≤ k) (hR : blockCount (k:=k) seen raw ≤ R) …Mentions: OAI.UniformKServer.RationalMetric, OAI.UniformKServer.EpochShadow.Selector, OAI.UniformKServer.EpochShadow.StronglyLazy, OAI.UniformKServer.Configuration, OAI.UniformKServer.FilterState, OAI.UniformKServer.Entry, OAI.UniformKServer.Represents, OAI.UniformKServer.LazyPath, OAI.UniformKServer.EpochShadow.blockCount
- theorem
OAI.UniformKServer.EpochShadow.epoch_virtual_boundline 222 - theorem
OAI.UniformKServer.EpochShadow.epoch_actual_boundline 238