Bounded encoded sparse-store update — controller definitions #
The fixed controller owns thirteen pairwise-distinct work tapes. It scans a runtime-counted entry stream, copying misses, replacing or deleting a hit, and appending a fresh nonzero entry only when the old count is exhausted without a match. A second count tape tracks the output-store cardinality.
Thirteen pairwise-distinct tapes used by encoded sparse-store update.
Assignment order: nine entry-match tapes, remaining count, replacement value, found flag, and output count.
- injective : Function.Injective self.idx
The complete assignment is injective.
Instances For
The nine-tape decode-and-match assignment.
Instances For
Runtime number of old entries still unread.
Instances For
Canonical source containing the requested new value.
Equations
- tapes.replacement = tapes.idx 10
Instances For
One-bit flag recording whether a matching old address has been seen.
Instances For
Canonical count of entries emitted by the completed update.
Equations
- tapes.resultCount = tapes.idx 12
Instances For
Distinct indices in the thirteen-tape assignment remain distinct.
Replacement-emission view of the update assignment.
Equations
Instances For
Exact preservation predicate outside the thirteen tapes owned by update.
Equations
Instances For
Auditable final work-tape contract for one encoded sparse-store update.
- ready : EntryScanReady tapes.entry [] address.bits finalWork finalWork
The encoded old store has been consumed and all entry scratch is reset.
The external replacement source is restored literally.
- remaining : (finalWork tapes.remaining).HasBinaryNat 0
The runtime old-entry counter is exhausted.
The flag records whether the old store contained the updated address.
- resultCount : (finalWork tapes.resultCount).HasBinaryNat (List.length (write store address newValue))
The result counter is the exact cardinality of the pure sparse write.
- frame : EntryUpdateFrame tapes initialWork finalWork
Every work tape outside the fixed assignment is unchanged.
Instances For
Canonical head profile after an old decoded entry has been emitted.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Work-independent cleanup bound when deletion emits no entry.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Work-independent cleanup bound after miss-copy or replacement emission.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fixed bound for copying one unmatched entry and restoring scratch.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fixed bound for emitting a replacement and restoring scratch.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Uniform binary counter-update budget below the initial store size.
Equations
- Complexity.RAM.RegisterStore.Machine.entryUpdateCountTime total = 2 * total.size + 2
Instances For
Maximum controller branch cost after one readable comparison.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fixed cost of one positive-count iteration, excluding the recursive tail.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Recursive fixed bound for updating a remaining sparse-store suffix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Public runtime bound for one complete encoded sparse-store update.
Equations
- Complexity.RAM.RegisterStore.Machine.entryUpdateTime tapes store address newValue = Complexity.RAM.RegisterStore.Machine.entryUpdateLoopTime tapes address newValue (List.length store) store
Instances For
Controller states, including each checked nested machine.
- test {n : ℕ} {tapes : EntryUpdateTapes n} : EntryUpdateQ tapes
- matching {n : ℕ} {tapes : EntryUpdateTapes n} : (entryMatchReadTM tapes.entry).Q → EntryUpdateQ tapes
- miss {n : ℕ} {tapes : EntryUpdateTapes n} : (entryMissCopyTM tapes.entry).Q → EntryUpdateQ tapes
- delete {n : ℕ} {tapes : EntryUpdateTapes n} : (entryMissCleanupTM tapes.entry).Q → EntryUpdateQ tapes
- replace {n : ℕ} {tapes : EntryUpdateTapes n} : (entryReplaceCleanupTM tapes.replace).Q → EntryUpdateQ tapes
- append {n : ℕ} {tapes : EntryUpdateTapes n} : (entryAppendRestoreTM tapes.replace).Q → EntryUpdateQ tapes
- remaining {n : ℕ} {tapes : EntryUpdateTapes n} : (TM.binaryPredTM tapes.remaining).Q → EntryUpdateQ tapes
- deleteCount {n : ℕ} {tapes : EntryUpdateTapes n} : (TM.binaryPredTM tapes.resultCount).Q → EntryUpdateQ tapes
- appendCount {n : ℕ} {tapes : EntryUpdateTapes n} : (TM.binarySuccTM tapes.resultCount).Q → EntryUpdateQ tapes
- done {n : ℕ} {tapes : EntryUpdateTapes n} : EntryUpdateQ tapes
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The update controller has finitely many states because every nested machine state type is finite.
Equations
- One or more equations did not get rendered due to their size.
Fixed runtime-counted update controller. The old remaining count reaches zero on every complete scan; the result count is decremented only for deletion and incremented only for absent-address append.
Equations
- One or more equations did not get rendered due to their size.