3SUM in O(n^1.960614) word-RAM steps
ProvedThreeSum1960614.threeSum_1960614For every fixed natural integer-size exponent , there exist a finite deterministic word-RAM program , a natural word-width constant , and a natural-valued time function . For every input size , every list of integers of absolute value at most , and every word width , the program halts within steps and accepts exactly when three pairwise distinct positions sum to zero. Repeated values at different positions are allowed. For the reduced rational , there is a natural such that for every . This exact campaign goal remains unproved until the modified complete program and runtime bridge are closed; it is not asserted to follow from numeric checks alone.
import Definitions.Def_ThreeSum1960614_Analysis import Definitions.Def_TrulySubcubicAPSP_SourceSpecification set_option autoImplicit false set_option relaxedAutoImplicit false open ThreeSum1960614
theorem ThreeSum1960614.threeSum_1960614 :
EndStatement.ThreeSum.SolvedInTime 1.960614 := by sorryRead-back
What the Lean code literally says, in plain math · GPT-6
declaration: ThreeSum1960614.threeSum_1960614 readback_model: GPT-6
For every natural number , there exist a finite program , a natural number , and a function , with the following two properties. First, there is a natural number such that, for every natural number , ; these are exactly the denominator and numerator of the reduced rational number . Second, for every natural number , every function satisfying at every input position , and every natural word width , executing from program position on the initial memory described below halts within steps, including the halting step, with some Boolean verdict and some final memory, and the verdict is true if and only if there exist positions such that , , , and as an equality of integers. The positions need not be ordered, equal integer values at different positions are allowed, and a position cannot be reused within the triple. Here for , while . The choices of , and the witness , may depend on , but the same must work for all the indicated sizes, inputs, and widths; depends only on , and there is no upper bound on . Memory has one cell for every integer address, each holding a -bit word. An integer is loaded as its residue modulo ; initially cell holds the word for , cell holds the word for for , and every other cell, including every negative-address cell, holds the zero word. For , a word with unsigned residue is read as the signed integer when , and as otherwise; for there is only the zero word and its signed value is . The program is a finite list of instructions whose direct cell addresses are arbitrary integers and whose jump positions are natural numbers. Its instructions can write the word for to a directly named cell; write the sum, difference, or product of two directly named cells to a directly named cell, with word arithmetic modulo ; load into a directly named cell the word at the integer address obtained by reading another directly named cell as signed; store the word from a directly named source cell at the integer address obtained by reading a directly named address cell as signed; branch to a specified program position precisely when the signed word in a directly named cell is negative, otherwise advance to the next position; accept; or reject. Each write updates only its destination cell and advances to the next position; an indirect store uses the address and source word in the memory before that update. Each instruction costs one step, including a branch, accept, or reject. Reading a program position at or beyond the end of its list acts as a reject instruction and costs a step. Running with zero available steps produces no halting result, even if the current instruction would accept or reject; exhausting the allotted steps before a halting instruction likewise gives no halting result, which does not satisfy the asserted correctness condition. Accept returns verdict true and reject returns verdict false, each with the memory at that step. There is no further requirement on the final memory because the output predicate for this problem is identically true. All natural sizes are included: for there is the unique empty input and its magnitude hypothesis is vacuous; for every admitted value has absolute value at most ; and for a triple of distinct positions does not exist, so every admitted input must halt with rejection. The displayed time inequality places no condition on or , although the halting requirement still applies to them; it does apply to . When , , including , so the nonempty admitted inputs contain only integers from ; when and , , still with an empty input. Neither nor is explicitly required to be positive. At sizes and the width lower bound is ; if , every natural width, including , is among the required widths, and in width zero the size, all input words, and the instruction's word for are all zero. No separate hypothesis requires the size or the input integers to be representable without wrapping at a required width.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.