Documentation

Complexitylib.Models.RandomAccessMachine.Simulation.RegisterStore.Machine.EntryScanStep

One bounded sparse-entry scan iteration #

This module exposes the compositional hit-or-next-iteration contract for one encoded sparse register-store entry.

theorem Complexity.RAM.RegisterStore.Machine.entryScanStepTM_hoareTime_frame {n : } (tapes : EntryMatchTapes n) (entry : Entry) (rest queryBits : List Bool) (initialWork iterationWork : Fin nTape) (inp₀ out₀ : Tape) (hready : EntryScanReady tapes (entry.encode ++ rest) queryBits initialWork iterationWork) (hinput : TM.Parked inp₀) (houtput : TM.Parked out₀) :
(entryScanStepTM tapes).HoareTime (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = inp₀ work = iterationWork out = out₀) (fun (inp : Tape) (work : Fin nTape) (out : Tape) => inp = inp₀ (entry.1.bits = queryBits EntryScanHit tapes entry rest queryBits initialWork work entry.1.bits queryBits EntryScanReady tapes rest queryBits initialWork work) out = out₀) (entryScanStepTime tapes entry queryBits iterationWork)

Decode and compare one entry, then either expose its decoded value on a hit or restore the exact invariant for the remaining encoded stream.

One scan iteration preserves one-way output safety.

theorem Complexity.RAM.RegisterStore.Machine.entryScanStepTM_prefix_withinAuxSpace {n : } (tapes : EntryMatchTapes n) (entry : Entry) (queryBits : List Bool) (initialWork : Fin nTape) (inputLength initialSpace time : ) (start current : Complexity.Cfg n (entryScanStepTM tapes).Q) (hinitial : start.WithinAuxSpace inputLength initialSpace) (hreach : (entryScanStepTM tapes).reachesIn time start current) (htime : time entryScanStepTime tapes entry queryBits initialWork) :
current.WithinAuxSpace inputLength (initialSpace + entryScanStepTime tapes entry queryBits initialWork)

Coarse all-prefix auxiliary-space envelope for one scan iteration.