From d7be8d9131a948ea1d25833e96906ea3da979764 Mon Sep 17 00:00:00 2001 From: Ali Romman <226877337+aliromman@users.noreply.github.com> Date: Wed, 18 Nov 2026 06:23:06 -0500 Subject: [PATCH] Prove the sharp global exact-sum Gaussian radial optimum --- .../CREDITS.md | 30 ++ .../PROOF.md | 211 +++++++++ .../README.md | 79 ++++ .../RESULT.json | 420 ++++++++++++++++++ .../SOURCES.json | 18 + .../TASK.json | 99 +++++ .../VERIFY.json | 34 ++ .../verify.py | 241 ++++++++++ 8 files changed, 1132 insertions(+) create mode 100644 research/gaussian-exact-sum-global-optimum/CREDITS.md create mode 100644 research/gaussian-exact-sum-global-optimum/PROOF.md create mode 100644 research/gaussian-exact-sum-global-optimum/README.md create mode 100644 research/gaussian-exact-sum-global-optimum/RESULT.json create mode 100644 research/gaussian-exact-sum-global-optimum/SOURCES.json create mode 100644 research/gaussian-exact-sum-global-optimum/TASK.json create mode 100644 research/gaussian-exact-sum-global-optimum/VERIFY.json create mode 100644 research/gaussian-exact-sum-global-optimum/verify.py diff --git a/research/gaussian-exact-sum-global-optimum/CREDITS.md b/research/gaussian-exact-sum-global-optimum/CREDITS.md new file mode 100644 index 0000000000..1b485ae533 --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/CREDITS.md @@ -0,0 +1,30 @@ +# Sources and credit + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +New work is Apache-2.0. No source code was copied. The exact arithmetic +checker is author-written; it is not an independent scientific review. +Independent human and formal-kernel acceptance are unclaimed. + +- Ali Romman's [PR #7673](https://github.com/CrocSwap/integer-mult-bounds/pull/7673), + [pinned proof](https://github.com/aliromman/integer-mult-bounds/blob/8ebf5eec9188f29c98be86eb1247f2ec6b41f19f/research/gaussian-exact-sum-next-obstruction/PROOF.md), + supplied the eighteen-to-sixteen Hall obstruction and open global question. + Its finite lower bound is retained as prior work. +- Nick Petalas's [PR #7652](https://github.com/CrocSwap/integer-mult-bounds/pull/7652), + [pinned source](https://github.com/petalas/integer-mult-bounds/blob/317fecee459888f4e4fecd8ca62adeb7583f696d/research/gaussian-exact-sum-forward-slack/README.md), + supplied the forward-only exact-sum question, candidate graph and first + eight-to-six Hall obstruction. The PR body identifies Nick Petalas. +- Jerry Chen / CubeJerry's [PR #7570](https://github.com/CrocSwap/integer-mult-bounds/pull/7570), + [pinned proof](https://github.com/CubeJerry/integer-mult-bounds/blob/053c42c68165cf24fd4e8bc33c2b20d6ac3d399b/research/sharp-order-four-gaussian-rounding/proof/PROOF.md), + supplied the half-grid transform, annular geometry and sharp stronger + square-to-swap class. That source was read. The new individual-ring + matching does not retain its quarter-turn requirement or connector edges. +- Ali Romman's [PR #6509](https://github.com/CrocSwap/integer-mult-bounds/pull/6509), + [pinned proof](https://github.com/aliromman/integer-mult-bounds/blob/a4173e810c4d34a1d13b9745af123ad0ec6cfed5/research/conservative-gaussian-rounding/PROOF.md), + supplied the ideal pair and exact-sum rounding contract. Its physical + port evidence is not transferred to the present map. That source retains + the earlier native, reversible-lifting, compiler and rounding credits. + +The new result is the growing Hall family, its limiting lower bound and +an explicit global bijection at that bound. The first two finite members +and the half-grid formulation are not new. The proof is self-contained; +these links identify the mathematical lineage, not runtime inputs. diff --git a/research/gaussian-exact-sum-global-optimum/PROOF.md b/research/gaussian-exact-sum-global-optimum/PROOF.md new file mode 100644 index 0000000000..5a7d5445c6 --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/PROOF.md @@ -0,0 +1,211 @@ +# The global exact-sum Gaussian radial optimum + +Let G=Z[i]. For x,y in G, write s=x+y and d=x-y. Set +`C_+(x,y)=((s+i*d)/2,(s-i*d)/2)` and use the Euclidean pair norm. +An admissible map F:G^2 -> G^2 is injective, preserves s exactly and has +`||F(z)-C_+(z)||<=1` for every input. Its forward outward slack is +`sup_z max(0,||F(z)||-||z||)`. + +**Theorem.** The minimum forward outward slack is `1/sqrt(2)`. +An explicit bijection attains this supremum. Its inverse approximates +C_- with error at most one. Its inverse outward and absolute radial +suprema are also `1/sqrt(2)`. Every individual radial change is strictly +smaller than this value. No phase, period, square identity or surjectivity +premise is needed for the lower bound. + +The earlier finite lower bounds are `sqrt(5)-sqrt(3)` in +[Nick Petalas's PR #7652](https://github.com/CrocSwap/integer-mult-bounds/pull/7652) +and `sqrt(13)-3` in +[Ali Romman's PR #7673](https://github.com/CrocSwap/integer-mult-bounds/pull/7673). +They are the first two positive members of the square family below. +The new result is the full family, its limiting lower bound and global +attainment. The finite witnesses retain their prior credit. + +## 1. The exact half-grid graph + +Identify complex numbers with real two-vectors. Define + +```text +J(a,b)=(-b,a), B(a,b)=(a+b,a-b), T=B/2. +B=T^-1, ||T v||^2=||v||^2/2. +``` + +The output difference f(d) must have the component parities of s. +The pair norm squared is `|s|^2/2+|d|^2/2`. The error squared is +`|f(d)-Jd|^2/2`. If the component parities of s agree, the ideal output +is integral. Exact sum makes the two Gaussian errors e and -e, so the +error condition forces e=0. + +If the parities differ, both components of `f(d)-Jd` are odd integers. +Their squared sum is at most two only when both are ±1. Put +`t=T Jd` and `u=T f(d)`. Both lie in `L=(Z+1/2)^2`, and u is one of the +four unit neighbors of t. These points have opposite colors, where the +color of a point is its integer coordinate sum modulo two. The norm +squared is `c+|t|^2` at the input and `c+|u|^2` at the output, with +`c=|s|^2/2>=1/2`. + +For the sum-one fiber, input points t have even color and output points +u have odd color. The changes of coordinates are bijections on these +cosets. Thus every admissible injection gives an injection from the even +color to the odd color, using only unit edges. This reduction uses no +surjectivity or order identity. The half-grid formulation is credited to +[CubeJerry's pinned proof](https://github.com/CubeJerry/integer-mult-bounds/blob/053c42c68165cf24fd4e8bc33c2b20d6ac3d399b/research/sharp-order-four-gaussian-rounding/proof/PROOF.md). + +## 2. A growing family of Hall obstructions + +Let `r=k+1/2`, for an integer k>=1. Take all even-color points S_r in +the square `D_r={t in L:max(|t_1|,|t_2|)<=r}`. Each color has +`2(k+1)^2` points. Exactly two corners have odd color. Each such corner +can be reached from inside D_r only by an edge from `(r-1,r)`, up to +coordinate signs and exchange. Its forward radial cost at sum one is + +```text +a(r) = sqrt(2r^2+1/2) - sqrt(2r^2-2r+3/2). +``` + +Every edge from D_r to its exterior changes a boundary coordinate r to +r+1 in absolute value. Its radial cost is smallest when the other +coordinate also has absolute value r. Thus its cost is at least + +```text +b(r) = sqrt(2r^2+2r+3/2) - sqrt(2r^2+1/2) > 1/sqrt(2). +``` + +For the last strict inequality, set `A=2r^2+1/2`. The squared-radius +increment is `2r+1`. Comparing its square-root gap with `1/sqrt(2)` +by positive squaring reduces to +`(2r+1/2)^2>2A`, or `2r>3/4`. This holds for r>=1/2. + +Also `a(r)<1/sqrt(2)`: it is a tangential edge of a square ring, covered +by the upper bound in Section 4. If the forward slack were less than +a(r), no output of S_r could be outside D_r or at either odd corner. +At most `2(k+1)^2-2` outputs would remain for `2(k+1)^2` inputs. +This violates injectivity. Therefore every admissible injection has +forward slack at least a(r), for every k>=1. + +Rationalization gives + +```text +a(r) = (2r-1) / + (sqrt(2r^2+1/2)+sqrt(2r^2-2r+3/2)). +``` + +Its limit as r tends to infinity is `1/sqrt(2)`. The lower bound follows. +No passage from finite successful matchings to a global map is used. +The cases r=3/2 and r=5/2 give the credited eight-to-six and +eighteen-to-sixteen witnesses. Larger squares prove strictly stronger +necessary bounds; the limit is a global obstruction, not a search result. + +## 3. An explicit bijection on every sum fiber + +Each point of L lies on exactly one square ring of radius `r=k+1/2`. +Traverse that ring from `(r,r)` along the top, left, bottom and right +sides. Each side contains its first corner and excludes its final corner. +The cycle has `8k+4` vertices. Pair entries 0 with 1, 2 with 3, and so on. +The even cycle length makes this a perfect matching. Each edge has unit +length and stays on the ring. Write M for the resulting involution on L. +It exchanges the two colors. It also satisfies `M(-t)=-M(t)`: the +half-turn shifts the cycle index by `4k+2`, an even integer. + +This construction uses individual rings. The paired-ring construction in +[PR #7570](https://github.com/CrocSwap/integer-mult-bounds/pull/7570) +serves its stronger square-to-swap contract. Its connector edges and +quarter-turn symmetry are not imposed here. + +For equal-parity sums use the exact ideal difference `f_+(d)=Jd`. +For mixed sums set + +```text +f_+(d) = B M(T Jd), +F_+(x,y) = ((s+f_+(d))/2,(s-f_+(d))/2). +``` + +To check parity, write d's component parities as `(p,1-p)`. +The coordinate sum of `T Jd` has parity `1-p`. M changes it to p. +For a half-grid point of color p, B produces components of parities +`(p,1-p)`. The output halves are therefore Gaussian integers. The map +preserves s. Its error is exactly one in every mixed fiber, since M +moves a point by one and B multiplies squared norm by two. + +The inverse difference map is explicit: + +```text +f_-(d) = -J B M(T d) [mixed sums], +f_-(d) = -Jd [equal-parity sums]. +``` + +Using `T B=I`, `(-J)J=I` and `M^2=I` proves both inverse identities. +The same color check proves that f_- stays in the required coset. +It has error one from -Jd in a mixed fiber. These formulas give a total +bijection on every fiber and hence on G^2. They do not choose unrelated +finite matchings or require a limiting existence theorem. + +## 4. Uniform radial bound and exact suprema + +An edge in a ring has one fixed coordinate of absolute value r. +A sign change between -1/2 and 1/2 has zero radial change. Every other +edge has absolute changing coordinates u and u+1, with `u>=1/2` and +`r>=u+1`. Its lower squared radius is `A=c+r^2+u^2`; the increment +is `2u+1`. Positive squaring shows that its radial gap is less than +`1/sqrt(2)` exactly when + +```text +(2u+1/2)^2 < 2A. +``` + +Since `c>=1/2` and `r>=u+1`, the right side is at least +`4u^2+4u+3`, while the left side is `4u^2+2u+1/4`. +The inequality is strict. This proves the absolute radial bound on every +mixed sum fiber; equal-parity fibers have zero change. The inverse uses +the same undirected edges, so the same bound applies. + +For every integer k>=1 the formulas give + +```text +F_+(-k*i,1+k*i) = (k+1,-k), +F_-(1-k*i,k*i) = (-k,k+1). +``` + +In the first case the matching edge is `(r-1,r)` to `(r,r)`; +in the second it is `(-r+1,r)` to `(-r,r)`, with `r=k+1/2`. +Both inputs have squared norm `2k^2+1`, and both outputs have squared +norm `2k^2+2k+1`. Their outward gaps are a(r), which tend to +`1/sqrt(2)`. Thus the forward, inverse outward and absolute suprema +of this explicit map all equal the lower bound. None is a maximum at +a finite input. The inverse conclusion uses these actual pairs, without +assuming that an arbitrary injective positive provider has an inverse. + +## 5. Contract, verification and limitations + +The map commutes with wire swap because M is odd. It commutes with common +Gaussian translation because d and the sum parities do not change. It +is exact on all integral ideal images and fixes equal-input pairs. +Global phase covariance and the square-to-swap identity fail; explicit +four-coordinate counterexamples are in RESULT.json. They are not promised +interfaces. The inverse is the stated formula, not an assumed square or +conjugation rule. No tensor commutation or native-graph identity is claimed. + +The checker constructs 129 complete rings by a separate directed walk, +compares their 66564 points with the direct index formula, and checks +matching, colors, oddness and exact radical inequalities. It checks both +providers, direct four-real-coordinate errors, inverse identities and +radial bounds for all 14641 pairs in [-5,5]^4 and 80 additional signed +inputs through 4097 bits. Thirty-two complete Hall squares check the +corner and exterior edges. Three separate rational-threshold neighborhood +censuses and one larger symbolic count corroborate the deficits. Invalid +domains, zero slack and the excluded algebraic identities are controls. +All arithmetic is integral. These checks support the written all-input +proof; they do not replace it. + +No finite-width physical schedule, scratch restoration, tape cost, native +tariff, caller error recurrence or analytic recovery is supplied. The +selected kappa and all five selected assumptions remain unchanged. The +construction can serve only a caller that accepts its stated inverse and +missing symmetries. Full predecessor replays, the selected cold replay, +Lean and Docker were not run. Independent human and formal-kernel review +are unclaimed. + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +[CREDITS.md](CREDITS.md) gives the exact source roles. The proof and code +are new; prior half-grid geometry and finite witnesses retain their credit. +Apache-2.0. diff --git a/research/gaussian-exact-sum-global-optimum/README.md b/research/gaussian-exact-sum-global-optimum/README.md new file mode 100644 index 0000000000..2f67e2acfc --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/README.md @@ -0,0 +1,79 @@ +# The sharp global exact-sum Gaussian rounding bound + +The minimum forward radial slack for an injective exact-sum Gaussian-pair +rounder with Euclidean error at most one is **1/sqrt(2)**. A stated +bijection attains this supremum and has the same inverse and absolute +radial suprema. Every finite input has a strictly smaller radial change. +The lower bound needs no phase, order, period or surjectivity condition. + +[PROOF.md](PROOF.md) gives the full Hall family and the individual-ring +construction. [verify.py](verify.py) is a direct integer implementation +with an explicit inverse. [RESULT.json](RESULT.json) records the exact +checks. This resolves the global question left by +[PR #7673](https://github.com/CrocSwap/integer-mult-bounds/pull/7673); +its finite lower bound sqrt(13)-3 is strictly below the global optimum. + +## Evidence and reproduction + +Use CPython 3.12 and its standard library from the repository root: + +```sh +python3.12 -I -W error -B research/gaussian-exact-sum-global-optimum/verify.py +python3.12 -I -W error -B -O research/gaussian-exact-sum-global-optimum/verify.py +python3.12 -B scripts/research_package.py --package research/gaussian-exact-sum-global-optimum +python3.12 -B scripts/check_research_commit.py --package research/gaussian-exact-sum-global-optimum --check-source-history --check-modes +``` + +Expected markers are PASS_GAUSSIAN_EXACT_SUM_GLOBAL_OPTIMUM, +PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. +The checks cover 129 complete rings with 66564 points, 14641 Gaussian +pairs in the full cube [-5,5]^4, 80 signed inputs through 4097 bits, +32 complete Hall squares and rational-threshold neighborhood counts. +They check direct ideal errors, both inverse identities, exact radial +inequalities, translation/swap covariance and failure controls. +Finite checks corroborate the written all-input proof. + +## Contract and limits + +The map preserves exact sums, common Gaussian translations and wire swap. +It is exact on integral ideal images. Its negative provider is the stated +inverse formula. Phase covariance and the square-to-swap identity fail. +The distinct stronger class in +[PR #7570](https://github.com/CrocSwap/integer-mult-bounds/pull/7570) +has optimum sqrt(19)-sqrt(13); the new map cannot replace that contract +without an explicit caller change. No tensor commutation is supplied. + +No physical finite-width graph, range envelope, scratch restoration, +tape cost, native tariff or complete caller is supplied. No new kappa or +selected-assumption discharge is claimed. The selected frontier and all +five assumptions remain unchanged. Full predecessor scientific replays, +selected cold replay, Lean and Docker were not run. Independent human +and formal-kernel review are unclaimed. + +## Source and scope + +Base: canonical main e54523517d0f03e58352e647c403a5af3e525a57, priority +revision 8. [SOURCES.json](SOURCES.json) pins selection and task metadata. +The uniform-transfer card changes scope to this exact local precision +contract; [TASK.json](TASK.json) records the boundary and remaining costs. +The [advance claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19707397) follows the existing exact-sum handoff. +Fresh open PR and Discussion checks, source-specific PR intake and the +complete closed snapshot with its updated-order delta show no competing +global claim. Sparse local and unpublished work remain coverage limits. + +## Open next questions + +Can a pinned caller accept the explicit inverse and missing phase/square +identities? First state its algebraic requirements and ordered-stage +contract. A physical implementation also needs complete range, temporary, +restoration and bit/tape costs. A numerical optimum does not discharge +these obligations. + +## Credit + +Prepared by Ali Romman with substantial OpenAI Codex assistance. +Credit Nick Petalas for the exact-sum forward question and first finite +witness, CubeJerry/Jerry Chen for the half-grid and annular geometry, +and Ali Romman for the next finite witness and ideal pair. +[CREDITS.md](CREDITS.md) links the exact proofs and identifies what is new. +New work is Apache-2.0. diff --git a/research/gaussian-exact-sum-global-optimum/RESULT.json b/research/gaussian-exact-sum-global-optimum/RESULT.json new file mode 100644 index 0000000000..c6c72bc575 --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/RESULT.json @@ -0,0 +1,420 @@ +{ + "status": "PASS_GAUSSIAN_EXACT_SUM_GLOBAL_OPTIMUM", + "theorem": "global forward optimum 1/sqrt(2); explicit bijection has the same bilateral and inverse suprema", + "complete_rings": 129, + "half_grid_points": 66564, + "pair_cube": [ + -5, + 5 + ], + "pair_inputs": 14641, + "sum_parities": { + "(0, 0)": 3721, + "(0, 1)": 3660, + "(1, 0)": 3660, + "(1, 1)": 3600 + }, + "large_inputs": 80, + "largest_input_bits": 4097, + "sharpness_sequence_indices": 69, + "hall_squares": [ + { + "r_doubled": 3, + "sources": 8, + "remaining_targets": 6, + "corner_gap_squared_norms": [ + 3, + 5 + ], + "boundary_edges": 8 + }, + { + "r_doubled": 5, + "sources": 18, + "remaining_targets": 16, + "corner_gap_squared_norms": [ + 9, + 13 + ], + "boundary_edges": 12 + }, + { + "r_doubled": 7, + "sources": 32, + "remaining_targets": 30, + "corner_gap_squared_norms": [ + 19, + 25 + ], + "boundary_edges": 16 + }, + { + "r_doubled": 9, + "sources": 50, + "remaining_targets": 48, + "corner_gap_squared_norms": [ + 33, + 41 + ], + "boundary_edges": 20 + }, + { + "r_doubled": 11, + "sources": 72, + "remaining_targets": 70, + "corner_gap_squared_norms": [ + 51, + 61 + ], + "boundary_edges": 24 + }, + { + "r_doubled": 13, + "sources": 98, + "remaining_targets": 96, + "corner_gap_squared_norms": [ + 73, + 85 + ], + "boundary_edges": 28 + }, + { + "r_doubled": 15, + "sources": 128, + "remaining_targets": 126, + "corner_gap_squared_norms": [ + 99, + 113 + ], + "boundary_edges": 32 + }, + { + "r_doubled": 17, + "sources": 162, + "remaining_targets": 160, + "corner_gap_squared_norms": [ + 129, + 145 + ], + "boundary_edges": 36 + }, + { + "r_doubled": 19, + "sources": 200, + "remaining_targets": 198, + "corner_gap_squared_norms": [ + 163, + 181 + ], + "boundary_edges": 40 + }, + { + "r_doubled": 21, + "sources": 242, + "remaining_targets": 240, + "corner_gap_squared_norms": [ + 201, + 221 + ], + "boundary_edges": 44 + }, + { + "r_doubled": 23, + "sources": 288, + "remaining_targets": 286, + "corner_gap_squared_norms": [ + 243, + 265 + ], + "boundary_edges": 48 + }, + { + "r_doubled": 25, + "sources": 338, + "remaining_targets": 336, + "corner_gap_squared_norms": [ + 289, + 313 + ], + "boundary_edges": 52 + }, + { + "r_doubled": 27, + "sources": 392, + "remaining_targets": 390, + "corner_gap_squared_norms": [ + 339, + 365 + ], + "boundary_edges": 56 + }, + { + "r_doubled": 29, + "sources": 450, + "remaining_targets": 448, + "corner_gap_squared_norms": [ + 393, + 421 + ], + "boundary_edges": 60 + }, + { + "r_doubled": 31, + "sources": 512, + "remaining_targets": 510, + "corner_gap_squared_norms": [ + 451, + 481 + ], + "boundary_edges": 64 + }, + { + "r_doubled": 33, + "sources": 578, + "remaining_targets": 576, + "corner_gap_squared_norms": [ + 513, + 545 + ], + "boundary_edges": 68 + }, + { + "r_doubled": 35, + "sources": 648, + "remaining_targets": 646, + "corner_gap_squared_norms": [ + 579, + 613 + ], + "boundary_edges": 72 + }, + { + "r_doubled": 37, + "sources": 722, + "remaining_targets": 720, + "corner_gap_squared_norms": [ + 649, + 685 + ], + "boundary_edges": 76 + }, + { + "r_doubled": 39, + "sources": 800, + "remaining_targets": 798, + "corner_gap_squared_norms": [ + 723, + 761 + ], + "boundary_edges": 80 + }, + { + "r_doubled": 41, + "sources": 882, + "remaining_targets": 880, + "corner_gap_squared_norms": [ + 801, + 841 + ], + "boundary_edges": 84 + }, + { + "r_doubled": 43, + "sources": 968, + "remaining_targets": 966, + "corner_gap_squared_norms": [ + 883, + 925 + ], + "boundary_edges": 88 + }, + { + "r_doubled": 45, + "sources": 1058, + "remaining_targets": 1056, + "corner_gap_squared_norms": [ + 969, + 1013 + ], + "boundary_edges": 92 + }, + { + "r_doubled": 47, + "sources": 1152, + "remaining_targets": 1150, + "corner_gap_squared_norms": [ + 1059, + 1105 + ], + "boundary_edges": 96 + }, + { + "r_doubled": 49, + "sources": 1250, + "remaining_targets": 1248, + "corner_gap_squared_norms": [ + 1153, + 1201 + ], + "boundary_edges": 100 + }, + { + "r_doubled": 51, + "sources": 1352, + "remaining_targets": 1350, + "corner_gap_squared_norms": [ + 1251, + 1301 + ], + "boundary_edges": 104 + }, + { + "r_doubled": 53, + "sources": 1458, + "remaining_targets": 1456, + "corner_gap_squared_norms": [ + 1353, + 1405 + ], + "boundary_edges": 108 + }, + { + "r_doubled": 55, + "sources": 1568, + "remaining_targets": 1566, + "corner_gap_squared_norms": [ + 1459, + 1513 + ], + "boundary_edges": 112 + }, + { + "r_doubled": 57, + "sources": 1682, + "remaining_targets": 1680, + "corner_gap_squared_norms": [ + 1569, + 1625 + ], + "boundary_edges": 116 + }, + { + "r_doubled": 59, + "sources": 1800, + "remaining_targets": 1798, + "corner_gap_squared_norms": [ + 1683, + 1741 + ], + "boundary_edges": 120 + }, + { + "r_doubled": 61, + "sources": 1922, + "remaining_targets": 1920, + "corner_gap_squared_norms": [ + 1801, + 1861 + ], + "boundary_edges": 124 + }, + { + "r_doubled": 63, + "sources": 2048, + "remaining_targets": 2046, + "corner_gap_squared_norms": [ + 1923, + 1985 + ], + "boundary_edges": 128 + }, + { + "r_doubled": 65, + "sources": 2178, + "remaining_targets": 2176, + "corner_gap_squared_norms": [ + 2049, + 2113 + ], + "boundary_edges": 132 + } + ], + "rational_hall_checks": [ + [ + 1, + 2, + 3, + 8, + 6 + ], + [ + 3, + 5, + 5, + 18, + 16 + ], + [ + 7, + 10, + 65, + 2178, + 2176 + ], + [ + 707, + 1000, + 4097, + "symbolic corner and boundary counts" + ] + ], + "ring_pairing_sha256": "f23ea25d4b260edd868936ede8d79560d93181400c151e42c6e5154b3f46a5ff", + "fault_controls": [ + "non-half-grid (0, 1)", + "non-half-grid (2, 2)", + "invalid provider sign", + "zero radial slack: (-2, -2, -1, 0)" + ], + "excluded_identity_witnesses": { + "square_to_swap": [ + [ + -2, + -2, + -2, + -1 + ], + [ + -2, + -2, + -2, + -1 + ], + [ + -2, + -2, + -2, + -1 + ] + ], + "phase_covariance": [ + [ + -2, + -2, + -2, + -1 + ], + [ + 1, + -2, + 2, + -2 + ], + [ + 2, + -2, + 1, + -2 + ] + ] + } +} diff --git a/research/gaussian-exact-sum-global-optimum/SOURCES.json b/research/gaussian-exact-sum-global-optimum/SOURCES.json new file mode 100644 index 0000000000..5335fa97d9 --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ] +} diff --git a/research/gaussian-exact-sum-global-optimum/TASK.json b/research/gaussian-exact-sum-global-optimum/TASK.json new file mode 100644 index 0000000000..148aa2357a --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/TASK.json @@ -0,0 +1,99 @@ +{ + "schema_version": 1, + "task_id": "uniform-transfer-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "uniform-transfer-audit", + "question": "Can one of the selected record's five inherited assumptions be proved at its actual caller?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one assumption ID (native_all_columns, owned_erasure, compiler, precision_tape, analytic_recovery), one quantified implication and exact dependency closure. Check current handoffs, including #5625 row reentry and #5707 root-prefix lowering, without treating their partial scope as the whole theorem. Prove or falsify that implication with a caller-bound argument; stop at the chosen obligation. Finite tests or root digits do not discharge an all-size statement.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "existing_checks": [ + { + "scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.", + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.", + "status": "author-checked", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Sharp global radial optimum for injective exact-sum error-one Gaussian rounding, without order or phase assumptions.", + "scope_change_reason": "Resolve the all-lattice question in PR7673 with a full Hall family and an explicit bijection; this is a local precision contract, not selected caller admission.", + "bottleneck_link": "A caller that needs exact sums must allow at least 1/sqrt(2) outward radial slack at unit rounding error. The new map meets this optimum with its explicit inverse.", + "budget_minutes": 60, + "stop_rule": "Stop at the global numerical contract. Do not infer a physical tape schedule, native tariff, tensor identity or complete multiplier.", + "outcome": "completed", + "evidence": "PROOF.md; RESULT.json; complete ring and Hall checks, direct Gaussian errors, both inverse identities and signed large inputs.", + "author": "Ali Romman", + "ai_assistance": "Substantial OpenAI Codex assistance; no independent human or formal-kernel review claimed.", + "open_questions": [ + { + "question": "Can a pinned caller accept this inverse, missing phase symmetry and ordered nonlinear stages?", + "why_it_matters": "The sharp local radial bound alone cannot replace a provider with a stronger algebraic contract.", + "first_step": "List the caller identities and test the exact positive and negative formulas before a physical implementation.", + "blocked_by": "No caller or physical implementation is supplied." + } + ], + "family_decision": { + "decision": "Resolve the global exact-sum optimum, then stop at this precision contract.", + "sources": "7673@8ebf5eec9188f29c98be86eb1247f2ec6b41f19f; 7652@317fecee459888f4e4fecd8ca62adeb7583f696d; 7570@053c42c68165cf24fd4e8bc33c2b20d6ac3d399b", + "evidence_status": "Author-checked proof and exact finite corroboration.", + "boundary": "All Gaussian pairs; exact sum, injectivity and pair error at most one. The construction is a bijection with an explicit negative provider.", + "obligations": { + "global_lower_bound": "proved by a Hall family", + "global_bijection": "explicit", + "forward_and_inverse_error": "proved", + "radial_suprema": "sharp", + "physical_range_and_tape": "unknown; not zero", + "native_tariff_and_complete_caller": "not supplied" + }, + "alternative": "A larger finite ball matching cannot prove global attainment.", + "construction_gate": "This is a numerical contract. Further physical work requires a caller that accepts the stated inverse and missing symmetries." + } +} diff --git a/research/gaussian-exact-sum-global-optimum/VERIFY.json b/research/gaussian-exact-sum-global-optimum/VERIFY.json new file mode 100644 index 0000000000..a9190e471e --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/VERIFY.json @@ -0,0 +1,34 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Complete square rings, Hall corner and exterior edges, rational threshold neighborhoods, direct Gaussian errors, inverse identities, radial bounds and contract controls." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Complete square rings, Hall corner and exterior edges, rational threshold neighborhoods, direct Gaussian errors, inverse identities, radial bounds and contract controls." + } + ] +} diff --git a/research/gaussian-exact-sum-global-optimum/verify.py b/research/gaussian-exact-sum-global-optimum/verify.py new file mode 100644 index 0000000000..c3f4003ec0 --- /dev/null +++ b/research/gaussian-exact-sum-global-optimum/verify.py @@ -0,0 +1,241 @@ +#!/usr/bin/env python3 +"""Check the global Gaussian rounder and finite Hall witnesses. + +Ali Romman, with substantial OpenAI Codex assistance. Apache-2.0. +""" +from collections import Counter +from itertools import product +from pathlib import Path +import hashlib +import json + +ROOT = Path(__file__).resolve().parent + + +def require(value, message): + if not value: + raise ValueError(message) + + +def ring_point(r, index): + side, offset = divmod(index % (4*r), r) + if side == 0: + return r-2*offset, r + if side == 1: + return -r, r-2*offset + if side == 2: + return -r+2*offset, -r + return r, -r+2*offset + + +def partner(point): + """Use doubled odd coordinates on one square ring.""" + x, y = point + require(x % 2 == y % 2 == 1, 'half-grid domain') + r = max(abs(x), abs(y)) + if y == r and x > -r: + index = (r-x)//2 + elif x == -r and y > -r: + index = r+(r-y)//2 + elif y == -r and x < r: + index = 2*r+(x+r)//2 + else: + index = 3*r+(y+r)//2 + return ring_point(r, index ^ 1) + + +def rotate(point, sign): + x, y = point + return -sign*y, sign*x + + +def round_pair(value, sign=1): + """Return the positive rounder or its explicit inverse.""" + require(sign in (-1, 1), 'provider sign') + a, b, c, d = value + sx, sy, dx, dy = a+c, b+d, a-c, b-d + if (sx-sy) % 2 == 0: + ex, ey = rotate((dx, dy), sign) + elif sign == 1: + px, py = partner((dx-dy, -dx-dy)) + ex, ey = (px+py)//2, (px-py)//2 + else: + px, py = partner((dx+dy, dx-dy)) + ex, ey = (px-py)//2, -(px+py)//2 + require((sx-ex) % 2 == (sy-ey) % 2 == 0, 'output parity') + return (sx+ex)//2, (sy+ey)//2, (sx-ex)//2, (sy-ey)//2 + + +def norm(value): + return sum(x*x for x in value) + + +def below_limit(a, b): + """Decide abs(sqrt(b)-sqrt(a)) < 1/sqrt(2) exactly.""" + a, b = sorted((a, b)) + difference = b-a + return difference == 0 or (2*difference-1)**2 < 8*a + + +def check_pair(value): + n = norm(value) + for sign in (-1, 1): + out = round_pair(value, sign) + a, b, c, d = value + sx, sy = a+c, b+d + require((out[0]+out[2], out[1]+out[3]) == (sx, sy), 'sum') + ex, ey = rotate((a-c, b-d), sign) + twice_ideal = (sx+ex, sy+ey, sx-ex, sy-ey) + error4 = sum((2*u-v)**2 for u, v in zip(out, twice_ideal)) + require(error4 == (0 if (sx-sy) % 2 == 0 else 4), 'direct ideal error') + require(round_pair(out, -sign) == value, 'two-sided inverse') + require(below_limit(n, norm(out)), 'strict radial bound') + swapped = value[2:]+value[:2] + require(round_pair(swapped, sign) == out[2:]+out[:2], 'swap covariance') + shifted = (a+3, b-2, c+3, d-2) + require(round_pair(shifted, sign) == (out[0]+3, out[1]-2, out[2]+3, out[3]-2), 'common translation') + return (sx % 2, sy % 2) + + +def color(point): + return ((point[0]+point[1])//2) % 2 + + +def neighbors(point): + x, y = point + return {(x-2,y), (x+2,y), (x,y-2), (x,y+2)} + + +def half_norm(point): + """Return the pair squared norm at sum one.""" + x, y = point + require((x*x+y*y+2) % 4 == 0, 'half norm parity') + return (x*x+y*y+2)//4 + + +def gap_le_rational(a, b, p, q): + difference = (b-a)*q*q-p*p + return difference <= 0 or difference*difference <= 4*a*p*p*q*q + + +def hall_square(r): + points = {(x,y) for x in range(-r, r+1, 2) for y in range(-r, r+1, 2)} + source = {z for z in points if color(z) == 0} + target = points-source + corners = {z for z in target if abs(z[0]) == abs(z[1]) == r} + # A boundary step has radial jump above 1/sqrt(2). Both target corners + # need the stated inward step. These exact facts prove the exclusion. + low = (r*r+(r-2)**2+2)//4 + high = (2*r*r+2)//4 + require(len(source) == len(target) == (r+1)**2//2, 'square color counts') + require(len(corners) == 2 and below_limit(low,high), 'corner threshold') + internal = set() + boundary = 0 + for u in source: + for v in neighbors(u): + if v not in points: + require(not below_limit(half_norm(u),half_norm(v)), 'outward boundary') + require(half_norm(v)>half_norm(u), 'boundary direction') + boundary += 1 + elif v in corners: + require((half_norm(u),half_norm(v)) == (low,high), 'corner edge cost') + else: + internal.add(v) + require(internal == target-corners, 'remaining neighbors') + return {'r_doubled':r,'sources':len(source),'remaining_targets':len(internal), + 'corner_gap_squared_norms':[low,high],'boundary_edges':boundary} + + +def verify(): + ring_count = 129 + points_checked = 0 + fingerprint = hashlib.sha256() + for k in range(ring_count): + r=2*k+1 + # Build the cycle by four directed walks, separate from ring_point. + cycle=[] + x,y=r,r + for dx,dy in [(-2,0),(0,-2),(2,0),(0,2)]: + for _ in range(r): + cycle.append((x,y));x+=dx;y+=dy + require((x,y)==(r,r) and len(set(cycle))==4*r,'cycle partition') + actual={(a,b) for a in range(-r,r+1,2) for b in range(-r,r+1,2) + if max(abs(a),abs(b))==r} + require(set(cycle)==actual,'complete ring') + for index,u in enumerate(cycle): + v=partner(u) + require(v==cycle[index ^ 1] and v in neighbors(u), 'consecutive pairing') + require(partner(v)==u and color(v)!=color(u), 'matching involution') + require(partner((-u[0],-u[1]))==(-v[0],-v[1]), 'odd matching') + require(below_limit(half_norm(u),half_norm(v)), 'ring radial bound') + fingerprint.update(f'{u}:{v};'.encode()) + points_checked+=1 + parity=Counter() + for value in product(range(-5,6),repeat=4): + parity[check_pair(value)]+=1 + large=[] + for bits in [16,64,256,1024,4096]: + n=2**bits+7 + for signs in product((-1,1),repeat=2): + for value in [(signs[0]*n,signs[1]*(n-1),0,0), + (signs[0]*n,signs[1]*n,1,-2), + (n,n-1,-n,2-n),(n,0,1-n,0)]: + check_pair(value);large.append(bits) + sequence_values = list(range(1,65)) + [2**b+7 for b in [16,64,256,1024,4096]] + for k in sequence_values: + require(round_pair((0,-k,1,k))==(k+1,0,-k,0), 'forward sharpness sequence') + require(round_pair((1,-k,0,k),-1)==(-k,0,k+1,0), 'inverse sharpness sequence') + require(norm((0,-k,1,k))==2*k*k+1 and norm((k+1,0,-k,0))==2*k*k+2*k+1, 'sharpness norms') + halls=[hall_square(r) for r in range(3,66,2)] + # A separate neighbor census tests the Hall deficit at rational slacks. + rational=[] + for p,q,r in [(1,2,3),(3,5,5),(7,10,65),(707,1000,4097)]: + low=(r*r+(r-2)**2+2)//4;high=(2*r*r+2)//4 + require(not gap_le_rational(low,high,p,q),'Hall gap exceeds trial slack') + if r<=65: + source={(x,y) for x in range(-r,r+1,2) for y in range(-r,r+1,2) if color((x,y))==0} + targets=set().union(*({v for v in neighbors(u) if gap_le_rational(half_norm(u),half_norm(v),p,q)} for u in source)) + require(len(targets)norm(value)) + controls.append('zero radial slack: '+str(witness)) + result={'status':'PASS_GAUSSIAN_EXACT_SUM_GLOBAL_OPTIMUM', + 'theorem':'global forward optimum 1/sqrt(2); explicit bijection has the same bilateral and inverse suprema', + 'complete_rings':ring_count,'half_grid_points':points_checked, + 'pair_cube':[-5,5],'pair_inputs':sum(parity.values()), + 'sum_parities':{str(k):v for k,v in sorted(parity.items())}, + 'large_inputs':len(large),'largest_input_bits':4097, + 'sharpness_sequence_indices':len(sequence_values), + 'hall_squares':halls,'rational_hall_checks':rational, + 'ring_pairing_sha256':fingerprint.hexdigest(), + 'fault_controls':controls,'excluded_identity_witnesses':faults} + return json.loads(json.dumps(result)) + + +if __name__=='__main__': + result=verify() + require(result==json.loads((ROOT/'RESULT.json').read_text()),'retained receipt differs') + print(json.dumps(result,indent=2,sort_keys=True))