Documentation

Complexity.Algorithms.WordRAM.ThreeSum.ChanHe.NodeRound

Complete charged native rounds of a Chan–He node #

Main definitions #

References #

These native setup and composition proofs are original.

Exact runtime parameters delivered to one complete counting/placement call.

Instances For

    Runtime argument delivery keeps all persistent caller registers.

    Every complete native round retains the caller arguments and prepared layout/constants.

    theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.NodePacking.exec_prepare {w : ℕ} (x y : WordRAM.Data 64) (j : Fin 3) (hparams : Parameters x y) (hready : Prepared (layout x) y) (hfit : WordRAM.Fits w (layout x).budget) (hN : 2 * (layout x).M ≤ (layout x).N) :
    ∃ (q : WordRAM.Data 64), WordRAM.ExecWithin w (prepare j) y q 20 ∧ CallArgs (layout x) (fun (j : Fin 3) => x.regs (source j)) j q ∧ q.mem = y.mem

    All count/place arguments are computed from actual retained caller values in at most twenty instructions. In particular no output pointer or encoded tag is supplied for free.

    theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.NodePacking.exec_round {w : ℕ} (x y : WordRAM.Data 64) (values : Fin 3 → ℕ → ℤ) (j : Fin 3) (hparams : Parameters x y) (hready : Prepared (layout x) y) (hfit : WordRAM.Fits (w + 2) (layout x).budget) (hM : 0 < (layout x).M) (hN : 2 * (layout x).M ≤ (layout x).N) (hmod : GenericRAM.Signed.Fits w ↑(layout x).M) (hsrc : x.regs (source j) + (layout x).n j ≤ (layout x).base) (hbdd : ∀ i < (layout x).n j, (values j i).natAbs ≤ (layout x).U) (hsigned : ∀ i < (layout x).n j, GenericRAM.Signed.Fits w (values j i)) (hinput : ∀ i < (layout x).n j, y.mem (x.regs (source j) + i) = WordRAM.Signed.encode (values j i)) (hinj : Set.InjOn (values j) ↑(Finset.range ((layout x).n j))) :
    ∃ (z : WordRAM.Data 64), WordRAM.ExecWithin (w + 2) (round j) y z (66 * (layout x).n j + 5 * (layout x).M + 65) ∧ z.mem = roundMemory (layout x) values j y.mem ∧ Frame y z ∧ Parameters x z ∧ Prepared (layout x) z

    A complete native round, with all actual counting calls discharged and all pointer, tag, duplicate-store and count-descriptor work charged.