An all-target deterministic Light program for signed colored 3SUM up to magnitude n^(6/5)
ProvedThreeSumFuture.moderate_colored_occupancy3sumalgorithmsword-ram
For any caller and report procedure there is a fixed Light program with polynomial word, cell and depth bounds. For every input of length n satisfying |x_i|^5 <= n^6 and every admissible index coloring, its five-argument entry writes each target in the negated third class and a bit indicating whether some pair from the first two classes sums to it. It preserves the caller's memory prefix and accepts repeated values and empty classes. Its entire running time satisfies the benchmark PowerBound at 78/41, hence is O(n^(78/41+epsilon)) for each epsilon>0.
Preamble
import Definitions.Def_Submission_ThreeSum_StageBounds import Definitions.Def_Submission_ThreeSum_LightArgumentTable import Definitions.Def_Submission_ThreeSum_ColorParameters import Definitions.Def_Submission_ThreeSumApsp_Lang_Tasks open Light ThreeSum ThreeSum.StageBounds
Formal statement
theorem ThreeSumFuture.moderate_colored_occupancy :
∀ wrapper report : Stmt, ∃ (P : Program) (need : ℕ → ℕ → Need) (time : ℕ → ℕ),
PolyNeed need ∧ PowerBound time (78/41) ∧
(∀ n U, 5+(U+1)^2≤(need n U).word ∧ 1+6*n≤(need n U).cells ∧ 2≤(need n U).depth) ∧
P[0]?=some wrapper ∧ P[1]?=some report ∧ P[2]?=some (LightArgumentTable.stores 0 4) ∧
∀ {lim : Limits} {n : ℕ} (x : Fin n → ℤ) (p : Coloring.Parameter (n.log2+1)) (μ : ℕ → ℤ)
(src params fields dst depth U : ℕ),
Seg μ src (List.ofFn x) → μ params=(n.log2:ℤ) → Seg μ fields (ColorParameters.fields p) →
(∀ i, (x i).natAbs^5≤n^6) → src+n≤fields → params<fields → dst=fields+6 →
(need n U).Ok lim dst depth →
let xs := ColorClassLists.classList p x 0 1
let ys := ColorClassLists.classList p x 1 1
let zs := ColorClassLists.classList p x 2 (-1)
Meets lim P 3 (depth+1) [src,n,params,fields,dst] μ (time n)
(fun m out => m=(zs.length:ℤ) ∧ Kept μ out fields ∧ ∀ j : Fin zs.length,
out (dst+1+4*n+j.val)=zs.get j ∧
(out (dst+1+5*n+j.val)=0 ∨ out (dst+1+5*n+j.val)=1) ∧
(out (dst+1+5*n+j.val)=1 ↔ ∃ a∈xs, ∃ b∈ys, a+b=zs.get j)) := by sorrySource
Extension of the signed linear-range program https://prove2.me/theorems/58a3d022-68b6-5b0c-8ab1-5e5317f960ee to a subclass of the wide-input mission frontier https://prove2.me/theorems/2cb23a86-854a-5bb9-adc7-2a50732e69fc. The benchmark developers and the Wang repository supply the Light semantics and the coloring, histogram and Karatsuba procedures. This contribution implements width selection and proves the combined operational, resource and exponent bounds.