Derived logarithmic width for native Chan–He preprocessing #
The positive physical-width threshold depends only on the fixed magnitude exponent and actual input length. Its signed envelope covers every root, including all shared memory reservations.
Main definitions #
width: positive physical width sufficient for the complete preprocessing envelope.
Main results #
arena_ready: global logarithmic width derives the complete traversal fit contract.input_fits: the same width derives actual signed-encoded input fitting.
These coarse native resource bounds are original.
One positive logarithmic physical width for every native preprocessing component.
Instances For
Empty inputs and exponent zero also receive a strictly positive word width.
The signed compiler's two representation bits are always available.
The whole-frontend threshold is covered by the global preprocessing threshold.
theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Preprocessing.input_fits {κ w : ℕ} (input : List ℤ) (hw : width κ input.length ≤ w) (hvalues : ∀ z ∈ input, |z| ≤ ↑((input.length + 2) ^ κ)) :
WordRAM.InputFits w (List.map WordRAM.Signed.encode input)
The actual native unsigned length header and every signed payload fit the derived width.
theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Preprocessing.setup_fits {κ n w : ℕ} (hw : width κ n ≤ w) (retained : ℕ → ℕ) :
have a := arena κ n retained;
WordRAM.Fits w (a.floor + a.U + a.N + a.fuel + 16) ∧ WordRAM.Fits w ((Frontend.layout κ n).endpoint + a.m + 4) ∧ WordRAM.Fits w (3 ^ (a.fuel + 1)) ∧ WordRAM.Fits w 6
The same global width covers every scalar and address of the native layout controller.