Documentation

Complexity.Algorithms.WordRAM.FusionTree.Node.Registers

Register banks for fusion-node queries #

The query uses a fixed register file. Header, compression, rank, neighbor, boundary, and multiword highest-bit workspaces occupy disjoint intervals. Explicit copies connect them.

Main definitions #

References #

@[reducible, inline]

Fixed physical register count, independent of width and node occupancy.

Instances For
    @[reducible, inline]

    Original bounded query.

    Instances For
      @[reducible, inline]

      Original record address.

      Instances For
        @[reducible, inline]

        Final full-key inclusive rank.

        Instances For
          @[reducible, inline]

          Full word to compress, and later the compressed result.

          Instances For
            @[reducible, inline]

            Initial inclusive sketch rank.

            Instances For
              @[reducible, inline]

              Constant zero for control flow.

              Instances For
                @[reducible, inline]

                Selected full key.

                Instances For
                  @[reducible, inline]

                  Exclusive or of the selected full key and original query.

                  Instances For
                    @[reducible, inline]

                    Highest differing position on a miss.

                    Instances For

                      A contiguous register embedding.

                      Instances For

                        A renamed subroutine cannot write a register outside its embedding. This proof treats the subroutine structurally and does not expand its instruction graph.

                        theorem Cslib.Algorithms.WordRAM.FusionTree.NodeProgram.preserves_bank {k offset : ℕ} (hk : offset + k ≤ registers) (c : WordRAM.Code WordRAM.Basis.standard k) (i : Fin registers) (hi : ↑i < offset ∨ offset + k ≤ ↑i) :

                        In particular, a contiguous bank frames every physical register outside its interval.

                        @[reducible, inline]

                        Eighteen-word header reader, including its pointer and address scratch.

                        Instances For
                          @[reducible, inline]

                          Compression workspace.

                          Instances For
                            @[reducible, inline]

                            Inclusive or strict rank workspace.

                            Instances For
                              @[reducible, inline]

                              Two-neighbor loader and selector.

                              Instances For
                                @[reducible, inline]

                                Correction boundaries.

                                Instances For

                                  Header register holding one of the fifteen stored preprocessing words.

                                  Instances For
                                    @[reducible, inline]

                                    Header register holding occupancy.

                                    Instances For

                                      Memory and caller registers below forty agree. The direction follows execution.

                                      Instances For
                                        theorem Cslib.Algorithms.WordRAM.FusionTree.NodeProgram.frame_extend {k offset : ℕ} (hk : offset + k ≤ registers) (ho : 40 ≤ offset) (x : WordRAM.Data registers) (y : WordRAM.Data k) (hm : y.mem = x.mem) :
                                        Frame x (WordRAM.Data.extend (bank offset hk) y x)

                                        Copy a finite sequence of registers, charging also a final self-copy of register 39. The final self-copy supplies an executable empty sequence without a special RAM primitive.

                                        Instances For

                                          Literal values loaded from the actual header. This is a register contract, with no correctness, execution, or rank oracle among its fields.

                                          Instances For
                                            theorem Cslib.Algorithms.WordRAM.FusionTree.NodeProgram.Prepared.set_low {w n : ℕ} {keys : Fin n → ℕ} {p : NodeParameters w keys} {x : WordRAM.Data registers} (hx : Prepared p x) (i : Fin registers) (v : ℕ) (hi : ↑i < 10) :
                                            Prepared p (x.set i v)

                                            Caller scratch registers zero through nine are disjoint from the loaded header.