diff --git a/research/four-axis-exact-square-grid/CERTIFICATE.json b/research/four-axis-exact-square-grid/CERTIFICATE.json new file mode 100644 index 0000000000..2aee65eb0a --- /dev/null +++ b/research/four-axis-exact-square-grid/CERTIFICATE.json @@ -0,0 +1,570 @@ +{"schema_version":1,"period_rows":[33,2310,28638,259,43244,670],"cycles":[ +[0,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[4,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[8,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[9,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[10,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[12,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[16,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[17,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[18,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[19,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[20,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[22,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[32,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[33,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[34,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[35,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[36,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[37,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[38,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[39,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]], +[64,[-1,1,1,3,1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-2,0,0,-2,0,-2,2,0]], +[3859,[0,-2,2,0,2,0,0,2,2,0,0,2,0,2,-2,0]], +[3872,[0,2,2,0,-2,0,0,2,-2,0,0,2,0,-2,-2,0]], +[3874,[0,2,-2,0,-2,0,0,-2,2,0,0,2,0,2,-2,0]], +[3875,[0,2,-2,0,-2,0,0,-2,2,0,0,2,0,2,-2,0]], +[3888,[0,2,2,0,-2,0,0,2,-2,0,0,2,0,-2,-2,0]], +[3890,[0,2,2,0,-2,0,0,2,-2,0,0,2,0,-2,-2,0]], +[3891,[0,2,2,0,-2,0,0,2,-2,0,0,2,0,-2,-2,0]], +[3892,[0,2,2,0,-2,0,0,2,-2,0,0,2,0,-2,-2,0]], +[3968,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[3970,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[3984,[-2,0,0,2,0,-2,-2,0,0,-2,-2,0,2,0,0,-2]], +[3986,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[3992,[-2,0,0,2,0,-2,-2,0,0,-2,-2,0,2,0,0,-2]], +[3994,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[4002,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[4004,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]], +[4006,[-2,0,0,-2,0,-2,2,0,0,2,-2,0,-2,0,0,-2]] +]} diff --git a/research/four-axis-exact-square-grid/INDEPENDENT-REVIEW.md b/research/four-axis-exact-square-grid/INDEPENDENT-REVIEW.md new file mode 100644 index 0000000000..9210141973 --- /dev/null +++ b/research/four-axis-exact-square-grid/INDEPENDENT-REVIEW.md @@ -0,0 +1,262 @@ +# Independent mathematical review of the four-axis square lift + +Reviewer: Worker A, prepared for Jerry Chen / @CubeJerry with substantial +OpenAI assistance. Apache-2.0. This is a separate mathematical derivation +and exact arithmetic review, not external human or proof-kernel acceptance. + +Reviewed compressed certificate: `CERTIFICATE.json`, SHA256 +`44a950a62abec947b4c094c2c1f290bec2f8d7f41d3a108ab4c58b5bdfc46b56`. +The author's search was read for definitions but is not imported or executed +by this review's checker. The lead separately completed all 4096 finite transitions using the direct +integer implementation retained in `independent_square.py`. This review +establishes why the precisely listed finite conditions suffice on the entire +integer lattice. The compressed table is hash-bound here; this checker does +not expand it or import the author's certificate code. + +The period and lifting argument are unchanged in the forced-cycle revision. +Its new full finite replay and direct tensor-bound attainment are independently +reviewed in [SHARPNESS-REVIEW.md](SHARPNESS-REVIEW.md); the earlier certificate +had SHA256 `9f7fa583cc8955e7f3129ff01db48dff849db6fd026f4205a0475f935ba174c7`. + +## 1. Operators and exact phase conventions + +Index the 16 coordinates by v in F2^4. Let W be the 16-by-16 Walsh matrix, +W_uv=(-1)^(u dot v), A=W/4, S_vv=(-1)^wt(v), and J the permutation +(Jz)_v=z_(v xor 15). Write B=SA and K=SJ. The Fourier identities give + + A²=I, AS=JA, SA=AJ, SJ=JS, + B²=K, K²=I, B⁴=I. + +The equality SJ=JS uses the even dimension four: complementing all bits +preserves the parity of their weight. This sign is material. + +The review checker constructs W by four tensor doublings, constructs the +lattice basis independently, inverts it over rational numbers, and verifies +the displayed square identities. It does not use the author's bit-dot +implementation or stored coordinate-action matrix. + +## 2. The exact integrality lattice and its coordinates + +Let L={z in Z^16: Az is integral}. Modulo four, + + W_uv = 1-2 sum_j u_j v_j. + +Consequently z belongs to L exactly when its total coordinate sum is +divisible by four and each of its four bit sums is even. The necessity +follows by using the zero Walsh row and the four singleton rows; the same +formula proves sufficiency for all 16 rows. + +An integer basis consists of 4e0; the four vectors 2(e_(2^j)-e0); and, for +every v of weight at least two, the vector + + e_v+(wt(v)-1)e0-sum_(j in v)e_(2^j). + +In the coordinate order (zero, four singletons, eleven higher-weight +vertices), its determinant is 4*2^4=64. Its coefficient coordinates are +the total sum divided by four, the four bit sums divided by two, and the +eleven original higher-weight coordinates. Thus it spans all of L, not a +subgroup with an unaccounted index. + +For z in L, Bz is integral; moreover ABz=Jz is integral. Hence B maps L +into itself. B⁴=I makes it an automorphism of L. + +## 3. The period subgroup has the asserted index and is stable + +For a vector's L-coordinate column t, define six parity checks by row masks + + 0x21, 0x906, 0x6fde, 0x103, 0xa8ec, 0x29e. + +Let Gamma be the kernel of these six checks inside L. The six rows have +rank six over F2, so [L:Gamma]=64 and [Z^16:Gamma]=4096. If rho_0,...,rho_5 +denote the rows and M is the integer coordinate matrix of B on L, the +independently reconstructed exact action is + + rho_0 M = rho_0+rho_1, + rho_1 M = rho_1+rho_2, + rho_2 M = rho_2, + rho_3 M = rho_3+rho_4, + rho_4 M = rho_4+rho_5, + rho_5 M = rho_5, over F2. + +Therefore B(Gamma)=Gamma. Negation and K also preserve Gamma. + +The six parity checks restricted to their first five coordinates have rank +five. A vector in L is coordinatewise even precisely when its eleven +higher-weight basis coordinates are even. If such a vector also lies in +Gamma, injectivity of those first five restricted checks forces every +basis coordinate even. Therefore + + Gamma intersect 2Z^16 is contained in 2L. + +This rules out the immediate oddness obstruction at the half-periods. +For comparison the coarser lattice L does have that obstruction: 4e0 lies +in L intersect 2Z^16, while A(2e0) has half-integer entries. An odd map +affine on all of L with slope A would have 2R(2e0)=A(4e0), an impossible +odd integer output column. This comparison is a necessary-condition +control. The stronger minimality conclusion uses the predecessor theorem +reviewed below, rather than this necessary condition alone. + +### Applicability of the predecessor's lower bound + +The reviewed source is +`CrocSwap/integer-mult-bounds#6761`, head +`b78c8938b6d04b7c340c06d4e958947aeecd9270`, +`research/four-axis-exact-square-period-obstruction/PROOF.md`. +Its hypotheses are an odd integer map R commuting with K, with any +full-rank affine period of slope A. The proof first closes the period under +K, then studies V=L/2L and E=(L intersect 2Z^16)/2L. For C=K+I on V, +C restricted to E has rank one but E intersect im(C) has dimension at +least two. A K-invariant subspace H disjoint from E therefore cannot have +dimension eleven: otherwise E identifies with V/H, whose induced C would +simultaneously have rank one and contain two independent image vectors. +Thus dim(H)<=10 and the full period index is divisible by 4096. + +The review independently checked these premises by matrix ranks, without +using the predecessor's supplied witnesses: C has rank six, E+im(C) has +rank nine, and hence dim(E intersect im(C))=5+6-9=2. Its first five columns +are (0,e0,e0,e0,e0), proving the rank-one restriction. The quotient argument +has no additional radius, sum, or bijectivity premise. + +Our T commutes with K=T², and S commutes with K, so R=ST commutes with K. +The constructed Gamma is a full-rank affine period of R with slope A and +index exactly 4096. The source theorem therefore applies, and the new +construction attains its divisibility lower bound. This is a minimum for +the stated real affine-period architecture; it does not prove a minimum +for arbitrary coupled complex rounders, memory, or physical cost. + +## 4. The 4096 labels classify every integer vector + +The first six bits are the four-valued total sum and four two-valued bit +sums. Given those residues, choose the base representative with the four +singleton coordinates equal to the bit residues and zero coordinate equal +to the total residue minus their sum. Subtracting this representative puts +the vector in L. Apply the six parity checks to its integer L coordinates +for the second six bits. + +Two integer vectors have the same complete label exactly when their +difference lies in Gamma. This follows directly from the two successive +quotients, Z^16/L and L/Gamma. All labels occur because both quotient maps +are surjective. The base representative section need not be a group +homomorphism, and labels must not be added by bitwise XOR across the full +4096-class quotient. XOR is valid only within the L/Gamma fiber. + +## 5. Sufficient finite conditions and the all-integer square + +Let c_s be the integer correction column stored at each Gamma coset s. +For one representative r_s of every coset, the complete finite verifier +must establish the following: + +1. B r_s+c_s/4 is integral. +2. If p(s) is the class of that output, c_(p(s))=-B c_s as an exact vector. +3. If n(s) is the class of -r_s, c_(n(s))=-c_s as an exact vector. +4. Each c_s has squared norm at most 64 and lies in the complex linear + kernel of the row d_v=(-i)^wt(v). + +There is no rounding tolerance in these requirements. The second condition +in particular checks the integer divisibility implicit in B c_s. + +Define, for every integer input, + + T(z)=Bz+c_([z])/4, R(z)=S T(z). + +For gamma in Gamma, B gamma lies in Gamma, so + + T(z+gamma)=T(z)+B gamma. + +Thus the first finite condition proves integrality for every representative +translate, p([z])=[Tz] is well defined independently of the representative, +and the correction at the second call really is c_(p([z])). Consequently + + T²z = B²z+(B c_([z])+c_(p([z])))/4 = Kz. + +The finite oddness condition likewise gives T(-z)=-T(z). Since K is a +bijection, T²=K makes T a bijection. R is therefore an odd bijection, and + + R S R = S T S S T = S T² = S K = J. + +R is affine on Gamma with slope A because SB=A. This proof supplies the +infinite quantifier. Replaying only the chosen representatives without +Gamma stability would not establish it. + +## 6. Complex lift, square, inverse and global unit covariance + +Extend R to Gaussian integer vectors by applying it separately to real +and imaginary parts; call the extension R_C. Oddness implies +R_C(i z)=i R_C(z), so R_C commutes with each global Gaussian unit. This +does not assert covariance under separately chosen coordinate phases. + +Set D_vv=(-i)^wt(v) and + + F(z)=-D R_C(Dz). + +Then D²=S and D J D=J, the latter because the weights at complementary +vertices sum to four. Keeping the outer minus signs gives + + F²z = -D R_C(-S R_C(Dz)) + = D R_C(S R_C(Dz)) + = D J D z + = Jz. + +This uses oddness exactly once and uses R_C S R_C=J; it does not assume +that R_C commutes with D or with S. Hence F⁴=I, F is bijective, and its +inverse is JF=FJ. F commutes with global Gaussian units as well. + +## 7. Error, weighted sum, and sharpness + +The real error is Rz-Az=S c_([z])/4. It has Euclidean norm at most two. +The certificate tests d-transpose c=0. For the error actually used by R, +the required row is d-transpose S=conjugate(d)-transpose. Since each c is +real, its annihilation by d also implies annihilation by conjugate(d). +Thus d-transpose(Rz-Az)=0. Both integer real/imaginary weighted equations are among the finite table +checks. The earlier review also checked them on the expanded table; this +retained script avoids a redundant expanded artifact and leaves the complete +table replay to `verify.py` and `independent_square.py`. + +The ideal complex map is H=-DAD. Its matrix entry is + + H_uv=-(1/4)(-i)^wt(u xor v). + +Its row and column sums are one because +-(1/4)(1-i)^4=1. Thus preserving the d-weighted error of R_C gives +sum(Fz)=sum(Hz)=sum(z), including its full complex phase. Both pre- and +postmultiplication by D preserve Euclidean norm, so + + ||Fz-Hz||² <= 4+4 = 8. + +The representative 2e0 has label 128 and correction squared norm 64. +For z=(2+2i)e0 the same maximum real correction occurs in both components, +and the complex bound sqrt(8) is attained. H²=J by the identical linear +calculation, so F^-1-H^-1=J(F-H), proving the same sharp inverse bound. +The maximum absolute correction-table entry is five: actual real-component +error coordinates are bounded by 5/4, not five. + +All 64 classes in the L/Gamma fiber have zero correction, and no other +class does. Hence Rz=Az whenever Az is integral, not merely when z is a +chosen representative. For the complex map, Hz is Gaussian-integral +exactly when the real and imaginary parts of Dz lie in L, because D is a +Gaussian unit diagonal. Therefore Fz=Hz on every Gaussian-integer input +whose ideal image is already integral. The author verifier checks this zero fiber explicitly; it is an additional +exactness property of the published table. + +## 8. Scope and execution record + +`python -I -B research/four-axis-exact-square-grid/review_lift.py` and its +`-O` counterpart passed. They check the independent tensor/rational lattice +derivation, exact B-action, parity ranks, predecessor lower-bound matrix +ranks, and complementary-coordinate phase. The retained checker does not +claim to replace the separate complete finite transition replay. + +The lead's separate finite verifier passed the four conditions in Section 5 +on the same pinned table. Combining those exact finite checks with the +derivation above, I find no gap in the claimed +all-integer map, exact square, inverse, error, weighted-sum, or global unit +phase argument. The map is not proved nearest-point or norm-inward. No +all-size multiplication bound, native graph flatness, compiler admission, +or kappa improvement follows merely from this finite block identity. + +The 32 KiB number is the logical payload of 4096*16 signed four-bit entries; +the compressed certificate is 26,889 bytes. A fast Walsh implementation uses 160 +real additions/subtractions and 32 divisions by four for the two transforms +and correction additions. Classifier arithmetic, lookup addressing, signs, +storage, source access and movement are additional work. Those operations +need a complete invoice before integration into a multiplication caller. diff --git a/research/four-axis-exact-square-grid/PROOF.md b/research/four-axis-exact-square-grid/PROOF.md new file mode 100644 index 0000000000..7a8e01635d --- /dev/null +++ b/research/four-axis-exact-square-grid/PROOF.md @@ -0,0 +1,400 @@ +# A sharp four-axis map with the exact native square + +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +The native factorization, correction predicates and half-grid lower bound are +inherited from Nick Petalas's CrocSwap/integer-mult-bounds#6574. The phase-only +construction is CrocSwap/integer-mult-bounds#6758; the period lower bound is +CrocSwap/integer-mult-bounds#6761. The new result is a compatible invariant +period and correction cycles satisfying the exact square at the sharp radius. + +## 1. Statement and notation + +Coordinates are indexed by the four-bit strings, encoded as integers 0 through +15; write `wt` for Hamming weight and `j xor 15` for coordinate complement. +Let + +\[ + W_{rs}=(-1)^{\operatorname{wt}(r\mathbin{\&}s)},\quad A=W/4,\quad + S_{jj}=(-1)^{\operatorname{wt}(j)},\quad (Jz)_j=z_{j\mathbin{\mathrm{xor}}15}, + \quad K=SJ,\quad B=SA. +\] + +Walsh orthogonality and character translation give + +\[ + A^2=I,\qquad ASA=J,\qquad B^2=K,\qquad B^4=I. +\] + +Both `A` and `B` are orthogonal; `S` and `J` commute. On complex vectors set +\(D_{jj}=(-i)^{\operatorname{wt}(j)}\) and \(U=-DAD\). Then \(D^2=S\), +\(DJD=J\), \(U^2=J\), and \(U\) is unitary. Here `U` is exactly the native +four-axis transform, not a numerical approximation or a different phase +convention. + +The construction below gives a map \(R:\mathbb Z^{16}\to\mathbb Z^{16}\) +and its componentwise extension \(R_C(a+ib)=R(a)+iR(b)\), with +\(F=-D R_C D\). For every Gaussian integer vector `z`: + +* `F` is a bijection, \(F^2=J\), \(F^4=I\), and \(F^{-1}=JF=FJ\). +* \(F(\zeta z)=\zeta F(z)\) for a **global** unit \(\zeta\in\{1,-1,i,-i\}\). +* \(\sum_jF(z)_j=\sum_jz_j\). +* \(\|F(z)-Uz\|_2\le\sqrt8\), and the same radius holds for the inverse + relative to \(U^{-1}\). Both radii are attained. +* If `Uz` is Gaussian-integral, then \(F(z)=Uz\). + +The real map is affine with slope `A` on a lattice of index 4096. This attains +the divisibility lower bound proved in #6761 for odd real rounders commuting +with `K`. No minimality claim is made for arbitrary coupled complex rounders. +At grid spacing `h`, multiply the displayed error bounds by `h`. + +## 2. The invariant period + +Let + +\[ + L=\{z\in\mathbb Z^{16}:Az\in\mathbb Z^{16}\}. +\] + +Write \(t=\sum_s z_s\) and \(b_j=\sum_{s:s_j=1}z_s\). Expanding Walsh signs +modulo four shows + +\[ + z\in L\iff t\equiv0\pmod4\text{ and }b_j\equiv0\pmod2\ (0\le j<4). +\] + +Indeed \((Wz)_r\equiv t-2\sum_{j:r_j=1}b_j\pmod4\); the rows `r=0` and +`r=2^j` establish necessity, and that expression establishes sufficiency. +Thus \([\mathbb Z^{16}:L]=64\). Use the following ordered integer basis: + +\[ + u_0=4e_0,\qquad u_{j+1}=2(e_{2^j}-e_0)\quad(0\le j<4), +\] + +followed, in increasing `s` of weight at least two, by + +\[ + u_s'=e_s+(\operatorname{wt}(s)-1)e_0-\sum_{j:s_j=1}e_{2^j}. +\] + +The basis coordinates of `z` in `L` are exactly + +\[ + x(z)=(t/4,b_0/2,b_1/2,b_2/2,b_3/2, + z_3,z_5,z_6,z_7,z_9,z_{10},z_{11},z_{12},z_{13},z_{14},z_{15}). +\] + +The physical basis determinant has absolute value 64. Also `B` preserves `L`: +`Bz` is integral for `z` in `L`, and \(ABz=Jz\) is integral. + +On these sixteen basis coordinates, take the binary row masks + +``` +0x0021 0x0906 0x6fde 0x0103 0xa8ec 0x029e +``` + +with the least significant bit referring to coordinate zero. Let `G` denote +the six-row matrix and define + +\[ + \Gamma=\{z\in L:Gx(z)=0\pmod2\}. +\] + +The binary row rank is six; its ascending pivot columns are `0,1,2,3,4,6`. +Consequently \([L:\Gamma]=64\) and \([\mathbb Z^{16}:\Gamma]=4096\). +If the rows are named \(g_0,\ldots,g_5\), direct exact multiplication in the +stated `L` basis gives the covector action + +\[ + (g_0B,g_1B,g_2B,g_3B,g_4B,g_5B) + =(g_0+g_1,g_1+g_2,g_2,g_3+g_4,g_4+g_5,g_5) + \pmod2. +\] + +Thus \(B\Gamma=\Gamma\); inclusion suffices because \(B^4=I\). In +particular `K` also preserves `Gamma`. This stronger `B` invariance is the +missing prerequisite beyond a period merely compatible with negation. + +The restriction of `G` to the first five columns has rank five. Since those +columns span \((L\cap2\mathbb Z^{16})/2L\), this proves +\(\Gamma\cap2\mathbb Z^{16}\subseteq2L\), the necessary oddness condition. +Furthermore \(2L\subseteq\Gamma\), so \(8\mathbb Z^{16}\subseteq\Gamma\). +The residue classifier therefore only needs three low bits per input +coordinate. This observation does not make its physical evaluation free. + +## 3. Exact quotient labels and representatives + +For any `z`, encode the residue modulo `L` by + +\[ + q=(t\bmod4)+4\sum_{j=0}^3(b_j\bmod2)2^j\in\{0,\ldots,63\}. +\] + +Write `a=q mod 4`, `m=floor(q/4)`, and let `r(q)` have coordinate +\(r(q)_0=a-\operatorname{wt}(m)\), coordinates +\(r(q)_{2^j}=m_j\), and zero elsewhere. Then \(z-r(q)\in L\). +The complete class label is + +\[ + s(z)=64q+\sum_{i=0}^5(g_i x(z-r(q))\bmod2)2^i. +\] + +Two integer vectors have the same label exactly when their difference lies +in `Gamma`. Reduction of each input coordinate modulo eight leaves this label +unchanged. `kernel.py` uses this low-bit variant; the dense rational lattice +oracle in `verify.py` does not use that classifier. + +The certificate fixes representatives as follows. Inspect the sixteen columns +of `G` in ascending order; retain a column if it is independent of the columns +already retained. Use the resulting six columns to lift each six-bit syndrome +by its unique binary linear combination of those columns. Replace each chosen +column by its corresponding physical `L` basis vector, obtaining `l(v)`. +The representative numbered \(s=64q+v\) is \(r_s=r(q)+l(v)\). This specifies +all 4096 representatives without a hidden search, arbitrary tie break or +external artifact. + +## 4. The finite correction certificate + +`CERTIFICATE.json` contains the period rows and 568 pairs `[s,c]`, where `s` +is a class label and `c` is a sixteen-entry integer vector. A row generates +four steps starting from \((z,c)=(r_s,c_s)\): + +\[ + z\longleftarrow (SWz+c)/4=Bz+c/4,\qquad c\longleftarrow-Bc. +\] + +At each step, assign correction `c` to the class of `z`, and correction `-c` +to the class of `-z`. All quarters are exact integers. Repeated assignments +agree, the cycles close, and the rows cover every class. There are 4 generated +class orbits of size 1, 18 of size 2, 78 of size 4 and 468 of size 8; their +sizes sum to 4096. The certificate is 26,889 bytes. + +For the expanded correction table, put + +\[ + T(z)=Bz+c_{s(z)}/4,\qquad R(z)=ST(z). +\] + +The decisive finite predicates, checked on **every** representative, are: + +1. \(SWr_s+c_s\equiv0\pmod4\). +2. \(\|c_s\|_2^2\le64\) and \((\Re d)^Tc_s=(\Im d)^Tc_s=0\), where + \(d_j=(-i)^{\operatorname{wt}(j)}\). +3. \(c_{s(-r_s)}=-c_s\). +4. If \(p(s)=s(T(r_s))\), then \(c_{p(s)}=-Bc_s\). + +The checker also verifies `K` covariance, quotient bijectivity, both literal +inverse compositions, maximal correction coordinate 5, and the value 64 for +the maximum squared correction norm. These are consequences or additional +bounds, not substitutes for predicate 4. In particular the rejection control +at class 128 changes an entire negation/`K` orbit: all local integrality, +sharp error, weighted sums, oddness and `K` covariance survive, but the exact +square predicate fails. + +The discovery search fixed this period, enumerated representative real +corrections `e=S c` in `[-3,3]^16` with the stated residues, weighted sums and +energy bound, and paired the induced negation/`K` orbits. A forced partner +`-Bc` may have coordinates of magnitude 5. The 64 coarse classes have candidate +count histogram `{1:1, 848:32, 4900:1, 36:28, 70:2}`. The resulting graph has +1120 vertices and 63,018 compatible undirected edges including loops, with no +isolated vertex. After forcing the displayed basis cycle, the first greedy seed, zero, supplies +the complete certificate; the +stopping rule allowed seeds 0 through 99. The optional search is a discovery +procedure, not a completeness proof over periods, matchings or rounders. +The mathematical result rests on the complete finite certificate and the lift +below, not on a heuristic search succeeding. + +## 5. Lift from the quotient to every integer input + +For \(\gamma\in\Gamma\), class labels are unchanged, so + +\[ + T(z+\gamma)=T(z)+B\gamma,\qquad + R(z+\gamma)=R(z)+A\gamma. +\] + +Since `B Gamma = Gamma`, the class of `T(z)` depends only on the class of `z`. +Integrality therefore extends from the representatives to all integer inputs, +and predicate 4 applies everywhere. Thus + +\[ + T(T(z)) + =B^2z+\tfrac14 Bc_{s(z)}+\tfrac14c_{s(T(z))} + =Kz. +\] + +Predicate 3 likewise extends oddness to all inputs. The equation `T^2=K` +implies `T` commutes with `K` and is bijective, with inverse `KT`. Since `S` +commutes with `K`, `R=ST` is odd, bijective and commutes with `K`. Moreover + +\[ + RSR=S T^2=SK=J. +\] + +This is the exact identity needed by the native factorization. Merely having +an arbitrary fourth-order real permutation would not establish it. + +The real error is \(R(z)-Az=S c_{s(z)}/4\), of norm at most 2. All 64 +correction entries for classes in `L/Gamma` are zero. Hence `Rz=Az` on `L`; +conversely a zero error implies that `Az` is integral. + +## 6. Native square, sum, sharp error and inverse + +Oddness makes `R_C` commute with multiplication by a global `i`, and hence +with every global Gaussian unit. The fixed diagonal `D` also commutes with +those scalars, proving the stated global covariance of `F`. This does **not** +assert covariance under independently chosen coordinate phases. + +Using oddness to move the inner minus sign, the exact composition is + +\[ + F^2=-D R_C D(-D R_C D)=D(R_C S R_C)D=DJD=J. +\] + +Associativity now gives \(F^4=I\), \(FJ=JF\) and \(F^{-1}=JF\). +For each real correction, \(d^TSc=\bar d^Tc=0\), because `DS=conj(D)` +and both its real and imaginary weighted sums vanish. Also +\(d^TA=-\bar d^T\), so \(\mathbf1^TU=\mathbf1^T\). Therefore `F` +preserves the complex coordinate sum exactly. + +The two componentwise real errors are orthogonal real/imaginary lanes, and +`D` preserves norm. It follows that + +\[ + \|F(z)-Uz\|_2^2 + =\frac{\|c_{s(\Re Dz)}\|_2^2+\|c_{s(\Im Dz)}\|_2^2}{16}\le8. +\] + +For \(z=(2+2i)e_0\), all real and imaginary coordinates of `Uz` are half +integers. Every Gaussian-integer output therefore has squared distance at +least \(16(1/4+1/4)=8\). The bound is sharp. Since +\(F^{-1}=JF\), \(U^{-1}=JU\), and `J` is an isometry, the inverse has +exactly the same pointwise error and the same sharp witness. Finally, `D` is +an integral Gaussian-unit diagonal: `Uz` is Gaussian-integral exactly when +both real lanes of `A Dz` are integral. The exactness of `R` on `L` gives +`Fz=Uz` on all such inputs. + +The native affine period +\(\Omega=D^{-1}(\Gamma+i\Gamma)\) has index \(4096^2\) in +\(\mathbb Z[i]^{16}\). It is `U` invariant because, in `D` coordinates, the +linear action is `-B` on each real lane. This is a componentwise construction; +no lower bound for a different coupled complex construction is inferred. + +## 7. Period lower bound and the fixed-block word interface + +CrocSwap/integer-mult-bounds#6761 proves: if an odd integer-valued real map has +full-rank affine period with slope `A` and commutes with `K`, then its period +index is divisible by 4096. Section 5 checks both hypotheses here. The present +index-4096 period therefore attains that earlier bound. The independent review +checks the predecessor's decisive finite ranks and hypothesis applicability; +the lower-bound theorem retains its predecessor attribution. + +For every integer `m`, exact group consistency gives + +\[ + F^{2m}=J^m=U^{2m},\qquad + \|F^{2m+1}(z)-U^{2m+1}z\|_2\le\sqrt8. +\] + +The second assertion follows by reducing the exponent modulo four: the two +odd possibilities are `F` and `JF`, and the two corresponding ideal maps are +`U` and `JU`. Thus repeated copies and inverses of this **same fixed block** +do not accumulate rounding error with word length. Global Gaussian scalars +can be moved through the word exactly. This closes the fixed-block native +square/fourth-power interface left open by #6758. + +### Bounded-error attainment of the sharp tensor witness bound + +The certificate also enforces the exact cycle + +\[ + T:e_0\longmapsto e_3\longmapsto e_{15}\longmapsto e_{12} + \longmapsto e_0. +\] + +For each transition `z -> y`, its correction is `c=4y-SWz`. All four +corrections have squared norm 24, vanish under both weighted sums, and obey +`c_next=-Bc`. Their positive class labels are `64,849,3920,3136` and their +negative labels are `201,960,4049,3289`. These eight labels are distinct and +outside `L/Gamma`. The search fixes their matching edge before assigning the +remaining orbits. The complete certificate, not merely the local cycle, passes +all 4096-class obligations. Since `D_33=-1` and `S_33=1`, it follows that +`F(e0)=e3`. + +This composes with the general +[tensor-obstruction theorem](https://github.com/CubeJerry/integer-mult-bounds/blob/408969010e33a5aacdeecc164a554111e09f8f36/research/gaussian-rounding-tensor-obstruction/PROOF.md). +Here is the complete specialization, so the new optimality claim is directly +reviewable in this package. Put `alpha=-4`, `lambda_j=i^wt(j)` and +`X0=lambda e0^T`. Every lambda entry is a Gaussian unit, +`U lambda=-4e0`, and `-4U` has Gaussian-unit entries. Applying the same `F` +independently to every row and column gives + +\[ + F_{\rm row}F_{\rm col}(X_0)=e_0(-4Ue_0)^T,\qquad + F_{\rm col}F_{\rm row}(X_0)=e_0(-4F(e_0))^T. +\] + +The first order uses exactness on integral ideal images; the other uses global +unit covariance, followed by the same exactness. Their squared Frobenius +difference is therefore `16 ||Ue0-F(e0)||_2^2`. + +For any admissible injective map, `w=F(e0)` is nonzero because `F(0)=0`. +Sum preservation also implies nonzero `w`. Each real or imaginary component +of `u=Ue0` has absolute value at most `1/4`. If +`L1(w)=sum_j(|Re w_j|+|Im w_j|)`, Gaussian integrality gives + +\[ + \|u-w\|_2^2 + \ge 1+L_1(w)-\tfrac12L_1(w) + \ge \tfrac32. +\] + +Thus the squared discrepancy on this fixed tensor witness is at least 24. +The new certificate attains it: `w=e3` and `Re(u_3)=1/4`, so the error +squared is `2-2(1/4)=3/2`. More explicitly the first-row defect is +`D 1 + 4e3` and every other row vanishes. The `(0,3)` outputs are `-1` and +`-4`; all sixteen first-row entries differ, with squared norm `9+15=24`. +The independent checker evaluates all 256 entries in both orders. + +This establishes sharpness at `n=4` while retaining bijectivity, exact sum, +global unit covariance, exactness on integral ideal images, the uniform +sharp error `sqrt(8) h`, and the native square `F^2=J`. The companion theorem's +unbounded-error sharpness example is not needed. The claim concerns the +specified witness `X0`: it is **not** a worst-case tensor-discrepancy optimum +and does not make the two row/column actions commute. Their ideal linear +counterparts commute, but this exact nonlinear difference is unavoidable +under the stated hypotheses. + +No general native word compiler, separately rounded individual-axis +commutation, or all-size graph flatness follows. These distinctions matter +when substituting the block into a supplier. + +## 8. Costs and complete-bound boundary + +A direct fast reference evaluation applies one 16-point real Walsh transform +per lane: 64 additions/subtractions per lane, followed by 16 correction +additions and 16 exact quarter divisions. Thus the complex transform uses +160 full-word additions/subtractions and 32 quarter divisions, **in addition +to** signs, low-bit reads and classification, table addressing and retrieval, +ordinary reads/writes, scratch management and any reversible cleanup. The +inverse adds the coordinate-complement permutation, whose physical routing +also requires a bill. These are arithmetic counts, not a primitive-operation +or tape-cost certificate. + +The expanded correction payload has 4096 entries of sixteen signed four-bit +values: 262,144 logical bits, or 32 KiB, shared between two real-lane lookups. +The 12-bit class label does not imply constant-time or free random access in +the repository's physical model. Certificate expansion and authentication are +offline reference setup; a physical implementation must specify initialization, +control, retained stock, table access, workspace and cleanup costs explicitly. +For component magnitudes at most `M`, a raw signed-Walsh-plus-correction +numerator is bounded by `16 M + 5`; this does not by itself establish the +surrounding caller's precision or word-width invariant. + +The credible next connection is the retained four-axis dirty-port/precision +interface used by #6509 and #6758: the same sharp radius remains available, +while restoration and repeated fixed-block words now obey the exact native +square. Before any global improvement, one must bind this particular table +and classifier to the actual input cuts and helper state, charge its physical +access/cleanup/routing and precision work, and derive a changed complete paid +recursive profile. The present package supplies none of those prices and +changes no selected supplier or frontier. **No new κ.** diff --git a/research/four-axis-exact-square-grid/README.md b/research/four-axis-exact-square-grid/README.md new file mode 100644 index 0000000000..3c2fed65d7 --- /dev/null +++ b/research/four-axis-exact-square-grid/README.md @@ -0,0 +1,203 @@ +# Sharp four-axis rounding with the exact native square + +**No new κ.** This package constructs an exact Gaussian-integer bijection for +one fixed native four-axis block, with the sharp error `sqrt(8) h`, exact sum +preservation, global Gaussian-unit covariance and the native identity +`F² = J`, where `J` complements all four coordinate bits. It also gives +`F⁴ = I`, the literal inverse `JF`, and exact agreement whenever the ideal +output already lies on the Gaussian grid. + +CrocSwap/integer-mult-bounds#6758 achieved the same sharp error and global phase +covariance but explicitly failed fourth power. CrocSwap/integer-mult-bounds#6761 +then proved that exact-square-compatible odd real rounders need affine-period +index divisible by 4096. The new invariant period has index exactly 4096 and +admits a complete correction-cycle certificate. This attains that predecessor +lower bound; it does not claim a minimum period for arbitrary coupled complex +rounders or a physical table-memory lower bound. + +## Result and why it matters + +For `A=W16/4`, the period is invariant under `B=SA`, the actual linear action +needed to close the native square. Six explicit parity equations inside the +Walsh integrality lattice define it. A 26,889-byte certificate supplies 568 +cycle generators that expand to all 4096 real correction classes. Its real +correction norm is at most 2, with maximum correction numerator coordinate 5. +The native complex map uses the same table for both real lanes. + +The complete theorem and quotient definitions are in [PROOF.md](PROOF.md). +For every integer `m`, repeated use of this **same fixed block** satisfies +`F^(2m)=J^m`, while odd powers have error at most `sqrt(8) h` relative to the +corresponding ideal power. Thus rounding error does not grow with the length +of such a word. This resolves the exact-square/fourth-power question retained +in the **Open next questions** of `research/four-axis-phase-covariant-grid`, +introduced by #6758 after Nick Petalas's #6574. + +The certificate additionally forces `F(e0)=e3`. Consequently it attains the +sharp squared tensor discrepancy 24 on the explicit array +`X0=lambda e0^T`, `lambda_j=i^wt(j)`, while retaining the uniform sharp error, +bijection, exact sum and native square. The first-row defect is `D1+4e3`; +all other rows are zero. This settles the four-axis bounded-error, +exact-square attainment case left open by the separate +[tensor-obstruction proof](https://github.com/CubeJerry/integer-mult-bounds/blob/408969010e33a5aacdeecc164a554111e09f8f36/research/gaussian-rounding-tensor-obstruction/PROOF.md). +Section 7 of [PROOF.md](PROOF.md) gives the local lower-bound derivation as +well as the exact composition check. This is sharpness for that fixed witness, +not a worst-case tensor-discrepancy optimum or commuting row/column actions. + +The finite map strengthens one native precision/group interface. The selected +multiplier, its five inherited assumptions and its κ remain unchanged. The +selected record at the pinned base is #6030 with κ `0.003125804`; stronger open +proposals do not change that accepted record. + +## Reproduction and evidence + +From the repository root, using CPython 3.12 and its standard library: + +```sh +python3 -W error -B research/four-axis-exact-square-grid/verify.py +``` + +The expected status is `PASS_FOUR_AXIS_EXACT_SQUARE_GRID`, with 4096 real +classes, 568 cycle generators, maximum squared correction norm 64, maximum +absolute correction coordinate 5 and sharp complex squared error 8. + +The registered replay runs all four checks in ordinary and `-O` modes: + +```sh +python3 -B scripts/research_package.py --package research/four-axis-exact-square-grid --check-only +python3 -B scripts/research_package.py --package research/four-axis-exact-square-grid +``` + +Executed under CPython 3.12.14: metadata/source-pin validation and all eight +registered ordinary/optimization-mode commands passed. The optional discovery +replay regenerated the certificate byte for byte. These execution results +certify only the declared finite and algebraic scope. + +The author check reconstructs a dense rational basis for the period and uses +its inverse for a separate quotient oracle. It checks every real class, 4096 +paired complex fixtures, both inverse compositions, the direct native +coefficient formula, global phase, exact sum, and eight translated/signed +fixtures through 4091-bit inputs. The all-complex-input theorem follows from +the componentwise proof; the checker does not enumerate all `4096²` lane +pairs. No floating point, tolerance or Python `assert` is used for its +proof-relevant predicates. + +Nine rejection controls cover missing cycles, weighted-sum and radius +corruption, a noninvariant period, a locally valid but square-incompatible +correction orbit, using the forward map as its own inverse, a false smaller +radius, an incorrect native coordinate phase, and falsely asserted row/column commutation. The square-incompatible +control retains integrality, sharp error, weighted sums, oddness and `K` +covariance, demonstrating that those properties alone do not certify the +new identity. + +Separately assigned reviewers supplied independent checks: + +* [independent_square.py](independent_square.py) imports no author module. It + constructs a different, largest-mask coset section, uses dense Walsh sums + and closed two-step orbit formulas, and checks all 4096 transitions, + correction coverage, sharpness, symmetry and a corrupted correction. +* [review_lift.py](review_lift.py) independently reconstructs the rational + lattice action and parity ranks, the phase identity, and the decisive + predecessor lower-bound matrices. Its universal lifting argument and + exact-on-integral-image observation are preserved in + [INDEPENDENT-REVIEW.md](INDEPENDENT-REVIEW.md). + +[independent_sharpness.py](independent_sharpness.py) additionally reconstructs +the new table with a descending-column section, imports no author kernel, +checks the forced cycle and all 256 entries of the tensor witness, and obtains +exact squared discrepancy 24. Its review is retained in +[SHARPNESS-REVIEW.md](SHARPNESS-REVIEW.md). + +These checks are independent mathematical/algorithmic review by separately +assigned AI agents. They are not human review, proof-kernel formalization, +supplier admission, or a complete multiplication-theorem audit. The replay +requires no unmerged predecessor Git objects, external network service or +third-party Python package. + +The bounded discovery replay is optional and is not a proof obligation: + +```sh +python3 -W error -B research/four-axis-exact-square-grid/search.py --output /tmp/four-axis-square-candidate.json +python3 -W error -B research/four-axis-exact-square-grid/independent_square.py /tmp/four-axis-square-candidate.json +``` + +It fixes the published period and enumerates seed-side real correction +numerators in `[-3,3]^16` with the residue, weighted-sum and energy constraints; +forced partner corrections can reach magnitude 5. The full compatibility graph +has 1120 negation/`K` orbits and 63,018 undirected edges including loops. The +stopping rule forces the compatible cycle `e0 -> e3 -> e15 -> e12 -> e0` +and its negations, then allows seeds 0 through 99 and stops at the first +complete greedy matching. Seed 0 succeeded; later seeds were not run. In CPython 3.12.14 the +replay regenerated the published certificate byte for byte. Integer-set +iteration in a different Python implementation may choose another matching; +any alternative certificate must be verified independently. No exhaustive +search over periods, matchings, or arbitrary rounders is claimed. + +## Scope, costs and remaining obligations + +The executable fast block uses 160 full-word additions/subtractions and 32 +exact quarter divisions. Signs, low-bit reads, residue classification, table +addressing/retrieval, data traffic, scratch return, reversible cleanup and the +inverse's coordinate permutation are additional payable work. The expanded +logical table payload is 32 KiB: 4096 entries of sixteen signed four-bit values, +shared between two real-lane lookups. Twelve-bit class labels do not make +lookup constant-time or free in the repository's physical model. The raw +transform numerator bound is `16 M + 5` when input component magnitudes are +at most `M`; caller precision and word-width invariants remain separate. + +The most direct next integration target is the retained four-axis dirty-port +and precision interface from Ali Romman's #6509 and the caller preserved by +#6758. This package provides the exact fixed-block algebra that that family +previously lacked. It does not bind the new classifier/table to every actual +caller input cut, provide a reversible physical lookup implementation, price +its cleanup/routing/compiler stock, or derive a changed complete paid +recursive profile. It therefore makes no κ improvement or claim that this +larger table is economical in a supplier. + +No pointwise nearest-output property, norm-inward condition, general native +graph flatness, individual-axis commutation or all-size assumption discharge +is claimed. The source-history preflight requires full Git history; this +workspace is shallow and no ancestry-certification pass is claimed. Canonical +provenance pins and all executable proof data are self-contained as documented +in [SOURCES.json](SOURCES.json). + +## Sources and credit + +Canonical base: `7c49fe32c55de02c2c873655c804b16e4c3fef0a`, priority revision 8. +[TASK.json](TASK.json) retains the exact `uniform-transfer-audit` card and +records the explicitly assigned structural-interface scope change. + +The phase predecessor #6758 is pinned at +`362b20bc934500bc503e850059f0d34daa5dcae3`; the exact-square period obstruction +#6761 is pinned at `b78c8938b6d04b7c340c06d4e958947aeecd9270`. Exact inspected +file hashes and Git-blob IDs are recorded as external provenance, not runtime +imports. Nick Petalas's #6574 +(`48e312ff18d5b66b0969148f615fdf5ce0f92edd`) supplies the native factorization, +correction predicates, sharp radius and half-grid lower-bound lineage. ToikY's +#6755 review identified the relevant phase/square/caller obligations. Ali +Romman's #6509 is credited for the retained caller used as a future integration +target; that caller has not been imported or reverified in this package. + +Prepared by @CubeJerry (Jerry Chen) with substantial OpenAI Codex assistance +for mathematical exploration, implementation and writing. Separate agents +reviewed the all-integer lift/lattice and the full finite transition table; +their exact scope is retained in the review files. New work is Apache-2.0. +Predecessor results and their contributor attribution remain unchanged. + +## Open next questions + +1. **Can the exact-square block receive a competitive complete physical bill?** + Bind this particular table and classifier to one exact retained four-axis + caller. Start with its actual paid input cuts, reversible table access, + low-bit traffic, helper/scratch restoration, precision and compiler stock; + only then compare complete target/paid profiles. The current package has no + such implementation or recurrence. +2. **Can a changed interface support consistent overlapping blocks?** + The companion tensor-obstruction theorem rules out row/column commutation + for the current state-free, globally unit-covariant, exact-on-integral-image + contract, including this map. Start by identifying which property an + actual caller can relax, or by specifying additional retained state and + proving its composition law. Its error, reversible cleanup, routing and + complete paid cost then remain separate obligations. The obstruction does + not cover every changed lattice or stateful representation. + +Structured relevance, first steps and blockers are in [TASK.json](TASK.json). diff --git a/research/four-axis-exact-square-grid/SHARPNESS-REVIEW.md b/research/four-axis-exact-square-grid/SHARPNESS-REVIEW.md new file mode 100644 index 0000000000..09e2abd57e --- /dev/null +++ b/research/four-axis-exact-square-grid/SHARPNESS-REVIEW.md @@ -0,0 +1,83 @@ +# Independent review of fixed-witness tensor sharpness + +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +This is separate mathematical reasoning and exact implementation, not human +peer review or proof-kernel acceptance. + +## Conclusion and exact pins + +The refined four-axis certificate attains the stronger squared tensor-witness +floor **24** while retaining the finite obligations for the bounded-error, +sum-preserving, globally phase-covariant exact-square map. The result concerns +the specified witness `lambda e0^T`. It does not assert a worst-case tensor +discrepancy bound or a new multiplication exponent. + +The checked `CERTIFICATE.json` has SHA256 +`44a950a62abec947b4c094c2c1f290bec2f8d7f41d3a108ab4c58b5bdfc46b56`. +The independently expanded table has SHA256 +`4b69d88e3049b4abca063d79e9145d2519bdbc506a09858dec4c210059b4dc43`. +The period rows remain `(0x21,0x906,0x6fde,0x103,0xa8ec,0x29e)`. Thus the +previous lattice-to-global-map proof and its precise scope apply; this +refinement changes the correction table rather than the period lattice or lifting formulas. + +## Forced cycle and completion + +Write `B=SW/4`, with W the sixteen-dimensional Walsh matrix, S the parity +diagonal and `K=SJ`. Prescribe `e0 -> e3 -> e15 -> e12 -> e0` under T and +put `c(e_j)=4e_next-SW e_j`. Direct dense integer computation gives one +coordinate equal to 3 and fifteen of absolute value 1 in each correction: +its energy is 24. Both weighted sums against the real and imaginary parts of +`D_jj=(-i)^wt(j)` vanish. + +The correction identity is `c(next)=-B c(current)`. It follows algebraically +from `B^2=K` and `e_nextnext=K e_current`, and B applied to every correction +is integral. The positive quotient labels are 64, 849, 3920 and 3136; their +negatives have labels 201, 960, 4049 and 3289. All eight differ and lie outside +the 64-class zero-correction fiber `L/Gamma`. K shifts the cycle by two because +all four support indices have even weight. Hence there is no local quotient, +oddness, K-covariance or exact-fiber collision. + +I ran the existing independently written dense-Walsh checker with its largest +binary L-coordinate representatives. It checks all 4,096 classes, square +transitions, oddness, K-covariance, both weighted sums, integrality, quotient +bijectivity and the unchanged error bound. Maximum correction energy remains +64 and maximum absolute coordinate remains 5. Its altered-correction negative +control still fails the square obligation as intended. + +I reconstructed all 4,096 corrections again with descending-column quotient +lifts, without importing the author's kernel. The complete table digest +agrees with the first independent replay. Every class in `L/Gamma` still has +zero correction, preserving exactness on integral ideal images. These full +checks, together with the unchanged global lifting proof, establish the map's +properties; local feasibility of the forced cycle alone would not do so. + +## Direct complex tensor check + +Separately written integer-pair code implements `F=-D R_C D`, with `R=ST`, +then applies F to every row and column of the complete 16-by-16 witness. +Since `D_33=-1` and `S_33=1`, the forced first transition gives `F(e0)=e3`. +At four axes, `lambda_j=i^wt(j)` and `alpha=-4`. The computation confirms: + +- Row-after-column has row 0 equal to `D*1` and all other rows zero. +- Column-after-row has only entry `(0,3)=-4`. +- Their difference has row 0 equal to `D*1+4e3`, with all other rows zero. + +All 256 complex entries match. Coordinate 3 of the difference is 3 and its +other fifteen nonzero entries are Gaussian units, so its squared Frobenius +norm is `3^2+15=24`. This attains the stronger fixed-witness lower bound. +No covariance under the nonunit scalar -4 is assumed: exactness on integral +ideal images supplies the necessary value on `-4e0`. + +## Reproduction and limitation + +From the repository root: + +```sh +python3 -I -B research/four-axis-exact-square-grid/independent_sharpness.py +``` + +Expected status: `PASS_INDEPENDENT_SHARP_TENSOR_COMPOSITION`, with 4,096 +finite classes, 256 tensor entries and `tensor_defect_squared: 24`. +Normal and optimized Python runs passed. This is fixed-witness sharpness +inside the same bounded-error exact-square family. It does not assert row/ +column commutation, a worst-case tensor discrepancy of 24, or a physical caller. diff --git a/research/four-axis-exact-square-grid/SOURCES.json b/research/four-axis-exact-square-grid/SOURCES.json new file mode 100644 index 0000000000..f0794c4bdf --- /dev/null +++ b/research/four-axis-exact-square-grid/SOURCES.json @@ -0,0 +1,103 @@ +{ + "schema_version": 1, + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "d59b5035e7b4cbaa9d688a1d32dd0d6eb79c466a", + "sha256": "9b8d0eea95b3bf0dfcb7938a732a6439b87a2685dec2a5ab9e525b3b34debbfa" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + } + ], + "external_provenance": [ + { + "repository": "CubeJerry/integer-mult-bounds", + "pull_request": "CrocSwap/integer-mult-bounds#6758", + "commit": "362b20bc934500bc503e850059f0d34daa5dcae3", + "author": "@CubeJerry, with OpenAI Codex assistance", + "usage": "Inspected mathematical provenance only; no runtime import, pending Git-object availability or network access is required for replay.", + "files": [ + { + "path": "research/four-axis-phase-covariant-grid/PROOF.md", + "size": 15396, + "sha256": "dc07dcdf9793b401053738ea7e88c69495967f48f234e8411b8aaaa9858e8632", + "git_blob": "bd5fb90ec3f064388eda1c1bd8834c26b4464bab" + }, + { + "path": "research/four-axis-phase-covariant-grid/construction.py", + "size": 4380, + "sha256": "2375b0fcc02fc55282cd008e5b5f99affd596aef5aaab347ca2cd78ff656349f", + "git_blob": "c5a604d9c4d303119b1536bfb1401030c2aad155" + }, + { + "path": "research/four-axis-phase-covariant-grid/kernel.py", + "size": 1939, + "sha256": "b47af1c5e0df4bfd7dca3898770accbbd9f54f753bcecb97e43fd5d579a172da", + "git_blob": "d7b329b539f9af14eded668ae51a1bd1f414ad18" + } + ] + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "pull_request": "CrocSwap/integer-mult-bounds#6761", + "commit": "b78c8938b6d04b7c340c06d4e958947aeecd9270", + "author": "@CubeJerry, with OpenAI Codex assistance", + "usage": "Inspected mathematical provenance only; no runtime import, pending Git-object availability or network access is required for replay.", + "files": [ + { + "path": "research/four-axis-exact-square-period-obstruction/PROOF.md", + "size": 4449, + "sha256": "605efb740932a218098734f4e91e9e54dd4e6c40fa12bb6f3384cc3b3a8a2eda", + "git_blob": "1d41283666e660a43e51e5db2ce10b3d830258fb" + }, + { + "path": "research/four-axis-exact-square-period-obstruction/verify.py", + "size": 3081, + "sha256": "eec2e5212edae3e826dbc0a1c626fdd611633251e2d3988e05db3ed17dff6d3a", + "git_blob": "36b6fbe5e05d1bcad9067bf7915ef3453da0443f" + } + ] + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "408969010e33a5aacdeecc164a554111e09f8f36", + "author": "@CubeJerry, with OpenAI Codex assistance", + "usage": "Concurrent self-contained tensor obstruction updates the remaining interface question; not a dependency of the square construction, runtime replay or period lower bound.", + "files": [ + { + "path": "research/gaussian-rounding-tensor-obstruction/PROOF.md", + "size": 15050, + "sha256": "35c97616d79edf5af01bbfa0571dc091f8bfda69c179b34f9ea0518b697ef593", + "git_blob": "7a69f170f8d6f8d04d08f3f4e4f184bfa75fd90d" + } + ] + } + ], + "cited_lineage": [ + { + "pull_request": "CrocSwap/integer-mult-bounds#6574", + "commit": "48e312ff18d5b66b0969148f615fdf5ce0f92edd", + "author": "Nick Petalas", + "usage": "Native factorization, correction predicates, sharp radius and half-grid lower-bound lineage, retained through the inspected #6758 sources." + }, + { + "pull_request": "CrocSwap/integer-mult-bounds#6755", + "commit": "4475dc90bbe6037981bfc8ce0dd55efb6bdbc6a0", + "author": "ToikY", + "usage": "Concurrent review identifying square/phase/caller obligations; context and credit, not a runtime dependency or endorsement." + }, + { + "pull_request": "CrocSwap/integer-mult-bounds#6509", + "commit": "a4173e810c4d34a1d13b9745af123ad0ec6cfed5", + "author": "Ali Romman", + "usage": "Retained dirty-port caller identified as a future integration target, not imported or checked in this package." + } + ], + "external_pin_boundary": "The files inventory pins canonical task/selected provenance. External head/file records authenticate inspected predecessor provenance only; all proof-relevant finite data and executable code are package-local and independently replayable without those pending Git objects." +} diff --git a/research/four-axis-exact-square-grid/TASK.json b/research/four-axis-exact-square-grid/TASK.json new file mode 100644 index 0000000000..bfbdf6a21a --- /dev/null +++ b/research/four-axis-exact-square-grid/TASK.json @@ -0,0 +1,96 @@ +{ + "schema_version": 1, + "task_id": "uniform-transfer-audit", + "priority_revision": 8, + "base_commit": "7c49fe32c55de02c2c873655c804b16e4c3fef0a", + "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": "Construct a sharp odd four-axis integer/Gaussian rounding map satisfying the exact native square F^2=J, on an explicitly invariant affine period, and independently certify the finite corrections and all-integer lift. Attain the general tensor theorem's sharp fixed-witness discrepancy at n=4 while retaining the uniform sharp error and exact native square.", + "scope_change_reason": "The orchestrator assigned seed 43 to the precise unresolved square identity in pending CrocSwap/integer-mult-bounds#6758, after the index-divisibility obstruction in CrocSwap/integer-mult-bounds#6761. The original uniform-transfer-audit card is retained as provenance; this finite structural interface does not discharge a selected all-size assumption.", + "bottleneck_link": "The complex native service limits the selected assembled result. This package closes exact fixed-block group consistency at the existing sharp f=4 radius. It leaves classifier/table evaluation, source traffic, reversible cleanup, precision binding, compiler stock and the complete recursive paid profile unpriced; no kappa follows.", + "budget_minutes": 90, + "stop_rule": "Freeze after a complete index-4096 exact-square certificate and independent replay; stop rather than infer general native graph flatness, physical supplier admission, or a stronger kappa from a local finite map.", + "outcome": "partial", + "evidence": "PROOF.md derives the all-integer lift, F^2=J, literal inverse, sum/global-phase covariance, sharp radius, exactness on integral ideal outputs and fixed-block power law. verify.py checks 4096 real classes, 4096 complex fixtures, 8 large-word cases and 9 rejection controls; independent_square.py reconstructs all transitions with a different representative section and closed orbit formulas; review_lift.py independently checks the period and predecessor lower-bound matrices. The forced T cycle e0->e3->e15->e12->e0 gives F(e0)=e3. Direct independent evaluation of all256 tensor-witness entries yields exact squared discrepancy24, attaining the nonzero-image lower bound while retaining uniform sharp error and native square. SHARPNESS-REVIEW.md records that composition check.", + "author": "@CubeJerry (Jerry Chen), with substantial OpenAI Codex assistance", + "ai_assistance": "Substantial OpenAI Codex assistance for period-module reasoning, bounded correction matching, implementation, proof and packaging. A separately tasked agent checked the lattice/algebra/lower-bound applicability; the lead orchestrator independently reconstructed all correction transitions using dense Walsh sums and a different quotient section. This is independent algorithmic/mathematical review, not human review or proof-kernel formalization.", + "open_questions": [ + { + "question": "Can this exact-square sharp block be lowered into the retained four-axis caller with a competitive complete physical bill?", + "why_it_matters": "The new algebraic compatibility can make fixed-block restoration exact, but a 4096-entry correction table and 12-bit classifier are not free operations and no changed multiplier profile has been derived.", + "first_step": "At the exact retained caller source used by CrocSwap/integer-mult-bounds#6509 and CrocSwap/integer-mult-bounds#6758, price one forward/inverse block including low-bit reads, classifier, table routing, signed arithmetic, scratch return, precision cuts and compiler stock; then compare the complete target/paid profile.", + "blocked_by": "No physical lookup/cleanup lowering or caller-bound recurrence is provided in this package." + }, + { + "question": "Can a changed exactness, phase or state interface support consistent overlapping rounded blocks?", + "why_it_matters": "The companion universal tensor-obstruction theorem rules out row/column commutation under this map's state-free, global-unit-covariant, exact-on-integral-image contract. The exact same-block square remains valid.", + "first_step": "Identify which property a pinned actual caller can relax, or declare additional retained state and prove its composition law; then price error, routing and reversible cleanup.", + "blocked_by": "No replacement contract or complete physical recurrence has been established. The companion theorem does not cover every changed lattice or stateful representation.", + "companion_proof": "https://github.com/CubeJerry/integer-mult-bounds/blob/408969010e33a5aacdeecc164a554111e09f8f36/research/gaussian-rounding-tensor-obstruction/PROOF.md" + } + ], + "verification_boundary": { + "selected_result": "Selected kappa 0.003125804 at canonical base; five inherited assumptions remain. No selected multiplier replay or baseline pass is claimed.", + "finite_result": "Exact finite certificate plus all-integer proof.", + "source_history": "The workspace is shallow; full Git-history ancestry certification is unavailable and no pass is claimed. Predecessor sources are provenance only, never imported at runtime.", + "publication": "No supplier admission, frontier change or upstream PR submission is performed by this package." + } +} diff --git a/research/four-axis-exact-square-grid/VERIFY.json b/research/four-axis-exact-square-grid/VERIFY.json new file mode 100644 index 0000000000..a03c58ac4f --- /dev/null +++ b/research/four-axis-exact-square-grid/VERIFY.json @@ -0,0 +1,101 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Every real quotient class, native complex fixtures, literal inverses, sharp error and meaningful rejection controls." + }, + { + "argv": [ + "{python}", + "-O", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Every real quotient class, native complex fixtures, literal inverses, sharp error and meaningful rejection controls. Optimization-mode controls remain active." + }, + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/independent_square.py" + ], + "timeout_seconds": 120, + "checks": "Independent dense-Walsh all-class transitions with a different coset section and closed orbit formulas." + }, + { + "argv": [ + "{python}", + "-O", + "-W", + "error", + "-B", + "{package}/independent_square.py" + ], + "timeout_seconds": 120, + "checks": "Independent dense-Walsh all-class transitions with a different coset section and closed orbit formulas. Optimization-mode controls remain active." + }, + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/review_lift.py" + ], + "timeout_seconds": 120, + "checks": "Independent exact lattice/phase proof obligations and predecessor minimum-period matrices." + }, + { + "argv": [ + "{python}", + "-O", + "-W", + "error", + "-B", + "{package}/review_lift.py" + ], + "timeout_seconds": 120, + "checks": "Independent exact lattice/phase proof obligations and predecessor minimum-period matrices. Optimization-mode controls remain active." + }, + { + "argv": [ + "{python}", + "-W", + "error", + "-B", + "{package}/independent_sharpness.py" + ], + "timeout_seconds": 120, + "checks": "Independent descending-section reconstruction, forced basis cycle and all256 complex tensor-witness entries; exact squared defect24. No author kernel import." + }, + { + "argv": [ + "{python}", + "-O", + "-W", + "error", + "-B", + "{package}/independent_sharpness.py" + ], + "timeout_seconds": 120, + "checks": "Independent descending-section reconstruction, forced basis cycle and all256 complex tensor-witness entries; exact squared defect24. No author kernel import." + } + ] +} diff --git a/research/four-axis-exact-square-grid/independent_sharpness.py b/research/four-axis-exact-square-grid/independent_sharpness.py new file mode 100644 index 0000000000..128c2ab9f9 --- /dev/null +++ b/research/four-axis-exact-square-grid/independent_sharpness.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +"""Independent full finite replay and direct 256-entry tensor witness check. + +No author kernel import. Reconstructs with descending-column coset lifts, +then compares with the existing largest-section independent finite checker. +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +""" +from hashlib import sha256 +import json +from pathlib import Path +import runpy + +HERE = Path(__file__).resolve().parent +M = runpy.run_path(str(HERE / "independent_square.py")) +need = M["need"] +E = lambda j: tuple(int(i == j) for i in range(16)) + + +def main(): + path = HERE / "CERTIFICATE.json" + raw = path.read_bytes() + need(sha256(raw).hexdigest() == "44a950a62abec947b4c094c2c1f290bec2f8d7f41d3a108ab4c58b5bdfc46b56", "Frozen candidate") + finite = M["replay"](path) + data = json.loads(raw) + basis = M["basis"]() + sections = {0: 0} + for j in range(15, -1, -1): + column = M["synd"](E(j)) + if column not in sections: + sections.update({label ^ column: mask ^ (1 << j) + for label, mask in list(sections.items())}) + need(len(sections) == 64, "Descending section surjective") + lifts = [tuple(sum(basis[j][i] for j in range(16) if sections[s] & (1 << j)) + for i in range(16)) for s in range(64)] + reps = [M["add"](M["base"](q), lifts[s]) for q in range(64) for s in range(64)] + need([M["label"](z) for z in reps] == list(range(4096)), "Every class represented") + table = {} + for source, values in data["cycles"]: + z, c = reps[source], tuple(values) + y = M["quarter"](M["add"](M["sw"](z), c)) + d = M["neg"](M["b"](c)) + for u, correction in ((z,c), (y,d), (M["k"](z),M["k"](c)), (M["k"](y),M["k"](d))): + for v, f in ((u,correction), (M["neg"](u),M["neg"](correction))): + label = M["label"](v) + need(label not in table or table[label] == f, "No reconstruction collision") + table[label] = f + need(len(table) == 4096, "Full reconstructed table") + packed = json.dumps([list(table[j]) for j in range(4096)], separators=(",",":")).encode() + need(sha256(packed).hexdigest() == finite["table_sha256"], "Table digest agrees with full independent check") + need(all(not any(table[j]) for j in range(64)), "Every integral-image fiber exact") + + def t(z): + return M["quarter"](M["add"](M["sw"](z), table[M["label"](z)])) + + re = tuple((1,0,-1,0)[i.bit_count()%4] for i in range(16)) + im = tuple((0,-1,0,1)[i.bit_count()%4] for i in range(16)) + cycle, signed_labels, local = (0,3,15,12), set(), [] + for k, j in enumerate(cycle): + z, y = E(j), E(cycle[(k+1)%4]) + c = tuple(4*a-b for a,b in zip(y,M["sw"](z))) + need(table[M["label"](z)] == c and t(z) == y, "Forced transition in full table") + need(sum(x*x for x in c) == 24, "Forced energy24") + need(sum(a*b for a,b in zip(re,c)) == 0 and sum(a*b for a,b in zip(im,c)) == 0, "Both weighted sums zero") + need(t(y) == M["k"](z), "Forced square") + labels = [M["label"](z), M["label"](M["neg"](z))] + signed_labels.update(labels) + local.append({"basis":j,"next":cycle[(k+1)%4],"labels":labels,"energy":24}) + need(len(signed_labels) == 8 and all(j >= 64 for j in signed_labels), "No odd/K/zero-fiber collision") + + def d_phase(z): + return tuple(((a,b),(b,-a),(-a,-b),(-b,a))[j.bit_count()%4] for j,(a,b) in enumerate(z)) + + def f(z): + inner = d_phase(z) + r, i = t(tuple(a for a,_ in inner)), t(tuple(b for _,b in inner)) + middle = tuple((M["SIGNS"][j]*r[j], M["SIGNS"][j]*i[j]) for j in range(16)) + return tuple((-a,-b) for a,b in d_phase(middle)) + + zero = ((0,0),)*16 + e0 = tuple((int(j == 0),0) for j in range(16)) + e3 = tuple((int(j == 3),0) for j in range(16)) + need(f(zero) == zero and f(e0) == e3, "F(e0)=e3 and F(0)=0") + lam = tuple(((1,0),(0,1),(-1,0),(0,-1))[j.bit_count()%4] for j in range(16)) + x = tuple(tuple(lam[r] if c == 0 else (0,0) for c in range(16)) for r in range(16)) + + def rows(a): + return tuple(f(row) for row in a) + + def columns(a): + images = tuple(f(tuple(a[r][c] for r in range(16))) for c in range(16)) + return tuple(tuple(images[c][r] for c in range(16)) for r in range(16)) + + rc, cr = rows(columns(x)), columns(rows(x)) + delta = tuple(tuple((rc[r][c][0]-cr[r][c][0], rc[r][c][1]-cr[r][c][1]) for c in range(16)) for r in range(16)) + expected_row = list(d_phase(((1,0),)*16)) + expected_row[3] = (expected_row[3][0]+4, expected_row[3][1]) + need(delta == (tuple(expected_row),)+(zero,)*15, "All256 tensor defect entries") + energy = sum(a*a+b*b for row in delta for a,b in row) + need(energy == 24, "Sharp stronger fixed-witness floor") + need(rc[0] == d_phase(((1,0),)*16), "Row-after-column output") + need(cr[0] == tuple((-4*int(j == 3),0) for j in range(16)), "Column-after-row output") + print(json.dumps({"status":"PASS_INDEPENDENT_SHARP_TENSOR_COMPOSITION", "finite_check":finite, + "forced_cycle":local,"F_e0":"e3","tensor_defect_squared":energy, + "tensor_entries_checked":256,"nonzero_defect_rows":[0], + "scope":"Fixed witness only; no worst-case tensor-discrepancy claim"},indent=2,sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/four-axis-exact-square-grid/independent_square.py b/research/four-axis-exact-square-grid/independent_square.py new file mode 100644 index 0000000000..4a2af45909 --- /dev/null +++ b/research/four-axis-exact-square-grid/independent_square.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python3 +"""Independent square replay: dense Walsh sums and a different coset section. + +Closed two-step orbit formulas replace the author's iterative decoder. +Prepared for @CubeJerry with substantial OpenAI assistance. Apache-2.0. +No author module is imported. +""" +import json +from hashlib import sha256 +from pathlib import Path +import sys + +def need(ok,message): + if not ok:raise ValueError(message) + +ROWS=(0x21,0x906,0x6fde,0x103,0xa8ec,0x29e) +HIGH=tuple(i for i in range(16)if i.bit_count()>1) +SIGNS=tuple(1 if i.bit_count()%2==0 else -1 for i in range(16)) +W=tuple(tuple(1 if (r&s).bit_count()%2==0 else -1 for s in range(16))for r in range(16)) + +def neg(z):return tuple(-x for x in z) +def add(x,y):return tuple(a+b for a,b in zip(x,y)) +def sw(z):return tuple(s*sum(a*b for a,b in zip(row,z))for s,row in zip(SIGNS,W)) +def quarter(z): + need(all(x%4==0 for x in z),'Noninteger quarter') + return tuple(x//4 for x in z) +def b(z):return quarter(sw(z)) +def k(z):return tuple(SIGNS[i]*z[15-i]for i in range(16)) +def coords(z): + total=sum(z);sums=[sum(z[i]for i in range(16)if i&(1<>j)&1 + z[0]=a-sum(z) + return tuple(z) +def label(z): + q=sum(z)%4+4*sum((sum(z[i]for i in range(16)if i&(1<>j)&1 for j in range(16));sections[synd(c)]=c + need(len(sections)==64,'Surjective syndrome') + lifts=[tuple(sum(a*v[i]for a,v in zip(sections[s],bs))for i in range(16))for s in range(64)] + reps=[add(base(q),lifts[s])for q in range(64)for s in range(64)] + need([label(z)for z in reps]==list(range(4096)),'Independent representatives') + for i in range(16): + z=tuple(8*(j==i)for j in range(16));need(label(z)==0,'Low-three-bit period') + table={} + for source,values in data['cycles']: + c=tuple(values);need(len(c)==16 and all(type(x)is int for x in c),'Correction vector') + z=reps[source];y=quarter(add(sw(z),c));d=neg(b(c)) + for u,e in ((z,c),(y,d),(k(z),k(c)),(k(y),k(d))): + for v,f in ((u,e),(neg(u),neg(e))): + j=label(v);need(j not in table or table[j]==f,'Conflicting orbit assignments') + table[j]=f + need(len(table)==4096,'Complete correction coverage') + transform=lambda z:quarter(add(sw(z),table[label(z)])) + image=[];energy=0;coordinate=0 + re=(1,0,-1,0);im=(0,-1,0,1) + for j,z in enumerate(reps): + c=table[j];y=transform(z);image.append(label(y)) + need(table[label(y)]==neg(b(c)),'Square transition') + need(transform(y)==k(z),'Exact square on alternative representative') + need(table[label(neg(z))]==neg(c),'Odd correction') + need(table[label(k(z))]==k(c),'K covariance') + need(sum(re[i.bit_count()%4]*c[i]for i in range(16))==0,'Real weighted sum') + need(sum(im[i.bit_count()%4]*c[i]for i in range(16))==0,'Imaginary weighted sum') + e=sum(x*x for x in c);need(e<=64,'Sharp radius');energy=max(energy,e) + coordinate=max(coordinate,max(map(abs,c))) + need(len(set(image))==4096,'Quotient bijection') + need(energy==64 and coordinate==5,'Sharp and coordinate maxima') + bad=dict(table);bad[0]=tuple(x+4*(i==0)for i,x in enumerate(bad[0])) + bad_t=lambda z:quarter(add(sw(z),bad[label(z)])) + need(any(bad_t(bad_t(z))!=k(z)for z in reps),'Changed correction negative control') + packed=json.dumps([list(table[j])for j in range(4096)],separators=(',',':')).encode() + return{'status':'PASS_INDEPENDENT_SQUARE_TRANSITIONS','certificate_sha256':sha256(raw).hexdigest(), + 'table_sha256':sha256(packed).hexdigest(),'classes':4096,'max_energy':energy, + 'max_coordinate':coordinate,'section':'largest binary L-coordinate representative', + 'changed_correction_rejected':True} + +if __name__=='__main__': + p=Path(sys.argv[1])if len(sys.argv)>1 else Path(__file__).with_name('CERTIFICATE.json') + print(json.dumps(replay(p),indent=2,sort_keys=True)) diff --git a/research/four-axis-exact-square-grid/kernel.py b/research/four-axis-exact-square-grid/kernel.py new file mode 100644 index 0000000000..5b0cdd6fe5 --- /dev/null +++ b/research/four-axis-exact-square-grid/kernel.py @@ -0,0 +1,209 @@ +"""Exact four-axis lattice map; integer arithmetic and a finite certificate. + +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +The native factorization and sharp radius originate in Nick Petalas's #6574; +the phase-period interface is developed in #6758 and the square-period +obstruction in #6761. This module does not implement a physical tape tariff. +""" + +import json +from functools import lru_cache +from pathlib import Path + +N = 16 +ROWS = (0x21, 0x906, 0x6FDE, 0x103, 0xA8EC, 0x29E) +HI = tuple(j for j in range(N) if j.bit_count() >= 2) +SIGN = tuple((-1) ** j.bit_count() for j in range(N)) +RE = tuple((1, 0, -1, 0)[j.bit_count() % 4] for j in range(N)) +IM = tuple((0, -1, 0, 1)[j.bit_count() % 4] for j in range(N)) + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def vector(values): + values = tuple(values) + require(len(values) == N and all(type(x) is int for x in values), + "expected sixteen exact integers") + return values + + +def neg(v): + return tuple(-x for x in v) + + +def walsh(v): + """Unnormalized Walsh transform: 64 additions/subtractions.""" + out = list(v) + width = 1 + while width < N: + for block in range(0, N, 2 * width): + for j in range(block, block + width): + a, b = out[j], out[j + width] + out[j], out[j + width] = a + b, a - b + width *= 2 + return tuple(out) + + +def quarter(v): + require(all(x % 4 == 0 for x in v), "nonintegral exact quarter") + return tuple(x // 4 for x in v) + + +def b_map(v): + return quarter(tuple(s * x for s, x in zip(SIGN, walsh(v)))) + + +def k_map(v): + return tuple(SIGN[j] * v[j ^ 15] for j in range(N)) + + +def l_basis(): + out = [] + v = [0] * N + v[0] = 4 + out.append(tuple(v)) + for bit in range(4): + v = [0] * N + v[0], v[1 << bit] = -2, 2 + out.append(tuple(v)) + for j in HI: + v = [0] * N + v[j], v[0] = 1, j.bit_count() - 1 + for bit in range(4): + if j >> bit & 1: + v[1 << bit] = -1 + out.append(tuple(v)) + return tuple(out) + + +BASIS = l_basis() + + +def l_coords(v): + total = sum(v) + bits = [sum(v[j] for j in range(N) if j >> bit & 1) + for bit in range(4)] + require(total % 4 == 0 and all(x % 2 == 0 for x in bits), + "vector is not in the Walsh integrality lattice") + return (total // 4, *(x // 2 for x in bits), *(v[j] for j in HI)) + + +def syndrome(coords): + mask = sum((x & 1) << j for j, x in enumerate(coords)) + return sum(((r & mask).bit_count() % 2) << j + for j, r in enumerate(ROWS)) + + +def coarse_rep(q): + a, bits = q & 3, q >> 2 + v = [0] * N + v[0] = a - bits.bit_count() + for bit in range(4): + v[1 << bit] = bits >> bit & 1 + return tuple(v) + + +BASE = tuple(coarse_rep(q) for q in range(64)) + + +def class_id(z): + """The 12-bit class depends only on each input's three low bits.""" + v = tuple(x % 8 for x in z) # 8 Z^16 is contained in Gamma. + bit_mask = sum((sum(v[j] for j in range(N) if j >> bit & 1) % 2) + << bit for bit in range(4)) + q = sum(v) % 4 + 4 * bit_mask + return 64 * q + syndrome(l_coords(tuple(x - y for x, y in zip(v, BASE[q])))) + + +def representatives(): + # Deterministic section: first independent syndrome columns in ascending + # basis order. The resulting representative ordering is certificate data. + sections = {0: 0} + for j in range(N): + col = sum(((r >> j) & 1) << bit for bit, r in enumerate(ROWS)) + if col not in sections: + sections.update({q ^ col: mask ^ (1 << j) + for q, mask in list(sections.items())}) + require(len(sections) == 64, "period syndrome rank is not six") + lifts = [tuple(sum(BASIS[j][i] for j in range(N) if sections[q] >> j & 1) + for i in range(N)) for q in range(64)] + return tuple(tuple(x + y for x, y in zip(BASE[q], lifts[v])) + for q in range(64) for v in range(64)) + + +REPS = representatives() + + +def expand_certificate(data): + """Expand cycle generators without a matching search or external inputs.""" + require(data.get("schema_version") == 1, "unsupported certificate schema") + require(data.get("period_rows") == list(ROWS), "wrong period rows") + cycles = data.get("cycles") + require(type(cycles) is list and 1 <= len(cycles) <= 4096, + "invalid cycle inventory") + table = {} + for row in cycles: + require(type(row) is list and len(row) == 2, "invalid cycle encoding") + source, raw_c = row + require(type(source) is int and 0 <= source < 4096, "invalid source class") + c0 = vector(raw_c) + require(sum(x * x for x in c0) <= 64, "correction exceeds sharp radius") + require(sum(a * x for a, x in zip(RE, c0)) == 0 and + sum(a * x for a, x in zip(IM, c0)) == 0, "nonzero weighted sum") + z0, c = REPS[source], c0 + z = z0 + for _ in range(4): + for u, correction in ((class_id(z), c), (class_id(neg(z)), neg(c))): + require(u not in table or table[u] == correction, + "incompatible correction cycle") + table[u] = correction + z = quarter(tuple(s * w + e for s, w, e in zip(SIGN, walsh(z), c))) + c = neg(b_map(c)) + require(z == z0 and c == c0, "cycle does not close") + require(len(table) == 4096, "incomplete correction table") + return tuple(table[j] for j in range(4096)) + + +@lru_cache(maxsize=1) +def load_table(): + path = Path(__file__).with_name("CERTIFICATE.json") + require(path.stat().st_size <= 1_000_000, "oversized certificate") + return expand_certificate(json.loads(path.read_text(encoding="utf-8"))) + + +def t_map(z, table=None): + z = vector(z) + if table is None: + table = load_table() + c = table[class_id(z)] + return quarter(tuple(s * w + e for s, w, e in zip(SIGN, walsh(z), c))) + + +def r_map(z, table=None): + return tuple(s * x for s, x in zip(SIGN, t_map(z, table))) + + +def diagonal(real, imag): + """Multiply coordinate j by (-i)^wt(j), using exact integer pairs.""" + a, b = [], [] + for j, (x, y) in enumerate(zip(real, imag)): + pair = ((x, y), (y, -x), (-x, -y), (-y, x))[j.bit_count() % 4] + a.append(pair[0]) + b.append(pair[1]) + return tuple(a), tuple(b) + + +def forward(real, imag, table=None): + """F = -D R_C D. Arguments and return value are two integer vectors.""" + real, imag = diagonal(vector(real), vector(imag)) + real, imag = diagonal(r_map(real, table), r_map(imag, table)) + return neg(real), neg(imag) + + +def inverse(real, imag, table=None): + """The literal inverse J F, not an approximate reverse transform.""" + real, imag = forward(real, imag, table) + return tuple(real[j ^ 15] for j in range(N)), tuple(imag[j ^ 15] for j in range(N)) diff --git a/research/four-axis-exact-square-grid/review_lift.py b/research/four-axis-exact-square-grid/review_lift.py new file mode 100644 index 0000000000..8df0fa2650 --- /dev/null +++ b/research/four-axis-exact-square-grid/review_lift.py @@ -0,0 +1,142 @@ +#!/usr/bin/env python3 +"""Independent lattice/phase review; does not import the author's search. + +This is a separate review of the finite-to-infinite argument. The lead's +direct integer checker owns the complete 4096-class transition replay. +Jerry Chen / @CubeJerry with substantial OpenAI assistance, Apache-2.0. +""" +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import json + +HERE = Path(__file__).resolve().parent +SOURCE = HERE / "CERTIFICATE.json" +CERTIFICATE_SHA256 = "44a950a62abec947b4c094c2c1f290bec2f8d7f41d3a108ab4c58b5bdfc46b56" + + +def need(ok, label): + if not ok: + raise ValueError(label) + + +def multiply(a, b): + return [[sum(x*y for x, y in zip(row, col)) for col in zip(*b)] for row in a] + + +def eye(n): + return [[int(i == j) for j in range(n)] for i in range(n)] + + +def inverse(a): + n = len(a) + rows = [[Q(x) for x in row] + unit for row, unit in zip(a, eye(n))] + for j in range(n): + pivot = next(i for i in range(j, n) if rows[i][j]) + rows[j], rows[pivot] = rows[pivot], rows[j] + scalar = rows[j][j] + rows[j] = [x/scalar for x in rows[j]] + for i in range(n): + if i != j: + scalar = rows[i][j] + rows[i] = [a-scalar*b for a,b in zip(rows[i], rows[j])] + need([row[:n] for row in rows] == eye(n), "rational inverse left block") + return [row[n:] for row in rows] + + +def binary_rank(masks): + pivots = {} + for value in masks: + while value: + j = value.bit_length()-1 + if j not in pivots: + pivots[j] = value + break + value ^= pivots[j] + return len(pivots) + + +def main(): + raw = SOURCE.read_bytes() + need(sha256(raw).hexdigest() == CERTIFICATE_SHA256, "compressed certificate SHA256") + data = json.loads(raw) + need(data["schema_version"] == 1 and len(data["cycles"]) == 568, "compressed certificate shape") + masks = data["period_rows"] + need(masks == [0x21, 0x906, 0x6fde, 0x103, 0xa8ec, 0x29e], "period rows") + + # Tensor construction of W, independent of the author's bit-dot formula. + w = [[1]] + for _ in range(4): + w = [row + row for row in w] + [row + [-x for x in row] for row in w] + s = [(-1)**j.bit_count() for j in range(16)] + a = [[Q(x, 4) for x in row] for row in w] + b = [[sign*x for x in row] for sign, row in zip(s, a)] + jmatrix = [[int(col == (row ^ 15)) for col in range(16)] for row in range(16)] + kmatrix = [[sign*x for x in row] for sign, row in zip(s, jmatrix)] + need(multiply(a, a) == eye(16), "Walsh isometry/involution") + need(multiply(b, b) == kmatrix, "B squared equals signed reversal") + need(multiply(kmatrix, kmatrix) == eye(16), "signed reversal involution") + + columns = [[4] + [0]*15] + for bit in range(4): + column = [0]*16 + column[0], column[1 << bit] = -2, 2 + columns.append(column) + for vertex in range(16): + if vertex.bit_count() < 2: + continue + column = [0]*16 + column[vertex], column[0] = 1, vertex.bit_count()-1 + for bit in range(4): + if vertex >> bit & 1: + column[1 << bit] = -1 + columns.append(column) + p = list(map(list, zip(*columns))) + pinv = inverse(p) + action = multiply(multiply(pinv, b), p) + need(all(x.denominator == 1 for row in action for x in row), "B preserves integral L") + action = [[int(x) for x in row] for row in action] + need(multiply(multiply(action, action), multiply(action, action)) == eye(16), "B automorphism of L") + + dual = [] + for mask in masks: + dual.append(sum((sum(action[i][j] for i in range(16) if mask >> i & 1) % 2) << j + for j in range(16))) + expected_dual = [masks[0]^masks[1], masks[1]^masks[2], masks[2], + masks[3]^masks[4], masks[4]^masks[5], masks[5]] + need(dual == expected_dual, "Gamma stable by exact dual row action") + need(binary_rank(masks) == 6, "six independent period constraints") + need(binary_rank([mask & 31 for mask in masks]) == 5, "no oddness obstruction on even vectors") + + # Independent matrix-rank check of the predecessor's lower-bound premise. + # E consists of the first five L-coordinate directions. C=K+I on L/2L. + kaction = multiply(action, action) + ccolumns = [sum(((kaction[i][j]+int(i == j)) % 2) << i for i in range(16)) + for j in range(16)] + c_rank = binary_rank(ccolumns) + joint_rank = binary_rank(ccolumns + [1 << i for i in range(5)]) + intersection = 5+c_rank-joint_rank + need(ccolumns[:5] == [0, 1, 1, 1, 1], "rank-one C restriction to E") + need(c_rank == 6 and joint_rank == 9 and intersection == 2, + "two-dimensional E intersection image C") + + # Exact phase pair: D_v D_{v xor 15}=(-i)^4=1. + need(all((v.bit_count()+(v^15).bit_count()) % 4 == 0 for v in range(16)), "D J D=J") + result = { + "status": "PASS_INDEPENDENT_LATTICE_PHASE_LIFT_REVIEW", + "certificate_sha256": sha256(raw).hexdigest(), + "lattice_index": 64, + "period_constraints_rank": 6, + "period_index": 4096, + "low_coordinate_restriction_rank": 5, + "predecessor_C_rank": c_rank, + "predecessor_E_plus_image_C_rank": joint_rank, + "predecessor_E_intersection_image_C_dimension": intersection, + "dual_action": dual, + "scope": "Independent lattice and phase derivation; complete finite table identities are checked separately by independent_square.py." + } + print(json.dumps(result, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/four-axis-exact-square-grid/search.py b/research/four-axis-exact-square-grid/search.py new file mode 100644 index 0000000000..24efe8fac5 --- /dev/null +++ b/research/four-axis-exact-square-grid/search.py @@ -0,0 +1,178 @@ +#!/usr/bin/env python3 +"""Fixed-period discovery replay. Prepared for @CubeJerry with OpenAI assistance. +Apache-2.0. Search assertions are diagnostic; verify.py separately certifies +all proof-relevant predicates in normal and optimization modes. This search +stops at the first greedy matching for seeds 0..99, not at exhaustive coverage +of matchings or lattices. Integer set order can select a different valid +matching on a different Python implementation; validate any new output. +""" +from itertools import product +from collections import Counter, deque +from pathlib import Path +import json, random, time + +import argparse +import kernel as model + +parser=argparse.ArgumentParser(description="Bounded fixed-period correction search; verifier remains authoritative.") +parser.add_argument('--output',type=Path,required=True,help='new or disposable candidate certificate path') +args=parser.parse_args() +basis=model.BASIS +ROWS=model.ROWS +HI=[s for s in range(16) if s.bit_count()>=2] +SIGN=[(-1)**s.bit_count() for s in range(16)] +RE=[(1,0,-1,0)[s.bit_count()%4] for s in range(16)] +IM=[(0,-1,0,1)[s.bit_count()%4] for s in range(16)] +W=[[(-1)**((r&s).bit_count()) for s in range(16)] for r in range(16)] + +def walsh(v):return tuple(sum(a*b for a,b in zip(row,v)) for row in W) +def b(v): + q=walsh(v) + assert all(x%4==0 for x in q) + return tuple(s*x//4 for s,x in zip(SIGN,q)) +def k(v):return tuple(SIGN[s]*v[s^15] for s in range(16)) +def neg(v):return tuple(-x for x in v) +def coords(v): + total=sum(v);bits=[sum(v[s] for s in range(16) if s>>j&1) for j in range(4)] + assert total%4==0 and all(x%2==0 for x in bits) + return [total//4]+[x//2 for x in bits]+[v[s] for s in HI] +def g(v): + mask=sum((x&1)<>2 + z=[0]*16;z[0]=a-bm.bit_count() + for j in range(4):z[1<>j)&1 + return tuple(z) +BASE=[base_rep(q) for q in range(64)] +def key(z): + q=(sum(z)%4)+4*sum((sum(z[s] for s in range(16) if s>>j&1)%2)<>j)&1)<>j&1) for i in range(16)) for q in range(64)] +REPS=[tuple(a+b for a,b in zip(BASE[q],LREP[v])) for q in range(64) for v in range(64)] +assert all(key(z)==i for i,z in enumerate(REPS)) +BK=[g(coords(b(v))) for v in LREP] +NK=[key(neg(z)) for z in REPS] +KK=[key(k(z)) for z in REPS] +assert all(KK[KK[i]]==i and NK[NK[i]]==i and KK[NK[i]]==NK[KK[i]] for i in range(4096)) + +orbits=[];oi={} +for i in range(4096): + if i in oi:continue + orb=sorted({i,NK[i],KK[i],NK[KK[i]]}) + for v in orb:oi[v]=len(orbits) + orbits.append(orb) +print('orbits',len(orbits),dict(Counter(map(len,orbits))),flush=True) + +def corrections(q,bound=3): + residue=[x%4 for x in walsh(BASE[q])] + groups=[] + for weights in [RE,IM]: + positions=[i for i,w in enumerate(weights) if w] + candidates=[] + options=[[e for e in range(-bound,bound+1) if (e+residue[i])%4==0] for i in positions] + for vals in product(*options): + energy=sum(x*x for x in vals) + if energy<=64 and sum(weights[i]*v for i,v in zip(positions,vals))==0: + candidates.append((positions,vals,energy)) + groups.append(candidates) + result=[] + for ps,vs,en in groups[0]: + for pt,vt,em in groups[1]: + if en+em>64:continue + e=[0]*16 + for i,v in zip(ps,vs):e[i]=v + for i,v in zip(pt,vt):e[i]=v + c=tuple(s*v for s,v in zip(SIGN,e)) + ct=neg(b(c)) + y=tuple((s*a+d)//4 for s,a,d in zip(SIGN,walsh(BASE[q]),c)) + assert all((s*a+d)%4==0 for s,a,d in zip(SIGN,walsh(BASE[q]),c)) + result.append((c,ct,key(y))) + return result + +def orbit_values(s,c):return ((s,c),(NK[s],neg(c)),(KK[s],k(c)),(NK[KK[s]],neg(k(c)))) +def compatible(s,t,c,ct): + vals={} + for u,v in orbit_values(s,c)+orbit_values(t,ct): + if u in vals and vals[u]!=v:return False + vals[u]=v + return True + +start=time.monotonic() +CANDS=[corrections(q) for q in range(64)] +print('candidates',dict(Counter(map(len,CANDS))), 'elapsed',time.monotonic()-start,flush=True) +adj=[set() for _ in orbits];edges={} +for a,orb in enumerate(orbits): + s=orb[0];q=s//64;v=s%64 + for j,(c,ct,tb) in enumerate(CANDS[q]): + t=tb^BK[v];bb=oi[t] + if bb in adj[a] or len(orbits[bb])!=len(orb):continue + if compatible(s,t,c,ct): + adj[a].add(bb);adj[bb].add(a);edges[tuple(sorted((a,bb)))]=(s,j,t) + if a%100==0:print('graph',a,len(edges),time.monotonic()-start,flush=True) +print('graph_done',len(edges),'degrees',dict(Counter(map(len,adj))),flush=True) +zeros=[orbits[i] for i,a in enumerate(adj) if not a] +print('zeros',len(zeros),zeros[:10],flush=True) + + +forced_source=64 +forced_target=849 +forced_c=tuple(4*int(i==3)-SIGN[i] for i in range(16)) +forced_j=next(j for j,(c,ct,tb) in enumerate(CANDS[forced_source//64]) if c==forced_c) +model.require((CANDS[1][forced_j][2]^BK[0])==forced_target,'wrong forced target') +forced_a,forced_b=oi[forced_source],oi[forced_target] +model.require(compatible(forced_source,forced_target,forced_c,neg(b(forced_c))), + 'incompatible forced edge') +edges[tuple(sorted((forced_a,forced_b)))]=(forced_source,forced_j,forced_target) +adj[forced_a].add(forced_b);adj[forced_b].add(forced_a) +print('FORCED_EDGE',forced_a,forced_b,'source',forced_source,'target',forced_target,flush=True) + +def greedy_match(seed): + rng=random.Random(seed);match={forced_a:forced_b,forced_b:forced_a} + pool=set(range(len(orbits)))-{forced_a,forced_b} + while pool: + a=min(pool,key=lambda a:(len(adj[a]&pool),rng.random())) + opts=adj[a]&pool + if not opts:return match,pool + b=min(opts,key=lambda b:(len(adj[b]&pool),rng.random())) + match[a]=b;match[b]=a;pool.discard(a);pool.discard(b) + return match,pool + +for seed in range(100): + matching,unmatched=greedy_match(seed) + print('matching',seed,len(unmatched),flush=True) + if not unmatched: + output={} + for a,bb in matching.items(): + if a>bb:continue + s,j,t=edges[tuple(sorted((a,bb)))];c,ct,_=CANDS[s//64][j] + for u,cu in orbit_values(s,c)+orbit_values(t,ct): + if u in output:assert output[u]==cu + output[u]=cu + assert len(output)==4096 + seen=set();cycles=[] + for s,z0 in enumerate(REPS): + if s in seen:continue + c0=output[s];cycles.append([s,list(c0)]);z=z0;c=c0 + for _ in range(4): + for u,cu in ((key(z),c),(key(neg(z)),neg(c))): + model.require(output[u]==cu,'cycle does not match table');seen.add(u) + z=model.quarter(tuple(a*w+v for a,w,v in zip(SIGN,walsh(z),c))) + c=neg(b(c)) + certificate={'schema_version':1,'period_rows':list(ROWS),'cycles':cycles} + model.require(model.expand_certificate(certificate)==tuple(output[i] for i in range(4096)), + 'compressed certificate mismatch') + body='{"schema_version":1,"period_rows":'+json.dumps(list(ROWS),separators=(',',':'))+',"cycles":[\n' + body+=',\n'.join(json.dumps(row,separators=(',',':')) for row in cycles)+'\n]}\n' + args.output.write_text(body,encoding='utf-8') + print('FOUND_CERTIFICATE',len(cycles),'cycle generators; successful seed',seed,flush=True);break + if zeros:break diff --git a/research/four-axis-exact-square-grid/verify.py b/research/four-axis-exact-square-grid/verify.py new file mode 100644 index 0000000000..1001f04823 --- /dev/null +++ b/research/four-axis-exact-square-grid/verify.py @@ -0,0 +1,359 @@ +#!/usr/bin/env python3 +"""Exact certificate replay, dense lattice/transform oracle and rejection controls. + +Prepared for @CubeJerry with substantial OpenAI Codex assistance. Apache-2.0. +This is a finite certificate check plus the scoped proof in PROOF.md, not a +formal proof-kernel verification or a multiplier/supplier admission. +""" +import copy +import hashlib +import json +import platform +from fractions import Fraction +from pathlib import Path + +import kernel as production + +HERE = Path(__file__).parent +N = 16 +ROWS = (0x21, 0x906, 0x6FDE, 0x103, 0xA8EC, 0x29E) +SIGN = tuple((-1) ** j.bit_count() for j in range(N)) +RE = tuple((1, 0, -1, 0)[j.bit_count() % 4] for j in range(N)) +IM = tuple((0, -1, 0, 1)[j.bit_count() % 4] for j in range(N)) +W = tuple(tuple((-1) ** (r & s).bit_count() for s in range(N)) for r in range(N)) + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def dot(a, b): + return sum(x * y for x, y in zip(a, b)) + + +def dense(v): + return tuple(dot(row, v) for row in W) + + +def b(v): + numerator = tuple(s * x for s, x in zip(SIGN, dense(v))) + need(all(x % 4 == 0 for x in numerator), 'nonintegral B image') + return tuple(x // 4 for x in numerator) + + +def k(v): + return tuple(SIGN[j] * v[j ^ 15] for j in range(N)) + + +def minus(v): + return tuple(-x for x in v) + + +def inverse_matrix(matrix): + n = len(matrix) + a = [[Fraction(x) for x in row] + [Fraction(i == j) for j in range(n)] + for i, row in enumerate(matrix)] + det = Fraction(1) + for j in range(n): + p = next((i for i in range(j, n) if a[i][j]), None) + need(p is not None, 'singular period matrix') + if p != j: + a[p], a[j] = a[j], a[p] + det = -det + pivot = a[j][j] + det *= pivot + a[j] = [x / pivot for x in a[j]] + for i in range(n): + if i != j: + scale = a[i][j] + a[i] = [x - scale * y for x, y in zip(a[i], a[j])] + return tuple(tuple(row[n:]) for row in a), det + + +def rref(rows, width=16): + rows = list(rows) + pivots = [] + rank = 0 + for j in range(width): + p = next((i for i in range(rank, len(rows)) if rows[i] >> j & 1), None) + if p is None: + continue + rows[p], rows[rank] = rows[rank], rows[p] + for i in range(len(rows)): + if i != rank and rows[i] >> j & 1: + rows[i] ^= rows[rank] + pivots.append(j) + rank += 1 + return rows[:rank], pivots + + +def period_oracle(rows): + # Construct the physical lattice basis, then invert its dense rational + # matrix. Membership/classification below does not use production.class_id. + high = [j for j in range(N) if j.bit_count() >= 2] + low = [0, 1, 2, 4, 8] + l_cols = [] + for j in low: + v = [0] * N + if j == 0: + v[0] = 4 + else: + v[0], v[j] = -2, 2 + l_cols.append(tuple(v)) + for j in high: + v = [0] * N + v[j], v[0] = 1, j.bit_count() - 1 + for bit in range(4): + if j >> bit & 1: + v[1 << bit] = -1 + l_cols.append(tuple(v)) + reduced, pivots = rref(rows) + need(len(pivots) == 6, 'period rank is not six') + need(len(rref([r & 31 for r in rows], 5)[1]) == 5, 'odd-period restriction fails') + c_cols = [] + for j in range(N): + v = [0] * N + if j in pivots: + v[j] = 2 + else: + v[j] = 1 + for row, pivot in zip(reduced, pivots): + v[pivot] = row >> j & 1 + c_cols.append(v) + gamma_cols = [tuple(sum(l_cols[j][i] * v[j] for j in range(N)) for i in range(N)) + for v in c_cols] + gamma = tuple(tuple(gamma_cols[j][i] for j in range(N)) for i in range(N)) + inv, det = inverse_matrix(gamma) + need(abs(det) == 4096, 'wrong period index') + need(all((8 * x).denominator == 1 for row in inv for x in row), '8Z not periodic') + inv8 = tuple(tuple(int(8 * x) for x in row) for row in inv) + + def signature(v): + return tuple(dot(row, v) % 8 for row in inv8) + + for col in gamma_cols: + need(not any(signature(b(col))), 'period is not B invariant') + for col in l_cols: + need(b(b(col)) == k(col), 'B square mismatch') + return signature, tuple(gamma_cols), abs(int(det)) + + +def local_check(table, reps): + for s, z in enumerate(reps): + c = table[s] + need(sum(x*x for x in c) <= 64, 'radius violation') + need(dot(RE, c) == dot(IM, c) == 0, 'weighted-sum violation') + need(all((a*w+v) % 4 == 0 for a, w, v in zip(SIGN, dense(z), c)), + 'integrality violation') + + +def native_numerator(real, imag): + # Direct coefficient formula 4U_rs=-d_r*d_s*(-1)^(r dot s). + rr, ii = [], [] + phases = ((1, 0), (0, -1), (-1, 0), (0, 1)) + for r in range(N): + ar = ai = 0 + for s in range(N): + pr, pi = phases[(r.bit_count() + s.bit_count()) % 4] + sign = -W[r][s] + ar += sign * (pr * real[s] - pi * imag[s]) + ai += sign * (pi * real[s] + pr * imag[s]) + rr.append(ar) + ii.append(ai) + return tuple(rr), tuple(ii) + + +def error_energy(real, imag, output): + ideal = native_numerator(real, imag) + return sum((4*x-y)**2 for part, target in zip(output, ideal) + for x, y in zip(part, target)) + + +def reject(action, label): + try: + action() + except (ValueError, TypeError, KeyError, IndexError): + return label + raise ValueError('negative control accepted: ' + label) + + +def main(): + raw = (HERE / 'CERTIFICATE.json').read_bytes() + certificate = json.loads(raw) + table = production.expand_certificate(certificate) + reps = production.REPS + signature, gamma, index = period_oracle(ROWS) + classes = {signature(z): s for s, z in enumerate(reps)} + need(len(classes) == 4096, 'representatives do not exhaust quotient') + need(all(production.class_id(z) == s for s, z in enumerate(reps)), 'classifier mismatch') + + def cid(z): + return classes[signature(z)] + + def t(z, candidate=table): + numerator = tuple(a*w+c for a, w, c in zip(SIGN, dense(z), candidate[cid(z)])) + need(all(x % 4 == 0 for x in numerator), 'nonintegral T value') + return tuple(x // 4 for x in numerator) + + def relations(candidate, square=True): + for s, z in enumerate(reps): + c = candidate[s] + need(candidate[cid(minus(z))] == minus(c), 'oddness violation') + need(candidate[cid(k(z))] == k(c), 'K covariance violation') + if square: + y = t(z, candidate) + need(candidate[cid(y)] == minus(b(c)), 'square correction violation') + need(t(y, candidate) == k(z), 'exact square violation') + + local_check(table, reps) + relations(table) + need(len({cid(t(z)) for z in reps}) == 4096, 'quotient is not bijective') + need(all(production.t_map(z, table) == t(z) for z in reps), 'fast/dense disagreement') + energy = max(sum(x*x for x in c) for c in table) + coordinate = max(abs(x) for c in table for x in c) + need(energy == 64 and coordinate == 5, 'wrong sharp maxima') + need(all(c == (0,)*16 for c in table[:64]), 'map does not fix integral Walsh classes') + + # Independent complex fixtures cover every real source class in each lane; + # the proof, not a 4096^2 enumeration, establishes all complex pairs. + complex_count = 0 + for s, real in enumerate(reps): + imag = reps[(1597*s + 43) % 4096] + out = production.forward(real, imag, table) + twice = production.forward(*out, table) + need(twice == (tuple(real[j^15] for j in range(N)), + tuple(imag[j^15] for j in range(N))), 'native square violation') + need(production.inverse(*out, table) == (real, imag), 'inverse-after-forward violation') + back = production.inverse(real, imag, table) + need(production.forward(*back, table) == (real, imag), 'forward-after-inverse violation') + phase = production.forward(minus(imag), real, table) + need(phase == (minus(out[1]), out[0]), 'global Gaussian phase violation') + need(tuple(map(sum, out)) == (sum(real), sum(imag)), 'native sum violation') + need(error_energy(real, imag, out) <= 128, 'native error violation') + complex_count += 1 + + # Translation and signed large-word fixtures exercise low-bit extraction, + # exact affine continuation and both executable directions. + for trial, bits in enumerate((0, 1, 7, 31, 127, 509, 1021, 4090)): + z = reps[(trial*683+31) % 4096] + shift = tuple((1 << bits) * gamma[(trial+3) % 16][j] - + (2*trial+1)*gamma[trial % 16][j] for j in range(N)) + zz = tuple(x+y for x, y in zip(z, shift)) + need(cid(zz) == production.class_id(zz) == cid(z), 'large-word class mismatch') + need(t(zz) == tuple(x+y for x, y in zip(t(z), b(shift))), 'affine period violation') + real, imag = zz, tuple(-x+8*j for j, x in enumerate(zz)) + out = production.forward(real, imag, table) + need(production.inverse(*out, table) == (real, imag), 'large-word inverse violation') + need(error_energy(real, imag, out) <= 128, 'large-word error violation') + + sharp = (2,) + (0,)*15 + need(error_energy(sharp, sharp, production.forward(sharp, sharp, table)) == 128, + 'forward sharp witness missing') + # J preserves the norm, and inverse=JF with ideal inverse=JU. + inv_sharp = production.inverse(sharp, sharp, table) + unpermute = tuple(tuple(part[j^15] for j in range(N)) for part in inv_sharp) + need(error_energy(sharp, sharp, unpermute) == 128, 'inverse sharp witness missing') + + # Composition with the all-n tensor obstruction: this bounded-error, + # conservative exact-square map attains its nonzero-image floor at n=4. + zero = (0,)*16 + unit = (1,)+(0,)*15 + w = production.forward(unit, zero, table) + target = tuple(int(j==3) for j in range(N)) + need(w == (target,zero), 'forced F(e0)=e3 fails') + for source, destination in ((0,3),(3,15),(15,12),(12,0)): + z = tuple(int(j==source) for j in range(N)) + expected = tuple(int(j==destination) for j in range(N)) + need(production.t_map(z,table) == expected, 'forced T basis cycle fails') + need(sum(x*x for x in table[cid(z)]) == 24, 'forced correction energy is not24') + + def rows(array): + return tuple(tuple(zip(*production.forward(*zip(*row), table))) for row in array) + + def columns(array): + return tuple(zip(*rows(tuple(zip(*array))))) + + lam = tuple((a,-b) for a,b in zip(RE,IM)) + array = tuple(tuple(lam[i] if j==0 else (0,0) for j in range(N)) for i in range(N)) + row_column = rows(columns(array)) + column_row = columns(rows(array)) + delta = tuple(tuple((x[0]-y[0],x[1]-y[1]) for x,y in zip(r,t)) + for r,t in zip(row_column,column_row)) + squared_defect = sum(a*a+b*b for row in delta for a,b in row) + expected_first = tuple((RE[j]+4*int(j==3),IM[j]) for j in range(N)) + need(delta[0] == expected_first and all(v==(0,0) for row in delta[1:] for v in row), + 'tensor witness has wrong exact defect') + need(squared_defect == 24, 'bounded-error exact-square map misses the sharp floor') + differing = sum(v!=(0,0) for row in delta for v in row) + need(differing == 16, 'universal witness difference support') + + controls = [] + controls.append(reject(lambda: need(row_column == column_row, 'rounded fibers do not commute'), + 'false row-column commutation')) + bad = copy.deepcopy(certificate) + bad['cycles'].pop() + controls.append(reject(lambda: production.expand_certificate(bad), 'missing cycle')) + bad = copy.deepcopy(certificate) + bad['cycles'][0][1][0] += 4 + controls.append(reject(lambda: production.expand_certificate(bad), 'weighted-sum corruption')) + bad = copy.deepcopy(certificate) + bad['cycles'][0][1][0] += 12 + controls.append(reject(lambda: production.expand_certificate(bad), 'radius corruption')) + controls.append(reject(lambda: period_oracle((ROWS[0] ^ 32,) + ROWS[1:]), + 'noninvariant period')) + + # This control remains integral, sharp, weighted-sum preserving, odd and + # K-equivariant. It fails the additional two-step correction obligation. + square_control = None + for s, c in enumerate(table): + if not any(c) or any(x % 2 for x in c): + continue + orbit = {s, cid(minus(reps[s])), cid(k(reps[s])), cid(minus(k(reps[s])))} + candidate = list(table) + for u in orbit: + candidate[u] = minus(candidate[u]) + local_check(candidate, reps) + relations(candidate, square=False) + if any(candidate[cid(t(z, candidate))] != minus(b(candidate[u])) + for u, z in enumerate(reps)): + square_control = s + controls.append(reject(lambda: relations(candidate), 'local predicates without exact square')) + break + need(square_control is not None, 'no meaningful square rejection control found') + unit = (1,) + (0,)*15 + zero = (0,)*16 + out = production.forward(unit, zero, table) + controls.append(reject(lambda: need(production.forward(*out, table) == (unit, zero), + 'forward is not the inverse'), 'forward-as-inverse')) + controls.append(reject(lambda: need(energy < 64, 'radius cannot be smaller'), 'false smaller radius')) + wrong = production.forward((64,)+(0,)*15, zero, table) + wrong = (tuple(-x if j == 0 else x for j, x in enumerate(wrong[0])), wrong[1]) + controls.append(reject(lambda: need(error_energy((64,)+(0,)*15, zero, wrong) <= 128, + 'wrong native phase'), 'wrong native coordinate phase')) + + receipt = { + 'status': 'PASS_FOUR_AXIS_EXACT_SQUARE_GRID', + 'python': platform.python_version(), + 'period_index': index, + 'real_classes': len(table), + 'cycle_generators': len(certificate['cycles']), + 'complex_fixtures': complex_count, + 'large_word_fixtures': 8, + 'row_column_boundary': {'input': 'lambda e0^T; lambda_j=i^wt(j)', 'differing_coordinates': differing, 'squared_defect': squared_defect, 'F_e0': 'e3', 'sharp_bounded_error_native_square_attainment': True}, + 'max_correction_energy': energy, + 'max_abs_correction': coordinate, + 'sharp_complex_error_squared': 8, + 'negative_controls': controls, + 'square_control_class': square_control, + 'certificate_sha256': hashlib.sha256(raw).hexdigest(), + 'expanded_table_sha256': hashlib.sha256(json.dumps(table, separators=(',', ':')).encode()).hexdigest(), + 'source_sha256': {name: hashlib.sha256((HERE/name).read_bytes()).hexdigest() + for name in ('kernel.py', 'verify.py')}, + 'scope': 'Exact finite certificate and all-integer proof in PROOF.md; no new kappa or all-size supplier admission.' + } + print(json.dumps(receipt, sort_keys=True, indent=2)) + + +if __name__ == '__main__': + main()