Documentation

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

Bounded encoded sparse-store update — invariant internals #

Tape-layout views and frame lemmas used by the semantic update loop. In particular, this file isolates the only controller-local mutation: changing the canonical zero-valued found tape to canonical one after a hit.

View the update layout as an entry scanner whose count is remaining.

Equations
Instances For

    View the update layout as an entry scanner whose count is resultCount.

    Equations
    Instances For

      The remaining count is outside every entry-machine tape.

      The replacement source is outside every entry-machine tape.

      The found flag is outside every entry-machine tape.

      The result count is outside every entry-machine tape.

      The remaining count and replacement source are distinct.

      The remaining count and found flag are distinct.

      The remaining and result counts are distinct.

      The replacement source and found flag are distinct.

      The replacement source and result count are distinct.

      The found flag and result count are distinct.

      The hit-marking update changes exactly the found tape.

      theorem Complexity.RAM.RegisterStore.Machine.entryUpdateMarkFoundWork_apply_ne_internal {n : } (tapes : EntryUpdateTapes n) (work : Fin nTape) (i : Fin n) (hi : i tapes.found) :
      entryUpdateMarkFoundWork tapes work i = work i

      The hit-marking update preserves every tape other than the found tape.

      Writing 1 over the parked canonical zero flag produces canonical one.

      Canonical natural-number tapes are parked away from the left marker.

      theorem Complexity.RAM.RegisterStore.Machine.entryUpdateMarkFoundWork_parked_internal {n : } (tapes : EntryUpdateTapes n) (work : Fin nTape) (hfound : (work tapes.found).HasBinaryNat 0) (hparked : ∀ (i : Fin n), TM.Parked (work i)) (i : Fin n) :

      Marking a canonical zero found flag preserves parkedness of the complete work family.

      The marked found flag exposes 1 directly under its parked head.

      theorem Complexity.RAM.RegisterStore.Machine.EntryScanReady.frame_outside_entry_internal {n : } {tapes : EntryUpdateTapes n} {remaining queryBits : List Bool} {initialWork finalWork : Fin nTape} (h : EntryScanReady tapes.entry remaining queryBits initialWork finalWork) (i : Fin n) (houtside : ∀ (j : Fin 9), i tapes.entry.idx j) :
      finalWork i = initialWork i

      The frame component of an entry-ready endpoint can be queried with one uniform proof that an index lies outside the nine entry-machine tapes.

      theorem Complexity.RAM.RegisterStore.Machine.ReadableEntryMatch.frame_outside_entry_internal {n : } {tapes : EntryUpdateTapes n} {entry : Entry} {rest queryBits : List Bool} {initialWork finalWork : Fin nTape} (h : ReadableEntryMatch tapes.entry entry rest queryBits initialWork finalWork) (i : Fin n) (houtside : ∀ (j : Fin 9), i tapes.entry.idx j) :
      finalWork i = initialWork i

      The frame component of a readable match can be queried uniformly outside the nine entry-machine tapes.

      theorem Complexity.RAM.RegisterStore.Machine.EntryScanReady.markFound_internal {n : } {tapes : EntryUpdateTapes n} {remaining queryBits : List Bool} {initialWork finalWork : Fin nTape} (h : EntryScanReady tapes.entry remaining queryBits initialWork finalWork) (hfound : (finalWork tapes.found).HasBinaryNat 0) :
      EntryScanReady tapes.entry remaining queryBits (entryUpdateMarkFoundWork tapes initialWork) (entryUpdateMarkFoundWork tapes finalWork)

      Marking the external found flag preserves an entry-ready invariant while updating both sides of its exact frame.

      theorem Complexity.RAM.RegisterStore.Machine.ReadableEntryMatch.markFound_internal {n : } {tapes : EntryUpdateTapes n} {entry : Entry} {rest queryBits : List Bool} {initialWork finalWork : Fin nTape} (h : ReadableEntryMatch tapes.entry entry rest queryBits initialWork finalWork) (hfound : (finalWork tapes.found).HasBinaryNat 0) :
      ReadableEntryMatch tapes.entry entry rest queryBits (entryUpdateMarkFoundWork tapes initialWork) (entryUpdateMarkFoundWork tapes finalWork)

      Marking the external found flag preserves a readable matched-entry endpoint while updating both sides of its exact frame.

      theorem Complexity.RAM.RegisterStore.Machine.EntryScanReady.change_remaining_internal {n : } {tapes : EntryUpdateTapes n} {remaining queryBits : List Bool} {initialWork work finalWork : Fin nTape} {count : } (h : EntryScanReady tapes.entry remaining queryBits initialWork work) (hother : ∀ (i : Fin n), i tapes.remainingfinalWork i = work i) (hcount : (finalWork tapes.remaining).HasBinaryNat count) :
      EntryScanReady tapes.entry remaining queryBits finalWork finalWork

      A frame-rich binary operation on the remaining-count tape preserves and rebases the entry-ready invariant.

      theorem Complexity.RAM.RegisterStore.Machine.EntryScanReady.change_resultCount_internal {n : } {tapes : EntryUpdateTapes n} {remaining queryBits : List Bool} {initialWork work finalWork : Fin nTape} {count : } (h : EntryScanReady tapes.entry remaining queryBits initialWork work) (hother : ∀ (i : Fin n), i tapes.resultCountfinalWork i = work i) (hcount : (finalWork tapes.resultCount).HasBinaryNat count) :
      EntryScanReady tapes.entry remaining queryBits finalWork finalWork

      A frame-rich binary operation on the result-count tape preserves and rebases the entry-ready invariant.