Documentation

LeanPool.BeyondBethe.Complexitylib.Models.RandomAccessMachine.Simulation.RegisterStore.Machine.Lookup.Defs

Reusable sparse-register operand lookup -- definitions #

One RAM instruction may need several direct or indirect register reads. This module gives lookup a reusable phase boundary: it loads a query from a canonical source, scans the encoded store, copies out the decoded value, resets all scanner scratch, rewinds the source, and restores the runtime entry count.

Uniform scanner-head bound from a canonical cell-one start.

Equations
Instances For

    Reset budget obtained from the nine fixed owned targets and the common head/width envelopes.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Restore scanner scratch, source cursor, and runtime count after a completed lookup whose value has already been copied out.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Copy out a lookup result, then restore the complete reusable scanner ABI.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Load the supplied query, perform one sparse lookup, copy out its value, and return to the same reusable blank-query scanner boundary.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Time bound for scanner reset, source rewind, and count restoration.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Time bound after the query has been prepared.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Complete reusable loaded-lookup time bound.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Read a positive-tag sparse overlay and either decode the tag or fall back to the immutable public-input bank on a sparse miss.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Complexity.RAM.RegisterStore.Machine.denseOverlayLookupTime {n : ℕ} (tapes : EntryLookupRestoreTapes n) (inputLength : ℕ) (overlay : Store) (address : ℕ) :

                    Complete reusable dense-overlay lookup budget.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Load one fixed address from canonical zero, read through the dense input and sparse overlay, then clear the fixed-address source back to zero.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Complete fixed-address dense-overlay lookup budget.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Load one fixed address from canonical zero, run a reusable lookup, then clear the fixed-address source back to zero.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Complete fixed-address lookup budget.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              structure Complexity.RAM.RegisterStore.Machine.EntryLookupRestoreReady {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (work : Fin n → Tape) :

                              Canonical precondition for one reusable loaded lookup.

                              Instances For

                                Canonical precondition for a fixed-address lookup whose query source starts at zero and is restored to zero.

                                Instances For
                                  structure Complexity.RAM.RegisterStore.Machine.EntryLookupPrepared {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                  Boundary after the external query has been copied into scanner storage.

                                  Instances For

                                    Uniform cleanup certificate extracted from either scanner outcome.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      structure Complexity.RAM.RegisterStore.Machine.EntryLookupScanned {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork preparedWork work : Fin n → Tape) :

                                      Boundary after the bounded scanner has produced a semantic lookup result. It retains the exact cleanup certificate, the read-only source image, a uniform cursor bound, and the complete external frame needed by restoration.

                                      Instances For
                                        def Complexity.RAM.RegisterStore.Machine.EntryLookupScannedReady {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                        Existentially packages the concrete prepared work family between query copying and scanning, so subsequent phases can use a semantic Hoare boundary.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          structure Complexity.RAM.RegisterStore.Machine.EntryLookupRestoreInvariant {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                          Stable semantic state carried through value rewind, value copy, scratch reset, source rewind, and count restoration.

                                          Instances For
                                            structure Complexity.RAM.RegisterStore.Machine.EntryLookupValueReady {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                            The decoded value has been rewound to the canonical read boundary.

                                            Instances For
                                              structure Complexity.RAM.RegisterStore.Machine.EntryLookupCopied {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                              The decoded value has been copied to the instruction operand tape while all scanner restoration data remains available.

                                              Instances For
                                                structure Complexity.RAM.RegisterStore.Machine.EntryLookupResetDone {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork copiedWork work : Fin n → Tape) :

                                                Exact boundary after all nine scanner-owned binary tapes have been reset.

                                                Instances For
                                                  structure Complexity.RAM.RegisterStore.Machine.EntryLookupScratchReset {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                                  Semantic form of the reset endpoint, stable while the encoded source is rewound.

                                                  Instances For
                                                    structure Complexity.RAM.RegisterStore.Machine.EntryLookupSourceReady {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork work : Fin n → Tape) :

                                                    Boundary after scanner reset and encoded-source rewind, immediately before the runtime entry count is copied back.

                                                    Instances For
                                                      structure Complexity.RAM.RegisterStore.Machine.EntryLookupRestoreResult {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork finalWork : Fin n → Tape) :

                                                      Reusable endpoint after one loaded sparse-register read.

                                                      Instances For
                                                        structure Complexity.RAM.RegisterStore.Machine.DenseOverlayLookupResult {n : ℕ} (tapes : EntryLookupRestoreTapes n) (input : List Bool) (overlay : Store) (address : ℕ) (initialWork finalWork : Fin n → Tape) :

                                                        Reusable endpoint after reading through a tagged mutable overlay into the immutable public-input bank.

                                                        Instances For
                                                          structure Complexity.RAM.RegisterStore.Machine.DenseOverlayLookupStaticResult {n : ℕ} (tapes : EntryLookupRestoreTapes n) (input : List Bool) (overlay : Store) (address : ℕ) (initialWork finalWork : Fin n → Tape) :

                                                          Reusable fixed-address dense-overlay endpoint. The destination contains the decoded register value and the temporary query source is zero again.

                                                          Instances For
                                                            structure Complexity.RAM.RegisterStore.Machine.EntryLookupStaticResult {n : ℕ} (tapes : EntryLookupRestoreTapes n) (store : Store) (address : ℕ) (initialWork finalWork : Fin n → Tape) :

                                                            Reusable fixed-address endpoint. The destination holds the semantic read, the scanner is restored, and the fixed query source is zero again.

                                                            Instances For