Equivalence of two WordRAM models up to polylogarithmic overhead
OpenWordRAM.APSPBridge.uniform_simulation_existsThe WordRAM models with unsigned pointers and with signed pointers admit two-way simulation and complete runtime transfer, with one natural overhead exponent d. Both support multiplication; the former also provides bit operations and shifts, while the latter branches on sign. At the operational level, every native-free program in the former model and every program in the latter has a fixed simulator in the other, preserving and reflecting successful halting and preserving every mapped source memory cell at target width w+4, within C(t+w+1)(w+1)^d steps. Accept/reject verdicts are preserved explicitly.
For every problem Q with input and observable output bounded by B(n)=K(n+1)^q, every input-magnitude exponent κ, and every correct source program with time bound T(n) at all sufficiently large word widths, there are a fixed target program, width threshold coefficient, and positive C solving the same problem within C(T(n)+B(n)+1)(⌊log₂ n⌋+1)^d steps. This holds in both directions. The target starts from ordinary packed input and produces the required verdict and signed output; conversion and output recovery count toward the bound. The same bound works at every physical word width above the new threshold, including arbitrarily large widths.
Consequently, for every rational R>q, existence of an algorithm with some rational exponent below R is equivalent in the two models. As applications, the same main theorem includes integer APSP at threshold 3 and integer 3SUM at threshold 2. A positive subcubic or subquadratic exponent saving is therefore preserved. Exact exponent bounds may acquire a polylogarithmic factor; no equality of exact-exponent complexity classes is claimed.
The theorem asserts existence of simulators and transferred programs. It has no unproved transfer hypothesis and no hidden assumption that the source problem already has a fast algorithm: the concrete APSP and 3SUM conclusions are equivalences.
import Definitions.Def_WordRAM_APSP_Bridge set_option autoImplicit false
theorem WordRAM.APSPBridge.uniform_simulation_exists :
∃ d : Nat,
WordRAM.APSPBridge.UniformOperationalSimulation d ∧
WordRAM.APSPBridge.UniformTimeTransfer d ∧
WordRAM.APSPBridge.FineGrainedTimeEquivalence ∧
(WordRAM.APSPBridge.APSPBelow TrulySubcubicAPSP.APSP 3 ↔
WordRAM.APSPBridge.WordRAMBelow TrulySubcubicAPSP.APSP 3) ∧
((∃ r : Rat, r < 2 ∧ EndStatement.ThreeSum.SolvedInTime r) ↔
WordRAM.APSPBridge.WordRAMBelow
(WordRAM.APSPBridge.sourceProblem EndStatement.ThreeSum) 2) := by sorryRead-back
What the Lean code literally says, in plain math · gpt-6
WordRAM.APSPBridge.uniform_simulation_exists. There exists one natural exponent for which all five assertions below hold. Here the natural-addressed machine has memory on , positive bit width , and a fixed finite width-independent program with copy, modular addition/subtraction/multiplication, zero-filling shifts by unsigned word amounts, bitwise AND/OR/NOT, jumps, unsigned equality/order branches, and explicit halt; direct addresses are arbitrary naturals, indirect pointers are unsigned words, natural immediate constants are reduced modulo , and there are no native constants. Its runs start at program counter and tick count zero with halt flag false; every instruction including halt costs one step, and invalid fetches are stuck without halting. The signed-addressed machine has memory on and finite programs with constant-one writes, modular addition/subtraction/multiplication, signed-pointer loads/stores, branches on a negative signed word, accept and reject; all instructions cost one step, including the default rejection at an out-of-range program position. Halting within a natural fuel bound means that the specified verdict and whole final memory have been returned by that bound, not necessarily for the first time exactly then; zero fuel never gives a successful halt. (i) For every natural-addressed program there exist a signed-addressed program and positive natural , fixed before the width and input, such that for every positive source width and every arbitrary source memory , initialize at width with cell equal to , cell equal to the zero-extended unsigned word for every natural , and every other cell zero: each explicit source halt within any bound with memory has a target acceptance within some whose memory at is the zero-extension of for every ; conversely every target halt with any verdict and memory within any bound is an acceptance and is matched by a source halt within some preserving all those cells. For every signed-addressed program there likewise exist a natural-addressed program and positive natural , fixed before width and input, such that for every positive source width and arbitrary integer-addressed input , the target at width starts with cell zero equal to , source cell zero-extended into cell , and other cells zero, where if and for ; each source halt within any bound with verdict and memory has a target explicit halt within some preserving every embedded source cell and recording as unsigned or in target cell , and every target halt within any bound conversely arises from a source halt within some with those same memory and verdict equalities. These operational clauses impose no support restriction on source memories and no requirement on other final target cells. To state the remaining clauses, a problem consists of instances at each natural size, an integer input list, a decision predicate, and a predicate on a natural-indexed integer output sequence. Say a program solves such a problem for natural parameters and runtime function when, for every natural size , every instance whose input integers have absolute value at most , and every physical width at least , it halts within steps from position zero on the packed input followed by that input list, all words reduced modulo , where is the physical bit width and every other cell initially zero, with the correct decision verdict and with the signed words immediately following the input satisfying the output predicate. Here , with and otherwise the floor of the base-two logarithm; signed-addressed widths may be any natural, including zero, while natural-addressed widths must be positive, its halt must be explicit, and its final cell zero must contain the verdict as unsigned or . There is no upper width bound. (ii) For every problem and every natural such that every size- input has length at most and the output predicate has the same truth value on every two integer sequences agreeing at all indices below , the following holds in both directions between the two machines: for every natural , source program , natural , and runtime function , if solves for those parameters, then there exist a target program , a natural , and positive natural solving the same and at all target widths at least within steps. Target witnesses may depend on , but not on size, instance, or physical width; no growth hypothesis on is assumed. (iii) For every such and every rational threshold , a signed-addressed solver exists at some rational exponent below if and only if a natural-addressed solver exists at some rational exponent below . In this statement and the remaining assertions, existence at exponent in reduced form with means: for every natural there exist a program, natural , and runtime function solving for those parameters, and some natural such that for every . Thus the exponent is fixed before , but the other witnesses may depend on ; negative numerators are truncated to zero. (iv) Existence at some rational exponent strictly below is equivalent for the two machines for the following all-pairs-shortest-path problem: a size- instance is an integer-weighted directed graph on in which every closed finite walk has nonnegative weight, walks may repeat vertices, and the empty walk has weight zero; input is the row-major edge-presence matrix followed by the row-major weights, with zero weights for absent edges. The decision predicate is always true; the empty graph at has no required output pairs. For each ordered pair , output positions and must either be and a realized walk weight no greater than every walk weight from to , or have the first entry and there be no such walk; in the latter case the distance entry is unconstrained. (v) Existence at some rational exponent strictly below for the EndStatement signed-addressed machine, whose instruction, fuel, packed-input, signed-output and growth conventions are precisely the signed-addressed conventions just stated, is equivalent to existence below for the natural-addressed machine on the unchanged problem with size- instances , input list , and decision predicate that three pairwise distinct indices have values summing to zero; its output predicate is always true, and its decision predicate is false for . All size quantifiers include , all magnitude exponents include with , and width coefficients may be zero; correctness at sizes zero and one remains required although the growth inequality starts at two. In (ii) and (iii), forces empty input lists and output predicates independent of the output sequence; empty instance types make their instance conditions vacuous. The exponents witnessing the two sides of any equivalence need not agree, and no equivalence by itself asserts existence of a solver on either side.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.