Aggregate callable box-backed fixed-prime charge #
The memory-window compiler multiplies the actual complete source charge by at most three. Only the original input adaptation and computed-modulus/return overhead are added. The source producer and all-product saving remain explicit, as does the single global false-positive reserve. This does not choose parameters or prove the final ExactTriangle/3SUM exponent.
theorem Cslib.Algorithms.WordRAM.ExactTriangle.CallableFixedPrime.timeBound_le {k n g p : ℕ} (hn : 0 < n) (values : List ℤ) (mem : ℕ → ℕ) (hD : 16 ≤ MatrixMultiplication.Schonhage.D (9 * k)) (hg : 1 ≤ g) (hp : p ∈ (MatrixMultiplication.Schonhage.D (9 * k)).sqrtPrimeWindow) (hN : MatrixMultiplication.Schonhage.D (9 * k) ^ 18 ≤ n) :
have V := fun (q : ℕ) => values.getD q 0;
have F :=
ExactTriangle.falsePositiveCount (fun (u v : Fin n) => V (Matrix.pairIndex (u, v)))
(fun (u v : Fin n) => V (n * n + Matrix.pairIndex (u, v)))
(fun (u v : Fin n) => V (2 * (n * n) + Matrix.pairIndex (u, v))) p;
↑(timeBound hn g p values mem + 1) ≤ 24 * ↑n ^ 2 + 24669 * ↑(Nat.clog 2 (n + MatrixMultiplication.Schonhage.D (9 * k) + g + p + rawTotal n values + 4)) + 483 + 3 * (690 * ↑n ^ 2 * ↑(MatrixMultiplication.Schonhage.D (9 * k)) * ↑g + 125829120 * ↑(189 * k + 1) ^ 2 * ↑(9 * k + 1) * ↑(MatrixMultiplication.Schonhage.D (9 * k)) ^ (-(8 / 125)) * ↑n ^ 3 * ↑g + 4 * ↑n * ↑g * ↑(5 * (MatrixMultiplication.Schonhage.D (9 * k)).sqrt + 8 * ExactTriangle.queryCap n (MatrixMultiplication.Schonhage.D (9 * k)) + 61) + ↑((42 * ExactTriangle.pieceSize (MatrixMultiplication.Schonhage.D (9 * k)) g + 28) * (F + 1) + 7))
Halt-inclusive complete caller bound. It includes all copies, setup, source instructions, recursion, index/dispatch, normalization, return copies and exactly one final halt. The box source's own halt-inclusive bound is retained conservatively inside the factor-three term.