Documentation

Complexitylib.Models.RandomAccessMachine.Simulation.RegisterStore.Machine.EntryUpdate.Internal.Loop

Bounded encoded sparse-store update — loop invariant internals #

structure Complexity.RAM.RegisterStore.Machine.EntryUpdateLoopInv {n : } (tapes : EntryUpdateTapes n) (store : Store) (address newValue : ) (processed remaining emitted : Store) (found : Bool) (resultCount : ) (initialWork work : Fin nTape) :

Tape and list semantics carried between controller iterations.

Instances For

    The controller frame is reflexive.

    theorem Complexity.RAM.RegisterStore.Machine.EntryUpdateFrame.trans_internal {n : } {tapes : EntryUpdateTapes n} {work₀ work₁ work₂ : Fin nTape} (h₁ : EntryUpdateFrame tapes work₀ work₁) (h₂ : EntryUpdateFrame tapes work₁ work₂) :
    EntryUpdateFrame tapes work₀ work₂

    Controller frames compose.

    theorem Complexity.RAM.RegisterStore.Machine.EntryUpdateFrame.markFound_internal {n : } {tapes : EntryUpdateTapes n} {initialWork work : Fin nTape} (h : EntryUpdateFrame tapes initialWork work) :
    EntryUpdateFrame tapes initialWork (entryUpdateMarkFoundWork tapes work)

    Changing the found flag preserves the frame outside all controller tapes.

    theorem Complexity.RAM.RegisterStore.Machine.EntryUpdateFrame.trans_ready_internal {n : } {tapes : EntryUpdateTapes n} {remaining queryBits : List Bool} {initialWork work finalWork : Fin nTape} (hframe : EntryUpdateFrame tapes initialWork work) (hready : EntryScanReady tapes.entry remaining queryBits work finalWork) :
    EntryUpdateFrame tapes initialWork finalWork

    An entry-machine frame extends an existing controller frame.

    theorem Complexity.RAM.RegisterStore.Machine.EntryUpdateFrame.trans_single_internal {n : } {tapes : EntryUpdateTapes n} {initialWork work finalWork : Fin nTape} (hframe : EntryUpdateFrame tapes initialWork work) (slot : Fin 13) (hother : ∀ (i : Fin n), i tapes.idx slotfinalWork i = work i) :
    EntryUpdateFrame tapes initialWork finalWork

    A one-tape arithmetic frame extends an existing controller frame.

    theorem Complexity.RAM.RegisterStore.Machine.entryUpdateLoopInv_initial_internal {n : } (tapes : EntryUpdateTapes n) (store : Store) (address newValue : ) (work : Fin nTape) (hready : EntryScanReady tapes.entry (List.flatMap Entry.encode store) address.bits work work) (hreplacement : (work tapes.replacement).HasBinaryNat newValue) (hremaining : (work tapes.remaining).HasBinaryNat (List.length store)) (hfound : (work tapes.found).HasBinaryNat 0) (hresultCount : (work tapes.resultCount).HasBinaryNat (List.length store)) :
    EntryUpdateLoopInv tapes store address newValue [] store [] false (List.length store) work work

    The public initial tape contract establishes the first loop invariant.