Documentation

Complexity.Algorithms.WordRAM.FusionTree.Node.Correction

Executable correction subroutines #

The highest-bit call accepts an ordinary physical register and initializes its own bank. The boundary and second-rank calls charge all register transfers. No call changes memory.

Main results #

References #

@[reducible, inline]

Disjoint workspace for the complete multiword highest-bit program.

Instances For

    Copy the physical input, run the actual highest-bit program, and copy its scalar result.

    Instances For
      theorem Cslib.Algorithms.WordRAM.FusionTree.NodeProgram.exec_highest {w d : ℕ} (hw : 3 ≤ w) (x : WordRAM.Data registers) (hd : WordRAM.Fits w d) (hxd : x.regs divergence = d) :
      ∃ (y : WordRAM.Data registers), WordRAM.ExecWithin w (highest w) x y 200002 ∧ y.regs position = d.log2 ∧ y.mem = x.mem ∧ ∀ (i : Fin registers), ↑i < 40 → i ≠ position → y.regs i = x.regs i

      The 200000-instruction MSB bound plus its two actual caller copies.

      The two transfers into the boundary workspace.

      Instances For

        Prepare two inputs and compute both correction boundaries.

        Instances For

          The boundary call includes three transfer instructions and ten arithmetic instructions.

          Transfer a full word to the compressor, make a sketch query and return the rank.

          Instances For
            theorem Cslib.Algorithms.WordRAM.FusionTree.NodeProgram.exec_secondQuery {w n q a z : ℕ} {keys : Fin n → ℕ} (p : NodeParameters w keys) (strict : Bool) (src : Fin registers) (hw : 2 ≤ w) (hn : 0 < n) (hs : StrictMono keys) (hk : ∀ (i : Fin n), keys i < 2 ^ w) (hnB : n ≤ Lean.FusionTree.branching w) (hlarge : 9 ≤ Nat.log 2 w) (x : WordRAM.Data registers) (hx : Ready p q a x) (hz : WordRAM.Fits w z) (hxz : x.regs src = z) :
            ∃ (y : WordRAM.Data registers), WordRAM.Exec w (secondQuery strict src) x y 121 ∧ y.regs out = sketchCut strict w keys z ∧ Ready p q a y ∧ y.mem = x.mem

            Both caller copies and all 119 sketch-query instructions are charged.

            The numeric bit tested by RAM is zero precisely when the Boolean query bit is false.

            Both boundary words are physical words, including a differing bit at w - 1.