From 6c76eaa184bb59724ac5bfdc5aa35a80afca73ae Mon Sep 17 00:00:00 2001 From: Jerry Jiaheng Chen <80299683+CubeJerry@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:13:17 +1100 Subject: [PATCH] Execute the complete selected MOVE through paid OLD23 entry and original-owner return --- .../ADMISSION-CONTROLS.json | 270 +++++++++ .../ADMISSION-NORMAL.txt | 2 + .../ADMISSION-OPTIMIZED.txt | 2 + .../ADMISSION-REVIEW.md | 296 +++++++++ .../COMPOSITION-CONTROLS.json | 87 +++ .../COMPOSITION-NORMAL.txt | 2 + .../COMPOSITION-OPTIMIZED.txt | 2 + research/selected-move-old-coded-full/LICENSE | 201 +++++++ .../selected-move-old-coded-full/NOTICE.md | 27 + .../selected-move-old-coded-full/OVERLAP.md | 34 ++ .../PR-DESCRIPTION.md | 118 ++++ .../selected-move-old-coded-full/PR-TITLE.txt | 1 + .../selected-move-old-coded-full/PROOF.md | 419 +++++++++++++ .../PUBLICATION-CHECKS.json | 21 + .../selected-move-old-coded-full/README.md | 140 +++++ .../RESULT-OPTIMIZED.json | 86 +++ .../selected-move-old-coded-full/RESULT.json | 86 +++ .../SOURCE-ORIGIN-CHECK.json | 166 ++++++ .../SOURCE-PINS.json | 302 ++++++++++ .../selected-move-old-coded-full/SOURCES.json | 18 + .../selected-move-old-coded-full/TASK.json | 90 +++ .../VALIDATION.json | 117 ++++ .../selected-move-old-coded-full/VERIFY.json | 125 ++++ .../check_admission.py | 177 ++++++ .../check_composition.py | 100 ++++ .../selected-move-old-coded-full/compose.py | 153 +++++ .../inputs/bridge-NOTICE.md | 28 + .../inputs/bridge-PROOF.md | 426 +++++++++++++ .../inputs/bridge.py | 328 ++++++++++ .../inputs/core/NOTICE.md | 53 ++ .../inputs/core/PROOF.md | 300 ++++++++++ .../inputs/core/SOURCES.json | 161 +++++ .../inputs/core/bind_source.py | 88 +++ .../inputs/core/move.py | 148 +++++ .../inputs/core/reference/RECIPE.json | 130 ++++ .../inputs/core/reference/SOURCE-FRAMES.json | 16 + .../inputs/core/reference/leaf/NOTICE.md | 34 ++ .../leaf/inputs/controller_reference.py | 112 ++++ .../inputs/core/reference/leaf/leaf.py | 564 ++++++++++++++++++ .../inputs/core/reference/linear/NOTICE.md | 36 ++ .../linear/inputs/controller_reference.py | 112 ++++ .../inputs/core/reference/linear/linear.py | 435 ++++++++++++++ .../inputs/core/reference/phase/NOTICE | 11 + .../phase/inputs/controller_reference.py | 112 ++++ .../inputs/core/reference/phase/phase.py | 335 +++++++++++ .../core/reference/source/clifford_exact.py | 149 +++++ .../core/reference/source/native_verify.py | 277 +++++++++ .../core/reference/translation/NOTICE.md | 20 + .../reference/inputs/controller_reference.py | 112 ++++ .../translation/reference/reverse.py | 207 +++++++ .../core/reference/translation/translate.py | 221 +++++++ .../inputs/core/verify.py | 316 ++++++++++ .../inputs/grid-interface-PROOF.md | 246 ++++++++ .../inputs/notices/common-grid-NOTICE.md | 20 + .../inputs/notices/grid-interface-NOTICE | 28 + .../inputs/notices/literal-leaf-NOTICE.md | 34 ++ .../inputs/notices/old-coded-NOTICE.md | 25 + .../inputs/notices/selected-NOTICE | 9 + .../selected-move-old-coded-full/verify.py | 215 +++++++ 59 files changed, 8350 insertions(+) create mode 100644 research/selected-move-old-coded-full/ADMISSION-CONTROLS.json create mode 100644 research/selected-move-old-coded-full/ADMISSION-NORMAL.txt create mode 100644 research/selected-move-old-coded-full/ADMISSION-OPTIMIZED.txt create mode 100644 research/selected-move-old-coded-full/ADMISSION-REVIEW.md create mode 100644 research/selected-move-old-coded-full/COMPOSITION-CONTROLS.json create mode 100644 research/selected-move-old-coded-full/COMPOSITION-NORMAL.txt create mode 100644 research/selected-move-old-coded-full/COMPOSITION-OPTIMIZED.txt create mode 100644 research/selected-move-old-coded-full/LICENSE create mode 100644 research/selected-move-old-coded-full/NOTICE.md create mode 100644 research/selected-move-old-coded-full/OVERLAP.md create mode 100644 research/selected-move-old-coded-full/PR-DESCRIPTION.md create mode 100644 research/selected-move-old-coded-full/PR-TITLE.txt create mode 100644 research/selected-move-old-coded-full/PROOF.md create mode 100644 research/selected-move-old-coded-full/PUBLICATION-CHECKS.json create mode 100644 research/selected-move-old-coded-full/README.md create mode 100644 research/selected-move-old-coded-full/RESULT-OPTIMIZED.json create mode 100644 research/selected-move-old-coded-full/RESULT.json create mode 100644 research/selected-move-old-coded-full/SOURCE-ORIGIN-CHECK.json create mode 100644 research/selected-move-old-coded-full/SOURCE-PINS.json create mode 100644 research/selected-move-old-coded-full/SOURCES.json create mode 100644 research/selected-move-old-coded-full/TASK.json create mode 100644 research/selected-move-old-coded-full/VALIDATION.json create mode 100644 research/selected-move-old-coded-full/VERIFY.json create mode 100644 research/selected-move-old-coded-full/check_admission.py create mode 100644 research/selected-move-old-coded-full/check_composition.py create mode 100644 research/selected-move-old-coded-full/compose.py create mode 100644 research/selected-move-old-coded-full/inputs/bridge-NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/bridge-PROOF.md create mode 100644 research/selected-move-old-coded-full/inputs/bridge.py create mode 100644 research/selected-move-old-coded-full/inputs/core/NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/core/PROOF.md create mode 100644 research/selected-move-old-coded-full/inputs/core/SOURCES.json create mode 100644 research/selected-move-old-coded-full/inputs/core/bind_source.py create mode 100644 research/selected-move-old-coded-full/inputs/core/move.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/RECIPE.json create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/SOURCE-FRAMES.json create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/leaf/NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/leaf/inputs/controller_reference.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/leaf/leaf.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/linear/NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/linear/inputs/controller_reference.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/linear/linear.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/phase/NOTICE create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/phase/inputs/controller_reference.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/phase/phase.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/source/clifford_exact.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/source/native_verify.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/translation/NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/translation/reference/inputs/controller_reference.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/translation/reference/reverse.py create mode 100644 research/selected-move-old-coded-full/inputs/core/reference/translation/translate.py create mode 100644 research/selected-move-old-coded-full/inputs/core/verify.py create mode 100644 research/selected-move-old-coded-full/inputs/grid-interface-PROOF.md create mode 100644 research/selected-move-old-coded-full/inputs/notices/common-grid-NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/notices/grid-interface-NOTICE create mode 100644 research/selected-move-old-coded-full/inputs/notices/literal-leaf-NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/notices/old-coded-NOTICE.md create mode 100644 research/selected-move-old-coded-full/inputs/notices/selected-NOTICE create mode 100644 research/selected-move-old-coded-full/verify.py diff --git a/research/selected-move-old-coded-full/ADMISSION-CONTROLS.json b/research/selected-move-old-coded-full/ADMISSION-CONTROLS.json new file mode 100644 index 0000000000..9380e9bbf7 --- /dev/null +++ b/research/selected-move-old-coded-full/ADMISSION-CONTROLS.json @@ -0,0 +1,270 @@ +{ + "base": "e54523517d0f03e58352e647c403a5af3e525a57", + "complete_archive_reextracted": true, + "depth_checks": { + "meaning": "finite corroboration only", + "n_max": 2048, + "n_min": 1, + "pairs": 6948 + }, + "marker": "PASS_FULL_MOVE_ADMISSION_CONTROLS", + "negative_controls": [ + "changed absolute phase", + "changed source frame", + "minimum-signed phase overflow", + "integral endpoints with nonintegral prefix" + ], + "nonintegral_prefix": { + "central_entrance": [ + { + "address": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "0", + "real": "1" + }, + { + "address": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "0", + "real": "1" + } + ], + "complete_native_output": [ + { + "address": [ + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0 + ], + "imag": "0", + "real": "-1" + }, + { + "address": [ + 2, + 2, + 2, + 2, + 0, + 2, + 2, + 2, + 0 + ], + "imag": "0", + "real": "-1" + } + ], + "f": 2, + "first_prefix": [ + { + "address": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "1/2", + "real": "1/2" + }, + { + "address": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "-1/2", + "real": "1/2" + }, + { + "address": [ + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "-1/2", + "real": "1/2" + }, + { + "address": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "1/2", + "real": "1/2" + } + ], + "native_input": [ + { + "address": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "imag": "0", + "real": "-1" + }, + { + "address": [ + 3, + 3, + 3, + 3, + 0, + 3, + 3, + 3, + 0 + ], + "imag": "0", + "real": "-1" + } + ], + "w": 2 + }, + "phase_overflow": { + "complete_native_output": [ + { + "address": [ + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0 + ], + "imag": "-1", + "real": "1" + }, + { + "address": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0 + ], + "imag": "-1", + "real": "-1" + } + ], + "f": 1, + "native_input": [ + { + "address": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0 + ], + "imag": "0", + "real": "-2" + } + ], + "phase_value": [ + "2", + "0" + ], + "physical_address": 258, + "w": 2 + }, + "source_basis_checks": 512, + "source_chart_rows": [ + 3, + 5, + 9, + 17, + 32, + 65, + 129, + 1, + 256 + ], + "source_event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "source_index": 24472, + "source_oracle": "direct canonical-frame conjugation, no factor imports", + "source_quadratic_rows": [ + 128, + 128, + 128, + 128, + 0, + 128, + 128, + 111, + 0 + ], + "two_column_basis_checks": 4 +} diff --git a/research/selected-move-old-coded-full/ADMISSION-NORMAL.txt b/research/selected-move-old-coded-full/ADMISSION-NORMAL.txt new file mode 100644 index 0000000000..6c663893b8 --- /dev/null +++ b/research/selected-move-old-coded-full/ADMISSION-NORMAL.txt @@ -0,0 +1,2 @@ +PASS_FULL_MOVE_ADMISSION_CONTROLS +512 source columns; 4 tensor columns; 2 numerical obstructions; 6948 bounded depth pairs diff --git a/research/selected-move-old-coded-full/ADMISSION-OPTIMIZED.txt b/research/selected-move-old-coded-full/ADMISSION-OPTIMIZED.txt new file mode 100644 index 0000000000..6c663893b8 --- /dev/null +++ b/research/selected-move-old-coded-full/ADMISSION-OPTIMIZED.txt @@ -0,0 +1,2 @@ +PASS_FULL_MOVE_ADMISSION_CONTROLS +512 source columns; 4 tensor columns; 2 numerical obstructions; 6948 bounded depth pairs diff --git a/research/selected-move-old-coded-full/ADMISSION-REVIEW.md b/research/selected-move-old-coded-full/ADMISSION-REVIEW.md new file mode 100644 index 0000000000..b30c11a396 --- /dev/null +++ b/research/selected-move-old-coded-full/ADMISSION-REVIEW.md @@ -0,0 +1,296 @@ +# Independent review: unchanged full MOVE admission + +Status: numerical/source derivation, complete static composition audit and +final proof prose review pass. Reviewed final `PROOF.md` SHA256 +`4dda913877963bebd0fc61ce04f14a594a78bdd781154d9a92961cd528e830d0`. +Prepared for @CubeJerry with OpenAI assistance. This is a complementary +mathematical and port audit, not independent human or formal proof acceptance. + +## Fixed sources and scope + +Canonical main: `e54523517d0f03e58352e647c403a5af3e525a57`. +The exact selected event is zero-based 24472, +`["MOVE",415,3,99,false]`, from frame 3 = `[]` to frame 99 = `[239]`. +The 350722-byte selected archive has SHA256 +`2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883`. + +The unchanged same-width 31-tape full core is retained from +CrocSwap/integer-mult-bounds#7563 at CubeJerry commit +`5dd80e8ab9c989336b5e448e14147c2ba29da89b`: + +* `inputs/core/move.py`: SHA256 + `42e4293ab59ffa1c99e0dbbd5fded0833a5d726e1e794f0f263ae9a4686587a5`; +* `inputs/core/reference/RECIPE.json`: SHA256 + `96fadb44c3316be93c6c02f50cd2c841a9541d67b98fd94fc47b73fa64dd404c`; +* its exact graph: 82813 locations, SHA256 of `repr(code)` + `14f38b15157a9c9cd2828861f6904701a29b1e27507a7e43d60030e1ae4d9238`. + +The pending OLD23 join is +`worker-c/wave3/research/selected-move-old-coded-full/compose.py`, initially +SHA256 `572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c`. +Its OLD23 bridge is the already published CubeJerry commit +`30497f40d89f2a137a4bc31a4fee1229b9af1440`, bridge SHA256 +`119b69594a2a33550eec9b6e083db8f496c3fb3d9c1214b6703d687a0a662eba`. + +The numerical premise is the selected application review section 5, +SHA256 `4501502c2ceb9759b20372435fe4beb51082c5a5e2910c1fd5dbe6edca415055`, +and its already established every-prefix deduction in +CrocSwap/integer-mult-bounds#7578, head +`e9b6d75397e3553af77bab81d5816e4b8708a501`, retained proof SHA256 +`ceb2cd71379644ab2c4f8e36489996436a11eb345a275d21ea487de59264e308`. +This review extends the location of that admission boundary to before the +actual right monomial. It does not claim a new Clifford denominator theorem. + +## Precise admission corollary before the complete right monomial + +Let the supplied OLD23 field faithfully represent the ideal selected current +field before this MOVE, with its complete root factor and all spectator +coordinates retained. Assume the selected invariant + +`z = sum c U x`, + +where each U is a Gaussian-dyadic Clifford on that same complete n-bit root, +the original real and imaginary coordinates are on grid `2^-p` and have +absolute value strictly below `2^h`, exterior coefficient denominator height +is at most `178t`, exterior Gaussian coefficient mass is at most +`2*2^(161t)`, and `356t=0`, `9f<=n`, `f<=cutoff`, common grid `2^-(p+n)`, and stored +width `w=p+h+2n+3`. All physical OLD23, ownership and transport premises +remain separate from these numerical premises. + +Then every numerical guard in the unchanged full MOVE succeeds. In +particular the right phase, right binary map, right offset, every low-bit- +first central C-axis prefix, left phase and final binary map are all +admissible on the same width and quantum, with no extra `2^f` input reserve. + +Proof: each completed monomial prefix and each subset of central C axes is +itself a Gaussian-dyadic Clifford on the same complete factor. Its product +with each U absorbs into U and changes neither the exterior denominator +height nor the coefficient mass. The retained complete-root row theorem +therefore gives at most + +`p+ceil(n/2)+178t` + +fractional bits and absolute real/imaginary magnitude strictly below + +`2^(h+ceil((n+1)/2)+161t+1)`. + +The integer depth condition implies `ceil(n/2)+178t<=n`. Also +`ceil((n+1)/2)+161t+1<=n+2`: for n even use `178t=1`. In packed native tuple notation place +the sole nonzero value `-2+0i` at + +`(a0,...,a8)=(1,0,0,0,0,0,0,1,0)`. + +This is one-column mask 129 but MSB-first physical address 258. The exact +right recipe gives phase `1+3+2=6 mod4`, hence multiplies this value by -1. +It must form +2, outside the 2-bit signed interval [-2,1], and the unchanged +literal phase rejects. The complete MOVE nevertheless has two nonzero +Gaussian outputs with components in {-1,1}. Both entrance and final +endpoints fit the ordinary signed interval and are integral. + +This is a valid boundary counterexample to endpoint-only admission of the +unwrapped core. It is not reachable under the stated strict common-root +bound, and it is not an input to the stronger symmetric-input promise of +the endpoint wrapper in #7563. + +## Endpoint integrality does not imply integral central prefixes + +For `f=2`, put real ones at central entrance a0=0 and a0=3, all other +native coordinates zero. The four central values are `[1,0,0,1]`. After +the first low-bit C axis they are + +`[(1+i)/2,(1-i)/2,(1-i)/2,(1+i)/2]`; + +after both C axes they are `[0,1,1,0]`. Apply the inverse exact right +monomial to obtain the complete native entrance, and the exact left +monomial to obtain the complete endpoint. Both consist only of Gaussian +units and zeros, so `w=2` fits even the symmetric interval [-1,1], but the +unchanged core rejects the nonintegral first prefix. This is the existing +#7578 endpoint obstruction transported through the actual full monomials, +not a newly claimed obstruction theorem. + +The widening/scaling endpoint wrapper shipped alongside #7563 is distinct +from its unchanged `compile_move()` core. Its extra scale changes this +example's intermediate grid. The once-rounded wrapper in #7568 has yet +another numerical contract and cannot be substituted into the selected +exact-interior route without a separate precision and error argument. + +## Independent source oracle and exact reproduction + +`check_admission.py` imports no retained verifier, Clifford producer or +factor helper. For the unlowered source frame `[239]`, it completes that +direction to a binary basis by explicit enumeration of its span, computes +the inverse bijection by enumerating the fixed 512 addresses, and evaluates +the canonical-frame conjugation directly. With chart G and its source +quadratic Q, the frame is + +`D_Q P_G C_0 P_G^-1 D_Q^*`. + +Its basis column at x has the unshifted coefficient `(1+i)/2` and the +coefficient `((1-i)/2)i^(q(x XOR 239)-q(x))` at `x XOR 239`. This oracle +is independent of the actual right/left lowering. All 512 one-column +basis columns agree with the lowered composition. Four additional +two-column basis controls check the tensor and repeated phase convention. +A changed right absolute phase and a changed source direction are both +detected. The numerical witnesses above are checked exactly over Gaussian +Fractions. A bounded scan of 6948 `(n,t)` pairs, `1<=n<=2048`, corroborates +the universal inequalities; it is not their proof. + +The full archive was independently re-extracted using the pinned compressed +and canonical JSON hashes, including the actual event and complete frames. +No archive-wide native replay was run. + +Executed command, from the shared run root: + +```sh +python3 -I -W error -B worker-b/wave3/check_admission.py \ + --package worker-c/wave3/research/selected-move-old-coded-full \ + --archive worker-b/selected-native.json.gz \ + --output worker-b/wave3/ADMISSION-CONTROLS.json +``` + +Expected marker: `PASS_FULL_MOVE_ADMISSION_CONTROLS`. +The archive argument is optional when only the retained compact witness is +available; the receipt distinguishes that case explicitly. + +## Literal port, guard and ownership audit + +`check_composition.py` independently compares all 88816 emitted instructions +with the two exact predecessor graphs. The 6003 bridge locations differ +only at its one PACKED halt; all 82813 child locations preserve their +source-symbol tests, writes, unit moves and fixed branch destinations under +the explicit port map + +`HEADER0 -> GAMMA3`, `DATA1 -> PACK2`, `private t>=2 -> t+41`. + +The resulting ports are 0 through 71. Child-private ports are exactly the +29 distinct owners 43 through 71, disjoint from all 43 bridge roles. The +child never writes OLD0, CONTEXT1 or GAMMA3. No child port reaches the +bridge's suspended geometry guides. Every branch target lies within the +fixed graph, and every action uses the four-symbol alphabet and a unit +move. The one child halt returns to the original bridge EXIT. Its +successful terminal instruction and the bridge PACKED instruction are +replaced by unit-cost jumps; no extra host operation is inserted. + +The graph SHA256 is +`5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403`. +Omitting the child call and aliasing HEADER to DATA both fail the independent +all-instruction comparison. This is static literal-simulation evidence, +not another execution of the author's tape interpreter. + +The guard boundary is substantive. All 43 bridge roles have the inherited +permanent LEFT at origin-1; each of the 29 new core roles instead enters +blank at origin-1. Core WORK and TRACE install and retire their own guards. +Its 27 reusable module roles do the same within each successful factor. +The protected bridge PACK/GAMMA guards are public guards for the core and +remain untouched. All heads at the call seam are at first body cells, +not on LEFT. Preserved heads, bridge guides, packed cardinality and same +width supply the exact EXIT precondition after the core succeeds. Entry +guards, full clean capacity, disjoint physical ownership and prior +historical backing remain supplied premises; an object-identity check +cannot establish those properties for arbitrary external wrappers. + +The unchanged source core's transaction protects its public PACK until +its last commit; the surrounding bridge additionally protects OLD through +inverse preparation. Rejection before successful return preserves OLD and +CONTEXT values, but it need not restore heads/private banks. No retry or +global rollback follows from this theorem. + +Executed command: + +```sh +python3 -I -W error -B worker-b/wave3/check_composition.py \ + --package worker-c/wave3/research/selected-move-old-coded-full \ + --output worker-b/wave3/COMPOSITION-CONTROLS.json +``` + +Expected marker: `PASS_FULL_MOVE_LITERAL_COMPOSITION_AUDIT`. + +## Complete bound calculation + +Let `V_o` be the original coded payload length, `V_p` the packed length, +E the OLD23 header length and `E_gamma` the six-Gamma length. The retained +bridge and core give respectively + +`T_bridge <= 2^20((9f+1)V_o+E+1)`, + +`T_core <= 2^24(f V_p+E_gamma+1)`, + +and historical increments `64(V_o+E+1)` and +`1024(V_p+E_gamma+1)`. + +The exact volume relation is `V_o/V_p=3(b+1)/b>3`. +Also `E_gamma<=V_p+E`. To prove this without omitting large binary cutoff +cost, the Gamma cutoff code has at most the length of its old canonical +code. For the other five positive values, `length(Gamma(x))<=2x-1`. +Writing `q=P S r b>=2`, the four-value sum is at most `q+3`, so these +five Gamma codes have total length at most `2f+2q+1`, below +`V_p=2q*2^(9f)` for every f>=1. Thus cutoff contributes its encoded length, +never its numerical value. + +Consequently the complete joined time is bounded by + +`[10*2^20+(2/3)*2^24] f V_o + [2^20+2^24](E+1)` + +which is below `2^25(f V_o+E+1)`. Historical increments sum to at most + +`[64+(2/3)*1024]V_o + [64+1024](E+1)` + +which is below `2048(V_o+E+1)`. All 72 owners' earlier history belongs in +the entry term. Retiring a role does not release visited capacity. The +proof deliberately sums even overlapping per-owner spans, so its double +counting is safe. The private guard cells and head returns are already +part of the retained complete bills. + +This establishes `O(f V_o+E)` for the direct local service. At a fixed +base-case cutoff it is linear with a cutoff-dependent constant. No +accelerated nonleaf tariff, recurrence or provider selected rate follows. +The cutoff test is in the central leaf after the right factors; the +success theorem requires f<=cutoff and makes no early-rejection cost claim. + +## Review disposition and remaining boundaries + +No mathematical, source-order, port, guard or complete-bound defect was +found in the frozen `compose.py` and its stated success domain. This review +does not duplicate the author's full tape replays; it supplies an +independent source-frame oracle, exact numerical admission proof, two +boundary counterexamples, every-instruction translation check and separate +cost inequalities. + +The final proof's two domains, strict phase margin, wrapper comparison, +encoded-cutoff charge, exact source/spectator action and cofinal direct- +controller lower-bound scope agree with this review. Its executed fixture +claims remain the author's primary evidence; this review did not rerun +those expensive tape fixtures. The general theorem does not infer legal +selected stock, actual root execution or physical caller acquisition from +their synthetic OLD23 test packets. + +The result proves no caller field acquisition, global source dispatcher, +stock admission, recursive child theorem, foundational assumption removal, +or new kappa. Source-bound operand415 and frames3->99 describe the admitted +local occurrence; they do not locate that operand in an enclosing native +execution or advance its external frame ledger. The full selected +multiplication theorem remains conditional. diff --git a/research/selected-move-old-coded-full/COMPOSITION-CONTROLS.json b/research/selected-move-old-coded-full/COMPOSITION-CONTROLS.json new file mode 100644 index 0000000000..8d3948cef7 --- /dev/null +++ b/research/selected-move-old-coded-full/COMPOSITION-CONTROLS.json @@ -0,0 +1,87 @@ +{ + "all_edges_checked": true, + "compose_sha256": "572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c", + "core_write_ports": [ + 2, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "cost_constants": { + "history": 2048, + "time": 33554432 + }, + "graph_sha256": "5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403", + "locations": 88816, + "marker": "PASS_FULL_MOVE_LITERAL_COMPOSITION_AUDIT", + "meaning": "static literal simulation and exact cost inequalities; no heavy tape replay", + "negative_controls": [ + "omitted core entry", + "header/data alias" + ], + "new_private_owners": [ + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 66, + 67, + 68, + 69, + 70, + 71 + ], + "source_public_to_joined_ports": { + "DATA": 2, + "HEADER": 3 + }, + "symbol_branches": 35755, + "tapes": 72, + "translated_core_locations": 82813, + "unchanged_bridge_locations": 6002 +} diff --git a/research/selected-move-old-coded-full/COMPOSITION-NORMAL.txt b/research/selected-move-old-coded-full/COMPOSITION-NORMAL.txt new file mode 100644 index 0000000000..e7fb1c8a00 --- /dev/null +++ b/research/selected-move-old-coded-full/COMPOSITION-NORMAL.txt @@ -0,0 +1,2 @@ +PASS_FULL_MOVE_LITERAL_COMPOSITION_AUDIT +88816 locations,72 tapes,29 new private owners; graph 5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403 diff --git a/research/selected-move-old-coded-full/COMPOSITION-OPTIMIZED.txt b/research/selected-move-old-coded-full/COMPOSITION-OPTIMIZED.txt new file mode 100644 index 0000000000..e7fb1c8a00 --- /dev/null +++ b/research/selected-move-old-coded-full/COMPOSITION-OPTIMIZED.txt @@ -0,0 +1,2 @@ +PASS_FULL_MOVE_LITERAL_COMPOSITION_AUDIT +88816 locations,72 tapes,29 new private owners; graph 5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403 diff --git a/research/selected-move-old-coded-full/LICENSE b/research/selected-move-old-coded-full/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/selected-move-old-coded-full/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/selected-move-old-coded-full/NOTICE.md b/research/selected-move-old-coded-full/NOTICE.md new file mode 100644 index 0000000000..e02042d619 --- /dev/null +++ b/research/selected-move-old-coded-full/NOTICE.md @@ -0,0 +1,27 @@ +Complete selected MOVE at the paid old-coded boundary +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Copyright 2026. Licensed under Apache License 2.0; see LICENSE. + +New work is the literal old-format complete-MOVE invocation and return, +its exact same-width/interface/owner composition proof, pre-right common-root +admission transfer, complete combined bills and source-address verification. +OpenAI assistance contributed to research, implementation, proof, independent +review, tests and packaging. Independent review is model-assisted, not human +or formal proof-kernel certification. + +Credit the paid bridge at CubeJerry30497f40d89f2a137a4bc31a4fee1229b9af1440, +the earlier central-C composition, and the already complete packed MOVE in +CrocSwap/integer-mult-bounds#7563 at5dd80e8ab9c989336b5e448e14147c2ba29da89b. +Credit #7578 for the common-root numerical/interface reduction; #7426, +#7428,#7429,#7430 for the literal phase, translation, C and linear maps; +#7000 for the selected source and compiler; Jose Manuel's #3091 and the +Gaussian/Clifford/norm predecessors; and the older coded/precision lineage. +The endpoint and rounded domain comparisons credit Nick Petalas #7468/#7211 +and the concrete wrappers #7563/#7568; neither wrapper is imported here. + +All retained originals are unchanged. Their notices are inputs/core/NOTICE.md, +the core's retained reference notices, inputs/bridge-NOTICE.md, and all five +inputs/notices files. Exact sources are in SOURCE-PINS.json and the retained +core SOURCES.json. Existing kernels, tensor identities, packing semantics, +complete packed MOVE and selected conditional bound are not claimed new. +No foundational assumption or new kappa is claimed. diff --git a/research/selected-move-old-coded-full/OVERLAP.md b/research/selected-move-old-coded-full/OVERLAP.md new file mode 100644 index 0000000000..277b2ab40a --- /dev/null +++ b/research/selected-move-old-coded-full/OVERLAP.md @@ -0,0 +1,34 @@ +# Scope, live predecessors and exclusions + +The parent assigned this wave after the separate complete-codec and +central-C packages. It explicitly requested the paid old-format full MOVE +boundary, using the already completed packed core. The independent worker +reviewed pre-right common-root admission, source kernel and every-instruction +translation; it did not implement a competing factor join. + +The source inspection on 2026-11-14 recorded these exact predecessor pins: + +| PR | Exact source commit | Existing scope | +| --- | --- | --- | +| #7563 | 5dd80e8ab9c989336b5e448e14147c2ba29da89b | Complete unscaled31-tape packed MOVE, plus52-tape sharp endpoint scale/width wrapper | +| #7568 | 6c68c9d55b518c997fe5f53d127810e4009e9903 | Arbitrary-input once-rounded54-tape packed MOVE wrapper | +| #7566 | 13c29e2df66ba46402d4da5f1d2489ebf333e5fe | Complete packed MOVE bound to HOME | +| #7578 | e9b6d75397e3553af77bab81d5816e4b8708a501 | Every-axis common-root admission and explicit unpaid old-codec obligation | + +#7563/#7568 were open, unmerged and based on canonical +e54523517d0f03e58352e647c403a5af3e525a57 at the metadata check. The exact +unscaled core's source, complete proof, source manifest, endpoint comparison, +native witness and binder were selectively read from that frozen head. +No monomial, packed whole-MOVE theorem or endpoint wrapper was re-created. + +The fresh claim is one uninterrupted OLD23/three-bit-coded -> existing +full MOVE -> OLD23 service, with actual inverse return and the complete +same-width bill. The predecessor core explicitly left this old-format +packing/entry obligation open. The new bridge commit30497f40 supplied +that representation service; the present package joins the actual complete +core, rather than the central-only child from the intervening package. + +This bounded predecessor comparison does not assert exhaustive archive +novelty. Source owner acquisition, HOME/stock/frame dispatch, failure cleanup, +recursive return and faster nonleaf work are not claimed. The selected +certificate, canonical source base and conditional frontier are unchanged. diff --git a/research/selected-move-old-coded-full/PR-DESCRIPTION.md b/research/selected-move-old-coded-full/PR-DESCRIPTION.md new file mode 100644 index 0000000000..4bcbd07ebe --- /dev/null +++ b/research/selected-move-old-coded-full/PR-DESCRIPTION.md @@ -0,0 +1,118 @@ +## Exact result and why it matters + +The complete selected MOVE24472 was already implemented on a supplied +packed field. Its old-codec/strided entrance and return remained separate +caller work. This package joins the new paid bridge to that **unchanged +complete core**: one uninterrupted 88,816-instruction program on 72 tapes +enters through OLD23/three-bit-coded data, executes both monomials, +translation and every central C axis, and returns the exact result to the +original old-coded owner. + +The fixed source is selected #7000 event `["MOVE",415,3,99,false]`, index +24472, with complete frames `[] -> [239]`. The proof preserves every row, +coefficient index, spectator, numerical quantum and absolute phase. All +72 heads return; the original 43 guards persist; 29 new guards and all +70 private bodies are retired. No runtime host callback implements a gap. + +## Complete cost and numerical domain + +For old physical volume V_old and descriptor length E: + +``` +T <= 2^25 (f V_old + E + 1) +K_after <= K_entry + 2048 (V_old + E + 1). +``` + +Both codecs, all 18f address passes, all six factors, descriptors, staging, +source access, original-owner commit, guards and returns are included. +Erasure never refunds history. The unchanged graph retains direct +Theta(f V_old+E) cost; no accelerated nonleaf tariff is claimed. + +The general domain requires every phase negation to fit and every C-axis +prefix to be integral and fit the signed width. The selected complete-root +invariant **before** the right monomial implies this domain at unchanged +quantum 2^-(p+n), width p+h+2n+3. Its strict magnitude bound excludes +most-negative-word phase overflow; no extra 2^f input reserve is needed. + +An independently derived control shows why endpoint fit alone is too weak: +at f=1,w=2, real −2 at native a0=a7=1 (old address258) has fitting integral +complete outputs, but the actual right phase requires +2. The literal +join rejects before C with zero old public writes. The existing endpoint +and once-rounded widened wrappers retain their distinct domains and bills; +neither is silently imported here. + +## Exact sources and novelty + +- Canonical base: `e54523517d0f03e58352e647c403a5af3e525a57`. +- Paid bridge: [CubeJerry30497f40](https://github.com/CubeJerry/integer-mult-bounds/tree/30497f40d89f2a137a4bc31a4fee1229b9af1440/research/selected-move-packed-codec). +- Existing full unscaled core: CrocSwap/integer-mult-bounds#7563 at + `5dd80e8ab9c989336b5e448e14147c2ba29da89b`. +- Common-root predecessor: CrocSwap/integer-mult-bounds#7578 at + `e9b6d75397e3553af77bab81d5816e4b8708a501`. + +All 32 retained files have exact byte, Git-blob and SHA256 pins. The original +bridge, full core and its small dependency closure remain unchanged. The +packed MOVE, factor algorithms, source normalization and tensor identities +are credited predecessor work. The new result is the complete paid old +physical boundary and its pre-right admission/return composition. + +## Reproduction and executed checks + +```sh +python3 -I -W error -B research/selected-move-old-coded-full/verify.py +python3 -I -W error -O -B research/selected-move-old-coded-full/verify.py +python3 -I -W error -B research/selected-move-old-coded-full/check_admission.py --package research/selected-move-old-coded-full +python3 -I -W error -B research/selected-move-old-coded-full/check_composition.py --package research/selected-move-old-coded-full +``` + +VERIFY.json also registers both independent checks under -O. Expected +primary status: `PASS_OLD_CODED_COMPLETE_SELECTED_MOVE`. Primary normal and +optimized runs give identical receipts. Full r=2,w=4 and common-root-model +w=22 packets take 40,936,214 and 109,257,735 transitions. The output oracle +uses the unlowered source-frame kernel directly in old addresses, not the +executable factors, CNOT words or packing helpers. + +Controls detect right-phase overflow, central nonintegrality, old-field +truncation, aliasing, all 32 source mutations, and two complete physically +returning programs with deleted absolute phase or translation. Separate +review derives the source-frame oracle without factor/verifier imports, +checks every translated instruction, ownership/guards, numerical admission +and exact cost inequalities, and independently re-extracts the full pinned +selected archive. Receipts and proof review are in the package. + +No full f>1 or K>1 joined packet is claimed; two-column counterexamples are +exact sparse algebra. The all-size proof is the fixed-control/ABI induction +with the immutable uniform program contracts, not finite extrapolation. + +## Publication checks + +All six canonical registered commands, committed bytes/modes,32 exact origin-byte +comparisons and official export/input-integrity checks pass. Authored-file +whitespace passes; two trailing-blank warnings are preserved inside byte-frozen +predecessor inputs. The full-history gate is unavailable in the shallow checkout; +its success is not claimed. Direct base-parent and exact source checks are recorded +in PUBLICATION-CHECKS.json. No hosted CI result is claimed. + +## Limitations and open obligations + +This is a complete **single MOVE boundary**, under supplied old owners, +origins, blank windows, actual cutoff and numerical admission. It does not +locate owner415, produce the descriptor, certify root/grid provenance, +update the caller's frame ledger, join HOME/stock dispatch, retire failures, +or supply full recursive/nonleaf closure. Gamma6 preserves an arbitrary +common implicit quantum; header-shape agreement does not certify it. + +No new kappa and no foundational-assumption discharge. The selected +conditional kappa remains 0.00363005817, with all five assumptions explicit. +No unconditional multiplication theorem is claimed. + +## Credit + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance +in research, proof, implementation, independent review and packaging. +Credit the paid bridge and earlier central join; CrocSwap/integer-mult-bounds#7563, +CrocSwap/integer-mult-bounds#7578, the #7426/#7428/#7429/#7430 literal factors, +selected #7000, Jose Manuel's #3091/Gaussian lineage, and the older codec, +compiler and precision predecessors. Domain comparisons credit Nick +Petalas's #7468/#7211 and the existing #7563/#7568 wrappers. Original notices +are retained. No independent human or proof-kernel acceptance is claimed. diff --git a/research/selected-move-old-coded-full/PR-TITLE.txt b/research/selected-move-old-coded-full/PR-TITLE.txt new file mode 100644 index 0000000000..cbc790f813 --- /dev/null +++ b/research/selected-move-old-coded-full/PR-TITLE.txt @@ -0,0 +1 @@ +Selected MOVE24472: execute the complete frozen native move through a paid old-coded entrance and original-owner return diff --git a/research/selected-move-old-coded-full/PROOF.md b/research/selected-move-old-coded-full/PROOF.md new file mode 100644 index 0000000000..ec72c4aaa4 --- /dev/null +++ b/research/selected-move-old-coded-full/PROOF.md @@ -0,0 +1,419 @@ +# A complete selected MOVE at the paid old-coded boundary + +## 1. Exact claim, dependency pins and scope + +The canonical base is `e54523517d0f03e58352e647c403a5af3e525a57`. +The fixed source event is selected #7000 zero-based index24472, +`["MOVE",415,3,99,false]`, with complete source frames `3:[]`, `99:[239]`. +Let U denote that exact source operator, including absolute Gaussian phase. +On f columns the intended action is the product of identical U factors on +the nine selected bits of each column, with all other factors retained. + +This package supplies OLD23/three-bit-coded entry, the **existing complete +MOVE** and OLD23 return in one literal program. It does not reimplement or +claim novelty for the already joined packed MOVE, its six factor graphs, +its source lowering, C arithmetic, or tensor identity. + +The exact bridge is CubeJerry commit +`30497f40d89f2a137a4bc31a4fee1229b9af1440`, package +`research/selected-move-packed-codec`, machine SHA256 +`119b69594a2a33550eec9b6e083db8f496c3fb3d9c1214b6703d687a0a662eba`. +The exact unscaled core is the `move.py` in #7563 at CubeJerry +`5dd80e8ab9c989336b5e448e14147c2ba29da89b`, package +`research/literal-selected-move-join`, SHA256 +`42e4293ab59ffa1c99e0dbbd5fded0833a5d726e1e794f0f263ae9a4686587a5`. +Its 82,813-location graph hash under its own repr convention is +`14f38b15157a9c9cd2828861f6904701a29b1e27507a7e43d60030e1ae4d9238`. +The retained 16-file core source manifest and notices remain unchanged. +SOURCE-PINS.json binds all32 retained files at exact source commits. + +The common-root numerical corollary uses #7578 at +`e9b6d75397e3553af77bab81d5816e4b8708a501`, extended here to the actual +monomial prefixes before and after its central C boundary. Both +predecessor program proofs are retained. They remain credited uniform +implementation lemmas; a pending branch is not a selected-frontier update. + +## 2. Supplied old boundary and two numerical domains + +Use the bridge's exact 23-value canonical old descriptor and complete old +physical field. Let `C_rows=outer*rows`, `a=within_bits`, `u=active_start`, +and let the selected positions counted from the left be + +\[ + p_{i,j}=u+(if+j)K+\rho,\qquad 0\le i<9,\ 0\le j=1; +and inferred signed component width b>=2. At every old address, r Gaussian +coefficients have b LSB-first real bits followed by b LSB-first imaginary +bits, with a virtual delimiter after each component. The physical codes +are 000,001,010 for virtual0,1,delimiter. All coefficients share one fixed +semantic quantum Delta. Let E be the actual old header length and + +\[ + V_o=C_{rows}2^a6r(b+1),\qquad V_p=2C_{rows}2^a r b. +\] + +All other old descriptor values are parsed canonically and preserved. +The graph does not certify enclosing stock, reservation geometry, root +provenance, owner lookup, logical frame state or a complete caller's guards. +The supplied old field is the physical representation of the abstract +operand415 at the input frame3. Producing that occurrence and updating an +enclosing frame ledger after return remain caller actions. + +Supply 72 genuinely distinct tape owners. Ports0,1 are the original old +field and descriptor. Ports2..42 are the 41 bridge-private roles with +permanent LEFT markers. Their bodies are blank through the bridge caps. +Ports43..71 are29 new core-private roles, blank beginning at origin-1 +through the inherited core caps. All heads start at their own origins, +which need not coincide. Correctly sized blank windows, opaque exteriors, +actual earlier backing and transport to these origins are entry premises. + +The **general success domain** is exactly the unscaled core predicate: +`f<=cutoff`; every required phase rotation/negation fits signed b bits; +and every component after each executed central low-bit-first C axis is +integral on Delta and fits `[-2^(b-1),2^(b-1)-1]`. Final integral output +alone does not imply this predicate. No input `2^f` divisibility promise +is required when the actual predicate is proved another way. + +The **common-root corollary** uses the selected invariant before the right +monomial: n complete root bits, original grid2^-p and strict component +magnitude below2^h, current fields `sum c U_0 x` with Gaussian-dyadic Clifford +U_0, exterior denominator height at most178t and coefficient mass at most +`2*2^(161t)`, depth `356t 2`, `0 -> 0`, `1 -> 1`, `| -> 3`. +Thus joined2 is blank and joined3 is LEFT. A virtual old delimiter is the +three *bits*010, never either guard or blank. This is a fixed alphabet +renaming of control labels, not a free runtime payload recoding. + +The 6,003 bridge instructions are copied unchanged except its unique +PACKED halt, replaced by a jump to core location0. All82,813 core locations +are translated by the fixed ports/symbols and destination offset6003. +The unique successful core halt becomes a jump to bridge EXIT. Empty +branches remain rejecting endpoints; sequential fallthrough is unchanged. +Both replacements have the original unit instruction cost. No host +callback, payload-dependent code generation, hidden parameter, numeric +oracle or owner substitution occurs between entry and final DONE. + +A step induction proves literal simulation: every mapped read sees the +same symbol and follows the mapped destination, every write changes the +corresponding cell, every move changes the same relative head by one, and +fixed jumps preserve the instruction relation. No other runtime operation +exists in the table. Source compiler loops enumerate only fixed graphs. + +The 29 additional owners differ deliberately from the bridge-private +guard convention. The core creates guards on its WORK/TRACE owners, and +its six modules create/erase guards on their shared27 module-private roles. +All29 begin blank at origin-1 and finish blank there. PACK/GAMMA retain +their bridge guards and the core never modifies them. This distinction is +part of the verified physical seam. + +## 4. Source action, complete addresses and successful owner return + +The bridge first physically parses OLD23, infers b/r, checks component +lengths/delimiters and complete cardinality, then converts every signed +component to MSB-first bits and gathers all9f native positions. It supplies +exactly six Gamma fields `(f,r,P,S,b,cutoff)` where + +\[ + P=C_{rows}2^u,\qquad S=2^{a-u-9f}, +\] + +and the complete packed array `[P] x [2^f]^9 x [S]`, with r coefficients +per address and exactly V_p bits followed by a blank. All bridge guides +remain live but excluded from core ports. Old field/descriptor are unchanged. + +The retained core already composes these actual factors: + +1. Right coordinate phase, including the repeated constant i^f. +2. The actual right binary map on every column. +3. Right offset after that map, with the full spectator/coefficient suffix. +4. Positive C on all f axes of native coordinate0. +5. The actual left coordinate phase. +6. The actual left binary map. + +It clones PACK into its private WORK, performs all six factor commits on +WORK, and commits to the same PACK owner only after success. Its source +kernel was bound to event24472 and frames3->99, not inferred from a rank-one +title or a related Pauli matrix. The retained source witness, exact compiler +and independent Gaussian interpreter expose this binding for review. + +Each retained factor restores the common header, private module owners and +heads. The core reuses those27 private roles only after successful complete +retirement. On full return all29 new bodies/guards are blank and every +core head has returned. It has touched no retained bridge guide. The inverse +bridge therefore receives exactly its required unchanged geometry/header +and a same-width packed output, physically reverses the complete address +permutation and codec, and commits to the original old owner. Its final +cleanup restores the41 bridge-private bodies and all original heads. + +Gathering reverses the column labels uniformly in all nine native slots: +old column j becomes new bit f-1-j. The product of identical nine-bit U +operators over all columns commutes with that common column permutation. +Equivalently, relabeling the f disjoint tensor factors changes their order, +not their product or absolute phase. Therefore conjugating the core by +the bridge gives exactly the old-coordinate selected MOVE. No spectator +or coefficient is omitted and no source row is projected away. + +Every success-stage numerical operation is exact on the same implicit +Delta. Gamma6 need not encode Delta to preserve it: copies/permutations +preserve stored integers, unit phases rotate them, and C's tested halves +are exact. No second field with a different quantum is added or identified. +The caller must establish which common Delta its old input represents; +neither header-shape equality nor OLD23's unused fields establish that +provenance. The program preserves the given grid, rather than deriving it. + +On a pre-success core rejection, old field and descriptor remain original. +The bridge has not reached its final old commit. Rejection does not promise +head return, private cleanup, reusable dirty owners or rollback after an +interrupted commit. These failure obligations are explicitly outside the +successful-call theorem. + +## 5. Pre-right common-root admission and honest domain comparison + +Take the common-root hypotheses from Section2 before the actual right +monomial. Every completed right phase/map/translation, every subset prefix +of the central C axes, and every completed left phase/map is a +Gaussian-dyadic Clifford on the *same complete n-bit root*. The selected +axes are distinct root positions and spectators remain complete. Applying +any such prefix B changes + +\[ + \sum c U_0 x\quad\hbox{to}\quad\sum c(BU_0)x. +\] + +The exterior coefficients and their178t/161t budgets do not change. +This reasoning also covers elementary CNOT/phase-gate prefixes when their +separate values are relevant. It does not infer a global unitary state +from a partly written physical stream. + +The retained complete-root row theorem gives denominator exponent at most +`p+ceil(n/2)+178t` and strict component magnitude below the majorant with +exponent `h+ceil((n+1)/2)+161t+1`. Because `356t=2048`. Each first-five parameter f,r,P,S,b is at most +V_p, so their five Gamma lengths total at most +`10 floor(log2 V_p)+5<=V_p`. The inequality holds for every integer bit +length m>=7 by induction from `10m+5<=2^m`. The domain has m>=11. +The cutoff Gamma code has two fewer bits than its old encoding, even if +its represented value is arbitrarily large. Hence + +\[ + E_g\le V_p+E. +\] + +The unchanged bridge's complete two-way bill is + +\[ + T_b\le2^{20}((9f+1)V_o+E+1), + \quad\Delta K_b\le64(V_o+E+1). +\] + +It includes all18f address passes, old codec scans, physical descriptor +parsing and width/multiplicity inference, generated geometry, full source +access, final old-owner commit, clearing and returns. The unchanged full +core's complete bill is + +\[ + T_U\le2^{24}(fV_p+E_g+1), + \quad\Delta K_U\le1024(V_p+E_g+1). +\] + +That bill includes both monomials, translation descriptor/reversal, +every central C axis, all scans and copies, nested staging/commits, +private reuse, guards, source access and all returns. Neither source +program invokes an uncharged recursive child. The two terminal-to-jump +replacements preserve step count. Since f>=1, + +\[ + \begin{aligned} + T&=T_b+T_U\\ + &\le2^{20}(10fV_o+E+1)+2^{24}(\tfrac23 fV_o+E+1)\\ + &\le2^{25}(fV_o+E+1). + \end{aligned} +\] + +The fV_o coefficient in units2^20 is `10+32/3<32`, and the E+1 coefficient +is17<32. The old physical field and packed volume are both paid. No cost +for an absent width conversion is imported; acquisition or transport +before the supplied old entry heads remains additional caller work. + +For histories, adding the two inherited increments can overcount shared +PACK/GAMMA cells, which is conservative. It never subtracts erased cells: + +\[ + \begin{aligned} + K_{after}-K_{entry} + &\le64(V_o+E+1)+1024(V_p+E_g+1)\\ + &\le(64+2048/3)V_o+1088(E+1)\\ + &\le2048(V_o+E+1). + \end{aligned} +\] + +This includes guards and endpoints on all owners. Old high-water histories +remain in K_entry. For later successful calls, union actual absolute +intervals per owner; blanking a field or renaming an origin never releases +backing. Changed origins and enclosing transport corridors must be paid +by the caller. The verifier records all read/write/move endpoint visits. + +The bridge's exact pass structure still forces at least `36fV_p>=8fV_o` +writes, plus actual old-header reads. Thus this unchanged joined graph has +Theta(fV_o+E) successful-call cost. All-zero inputs give successful +cofinal families even under the common-root specialization, for example +`a=n=9f`, `K=r=1`, `u=rho=p=h=t=0`, `cutoff=f`, `b=18f+3`. +This excludes a pure `O(V_o f^(1-kappa)+E)` bill for positive kappa on +that family. It is not a lower bound on other packing algorithms or a +complete selected-tariff ceiling: the latter includes precision parameters +and requires a separate cofinal parameter comparison. Fixed leaf f has +no contradiction. No multiplication-bound improvement follows. + +## 7. Executed evidence, independence and open obligations + +The primary checker compiles one uninterrupted88,816-location graph. +Its output oracle uses the independently written retained Gaussian +interpreter on the **unlowered source frames** `[] -> [239]`, obtaining all +512 exact one-column source kernels. It applies those kernels directly at +the old selected-address tuples, without invoking any executable factor, +CNOT word, phase counter, bridge permutation helper or tape arithmetic. +The source-kernel interpreter is credited predecessor verification code. + +Two complete f=1 packets execute: distinct r=2 coefficients at width4, +and an n=9,p=0,h=1,t=0 common-root numerical model at width22 with a138-bit +cutoff. Both nonidentity outputs match all old physical bits and retain the +same original owner. All72 heads,43 permanent guards,29 retired guards, +70 private bodies, descriptor bytes, opaque exteriors and full histories +are checked. The numerical model is not an executed selected root trace +or an admission of the older dispatcher's other reservation fields. + +Actual literal controls reach the address258 phase overflow before C, +central nonintegrality after the three right factors, and truncated old +field rejection, all with zero old public writes. Two complete physically +returning mutant programs delete the absolute phase or right translation; +the direct source kernel detects their wrong results. Aliased-owner +binding and all32 source mutations are rejected. Seed24472 and the exact +finite domains are in verify.py and RESULT.json. No full f>1 or K>1 joined +packet is executed. Uniformity is the fixed-control/ABI induction with +the pinned all-size contracts, not extrapolation from these packets. + +The separate admission review derives the unlowered source kernel without +importing factor/verifier code, checks all512 one-column and four two-column +source basis cases, proves the pre-right root implication and gives both +endpoint counterexamples. Its static translation/cost review is packaged +separately. Reviews are model-assisted; no human or proof-kernel acceptance +is claimed. + +Still separate are locating/transporting the actual source owner415, +certifying the pre-right root invariant at that occurrence, updating the +caller's frame ledger, HOME/stock/cutoff emission, root reservations, +failure retirement/retry, whole-program compiler closure, owned recursive +returns, accelerated nonleaf service and global precision/analytic recovery. +The selected conditional kappa0.00363005817 and all five foundational +assumptions remain unchanged. This is a complete *single MOVE physical +boundary* theorem under explicit entry promises, not a complete selected +caller or an unconditional multiplication algorithm. diff --git a/research/selected-move-old-coded-full/PUBLICATION-CHECKS.json b/research/selected-move-old-coded-full/PUBLICATION-CHECKS.json new file mode 100644 index 0000000000..edcecc606b --- /dev/null +++ b/research/selected-move-old-coded-full/PUBLICATION-CHECKS.json @@ -0,0 +1,21 @@ +{ + "status": "PASS_SCOPED_PUBLICATION_GATES", + "tested_commit": "3319932e30b8c8cea0fe1d8588b95215a42cf176", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "checks": [ + "Six canonical registered normal/optimized executions passed", + "All32 origin files equal exact pinned Git objects", + "Committed bytes and modes passed", + "Official Git-free export/input integrity passed", + "All authored files pass whitespace inspection", + "Root independent written proof and full-cost review, in addition to separate source/static reviewer" + ], + "registered_log_sha256": "ed8fa2229c8c70f23bdcebf7da95e1b7ebefb4610dfb6293385983f870dbb8f1", + "export_file_count": 58, + "full_history_gate": "Unavailable: source-history check requires full Git history; no success claimed. Direct canonical-base parent and32 source origins separately checked.", + "immutable_source_whitespace": [ + "inputs/core/reference/leaf/leaf.py:561 inherited trailing blank line", + "inputs/core/reference/translation/reference/reverse.py:207 inherited trailing blank line" + ], + "scope": "No selected cold replay, new kappa, complete caller, foundational-assumption discharge, human or formal acceptance." +} diff --git a/research/selected-move-old-coded-full/README.md b/research/selected-move-old-coded-full/README.md new file mode 100644 index 0000000000..9faef1c87e --- /dev/null +++ b/research/selected-move-old-coded-full/README.md @@ -0,0 +1,140 @@ +# The complete selected MOVE at a paid old-coded boundary + +One fixed 72-tape program now enters through the old 23-field/three-bit-coded +format, executes the **unchanged complete selected MOVE24472**, and returns +the exact result in the original old-coded owner. The 88,816-location graph +physically includes both codecs, complete address transport, both source +monomials, translation, all central C axes, staging, commits and retirement. +No runtime host service fills a gap between those stages. + +**Classification:** scoped physical implementation/composition theorem and +enabling progress on `precision_tape` / `native_all_columns`. No foundational +assumption is discharged. No new kappa; the selected conditional value +remains 0.00363005817. + +## Exact result and complete bill + +On the bridge's supplied complete old field/descriptor, distinct blank +private owners and correct entry origins, retain `f<=cutoff` and the actual +numerical predicate: every required phase negation fits, and every C-axis +prefix is integral on the common grid and fits the signed component width. +The program applies actual source event `["MOVE",415,3,99,false]` to every +column, preserving rows, coefficient multiplicity, all spectators, quantum +and absolute phase. It returns all 72 heads, preserves the original 43 guards, +erases 29 new guards, and restores all 70 private bodies and the descriptor. + +For old physical field volume V_old and old descriptor length E: + +``` +T <= 2^25 (f V_old + E + 1) +K_after <= K_entry + 2048 (V_old + E + 1). +``` + +The proof adds the complete bridge and full-core bills at the actual +volumes, including all 18f address passes, source scans, descriptor work, +every factor, private reuse and head returns. It proves +`E_Gamma<=V_packed+E` and uses `V_packed [239]`, then indexes it directly in old +address coordinates; it calls no executable factor or bridge permutation +to obtain expected values. Two complete f=1 packets run: r=2,w=4 takes +40,936,214 transitions, and the n=9,p=0,h=1,t=0 width 22 numerical model with +a 138-bit cutoff takes 109,257,735. Every output changes and matches exactly. + +The actual address258 phase rejection, later central nonintegrality, +truncated old field and alias controls are exercised. Two full physically +returning mutant programs delete the source absolute phase or translation; +the source-kernel oracle detects their wrong output. All 32 source changes +are detected. All heads, guards, private bodies and visited histories are +checked; there is no unreported output substitution. + +Separate model-assisted review independently derives the source-frame +kernel without factor/verifier imports, checks all 512 basis columns and +four two-column cases, proves the numerical implication and checks every +translated instruction/port/edge and the complete cost constants: + +```sh +python3 -I -W error -B research/selected-move-old-coded-full/check_admission.py --package research/selected-move-old-coded-full +python3 -I -W error -B research/selected-move-old-coded-full/check_composition.py --package research/selected-move-old-coded-full +``` + +Both are also registered under -O. Their defaults are read-only. The +admission reviewer additionally re-extracted the full pinned 350,722-byte +selected archive; ADMISSION-CONTROLS.json records that separate executed +check. The archive is not duplicated in this package. To repeat that +specific check, pass `--archive PATH_TO_PINNED_ARCHIVE`; its exact identity +and original command appear in ADMISSION-REVIEW.md. + +No full f>1 or K>1 joined tape packet is run here. The f=2 obstructions are +exact sparse algebra. Uniformity rests on the pinned all-size contracts +and the literal interface proof, with finite checks as failure controls. +No independent human or proof-kernel certification is claimed. + +## Open next questions + +1. Bind this OLD23 service to the actual selected owner415/frame3 occurrence, + physical HOME access, old descriptor production and frame99 return. The + theorem currently starts at supplied public owners and origins. +2. Establish the common-root/grid/cutoff invariant and complete reservation + state at that caller; shape-compatible data alone is insufficient. +3. Supply a failure retirement/retry contract. Precommit rejection protects + old public data but can leave private banks dirty and heads displaced. +4. Provide an admitted recursive/nonleaf service with its complete scan, + transport, child, restoration and historical-backing invoice. The present + direct-order graph cannot be relabelled as the faster selected rate. + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +The selected certificate, all five assumptions and accepted bound are +unchanged. See PROOF.md, ADMISSION-REVIEW.md, SOURCE-PINS.json and NOTICE.md. diff --git a/research/selected-move-old-coded-full/RESULT-OPTIMIZED.json b/research/selected-move-old-coded-full/RESULT-OPTIMIZED.json new file mode 100644 index 0000000000..c155eaf90c --- /dev/null +++ b/research/selected-move-old-coded-full/RESULT-OPTIMIZED.json @@ -0,0 +1,86 @@ +{ + "status": "PASS_OLD_CODED_COMPLETE_SELECTED_MOVE", + "source_event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "source_event_index": 24472, + "fixed_tapes": 72, + "instructions": 88816, + "graph_sha256": "5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403", + "compose_sha256": "572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c", + "kernel_sha256": "ab8f0ddfd12a7e2b098983754d39b5859347d36783c850b826c7a3bd0ac5828e", + "authenticated_sources": 32, + "source_mutations_detected": 32, + "positive_cases": [ + { + "parameters": { + "r": 2, + "width": 4, + "scale": 2 + }, + "old_bits": 30720, + "header_bits": 131, + "transitions": 40936214, + "private_history": 268570, + "common_root_numeric_model": false, + "changed_exact_output": true + }, + { + "parameters": { + "width": 22, + "scale": 512, + "cutoff": 174224571863520493293247799005065324265475 + }, + "old_bits": 70656, + "header_bits": 413, + "transitions": 109257735, + "private_history": 689002, + "common_root_numeric_model": true, + "changed_exact_output": true + } + ], + "negative_controls": [ + { + "control": "actual endpoint-only phase overflow at old address258", + "steps": 2012411, + "entered_core": true, + "entered_C_arithmetic": false, + "public_writes": 0 + }, + { + "control": "nonintegral central C after three actual right factors", + "steps": 5131360, + "entered_core": true, + "entered_C_arithmetic": true, + "public_writes": 0 + }, + { + "control": "truncated old-coded field", + "steps": 885939, + "entered_core": false, + "entered_C_arithmetic": false, + "public_writes": 0 + }, + { + "control": "drop_absolute_phase", + "steps": 20725036, + "detected_by_direct_source_kernel": true + }, + { + "control": "omit_offset", + "steps": 20260903, + "detected_by_direct_source_kernel": true + }, + { + "control": "aliased added owner", + "detected": true + } + ], + "full_f2_run": false, + "assumptions_discharged": [], + "new_kappa": false +} diff --git a/research/selected-move-old-coded-full/RESULT.json b/research/selected-move-old-coded-full/RESULT.json new file mode 100644 index 0000000000..c155eaf90c --- /dev/null +++ b/research/selected-move-old-coded-full/RESULT.json @@ -0,0 +1,86 @@ +{ + "status": "PASS_OLD_CODED_COMPLETE_SELECTED_MOVE", + "source_event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "source_event_index": 24472, + "fixed_tapes": 72, + "instructions": 88816, + "graph_sha256": "5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403", + "compose_sha256": "572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c", + "kernel_sha256": "ab8f0ddfd12a7e2b098983754d39b5859347d36783c850b826c7a3bd0ac5828e", + "authenticated_sources": 32, + "source_mutations_detected": 32, + "positive_cases": [ + { + "parameters": { + "r": 2, + "width": 4, + "scale": 2 + }, + "old_bits": 30720, + "header_bits": 131, + "transitions": 40936214, + "private_history": 268570, + "common_root_numeric_model": false, + "changed_exact_output": true + }, + { + "parameters": { + "width": 22, + "scale": 512, + "cutoff": 174224571863520493293247799005065324265475 + }, + "old_bits": 70656, + "header_bits": 413, + "transitions": 109257735, + "private_history": 689002, + "common_root_numeric_model": true, + "changed_exact_output": true + } + ], + "negative_controls": [ + { + "control": "actual endpoint-only phase overflow at old address258", + "steps": 2012411, + "entered_core": true, + "entered_C_arithmetic": false, + "public_writes": 0 + }, + { + "control": "nonintegral central C after three actual right factors", + "steps": 5131360, + "entered_core": true, + "entered_C_arithmetic": true, + "public_writes": 0 + }, + { + "control": "truncated old-coded field", + "steps": 885939, + "entered_core": false, + "entered_C_arithmetic": false, + "public_writes": 0 + }, + { + "control": "drop_absolute_phase", + "steps": 20725036, + "detected_by_direct_source_kernel": true + }, + { + "control": "omit_offset", + "steps": 20260903, + "detected_by_direct_source_kernel": true + }, + { + "control": "aliased added owner", + "detected": true + } + ], + "full_f2_run": false, + "assumptions_discharged": [], + "new_kappa": false +} diff --git a/research/selected-move-old-coded-full/SOURCE-ORIGIN-CHECK.json b/research/selected-move-old-coded-full/SOURCE-ORIGIN-CHECK.json new file mode 100644 index 0000000000..421bcd3bbd --- /dev/null +++ b/research/selected-move-old-coded-full/SOURCE-ORIGIN-CHECK.json @@ -0,0 +1,166 @@ +{ + "status": "PASS_EXACT_ORIGIN_BYTES", + "source_cache": "read-only reusable Git object database", + "files": [ + { + "local": "inputs/bridge-NOTICE.md", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/NOTICE.md", + "git_blob": "8c3beaf115c354c7874556b0990dd2081a46cf13" + }, + { + "local": "inputs/bridge-PROOF.md", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/PROOF.md", + "git_blob": "b0f7372959d498c8d1fd691f5992be50246f200d" + }, + { + "local": "inputs/bridge.py", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/machine.py", + "git_blob": "68701de0744f1fb3c31b572f5916bc79478c1770" + }, + { + "local": "inputs/core/NOTICE.md", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/NOTICE.md", + "git_blob": "07b9f44dcbc253a12795ae6c9f5eefff1862bd22" + }, + { + "local": "inputs/core/PROOF.md", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/PROOF.md", + "git_blob": "f3173c7a67822d98159202315bd2310484a9c2ee" + }, + { + "local": "inputs/core/SOURCES.json", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/SOURCES.json", + "git_blob": "8a2db1259a94dd5e863d8e95922ef33ef93e8751" + }, + { + "local": "inputs/core/bind_source.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/bind_source.py", + "git_blob": "fbd9305a02daf566198f5e659b650112d83b0ed1" + }, + { + "local": "inputs/core/move.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/move.py", + "git_blob": "3c11397a02d2a52e3e3d690bce1ebfe067b06c6c" + }, + { + "local": "inputs/core/reference/RECIPE.json", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/RECIPE.json", + "git_blob": "ea2bc6909e02d8aa61e170d65bb707da7279d0ab" + }, + { + "local": "inputs/core/reference/SOURCE-FRAMES.json", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/SOURCE-FRAMES.json", + "git_blob": "478d9edddea642447dd14a931835c0208d7278e4" + }, + { + "local": "inputs/core/reference/leaf/NOTICE.md", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/leaf/NOTICE.md", + "git_blob": "71c5f6dae2c799ce5d76c544e98d1ee7c52ef76c" + }, + { + "local": "inputs/core/reference/leaf/inputs/controller_reference.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/leaf/inputs/controller_reference.py", + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "local": "inputs/core/reference/leaf/leaf.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/leaf/leaf.py", + "git_blob": "bdcc80cbd8b64c601e6d69b7d25ece444b8b1ae2" + }, + { + "local": "inputs/core/reference/linear/NOTICE.md", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/linear/NOTICE.md", + "git_blob": "3a3030f23df347c1e45ddf92d2083f89ed16cc67" + }, + { + "local": "inputs/core/reference/linear/inputs/controller_reference.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/linear/inputs/controller_reference.py", + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "local": "inputs/core/reference/linear/linear.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/linear/linear.py", + "git_blob": "6aad40a6c47ed4415917c86fabbd5227a3819a41" + }, + { + "local": "inputs/core/reference/phase/NOTICE", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/phase/NOTICE", + "git_blob": "7a1f1da9c59d40b1e72905fee5344a8db9ca4353" + }, + { + "local": "inputs/core/reference/phase/inputs/controller_reference.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/phase/inputs/controller_reference.py", + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "local": "inputs/core/reference/phase/phase.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/phase/phase.py", + "git_blob": "d48978145821fc4a62d534bef2bef9449bda883a" + }, + { + "local": "inputs/core/reference/source/clifford_exact.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/source/clifford_exact.py", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2" + }, + { + "local": "inputs/core/reference/source/native_verify.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/source/native_verify.py", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c" + }, + { + "local": "inputs/core/reference/translation/NOTICE.md", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/translation/NOTICE.md", + "git_blob": "903e332da2844843fbb1ad716b6d470f175e8de9" + }, + { + "local": "inputs/core/reference/translation/reference/inputs/controller_reference.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/translation/reference/inputs/controller_reference.py", + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "local": "inputs/core/reference/translation/reference/reverse.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/translation/reference/reverse.py", + "git_blob": "60fce51dd8c3336e2bcf2873df254190e2203e14" + }, + { + "local": "inputs/core/reference/translation/translate.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/reference/translation/translate.py", + "git_blob": "5e1149f8ab45e0d5b4ecd963674ff8659d7f014b" + }, + { + "local": "inputs/core/verify.py", + "origin": "5dd80e8ab9c989336b5e448e14147c2ba29da89b:research/literal-selected-move-join/verify.py", + "git_blob": "1aa0ba169ca4ab15189bc3727da844d9ce641b28" + }, + { + "local": "inputs/grid-interface-PROOF.md", + "origin": "e9b6d75397e3553af77bab81d5816e4b8708a501:research/selected-move-packed-grid-interface/PROOF.md", + "git_blob": "a9c224b2f94b20b1eaae22553cdc121231322d9d" + }, + { + "local": "inputs/notices/common-grid-NOTICE.md", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/inputs/notices/common-grid-NOTICE.md", + "git_blob": "51fa9d494c79e6c5a113bc09f2852bfacece6b52" + }, + { + "local": "inputs/notices/grid-interface-NOTICE", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/inputs/notices/grid-interface-NOTICE", + "git_blob": "dcfe84cbdd5f93d92f1970718c21e04833e8c36e" + }, + { + "local": "inputs/notices/literal-leaf-NOTICE.md", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/inputs/notices/literal-leaf-NOTICE.md", + "git_blob": "71c5f6dae2c799ce5d76c544e98d1ee7c52ef76c" + }, + { + "local": "inputs/notices/old-coded-NOTICE.md", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/inputs/notices/old-coded-NOTICE.md", + "git_blob": "9ec74ef6051fcd53f11b569b232b639261daf81f" + }, + { + "local": "inputs/notices/selected-NOTICE", + "origin": "30497f40d89f2a137a4bc31a4fee1229b9af1440:research/selected-move-packed-codec/inputs/notices/selected-NOTICE", + "git_blob": "a3687d65a00794277cdaad37558d24008cbc37f5" + } + ] +} diff --git a/research/selected-move-old-coded-full/SOURCE-PINS.json b/research/selected-move-old-coded-full/SOURCE-PINS.json new file mode 100644 index 0000000000..eb9e811c24 --- /dev/null +++ b/research/selected-move-old-coded-full/SOURCE-PINS.json @@ -0,0 +1,302 @@ +{ + "canonical_main": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "local": "inputs/bridge-NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/NOTICE.md", + "bytes": 1665, + "git_blob": "8c3beaf115c354c7874556b0990dd2081a46cf13", + "sha256": "94a369c7d672d9b8afa6594f654251aa4bccfcc7f1e480dc1df9207a0594ae62" + }, + { + "local": "inputs/bridge-PROOF.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/PROOF.md", + "bytes": 21104, + "git_blob": "b0f7372959d498c8d1fd691f5992be50246f200d", + "sha256": "9b469d81f64d56800bc0b28c40faa4bb6e85f836cc878ef6506492373da5fd69" + }, + { + "local": "inputs/bridge.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/machine.py", + "bytes": 18545, + "git_blob": "68701de0744f1fb3c31b572f5916bc79478c1770", + "sha256": "119b69594a2a33550eec9b6e083db8f496c3fb3d9c1214b6703d687a0a662eba" + }, + { + "local": "inputs/core/NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/NOTICE.md", + "bytes": 3200, + "git_blob": "07b9f44dcbc253a12795ae6c9f5eefff1862bd22", + "sha256": "5b708636e2aa0fe5fbcc5e51ce0fc3287617698f13d235ed9d6771a5b07c1e44" + }, + { + "local": "inputs/core/PROOF.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/PROOF.md", + "bytes": 17089, + "git_blob": "f3173c7a67822d98159202315bd2310484a9c2ee", + "sha256": "b6604cdba74a093c89603a5197ef2ed1146364ffbb718a731087bfaf392e505e" + }, + { + "local": "inputs/core/SOURCES.json", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/SOURCES.json", + "bytes": 7341, + "git_blob": "8a2db1259a94dd5e863d8e95922ef33ef93e8751", + "sha256": "26d0ef51dda5fa599381f7f31dec4ba3a37f14f63ff9055ad1661dec2d02610c" + }, + { + "local": "inputs/core/bind_source.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/bind_source.py", + "bytes": 4281, + "git_blob": "fbd9305a02daf566198f5e659b650112d83b0ed1", + "sha256": "5b75ebfea1563a8525438a03262900b1ecbfdd762d5d1aaced3faddfa3b23a8c" + }, + { + "local": "inputs/core/move.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/move.py", + "bytes": 5497, + "git_blob": "3c11397a02d2a52e3e3d690bce1ebfe067b06c6c", + "sha256": "42e4293ab59ffa1c99e0dbbd5fded0833a5d726e1e794f0f263ae9a4686587a5" + }, + { + "local": "inputs/core/reference/RECIPE.json", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/RECIPE.json", + "bytes": 1798, + "git_blob": "ea2bc6909e02d8aa61e170d65bb707da7279d0ab", + "sha256": "96fadb44c3316be93c6c02f50cd2c841a9541d67b98fd94fc47b73fa64dd404c" + }, + { + "local": "inputs/core/reference/SOURCE-FRAMES.json", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/SOURCE-FRAMES.json", + "bytes": 151, + "git_blob": "478d9edddea642447dd14a931835c0208d7278e4", + "sha256": "58f784587d1f21d6aaa1f6a14932779ff1f24d232496b042240e832939c9010d" + }, + { + "local": "inputs/core/reference/leaf/NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/leaf/NOTICE.md", + "bytes": 1900, + "git_blob": "71c5f6dae2c799ce5d76c544e98d1ee7c52ef76c", + "sha256": "773921ac301cf7e37de97ed8a0066e6bbb69ec1150cc2b5f74a12cb20103f3cf" + }, + { + "local": "inputs/core/reference/leaf/inputs/controller_reference.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/leaf/inputs/controller_reference.py", + "bytes": 5938, + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72", + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73" + }, + { + "local": "inputs/core/reference/leaf/leaf.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/leaf/leaf.py", + "bytes": 17526, + "git_blob": "bdcc80cbd8b64c601e6d69b7d25ece444b8b1ae2", + "sha256": "bb46c1a55f1119957a52cd61f2cd957f3f7ad1e9b818c54a852bde09a0773744" + }, + { + "local": "inputs/core/reference/linear/NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/linear/NOTICE.md", + "bytes": 2180, + "git_blob": "3a3030f23df347c1e45ddf92d2083f89ed16cc67", + "sha256": "2ac2051c0fbedfd9d11348493456bf479dbdd3104a4e106c8bf36251a72b6a50" + }, + { + "local": "inputs/core/reference/linear/inputs/controller_reference.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/linear/inputs/controller_reference.py", + "bytes": 5938, + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72", + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73" + }, + { + "local": "inputs/core/reference/linear/linear.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/linear/linear.py", + "bytes": 13102, + "git_blob": "6aad40a6c47ed4415917c86fabbd5227a3819a41", + "sha256": "d56704082b82e37d4a360b8aad7e0af63499f4160c6bbcfd338804453c46fa33" + }, + { + "local": "inputs/core/reference/phase/NOTICE", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/phase/NOTICE", + "bytes": 808, + "git_blob": "7a1f1da9c59d40b1e72905fee5344a8db9ca4353", + "sha256": "5654eeb7fdc1acd6a6d246ef87b1155812efdcd0949f54be78e048fe905fbae0" + }, + { + "local": "inputs/core/reference/phase/inputs/controller_reference.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/phase/inputs/controller_reference.py", + "bytes": 5938, + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72", + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73" + }, + { + "local": "inputs/core/reference/phase/phase.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/phase/phase.py", + "bytes": 11734, + "git_blob": "d48978145821fc4a62d534bef2bef9449bda883a", + "sha256": "2be149aa1be504509bb480f85396f0be302082d638e81422f747daee5a3c1ce7" + }, + { + "local": "inputs/core/reference/source/clifford_exact.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/source/clifford_exact.py", + "bytes": 6824, + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "local": "inputs/core/reference/source/native_verify.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/source/native_verify.py", + "bytes": 12323, + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + }, + { + "local": "inputs/core/reference/translation/NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/translation/NOTICE.md", + "bytes": 1201, + "git_blob": "903e332da2844843fbb1ad716b6d470f175e8de9", + "sha256": "24f5e9957fcd8f6cfdc021ff5bc91bf89e50587997e2a2cb18053949c0e0d205" + }, + { + "local": "inputs/core/reference/translation/reference/inputs/controller_reference.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/translation/reference/inputs/controller_reference.py", + "bytes": 5938, + "git_blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72", + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73" + }, + { + "local": "inputs/core/reference/translation/reference/reverse.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/translation/reference/reverse.py", + "bytes": 6649, + "git_blob": "60fce51dd8c3336e2bcf2873df254190e2203e14", + "sha256": "4b516d85baf3303db809bc1174394009b1fc71a8f7d17fb6c729ec8bb6aba245" + }, + { + "local": "inputs/core/reference/translation/translate.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/reference/translation/translate.py", + "bytes": 7703, + "git_blob": "5e1149f8ab45e0d5b4ecd963674ff8659d7f014b", + "sha256": "e2750fef8c2b9c8019d67285df3ca0d04340cd241782c7845665b7de621ca3bd" + }, + { + "local": "inputs/core/verify.py", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "5dd80e8ab9c989336b5e448e14147c2ba29da89b", + "path": "research/literal-selected-move-join/verify.py", + "bytes": 12622, + "git_blob": "1aa0ba169ca4ab15189bc3727da844d9ce641b28", + "sha256": "372eaf92353add7b7ce9a9513469408a341176aef749bcf3b0f60918c90630ca" + }, + { + "local": "inputs/grid-interface-PROOF.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "e9b6d75397e3553af77bab81d5816e4b8708a501", + "path": "research/selected-move-packed-grid-interface/PROOF.md", + "bytes": 13615, + "git_blob": "a9c224b2f94b20b1eaae22553cdc121231322d9d", + "sha256": "ceb2cd71379644ab2c4f8e36489996436a11eb345a275d21ea487de59264e308" + }, + { + "local": "inputs/notices/common-grid-NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/inputs/notices/common-grid-NOTICE.md", + "bytes": 1078, + "git_blob": "51fa9d494c79e6c5a113bc09f2852bfacece6b52", + "sha256": "3a3d353a0fb41ce5688c8ae2bcc82306f4499ffc19f0c44eeaa85679f895a5d3" + }, + { + "local": "inputs/notices/grid-interface-NOTICE", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/inputs/notices/grid-interface-NOTICE", + "bytes": 1513, + "git_blob": "dcfe84cbdd5f93d92f1970718c21e04833e8c36e", + "sha256": "3d176e19ad6f1280427563ed5279827afd194a0d25ce400863e0fe7b7d185774" + }, + { + "local": "inputs/notices/literal-leaf-NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/inputs/notices/literal-leaf-NOTICE.md", + "bytes": 1900, + "git_blob": "71c5f6dae2c799ce5d76c544e98d1ee7c52ef76c", + "sha256": "773921ac301cf7e37de97ed8a0066e6bbb69ec1150cc2b5f74a12cb20103f3cf" + }, + { + "local": "inputs/notices/old-coded-NOTICE.md", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/inputs/notices/old-coded-NOTICE.md", + "bytes": 1468, + "git_blob": "9ec74ef6051fcd53f11b569b232b639261daf81f", + "sha256": "db63191f6fbf8d5b3b577ba7afb07c15bd0a89a7446626217cadf401acc4ffde" + }, + { + "local": "inputs/notices/selected-NOTICE", + "repository": "CubeJerry/integer-mult-bounds", + "commit": "30497f40d89f2a137a4bc31a4fee1229b9af1440", + "path": "research/selected-move-packed-codec/inputs/notices/selected-NOTICE", + "bytes": 893, + "git_blob": "a3687d65a00794277cdaad37558d24008cbc37f5", + "sha256": "da12736e2e824167ff56f2ecb623a5f88f75a270410360890f61dffc33bab249" + } + ], + "selected_event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "selected_event_index": 24472, + "selected_kappa": "0.00363005817" +} diff --git a/research/selected-move-old-coded-full/SOURCES.json b/research/selected-move-old-coded-full/SOURCES.json new file mode 100644 index 0000000000..89b7c5747a --- /dev/null +++ b/research/selected-move-old-coded-full/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "75d77b328ea02ded535e7f23aee5b1e55d0bb1a8", + "sha256": "154c3d30455d778fd3343b6b4851f0fa4665f0f7625b0adb3675e2bafbbf6bf1" + } + ] +} diff --git a/research/selected-move-old-coded-full/TASK.json b/research/selected-move-old-coded-full/TASK.json new file mode 100644 index 0000000000..f432fe4878 --- /dev/null +++ b/research/selected-move-old-coded-full/TASK.json @@ -0,0 +1,90 @@ +{ + "schema_version": 1, + "task_id": "uniform-transfer-audit", + "priority_revision": 8, + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "original_card": { + "id": "uniform-transfer-audit", + "question": "Can one of the selected record's five inherited assumptions be proved at its actual caller?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "Identify the proposition and what would change downstream; do not equate a finite replay with a universal proof.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose one assumption ID (native_all_columns, owned_erasure, compiler, precision_tape, analytic_recovery), one quantified implication and exact dependency closure. Check current handoffs, including #5625 row reentry and #5707 root-prefix lowering, without treating their partial scope as the whole theorem. Prove or falsify that implication with a caller-bound argument; stop at the chosen obligation. Finite tests or root digits do not discharge an all-size statement.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "native_all_columns", + "owned_erasure", + "compiler", + "precision_tape", + "analytic_recovery" + ], + "existing_checks": [ + { + "scope": "PR #4100: proposed unconditional construction and finite checks, without independent acceptance.", + "evidence": "research/unconditional-batched-crt/README.md", + "remaining": "Independent proof audit of one caller-bound all-size implication; all other premises remain explicit.", + "status": "author-checked", + "source_commit": "337d04939571a637aeab54a0f58f54fde811663a", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "scope": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Construct one literal OLD23/three-bit-coded entrance through the unchanged full selected MOVE24472 core and back, with72 distinct owners, complete direct cost and successful original-owner return under explicit all-prefix/common-root admission.", + "scope_change_reason": "Wave2 closed the central C seam. The new task joins the already existing full six-factor core, without rebuilding monomials or importing endpoint scaling/rounding, and extends admission to pre-right phase negations.", + "bottleneck_link": "The existing complete packed MOVE still required an actual paid old-codec/strided entrance and return. This package supplies that single physical MOVE boundary, not a full caller.", + "budget_minutes": 90, + "stop_rule": "Stop after the exact old-format full MOVE boundary; do not claim source/HOME acquisition, stock/cutoff production, failure retirement, recursive closure or accelerated nonleaf admission.", + "outcome": "completed", + "evidence": "PROOF.md, compose.py, verify.py, SOURCE-PINS.json, ADMISSION-REVIEW.md and independent control receipts", + "result_summary": "Uniform72-tape complete selected MOVE at the old-coded boundary; actual full packets and phase/translation/numerical controls pass, with separate admission/source/static/cost review. No assumption discharge or new kappa.", + "author": "Jerry Chen / @CubeJerry", + "ai_assistance": "Substantial OpenAI ChatGPT assistance in research, implementation, proof, verification and packaging.", + "open_questions": [ + { + "question": "Bind this exact OLD23 service to actual owner415/frame3 occurrence emission, HOME access and frame99 return.", + "why_it_matters": "The current theorem begins at supplied old public owners and origins.", + "first_step": "Pin one real dispatcher occurrence and prove the emitted descriptor, root/grid invariant, physical owners and returned logical frame.", + "blocked_by": "No enclosing occurrence acquisition or frame-ledger update is implemented here." + }, + { + "question": "Provide successful recursion, failure retirement and an admitted nonleaf tariff.", + "why_it_matters": "This complete local MOVE has Theta(f V_old+E) cost and protects public input on precommit failure without retiring dirty private state.", + "first_step": "Choose one precise caller regime and charge recursive children, copies, corridors, restored state and historical unions.", + "blocked_by": "Fast child services and a compatible failure lifecycle are absent." + } + ] +} diff --git a/research/selected-move-old-coded-full/VALIDATION.json b/research/selected-move-old-coded-full/VALIDATION.json new file mode 100644 index 0000000000..5728698b97 --- /dev/null +++ b/research/selected-move-old-coded-full/VALIDATION.json @@ -0,0 +1,117 @@ +{ + "status": "PASS_PRIMARY_AND_INDEPENDENT_NORMAL_OPTIMIZED", + "python": "3.12.14 (main, Aug 25 2026, 14:00:49) [Clang 22.1.3 ]", + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "compose_sha256": "572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c", + "verify_sha256": "11c1114ca87cec00352b1b94f6dd1df9ab8bacc42a92eae4ca5c6c365f70c88d", + "graph_sha256": "5cd132ae9c4234dbd7a0a591186d8506e9ea50658b7c5b0f4d7e0da8e49fc403", + "commands": [ + { + "argv": [ + "python3", + "-I", + "-W", + "error", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/verify.py" + ], + "exit_code": 0, + "elapsed_seconds": null, + "note": "Normal run exit0/stdout observed via PTY session49440; wall duration not recorded.", + "result": "RESULT.json", + "sha256": "ebb38e5be09bd86f7f55247af2e73c9cb233679ec6c9c35cf7c5cb969426d6b1" + }, + { + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-W", + "error", + "-O", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/verify.py" + ], + "exit_code": 0, + "elapsed_seconds": 58.755, + "result": "RESULT-OPTIMIZED.json", + "sha256": "ebb38e5be09bd86f7f55247af2e73c9cb233679ec6c9c35cf7c5cb969426d6b1" + }, + { + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-W", + "error", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/check_admission.py", + "--package", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full" + ], + "exit_code": 0, + "elapsed_seconds": 0.374, + "result": "ADMISSION-NORMAL.txt", + "sha256": "db091d552c4664500f8aeaa7c61ec148b20af8db01768c59845e5b3e8e8e0156" + }, + { + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-W", + "error", + "-O", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/check_admission.py", + "--package", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full" + ], + "exit_code": 0, + "elapsed_seconds": 0.482, + "result": "ADMISSION-OPTIMIZED.txt", + "sha256": "db091d552c4664500f8aeaa7c61ec148b20af8db01768c59845e5b3e8e8e0156" + }, + { + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-W", + "error", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/check_composition.py", + "--package", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full" + ], + "exit_code": 0, + "elapsed_seconds": 0.908, + "result": "COMPOSITION-NORMAL.txt", + "sha256": "3740a90622aff236df5d0ddb276180706d8c99315f4deeb3244fe5db56bb4309" + }, + { + "argv": [ + "/opt/codex/runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-W", + "error", + "-O", + "-B", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full/check_composition.py", + "--package", + "/workspace/scratch/a91d12abea4e/worker-c/wave3/research/selected-move-old-coded-full" + ], + "exit_code": 0, + "elapsed_seconds": 0.833, + "result": "COMPOSITION-OPTIMIZED.txt", + "sha256": "3740a90622aff236df5d0ddb276180706d8c99315f4deeb3244fe5db56bb4309" + } + ], + "independent_review": "PASS: exact source-frame algebra, pre-right root admission, every-instruction translation, ownership/guard seam and full cost inequalities; see ADMISSION-REVIEW.md", + "assumptions_discharged": [], + "new_kappa": false, + "proof_sha256": "4dda913877963bebd0fc61ce04f14a594a78bdd781154d9a92961cd528e830d0", + "independent_review_sha256": "afcefafa6105ac92a237ba34e8b5722d0e1e68678d718ed80b1bc7acebaa74af", + "separate_complete_archive_reextraction": { + "status": "PASS", + "receipt": "ADMISSION-CONTROLS.json", + "sha256": "6449cb0b33ce80395e9dd8e558e63d91eb9e91645b03f5afa575bc118f928433", + "description": "Independent reviewer executed optional --archive against exact selected source; archive bytes are not duplicated here." + } +} diff --git a/research/selected-move-old-coded-full/VERIFY.json b/research/selected-move-old-coded-full/VERIFY.json new file mode 100644 index 0000000000..9e16d2f4d5 --- /dev/null +++ b/research/selected-move-old-coded-full/VERIFY.json @@ -0,0 +1,125 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/selected-move-old-coded-full/inputs/bridge-NOTICE.md", + "research/selected-move-old-coded-full/inputs/bridge-PROOF.md", + "research/selected-move-old-coded-full/inputs/bridge.py", + "research/selected-move-old-coded-full/inputs/core/NOTICE.md", + "research/selected-move-old-coded-full/inputs/core/PROOF.md", + "research/selected-move-old-coded-full/inputs/core/SOURCES.json", + "research/selected-move-old-coded-full/inputs/core/bind_source.py", + "research/selected-move-old-coded-full/inputs/core/move.py", + "research/selected-move-old-coded-full/inputs/core/reference/RECIPE.json", + "research/selected-move-old-coded-full/inputs/core/reference/SOURCE-FRAMES.json", + "research/selected-move-old-coded-full/inputs/core/reference/leaf/NOTICE.md", + "research/selected-move-old-coded-full/inputs/core/reference/leaf/inputs/controller_reference.py", + "research/selected-move-old-coded-full/inputs/core/reference/leaf/leaf.py", + "research/selected-move-old-coded-full/inputs/core/reference/linear/NOTICE.md", + "research/selected-move-old-coded-full/inputs/core/reference/linear/inputs/controller_reference.py", + "research/selected-move-old-coded-full/inputs/core/reference/linear/linear.py", + "research/selected-move-old-coded-full/inputs/core/reference/phase/NOTICE", + "research/selected-move-old-coded-full/inputs/core/reference/phase/inputs/controller_reference.py", + "research/selected-move-old-coded-full/inputs/core/reference/phase/phase.py", + "research/selected-move-old-coded-full/inputs/core/reference/source/clifford_exact.py", + "research/selected-move-old-coded-full/inputs/core/reference/source/native_verify.py", + "research/selected-move-old-coded-full/inputs/core/reference/translation/NOTICE.md", + "research/selected-move-old-coded-full/inputs/core/reference/translation/reference/inputs/controller_reference.py", + "research/selected-move-old-coded-full/inputs/core/reference/translation/reference/reverse.py", + "research/selected-move-old-coded-full/inputs/core/reference/translation/translate.py", + "research/selected-move-old-coded-full/inputs/core/verify.py", + "research/selected-move-old-coded-full/inputs/grid-interface-PROOF.md", + "research/selected-move-old-coded-full/inputs/notices/common-grid-NOTICE.md", + "research/selected-move-old-coded-full/inputs/notices/grid-interface-NOTICE", + "research/selected-move-old-coded-full/inputs/notices/literal-leaf-NOTICE.md", + "research/selected-move-old-coded-full/inputs/notices/old-coded-NOTICE.md", + "research/selected-move-old-coded-full/inputs/notices/selected-NOTICE" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Actual uninterrupted72-tape complete selected MOVE on old-coded packets; direct source-frame old-address oracle, all heads/guards/retirement, numerical/source-factor/cardinality/alias controls and32 source pins." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 180, + "checks": "Actual uninterrupted72-tape complete selected MOVE on old-coded packets; direct source-frame old-address oracle, all heads/guards/retirement, numerical/source-factor/cardinality/alias controls and32 source pins." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/check_admission.py", + "--package", + "{package}" + ], + "timeout_seconds": 30, + "checks": "Independently derived source-frame algebra,512 one-column/four two-column basis cases, phase and C-prefix endpoint obstructions and exact depth controls; compact source witness." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-O", + "-B", + "{package}/check_admission.py", + "--package", + "{package}" + ], + "timeout_seconds": 30, + "checks": "Independently derived source-frame algebra,512 one-column/four two-column basis cases, phase and C-prefix endpoint obstructions and exact depth controls; compact source witness." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/check_composition.py", + "--package", + "{package}" + ], + "timeout_seconds": 30, + "checks": "Independent every-instruction port/symbol/PC translation, all guard owners, continuation mutations and exact complete cost constants; no tape replay." + }, + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-O", + "-B", + "{package}/check_composition.py", + "--package", + "{package}" + ], + "timeout_seconds": 30, + "checks": "Independent every-instruction port/symbol/PC translation, all guard owners, continuation mutations and exact complete cost constants; no tape replay." + } + ] +} diff --git a/research/selected-move-old-coded-full/check_admission.py b/research/selected-move-old-coded-full/check_admission.py new file mode 100644 index 0000000000..9bc8d64997 --- /dev/null +++ b/research/selected-move-old-coded-full/check_admission.py @@ -0,0 +1,177 @@ +"""Independent exact algebra; no retained factor/verifier imports. +Prepared for @CubeJerry with OpenAI assistance. Apache-2.0. +Finite checks corroborate the universal proof in ADMISSION-REVIEW.md. +""" +from fractions import Fraction as F +from hashlib import sha256 +from pathlib import Path +import argparse +import copy +import gzip +import json +ZERO=(F(0),F(0)); ONE=(F(1),F(0)) +def need(ok,message): + if not ok: raise ValueError(message) +def add(x,y): return x[0]+y[0],x[1]+y[1] +def mul(x,y): return x[0]*y[0]-x[1]*y[1],x[0]*y[1]+x[1]*y[0] +def rotate(z,p): + a,b=z + return ((a,b),(-b,a),(-a,-b),(b,-a))[p%4] +def combine(out,key,value): + value=add(out.get(key,ZERO),value) + if value==ZERO: out.pop(key,None) + else: out[key]=value +def linear(rows,vector): + result=[] + for row in rows: + total=0 + for i,value in enumerate(vector): + if row>>i&1: total^=value + result.append(total) + return tuple(result) +def inverse_rows(rows): + # Exhaust fixed nine-bit bijection, independently of source elimination. + inv={} + for x in range(512): + y=sum(((r&x).bit_count()%2)<>i)&1)<>j&1))%4 +def monomial(values,record,f,inverse=False): + result={}; offset=tuple(((record['offset']>>i)&1)*((1<>i)&1)<>i)&1)<>i)&1 for i in range(9) if x>>i&1) + +2*sum((q[i]>>j)&1 for i in range(9) for j in range(i+1,9) + if x>>i&1 and x>>j&1))%4 + return rows,q,value +def native_frame(values,direction,f): + # F([u])=D_Q P_G C_0 P_G^-1 D_Q^*. Diagonal (1+i)/2; + # shifted coefficient ((1-i)/2)*i^(q(x XOR u)-q(x)). + # No lowered recipe/helper is used by this oracle. + _,_,q=frame_quadratic(direction); result=dict(values) + for j in range(f): + out={} + for address,value in result.items(): + x=sum(((a>>j)&1)<>i&1 else 0) for i,a in enumerate(address)) + off=rotate(mul(value,(F(1,2),F(-1,2))),q(x^direction)-q(x)) + combine(out,target,off) + result=out + return result +def integral(values): return all(v.denominator==1 for z in values.values() for v in z) +def symmetric(values,bound): return all(abs(v)<=bound for z in values.values() for v in z) +def serialize(values): + return [{'address':list(k),'real':str(z[0]),'imag':str(z[1])} for k,z in sorted(values.items())] +def audit(package): + raw=(package/'inputs/core/reference/RECIPE.json').read_bytes() + need(sha256(raw).hexdigest()=='96fadb44c3316be93c6c02f50cd2c841a9541d67b98fd94fc47b73fa64dd404c','recipe pin') + record=json.loads(raw); recipe=record['lowered_recipe'] + witness=json.loads((package/'inputs/core/reference/SOURCE-FRAMES.json').read_text()) + need(record['native_event_index']==witness['event_index']==24472,'event index') + need(record['event']==witness['event']==['MOVE',415,3,99,False],'source event') + need(witness['frames']=={'3':[],'99':[239]},'complete source frames') + for x in range(512): + values={tuple((x>>i)&1 for i in range(9)):ONE} + need(lowered_move(values,recipe,1)==native_frame(values,239,1),'source column '+str(x)) + for a in [(0,)*9,(3,)*9,(1,0,2,3,1,0,2,3,1),(2,1,0,3,2,1,0,3,2)]: + need(lowered_move({a:ONE},recipe,2)==native_frame({a:ONE},239,2),'tensor column') + wrong=copy.deepcopy(recipe); wrong['right']['phase']=(wrong['right']['phase']+1)%4 + need(lowered_move({(0,)*9:ONE},wrong,1)!=native_frame({(0,)*9:ONE},239,1),'phase mutation missed') + need(lowered_move({(0,)*9:ONE},recipe,1)!=native_frame({(0,)*9:ONE},238,1),'frame mutation missed') + a=(1,0,0,0,0,0,0,1,0); source={a:(F(-2),F(0))} + need(exponent(recipe['right'],a,1)==2,'phase exponent') + phase_value=rotate(source[a],2); need(phase_value==(F(2),F(0)),'signed negation') + target=native_frame(source,239,1) + need(target==lowered_move(source,recipe,1),'phase witness source binding') + need(integral(target) and symmetric(target,1),'phase witness endpoints') + physical=sum(v<<(8-i) for i,v in enumerate(a)); need(physical==258,'MSB address') + central={(0,)*9:ONE,(3,)+(0,)*8:ONE} + entrance=monomial(central,recipe['right'],2,inverse=True) + need(monomial(entrance,recipe['right'],2)==central,'inverse right') + first=c_axis(central,0); last=c_axis(first,1) + need(not integral(first),'fractional prefix not detected') + need(last=={(1,)+(0,)*8:ONE,(2,)+(0,)*8:ONE},'central endpoint') + endpoint=monomial(last,recipe['left'],2) + need(integral(entrance) and integral(endpoint) and symmetric(entrance,1) and symmetric(endpoint,1),'symmetric integral endpoints') + need(endpoint==native_frame(entrance,239,2),'prefix witness source binding') + depths=0 + for n in range(1,2049): + for t in range((n-1)//356+1): + need((n+1)//2+178*t<=n,'grid depth inequality') + need((n+2)//2+161*t+1<=n+2,'width depth inequality'); depths+=1 + rows,q,_=frame_quadratic(239) + return {'marker':'PASS_FULL_MOVE_ADMISSION_CONTROLS', + 'base':'e54523517d0f03e58352e647c403a5af3e525a57', + 'source_index':24472,'source_event':witness['event'], + 'source_basis_checks':512,'two_column_basis_checks':4, + 'source_chart_rows':rows,'source_quadratic_rows':q, + 'source_oracle':'direct canonical-frame conjugation, no factor imports', + 'phase_overflow':{'f':1,'w':2,'physical_address':physical, + 'native_input':serialize(source),'phase_value':[str(x) for x in phase_value], + 'complete_native_output':serialize(target)}, + 'nonintegral_prefix':{'f':2,'w':2,'native_input':serialize(entrance), + 'central_entrance':serialize(central),'first_prefix':serialize(first), + 'complete_native_output':serialize(endpoint)}, + 'depth_checks':{'n_min':1,'n_max':2048,'pairs':depths,'meaning':'finite corroboration only'}, + 'negative_controls':['changed absolute phase','changed source frame', + 'minimum-signed phase overflow','integral endpoints with nonintegral prefix']} +if __name__=='__main__': + parser=argparse.ArgumentParser(); parser.add_argument('--package',type=Path,required=True) + parser.add_argument('--output',type=Path); parser.add_argument('--archive',type=Path) + args=parser.parse_args() + result=audit(args.package.resolve()) + result['complete_archive_reextracted']=False + if args.archive: + raw=args.archive.read_bytes() + need(len(raw)==350722,'archive length') + need(sha256(raw).hexdigest()=='2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883','archive hash') + word=json.loads(gzip.decompress(raw)) + canonical=json.dumps(word,separators=(',',':'),sort_keys=True).encode() + need(sha256(canonical).hexdigest()=='91429a6b96729292a8764836e00c87a6f7cd3b76f05159033f4867f69a98d097','canonical source hash') + need(word['program'][24472]==result['source_event'],'actual source event') + need(word['frames'][3]==[] and word['frames'][99]==[239],'actual complete frames') + result['complete_archive_reextracted']=True + if args.output: args.output.write_text(json.dumps(result,indent=2,sort_keys=True)+'\n') + print(result['marker']) + print('512 source columns; 4 tensor columns; 2 numerical obstructions; '+str(result['depth_checks']['pairs'])+' bounded depth pairs') diff --git a/research/selected-move-old-coded-full/check_composition.py b/research/selected-move-old-coded-full/check_composition.py new file mode 100644 index 0000000000..7505f6db1f --- /dev/null +++ b/research/selected-move-old-coded-full/check_composition.py @@ -0,0 +1,100 @@ +"""Independent all-instruction translation audit, without tape replay. +Prepared for @CubeJerry with OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from hashlib import sha256 +import argparse +import json +import sys +import types + +def need(ok,label): + if not ok: raise ValueError(label) +def load(path,name): + module=types.ModuleType(name); module.__file__=str(path) + sys.modules[name]=module + exec(compile(path.read_bytes(),str(path),'exec'),module.__dict__) + return module + +def audit(package): + expected_source='572e2c5de3b210ef34ed8f26f51fb1a2a6b4306fc355f93368504ad79308561c' + need(sha256((package/'compose.py').read_bytes()).hexdigest()==expected_source,'join source drift') + compose=load(package/'compose.py','independent_join_audit') + actual,labels=compose.compile_composition() + # Recompile frozen old and core graphs; compare each edge independently + # rather than trusting the constructor's PORT_MAP or SYMBOL objects. + old=load(package/'inputs/bridge.py','independent_bridge_source') + bridge,blabel=old.compile_bridge() + core,alphabet=compose.core_graph() + need(len(bridge)==6003 and len(core)==82813 and len(actual)==88816,'fixed graph sizes') + port=lambda t: 3 if t==0 else 2 if t==1 else t+41 + sym={'_':2,'0':0,'1':1,'|':3}; expected=[] + entries=returns=0; old_private=set(); new_private=set(); core_writes=set() + for instruction in bridge: + if instruction==('H','PACKED'): + expected.append(('J',6003)); entries+=1 + else: expected.append(instruction) + if instruction[0] in ('R','W','M') and instruction[1]>=2: + old_private.add(instruction[1]) + for instruction in core: + op,*a=instruction + if op=='read': translated=('R',port(a[0]),{sym[s]:6003+j for s,j in a[1].items()}) + elif op=='write': + translated=('W',port(a[0]),sym[a[1]]); core_writes.add(port(a[0])) + elif op=='move': + need(a[1] in (-1,1),'unit move'); translated=('M',port(a[0]),a[1]) + elif op=='goto': translated=('J',6003+a[0]) + elif op=='halt': translated=('J',blabel['EXIT']); returns+=1 + else: raise ValueError('nonliteral child instruction') + expected.append(translated) + if op in ('read','write','move') and a[0]>=2: new_private.add(port(a[0])) + need(tuple(expected)==actual,'literal translated graph mismatch') + need(entries==returns==1,'one child call and return') + need(labels['CORE']==6003 and labels['EXIT']==blabel['EXIT'],'call labels') + need(old_private==set(range(2,43)),'all old private owners present') + need(new_private==set(range(43,72)),'exact29 disjoint new private owners') + need(not core_writes.intersection({0,1,3}),'child writes old/context/header') + need(2 in core_writes,'core never commits packed payload') + need(len({port(i) for i in range(31)})==31,'child port alias') + branches=0 + for pc,instruction in enumerate(actual): + if instruction[0]=='R': + need(0<=instruction[1]<72,'read port'); need(set(instruction[2])<=set(sym.values()),'read alphabet') + targets=instruction[2].values(); branches+=len(instruction[2]) + elif instruction[0]=='J': targets=(instruction[1],) + elif instruction[0] in ('W','M'): + need(0<=instruction[1]<72,'write/move port'); targets=() + need(instruction[2] in (sym.values() if instruction[0]=='W' else (-1,1)),'local action') + elif instruction[0]=='H': targets=() + else: raise ValueError('nonlocal graph instruction') + need(all(0<=j unchanged selected MOVE24472 -> OLD23 program. +Prepared for @CubeJerry with OpenAI assistance. Apache-2.0. +""" +from pathlib import Path +from hashlib import sha256 +import json +import sys +import tempfile +import types + +HERE = Path(__file__).resolve().parent +PIN = { + 'inputs/bridge.py': '119b69594a2a33550eec9b6e083db8f496c3fb3d9c1214b6703d687a0a662eba', + 'inputs/core/move.py': '42e4293ab59ffa1c99e0dbbd5fded0833a5d726e1e794f0f263ae9a4686587a5', + 'inputs/core/SOURCES.json': '26d0ef51dda5fa599381f7f31dec4ba3a37f14f63ff9055ad1661dec2d02610c', + 'inputs/core/reference/linear/inputs/controller_reference.py': 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73', +} +CORE_GRAPH = '14f38b15157a9c9cd2828861f6904701a29b1e27507a7e43d60030e1ae4d9238' +TAPES = 72 +BLANK, LEFT = 2, 3 +SYMBOL = {'_': BLANK, '0': 0, '1': 1, '|': LEFT} +PORT_MAP = (3, 2, *range(43, 72)) + + +def authenticate(relative): + raw = (HERE/relative).read_bytes() + if sha256(raw).hexdigest() != PIN[relative]: + raise ValueError('source drift: '+relative) + return raw + + +def load_exact(relative, name): + module = types.ModuleType(name); module.__file__ = str(HERE/relative) + sys.modules[name] = module + exec(compile(authenticate(relative), module.__file__, 'exec'), module.__dict__) + return module + + +def core_graph(): + """Compile authenticated frozen sources with no possible stale cache read.""" + authenticate('inputs/core/SOURCES.json') + old_path = list(sys.path); old_prefix = sys.pycache_prefix + old_write = sys.dont_write_bytecode + old_controller = sys.modules.get('controller_reference') + try: + with tempfile.TemporaryDirectory(prefix='selected-move-source-') as temporary: + absent = Path(temporary)/'required-absent' + if absent.exists(): raise ValueError('source cache prefix must be absent') + sys.pycache_prefix = str(absent); sys.dont_write_bytecode = True + load_exact('inputs/core/reference/linear/inputs/controller_reference.py', 'controller_reference') + core = load_exact('inputs/core/move.py', '_joined_selected_core') + code, alphabet = core.compile_move() + finally: + sys.path[:] = old_path; sys.pycache_prefix = old_prefix + sys.dont_write_bytecode = old_write + if old_controller is None: sys.modules.pop('controller_reference', None) + else: sys.modules['controller_reference'] = old_controller + if sha256(repr(code).encode()).hexdigest() != CORE_GRAPH: + raise ValueError('unchanged selected core graph mismatch') + return code, alphabet + + +def compile_composition(): + """Fixed construction: no runtime shape, value, grid, owner or recipe input.""" + bridge = load_exact('inputs/bridge.py', '_joined_bridge') + old, labels = bridge.compile_bridge() + child, alphabet = core_graph() + if len(old) != 6003 or len(child) != 82813 or set(alphabet) != set(SYMBOL): + raise ValueError('unexpected source graph') + offset = len(old); code = []; joins = successes = 0 + for ins in old: + if ins == ('H','PACKED'): + code.append(('J',offset)); joins += 1 + else: code.append(ins) + for ins in child: + op, *args = ins + if op == 'read': + code.append(('R',PORT_MAP[args[0]],{SYMBOL[s]:offset+dst for s,dst in args[1].items()})) + elif op == 'write': code.append(('W',PORT_MAP[args[0]],SYMBOL[args[1]])) + elif op == 'move': + if args[1] not in (-1,1): raise ValueError('nonunit source move') + code.append(('M',PORT_MAP[args[0]],args[1])) + elif op == 'goto': code.append(('J',offset+args[0])) + elif op == 'halt': + returned = len(code); code.append(('J',labels['EXIT'])); successes += 1 + else: raise ValueError('nonliteral source opcode') + if joins != 1 or successes != 1 or len(set(PORT_MAP)) != 31: + raise ValueError('invalid fixed invocation or return') + return tuple(code), {'ENTER':0,'CORE':offset,'EXIT':labels['EXIT'], + 'CORE_RETURN':returned,'NUM':70} + + +def digest(program): + return sha256(json.dumps(program,separators=(',',':'),sort_keys=True).encode()).hexdigest() + + +class Tape: + """Verifier hardware only. The graph receives scanned symbols/unit moves.""" + def __init__(self, body=(), origin=3, permanent_guard=True): + if origin < 2: + raise ValueError('verifier origin must leave opaque exterior') + self.origin = self.head = origin + self.cells = [BLANK] * origin + list(body) + self.cells[origin - 2] = 7 # Opaque exterior, outside runtime alphabet. + self.cells[origin - 1] = LEFT if permanent_guard else BLANK + self.low = origin + self.high = origin - 1 + self.writes = 0 + def read(self): + self.low = min(self.low, self.head); self.high = max(self.high, self.head) + return self.cells[self.head] if self.head < len(self.cells) else BLANK + def write(self, symbol): + self.writes += 1 + self.low = min(self.low, self.head); self.high = max(self.high, self.head) + if self.head >= len(self.cells): + self.cells.extend([BLANK] * (self.head + 1 - len(self.cells))) + self.cells[self.head] = symbol + def move(self, direction): + if direction not in (-1, 1): + raise ValueError('nonunit move') + self.head += direction + self.low = min(self.low, self.head); self.high = max(self.high, self.head) + if self.head < 0: + raise ValueError('crossed verifier physical boundary') + + +class CPU: + """One uninterrupted local-instruction interpreter; counters are observers.""" + def __init__(self, code, tapes, labels): + if len(tapes) != TAPES or len({id(t) for t in tapes}) != TAPES: + raise ValueError('72 distinct tape owners required') + self.code, self.tapes, self.labels = code, tuple(tapes), labels + self.steps = self.core_entries = self.exit_entries = 0 + self.first_numerator_write = None + def run(self, limit=300_000_000): + pc = 0; code = self.code; tapes = self.tapes + while self.steps < limit: + self.steps += 1 + if pc == self.labels['CORE']: self.core_entries += 1 + if pc == self.labels['CORE_RETURN']: self.exit_entries += 1 + ins = code[pc]; op = ins[0] + if op == 'R': + pc = ins[2].get(tapes[ins[1]].read(), -1) + if pc < 0: return 'REJECT' + elif op == 'W': + if ins[1] == self.labels['NUM'] and ins[2] in (0, 1) and self.first_numerator_write is None: + self.first_numerator_write = pc + tapes[ins[1]].write(ins[2]); pc += 1 + elif op == 'M': tapes[ins[1]].move(ins[2]); pc += 1 + elif op == 'J': pc = ins[1] + elif op == 'H': return ins[1] + else: raise ValueError('nonliteral instruction') + raise TimeoutError('bounded interpreter step cap') diff --git a/research/selected-move-old-coded-full/inputs/bridge-NOTICE.md b/research/selected-move-old-coded-full/inputs/bridge-NOTICE.md new file mode 100644 index 0000000000..8c3beaf115 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/bridge-NOTICE.md @@ -0,0 +1,28 @@ +Selected MOVE complete packed codec and strided transport +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Copyright 2026. Licensed under Apache License 2.0; see LICENSE. + +The new literal instruction graph, runtime guide composition, complete +format/return proof and source-specific tests were prepared for @CubeJerry. +OpenAI assistance contributed to research, implementation, proof, tests +and packaging. Separate model-assisted checks are not human or formal +proof-kernel acceptance. + +Credit CrocSwap/integer-mult-bounds#7578 for the exact semantic packing +permutation, volume obstruction and selected numerical premise; #7429 for +the literal positive packed C provider; #6967 and #6974 for the older coded +leaf/MOVE and exact 23-field/three-bit-coded boundary; and #7000 for the +selected source construction. The wider compiler, Clifford, Gaussian, +precision and tape lineage retains its original authorship. + +In particular retain all original notices in inputs/notices/: +- grid-interface-NOTICE: the predecessor interface package and attribution; +- old-coded-NOTICE.md: current codec and physical monomial/leaf predecessors; +- literal-leaf-NOTICE.md: pending literal positive provider and its lineage; +- common-grid-NOTICE.md: odd scalar/common-root precision predecessors; +- selected-NOTICE: selected shared-native source and compiler/caller lineage. + +Stable partition, positional integer encodings and elementary tape-copy +algorithms are classical. Their general invention, the Gaussian C identity, +the common-root Clifford theorem, existing algebraic tensor closure and +the selected conditional kappa are not claimed as new work here. diff --git a/research/selected-move-old-coded-full/inputs/bridge-PROOF.md b/research/selected-move-old-coded-full/inputs/bridge-PROOF.md new file mode 100644 index 0000000000..b0f7372959 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/bridge-PROOF.md @@ -0,0 +1,426 @@ +# A literal paid bridge from the old coded field to the complete native packet + +This is a source-specific implementation lemma for the `precision_tape` +obligation, at canonical main +`e54523517d0f03e58352e647c403a5af3e525a57`. It answers the payload bridge +left open in #7578, exact head +`e9b6d75397e3553af77bab81d5816e4b8708a501`. It proves no new kappa and does +not discharge any of the five selected assumptions at its full scope. + +The semantic coordinate bijection and the incompatible old/new lengths +were already stated in #7578. The old coded positive leaf #6967 already +has a structured physical implementation. The new result is the explicit +input-independent literal controller for this particular codec and strided +layout boundary, including old header parsing, inverse transport, physical +retirement and a complete direct-service bill. Stable binary partition is a +classical algorithm; no novelty is claimed for that general idea. + +## 1. Exact old and new interfaces + +The source header schema is copied verbatim from the canonical current +provider and checked against it: + +``` +outer, rows, stock, row_bits, within_bits, record_bits, p, d, +K, G, H, q0, qF, qB, D, f, rho, active_start, back_start, +selected_axes, entry_start, remainder, cutoff. +``` + +A nonnegative value uses `1^ell 0` followed by its ell binary digits, +least significant first. Zero has one digit. Every nonzero value has +leading (last written) digit one. The old descriptor is exactly these +twenty-three codes followed by physical blank. Let E be its actual bit +length, including values irrelevant to this bridge. All twenty-three +values are scanned and checked for canonical coding; ignored fields are +not interpreted as arithmetic promises. + +Write + +``` +a = within_bits, u = active_start, +C_rows = outer*rows, g = 9f, +N = C_rows*2^a, L = 2rb. +``` + +The bridge needs `outer, rows, f, K, cutoff > 0`, `0 <= rho < K`, +`u+9fK <= a`, and the complete old row relation +`row_bits = 2^a record_bits`. Each address record has r positive complex +coefficients, each with b>=2 real bits followed by b imaginary bits, +least significant first, and virtual delimiter 2 after each component. +The literal physical codes are 000 for 0, 001 for 1, and 010 for delimiter +2, as in the retained CodedPort. Therefore + +``` +record_bits = 6r(b+1), +V_old = C_rows*2^a*6r(b+1), +V_packed = C_rows*2^a*2rb = N L. +``` + +The bridge's geometric premises are weaker than the complete historical +monomial producer geometry: it does not use G, H, the back reservation or +the hidden row supplier. A caller of the older provider still owes those +additional premises. No permission to reinterpret its source tokens or +owner namespace follows from this local lemma. + +The old numeric width b and coefficient multiplicity r are **not** separate +members of the twenty-three-field header. The controller reads the first +component to its delimiter, counts b physically and returns the old head. +It then divides the encoded `record_bits` exactly by `6(b+1)`. A zero or +nonintegral quotient rejects. Every later component is checked to have +exactly that b and a delimiter, so inference from the first component is +not an unchecked uniformity assumption. The component quantum is external +to both ABIs and is unchanged. + +The output is exactly the supplied ABI of #7429: six positive canonical +Gamma codes `(f,r,P,S,b,cutoff)`, where + +``` +P = C_rows*2^u, S = 2^(a-u-9f), +DATA = [P] x [2^f]^9 x [S], with r Gaussian coefficients per address. +``` + +Its components are signed MSB-first b-bit words, with no delimiters or +three-bit code expansion. Gamma is `0^(ell-1)` followed by the MSB-first +binary value, exactly as in the literal leaf's checker. The literal graph +preserves cutoff in binary: a cutoff of enormous numerical value costs +its encoded length, not its value. The bridge does not itself execute +the provider's f<=cutoff test; the same supplied cutoff reaches it. + +## 2. The actual literal controller + +`compile_bridge()` takes no runtime argument and produces 6,003 locations +on 43 fixed tapes. Instructions are only a scanned-symbol branch, a write +of one fixed symbol, a one-cell move, a fixed jump, or a halt. The alphabet +is `{blank,0,1,LEFT}`. LEFT is the common finite-alphabet renaming of the +old physical left guard and the literal provider's local guard; numeric +delimiter 2 is still the three physical bits 010, never a physical guard. +For a joint hardware table the two fixed marker names are relabelled once +at compilation to that hardware's blank/LEFT symbols. This is a fixed +injective change of instruction labels, not a runtime rewriting of public +markers or a conversion of numerical codeword 010. +No address, width, stride, payload value, list length or Python integer +selects a runtime instruction. Python arrays and numerical positions +exist only in the checker hardware and independent fixtures. + +The finite subroutine macros in Builder are expanded at compilation. There +is no runtime call stack or unbounded inventory of registers. Literal +branches check the relevant symbolic invariants. A missing branch is an +explicit rejection. This contribution exports the complete finite table +by deterministic compilation from its small source; its digest is recorded +in the verification receipt. + +The two original public tapes are OLD and CONTEXT. PACK and GAMMA are a +new supplied service bank and its header. All remaining tapes are private +counter, staging and shuttle banks. They enter at their local origins with +LEFT immediately before each origin, and physically blank bodies through +the stated capacity. Genuinely disjoint physical segments and the supply +of these guards/windows are premises. Object-identity alias checks in the +reference binder reject an obvious alias; they do not prove disjointness +of arbitrary external wrappers. + +The parser reads all old header codes. It retains the used scalar values +as unary guides and cutoff as a binary word. It checks positivity, the +selected-position bounds, the exact row size and the recovered r. It +constructs the six Gamma values, converts every old component into its +MSB-first word, and checks the exact old data frontier. Conversion uses +one component tape, reverses that tape physically, and erases it before +the next component. Both original heads return to their origins; OLD +has not been written. The complete unsigned bit pattern is preserved, +including the most-negative signed word. No arithmetic rounding occurs. + +## 3. All 9f selected positions and the stable-partition invariant + +Number within-row bits from the left, beginning at zero. The old selected +position at native slot i and column j is + +``` +p_(i,j) = u+(if+j)K+rho, 0<=i<9, 0<=j= K`; `a-u-k-1 >= 1`; and the guides have the displayed powers +of two. No guide is updated after the last pass. The first actual native +service therefore sees the complete Gamma packet and DATA at their origins. +The bridge keeps its final guides while the service runs; the service may +not access them or reuse their owners. + +For return, start with the last guide values. Within each prefix, copy +HALF consecutive bits to ZERO and then HALF to ONE; replay CHUNKS pairs +of RUN bits from those banks, interleaving them into the next full bank +and erasing the consumed buffers. This is exactly the inverse rotation. +The reverse updates are + +``` +PREFIX <- PREFIX/2, HALF <- 2 HALF, +RUN <- RUN*2^K, CHUNKS <- CHUNKS/2^(K-1). +``` + +They are applied only before another reverse pass. In reverse pass k>=1, +PREFIX is even and `m_k >= K-1`, so the divisions are exact. The original +order is restored by induction down to k=0. No reverse routing table or +input-size family of tapes is materialized. + +## 5. Successful return, retirement and ownership + +Suppose the packed service returns the same complete b-bit format and +length at the original PACK/GAMMA heads, preserves GAMMA and all bridge +private tapes, and restores its own distinct private owners. Its numerical +action may be any function on those packed words; codec correctness is a +bitwise statement and needs no independence of input coefficients. + +After inverse routing, the controller creates the complete old-format +image on STAGE: it physically reverses each b-bit component, emits its +three-bit digit codes and restores the delimiter. It checks the complete +packed frontier. Only then does a linear successful commit replace OLD +with the same number of physical bits. CONTEXT is never written. Every +bridge-owned body is erased and every head returns to its initial relative +origin. The LEFT markers and exterior symbols remain unchanged. + +OLD is a protected backup through the entire forward codec, service and +inverse preparation. PACK is a paid temporary representation, with no new +productive-target credit. Parent and child owners are distinct physical +segments; the theorem does not infer that equal values or equal frames +permit aliasing. This construction supplies a local transfer/return +service; it does not establish the enclosing compiler's ownership naming +or allocation contract. + +On the explicitly exercised malformed entrances, rejection precedes any +OLD write. General malformed-input retirement, interrupted computation, +corrupt service returns and failure cleanup of #7429 remain outside this +successful-call theorem. In particular a numerical rejection by a child +whose failure contract does not restore its banks cannot be promoted to a +successful full owned return. The #7578 common-root numerical premise is +one separate way to guarantee that the actual positive child succeeds. + +## 6. Complete uniform time and backing bounds + +Count every R/W/M/J/H transition, including tests and jumps. The following +coarse constants are obtained directly by counting the emitted loop bodies: + +| Macro | Sufficient charged form | +|---|---| +| Copy, erase or rewind an ell-cell word | `16(ell+1)` transitions | +| Unary doubling or halving with cleanup | `128(ell+1)` | +| Canonical binary-to-unary conversion of v | `1024(v+encoded_length+1)` | +| Unary x-by-y product, all head returns | `128(xy+x+y+1)` | +| Unary-to-binary and one Gamma output | `256(v+1)` | +| One complete routing pass, including copies, retirement and guide updates | `8192(V_packed+1)` | + +Here ell includes the span actually crossed on a return from a formerly +occupied, now-erased word. Erasing a buffer does not make its head's +physical return distance zero. + +For binary-to-unary conversion, strict binary prefixes sum to less than +the final positive value; the sole zero word is handled separately. For +unary-to-binary conversion, an increment changes its trailing ones and +the next bit, then physically returns. The total trailing-one count over +v increments is less than v, so this is linear rather than v log v. + +All nine unary-expanded old shape values are at most V_old on legal input. +For example `row_bits <= V_old`, `record_bits <= V_old`, +`K,u,9f <= a <= 2^a`, and outer and rows are at most C_rows. Products +constructed during preparation are either at most a or at most V_old. +The gK product is bounded by a-u. The row-size product is checked against +the supplied row_bits. Prefix counts, N, all shuttles and every unary +run/half/chunk guide are bounded by V_old. The unused header fields and +cutoff are scanned/copied in their encoded lengths and never unary-expanded. + +In each routing pass the total number of payload bits copied to the two +half buffers is V_packed. Buffer readback, full-bank retirement, full-bank +replacement and all rewinds are linear in the same volume. The numbers of +prefixes and runs are also bounded by V_packed because every run contains +at least one bit. The geometric update sums in section 4 and K<=a<=V_old +cover the runtime counter work. Preparation and the two codec sweeps cost +O(V_old+E), and there are exactly 2g routing passes. + +A conservative explicit whole-bridge envelope, deliberately much larger +than the preceding macro totals, is + +``` +T_bridge <= 2^20 ((9f+1)V_old + E + 1), +K_after <= K_entry + 64(V_old + E + 1). +``` + +The order of this particular controller is also necessary. Each of its +2g routing passes erases all V_packed cells of PACK and writes all of them +back from OUT. These alone are 4g V_packed=36f V_packed writes. Since +`V_packed/V_old=b/(3(b+1))>=2/9` for b>=2, there are at least 8f V_old +PACK writes. The E old header reads are distinct additional transitions. +Thus `T_bridge>=8f V_old+E`, and this controller has +**Theta(f V_old+E)** complete time. This is a lower bound for this graph, +not for every possible packing algorithm. + +The second line counts the union of newly visited cells of all 41 private +tapes; each body has at most V_old+E+1 cells. Erasure does not subtract any +earlier history. K_entry retains every previous extent, including public +owners, suspended ancestors and old private high-water regions. The supplied +relative windows must cover these new extents; supplying those windows is +an explicit allocation premise. No ancestor sweep or absolute-origin access +is hidden in a rewind, which stops at its own LEFT guard. + +For the Gamma bank specifically, g>=9 implies N>=512, +P<=N/512 and S<=N/512. Since b>=2 and r>=1, V_old>=18N, +and b,r,f are also bounded by the corresponding positive payload factors. +Using `length(Gamma(v))<=2v` for the five non-cutoff fields gives a total +less than V_old; the cutoff Gamma is shorter than its own old header code. +Thus the claimed per-bank V_old+E+1 cap also covers Gamma, rather than +assuming every output header is only as long as the original header. + +The bound is for legal promised shapes, not a guarantee that malicious +enormous inconsistent header values are rejected within the valid-data bill. +This distinction is immaterial to the successful selected-occurrence theorem +but relevant when interpreting rejection tests as more than fault detection. + +## 7. Source-relative central-service corollary and remaining obligations + +The six generated values and complete data word meet precisely the packed +entrance required by #7429. In the selected event 24472 application of +#7578, use `b=p+h+2n+3`, the same common quantum, complete spectators and +f<=cutoff. Its complete-root Clifford-prefix argument supplies every +numerical integrality/width premise of the literal positive child. Its +local bill remains + +``` +T_C <= 65536(f V_packed + E_Gamma + 1), +K_C_after <= K_C_entry + 64(V_packed + E_Gamma + 1). +``` + +Using PACK/GAMMA as its two public ports and 27 additional genuinely +distinct private owners gives a 70-tape direct central-service composition. +The honest combined successful invoice is `T_bridge + T_C`; both historical +backing allowances are retained. The old-to-new length ratio +`3(b+1)/b > 3` remains exactly the predecessor's calculation. The physical +codec now pays for it; no header-only substitution is asserted. + +This supplies a literal **direct/leaf-order** upper tariff O(f V_old+E), +uniformly in the complete valid old format. It does not produce the faster +nonleaf recurrence used by the selected conditional theorem. It does not +execute the right or left monomial, connect a HOME packet wrapper, prove +enclosing cutoff/stock/owner admission, or validate analytic recovery. +The exact source token and full selected compiler still need an admitted +dispatcher. All five global assumptions remain, and the selected conditional +bound remains kappa=0.00363005817. + +More sharply, the preceding lower bound excludes using this unchanged +graph as a uniform `O(V_old f^(1-kappa)+E)` nonleaf service for kappa>0 +on valid unbounded-f families with negligible descriptor term. For example +the bridge domain permits `a=9f,u=rho=0,K=r=1,b=2,outer=rows=1,cutoff=f`, +where E=O(f) and V_old=18*2^(9f). This is a scoped obstruction to this +direct controller's rate, not a restriction on a different representation, +ordinary supplier, changed caller or the selected conditional theorem. +In particular the selected tariff also has logarithmic precision factors; +this pure-power comparison does not exclude that full tariff without a +separate cofinal relation between f and precision p. Bounded leaf f gives +no contradiction to an accelerated asymptotic caller. + +## 8. What the finite checks establish + +The primary checker executes the actual fixed table on four complete +nine-slot f=1 packets. It independently reconstructs the bit-index +permutation, six Gamma values, component reversal, same-owner return, +private retirement and relative head positions. One packet has the old +reservation-compatible geometry a=12,u=2,K=1; another infers r=2,b=3 and +retains a 201-bit cutoff; another uses b=22. Two tests replace the packed +words with a supplied same-width function to distinguish correct inverse +transport from merely undoing untouched data. That supplied function is a +codec fixture, not an executed native C service. + +Five extracted shuffle subprogram tests exercise nontrivial K=2/3, rho>0, +multiple prefixes/rows and different record widths against direct indexing. +They execute the same literal macro on small general rotation geometries; +they are not complete nine-slot f>1 or K>1 packets. The universal statement +rests on sections 3-6. Such complete packets are exponentially larger and +are explicitly unrun. Wrong-position/global-prefix controls, exact-length +and source-code controls, and alias binding distinguish the main seams. +Separate review must assess the proof and physical program, rather than +calling the author's own replay an independent proof. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +The retained source authors and originating PRs are credited in NOTICE.md. +No independent human review or formal proof-kernel acceptance is claimed. diff --git a/research/selected-move-old-coded-full/inputs/bridge.py b/research/selected-move-old-coded-full/inputs/bridge.py new file mode 100644 index 0000000000..68701de074 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/bridge.py @@ -0,0 +1,328 @@ +"""Input-independent literal tape bridge. Prepared for @CubeJerry with OpenAI assistance. Apache-2.0.""" +from dataclasses import dataclass +from hashlib import sha256 +import json + +BLANK, LEFT = 2, 3 +SCHEMA = ('outer','rows','stock','row_bits','within_bits','record_bits','p','d', + 'K','G','H','q0','qF','qB','D','f','rho','active_start','back_start', + 'selected_axes','entry_start','remainder','cutoff') +NAMES = ('OLD','CONTEXT','PACK','GAMMA','OUT','ZERO','ONE','STAGE','COMP','BIN', + 'LEN','TMP','TMP2','CUTOFF','OUTER','ROWS','ROWCLAIM','A','REC','F','K', + 'RHO','U','W','DEN','R','R2','G','GK','END','KM1','CROWS','N','L', + 'ROWEXPECTED','BASEP','S','EXP','HALF','RUN','CHUNKS','PREFIX','ONECOUNT') +PORT = {name:i for i,name in enumerate(NAMES)} + + +class Builder: + def __init__(self): + self.code=[]; self.labels={}; self.serial=0 + def fresh(self,stem='q'): + self.serial+=1; return stem+str(self.serial) + def label(self,name): + if name in self.labels: raise ValueError('duplicate label') + self.labels[name]=len(self.code) + def r(self,t,branches): self.code.append(('R',PORT[t],branches)) + def w(self,t,v): self.code.append(('W',PORT[t],v)) + def m(self,t,d): self.code.append(('M',PORT[t],d)) + def j(self,q): self.code.append(('J',q)) + def halt(self,status): self.code.append(('H',status)) + def expect(self,t,v): + q=self.fresh(); self.r(t,{v:q}); self.label(q) + def rewind(self,t): + q=self.fresh(); done=self.fresh(); step=self.fresh() + self.m(t,-1); self.label(q); self.r(t,{LEFT:done,BLANK:step,0:step,1:step}) + self.label(step); self.m(t,-1); self.j(q); self.label(done); self.m(t,1) + def end(self,t): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(t,{0:step,1:step,BLANK:done}) + self.label(step); self.m(t,1); self.j(q); self.label(done) + def clear(self,t): + self.rewind(t); q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(t,{0:step,1:step,BLANK:done}) + self.label(step); self.w(t,BLANK); self.m(t,1); self.j(q) + self.label(done); self.rewind(t) + def append_one(self,t): + self.end(t); self.w(t,1); self.m(t,1); self.rewind(t) + def positive(self,t): self.expect(t,1) + def copy(self,src,dst,erase=False): + q=self.fresh(); done=self.fresh(); z=self.fresh(); o=self.fresh() + self.label(q); self.r(src,{0:z,1:o,BLANK:done}) + for bit,target in ((0,z),(1,o)): + self.label(target); self.w(dst,bit) + if erase:self.w(src,BLANK) + self.m(src,1); self.m(dst,1); self.j(q) + self.label(done) + def copy_reset(self,src,dst): + self.copy(src,dst); self.rewind(src) + def equal(self,x,y): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(x,{1:step,BLANK:done}) + self.label(step); self.expect(y,1); self.m(x,1); self.m(y,1); self.j(q) + self.label(done); self.expect(y,BLANK); self.rewind(x); self.rewind(y) + def less(self,x,y,strict=False): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(x,{1:step,BLANK:done}) + self.label(step); self.expect(y,1); self.m(x,1); self.m(y,1); self.j(q) + self.label(done) + if strict:self.expect(y,1) + self.rewind(x); self.rewind(y) + def sub(self,x,y,z): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(y,{1:step,BLANK:done}) + self.label(step); self.expect(x,1); self.m(x,1); self.m(y,1); self.j(q) + self.label(done); self.copy(x,z); self.rewind(x); self.rewind(y); self.rewind(z) + def sum(self,x,y,z): + self.copy_reset(x,z); self.copy_reset(y,z); self.rewind(z) + def multiply(self,x,y,z): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(y,{1:step,BLANK:done}) + self.label(step); self.copy_reset(x,z); self.m(y,1); self.j(q) + self.label(done); self.rewind(y); self.rewind(z) + def scale(self,x,k,z): + for _ in range(k):self.copy_reset(x,z) + self.rewind(z) + def double(self,x): + self.copy_reset(x,'TMP'); self.rewind('TMP'); self.end(x) + self.copy_reset('TMP',x); self.clear('TMP'); self.rewind(x) + def halve(self,x): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(x,{1:step,BLANK:done}) + self.label(step); self.m(x,1); self.expect(x,1); self.m(x,1) + self.w('TMP',1); self.m('TMP',1); self.j(q) + self.label(done); self.clear(x); self.rewind('TMP') + self.copy('TMP',x,erase=True); self.rewind('TMP'); self.rewind(x) + def repeat_shift(self,x,n,up=True): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(n,{1:step,BLANK:done}); self.label(step) + (self.double if up else self.halve)(x) + self.m(n,1); self.j(q); self.label(done); self.rewind(n) + def unary(self,binary,target): + self.end(binary); self.m(binary,-1) + q=self.fresh(); z=self.fresh(); o=self.fresh(); done=self.fresh(); common=self.fresh() + self.label(q); self.r(binary,{0:z,1:o,LEFT:done}) + self.label(z); self.double(target); self.j(common) + self.label(o); self.double(target); self.append_one(target) + self.label(common); self.m(binary,-1); self.j(q) + self.label(done); self.m(binary,1) + def binary(self,unary,target='BIN'): + q=self.fresh(); step=self.fresh(); done=self.fresh() + carry=self.fresh(); zero=self.fresh(); one=self.fresh(); incremented=self.fresh() + self.label(q); self.r(unary,{1:step,BLANK:done}); self.label(step) + self.label(carry); self.r(target,{0:zero,BLANK:zero,1:one}) + self.label(one); self.w(target,0); self.m(target,1); self.j(carry) + self.label(zero); self.w(target,1); self.j(incremented) + self.label(incremented); self.rewind(target); self.m(unary,1); self.j(q) + self.label(done); self.rewind(unary) + def positive_binary(self,t): + self.end(t); self.m(t,-1); self.expect(t,1); self.rewind(t) + def gamma_binary(self,binary): + self.positive_binary(binary) + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r(binary,{0:step,1:step,BLANK:done}) + self.label(step); self.w('LEN',1); self.m('LEN',1); self.m(binary,1); self.j(q) + self.label(done); self.rewind('LEN'); self.m('LEN',1) + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r('LEN',{1:step,BLANK:done}) + self.label(step); self.w('GAMMA',0); self.m('GAMMA',1); self.m('LEN',1); self.j(q) + self.label(done); self.m(binary,-1) + q=self.fresh(); z=self.fresh(); o=self.fresh(); done=self.fresh() + self.label(q); self.r(binary,{0:z,1:o,LEFT:done}) + for bit,label in ((0,z),(1,o)): + self.label(label); self.w('GAMMA',bit); self.m('GAMMA',1); self.m(binary,-1); self.j(q) + self.label(done); self.m(binary,1); self.clear('LEN') + def gamma(self,unary): + self.binary(unary); self.gamma_binary('BIN'); self.clear('BIN') + def take(self,src,dst,guide,erase=False): + q=self.fresh(); step=self.fresh(); done=self.fresh(); z=self.fresh(); o=self.fresh() + self.label(q); self.r(guide,{1:step,BLANK:done}); self.label(step); self.r(src,{0:z,1:o}) + for bit,label in ((0,z),(1,o)): + self.label(label); self.w(dst,bit) + if erase:self.w(src,BLANK) + self.m(src,1); self.m(dst,1); self.m(guide,1); self.j(q) + self.label(done); self.rewind(guide) + def parse(self,target): + q=self.fresh(); step=self.fresh(); done=self.fresh() + self.label(q); self.r('CONTEXT',{1:step,0:done}) + self.label(step); self.w('LEN',1); self.m('LEN',1); self.m('CONTEXT',1); self.j(q) + self.label(done); self.m('CONTEXT',1); self.rewind('LEN'); self.positive('LEN') + self.take('CONTEXT','BIN','LEN'); self.m('BIN',-1) + good=self.fresh(); lastzero=self.fresh() + self.r('BIN',{1:good,0:lastzero}); self.label(lastzero) + self.m('BIN',-1); self.expect('BIN',LEFT); self.m('BIN',1); self.j(good) + self.label(good); self.rewind('BIN'); self.clear('LEN') + if target=='CUTOFF': + self.positive_binary('BIN'); self.copy_reset('BIN','CUTOFF'); self.rewind('CUTOFF') + elif target is not None:self.unary('BIN',target) + self.clear('BIN') + def codeword(self,zero,one,delimiter): + self.expect('OLD',0); self.m('OLD',1) + q0=self.fresh(); q1=self.fresh(); self.r('OLD',{0:q0,1:q1}) + self.label(q0); self.m('OLD',1) + z=self.fresh(); o=self.fresh(); self.r('OLD',{0:z,1:o}) + self.label(z); self.m('OLD',1); self.j(zero) + self.label(o); self.m('OLD',1); self.j(one) + self.label(q1); self.m('OLD',1); self.expect('OLD',0); self.m('OLD',1); self.j(delimiter) + def infer_width(self): + q=self.fresh(); bit=self.fresh(); done=self.fresh() + self.label(q); self.codeword(bit,bit,done) + self.label(bit); self.w('W',1); self.m('W',1); self.j(q) + self.label(done); self.rewind('W'); self.positive('W'); self.m('W',1) + self.positive('W'); self.rewind('W'); self.rewind('OLD') + def quotient(self,x,y,z): + q=self.fresh(); step=self.fresh(); inner=self.fresh(); take=self.fresh(); complete=self.fresh(); done=self.fresh() + self.label(q); self.r(x,{1:step,BLANK:done}); self.label(step) + self.label(inner); self.r(y,{1:take,BLANK:complete}) + self.label(take); self.expect(x,1); self.m(x,1); self.m(y,1); self.j(inner) + self.label(complete); self.w(z,1); self.m(z,1); self.rewind(y); self.j(q) + self.label(done); self.rewind(x); self.rewind(z); self.positive(z) + def decode(self): + outer=self.fresh(); record=self.fresh(); end=self.fresh(); comps=self.fresh(); component=self.fresh(); next_record=self.fresh() + self.label(outer); self.r('N',{1:record,BLANK:end}); self.label(record) + self.label(comps); self.r('R2',{1:component,BLANK:next_record}); self.label(component) + bits=self.fresh(); take=self.fresh(); delimiter=self.fresh(); z=self.fresh(); o=self.fresh(); wrong=self.fresh(); decoded=self.fresh() + self.label(bits); self.r('W',{1:take,BLANK:delimiter}); self.label(take) + self.codeword(z,o,wrong) + for bit,label in ((0,z),(1,o)): + self.label(label); self.w('COMP',bit); self.m('COMP',1); self.m('W',1); self.j(bits) + self.label(wrong); self.halt('REJECT') + self.label(delimiter); self.codeword(wrong,wrong,decoded); self.label(decoded) + self.reverse_component('COMP','PACK'); self.rewind('W'); self.m('R2',1); self.j(comps) + self.label(next_record); self.rewind('R2'); self.m('N',1); self.j(outer) + self.label(end); self.expect('OLD',BLANK); self.rewind('OLD'); self.rewind('N'); self.rewind('PACK') + def reverse_component(self,src,dst,coded=False): + self.m(src,-1); q=self.fresh(); z=self.fresh(); o=self.fresh(); done=self.fresh() + self.label(q); self.r(src,{0:z,1:o,LEFT:done}) + for bit,label in ((0,z),(1,o)): + self.label(label) + if coded: + self.w(dst,0); self.m(dst,1); self.w(dst,0); self.m(dst,1) + self.w(dst,bit); self.m(dst,1); self.w(src,BLANK); self.m(src,-1); self.j(q) + self.label(done); self.m(src,1) + if coded: + for bit in (0,1,0):self.w(dst,bit); self.m(dst,1) + def encode(self): + outer=self.fresh(); record=self.fresh(); end=self.fresh(); comps=self.fresh(); component=self.fresh(); next_record=self.fresh() + self.label(outer); self.r('N',{1:record,BLANK:end}); self.label(record) + self.label(comps); self.r('R2',{1:component,BLANK:next_record}); self.label(component) + self.take('PACK','COMP','W'); self.reverse_component('COMP','STAGE',coded=True) + self.m('R2',1); self.j(comps) + self.label(next_record); self.rewind('R2'); self.m('N',1); self.j(outer) + self.label(end); self.expect('PACK',BLANK); self.rewind('PACK'); self.rewind('N'); self.rewind('STAGE') + def partition(self,inverse=False): + outer=self.fresh(); block=self.fresh(); end=self.fresh(); inner=self.fresh(); run=self.fresh(); block_done=self.fresh() + self.label(outer); self.r('PREFIX',{1:block,BLANK:end}); self.label(block) + if inverse: + self.take('PACK','ZERO','HALF'); self.take('PACK','ONE','HALF'); self.rewind('ZERO'); self.rewind('ONE') + self.label(inner); self.r('CHUNKS',{1:run,BLANK:block_done}); self.label(run) + if inverse: + self.take('ZERO','OUT','RUN',erase=True); self.take('ONE','OUT','RUN',erase=True) + else: + self.take('PACK','ZERO','RUN'); self.take('PACK','ONE','RUN') + self.m('CHUNKS',1); self.j(inner); self.label(block_done); self.rewind('CHUNKS') + if not inverse: + self.rewind('ZERO'); self.rewind('ONE'); self.copy('ZERO','OUT',erase=True); self.copy('ONE','OUT',erase=True) + self.rewind('ZERO'); self.rewind('ONE'); self.m('PREFIX',1); self.j(outer) + self.label(end); self.expect('PACK',BLANK); self.clear('PACK'); self.rewind('OUT') + self.copy('OUT','PACK',erase=True); self.rewind('OUT'); self.rewind('PACK'); self.rewind('PREFIX') + def shuffle(self,inverse=False): + q=self.fresh(); step=self.fresh(); update=self.fresh(); done=self.fresh() + self.label(q); self.r('G',{1:step,BLANK:done}); self.label(step); self.partition(inverse) + self.m('G',1); self.r('G',{1:update,BLANK:done}); self.label(update) + if inverse: + self.halve('PREFIX'); self.double('HALF'); self.repeat_shift('RUN','K',True); self.repeat_shift('CHUNKS','KM1',False) + else: + self.double('PREFIX'); self.halve('HALF'); self.repeat_shift('RUN','K',False); self.repeat_shift('CHUNKS','KM1',True) + self.j(q); self.label(done); self.rewind('G') + def finish(self): + out=[] + for ins in self.code: + if ins[0]=='R':out.append(('R',ins[1],{s:self.labels[q] for s,q in ins[2].items()})) + elif ins[0]=='J':out.append(('J',self.labels[ins[1]])) + else:out.append(ins) + return tuple(out),dict(self.labels) + + +def compile_bridge(): + b=Builder(); b.label('ENTER') + kept={'outer':'OUTER','rows':'ROWS','row_bits':'ROWCLAIM','within_bits':'A', + 'record_bits':'REC','f':'F','K':'K','rho':'RHO','active_start':'U','cutoff':'CUTOFF'} + for name in SCHEMA:b.parse(kept.get(name)) + b.expect('CONTEXT',BLANK); b.rewind('CONTEXT') + for t in ('OUTER','ROWS','ROWCLAIM','REC','F','K'):b.positive(t) + b.w('ONECOUNT',1); b.scale('F',9,'G'); b.multiply('G','K','GK'); b.sum('U','GK','END'); b.less('END','A'); b.less('RHO','K',True) + b.sub('K','ONECOUNT','KM1'); b.infer_width() + b.sum('W','ONECOUNT','TMP2'); b.scale('TMP2',6,'DEN'); b.clear('TMP2'); b.quotient('REC','DEN','R'); b.scale('R',2,'R2') + b.copy_reset('REC','ROWEXPECTED'); b.rewind('ROWEXPECTED'); b.repeat_shift('ROWEXPECTED','A'); b.equal('ROWEXPECTED','ROWCLAIM') + b.multiply('OUTER','ROWS','CROWS'); b.copy_reset('CROWS','N'); b.rewind('N'); b.repeat_shift('N','A') + b.multiply('W','R2','L'); b.copy_reset('CROWS','BASEP'); b.rewind('BASEP'); b.repeat_shift('BASEP','U') + b.sub('A','U','TMP2'); b.sub('TMP2','G','EXP'); b.clear('TMP2'); b.w('S',1); b.repeat_shift('S','EXP'); b.clear('EXP') + b.copy_reset('BASEP','PREFIX'); b.rewind('PREFIX') + b.sub('A','U','TMP2'); b.sub('TMP2','ONECOUNT','EXP'); b.clear('TMP2') + b.copy_reset('L','HALF'); b.rewind('HALF'); b.repeat_shift('HALF','EXP'); b.clear('EXP') + b.copy_reset('HALF','RUN'); b.rewind('RUN'); b.repeat_shift('RUN','RHO',False) + b.w('CHUNKS',1); b.repeat_shift('CHUNKS','RHO') + for t in ('F','R','BASEP','S','W'):b.gamma(t) + b.gamma_binary('CUTOFF'); b.rewind('GAMMA') + b.decode(); b.shuffle(); b.halt('PACKED') + b.label('EXIT'); b.shuffle(inverse=True); b.encode() + q=b.fresh(); z=b.fresh(); o=b.fresh(); done=b.fresh() + b.label(q); b.r('STAGE',{0:z,1:o,BLANK:done}) + for bit,label in ((0,z),(1,o)): + b.label(label); valid=b.fresh(); b.r('OLD',{0:valid,1:valid}); b.label(valid) + b.w('OLD',bit); b.m('OLD',1); b.m('STAGE',1); b.j(q) + b.label(done); b.expect('OLD',BLANK); b.rewind('OLD'); b.rewind('STAGE') + for t in NAMES[2:]:b.clear(t) + b.halt('DONE'); return b.finish() + + +@dataclass +class Tape: + """Checker hardware; runtime only receives read/write/unit move.""" + cells:list + head:int=1 + high:int=1 + low:int=0 + reads:int=0 + writes:int=0 + moves:int=0 + @classmethod + def supplied(cls,bits=(),origin=1): + if origin<1:raise ValueError('fixture origin') + values=[BLANK]*(origin-1)+[LEFT]+list(bits) + return cls(values,origin,len(values),origin-1) + def read(self): + self.reads+=1 + return self.cells[self.head] if self.head=len(self.cells):self.cells.extend([BLANK]*(self.head+1-len(self.cells))) + self.cells[self.head]=v; self.high=max(self.high,self.head+1) + def move(self,d): + if d not in (-1,1):raise ValueError('nonunit move') + self.moves+=1; self.head+=d; self.low=min(self.low,self.head) + if self.head<0:raise ValueError('crossed physical boundary') + + +class CPU: + def __init__(self,program,tapes): + if len(tapes)!=len(NAMES) or len({id(t) for t in tapes})!=len(tapes): + raise ValueError('genuinely distinct physical owners required') + self.program=program; self.tapes=tuple(tapes); self.steps=0 + def run(self,entry=0,limit=100_000_000): + pc=entry; code=self.program; tapes=self.tapes + while self.steps=2`, and every +complete legal entry described below, if `f<=cutoff` and the numerical +condition in section 4 holds, `compile_move()` is a single fixed local tape +program that replaces the original public DATA by the exact source MOVE +tensorized over all f columns, preserves every complete spectator and +coefficient address, returns all 31 heads, and restores every private +body/guard and opaque exterior. It uses 82,813 locations, 31 fixed tapes, +the four symbols `{blank,0,1,|}`, and only read, write, unit move, fixed goto +and halt. There is no runtime child callback, integer oracle, supplied stride, +replacement owner, or omitted Fourier axis. + +With `N=P S r 2^(9f)`, `V=2Nw`, and E the actual length of the first six Gamma +codes, its complete successful cost and historical backing satisfy + +`T <= 2^24 (fV+E+1)`, + +`K_final <= K_entry + 1024 (V+E+1)`. + +K_entry includes the actual earlier history of all 31 owners, public inputs +and opaque regions. Erasure never releases that history. These are loose +direct-reference bounds. This is **O(fV+E)**, not a recursive selected-rate +supplier. At a fixed compiler base-case cutoff q, accepted calls have f<=q +and the local bill is O_q(V+E). This theorem supplies neither a nonleaf +recurrence nor an `f^sigma` tariff. All five selected framework assumptions +remain; there is no new kappa or multiplier theorem. + +## 2. Supplied complete physical entry + +HEADER is a distinct public owner containing six positive canonical binary +Gamma codes in the exact order `f,r,P,S,w,cutoff`. The first five agree with +#7426/#7428/#7430. Those modules consume only those five codes and preserve +the opaque sixth and all following symbols. #7429 consumes six codes and +preserves the following opaque tail. DATA is exactly the lexicographic +packed array `[P] x [2^f]^9 x [S]`, with r Gaussian coefficients per address +and w two's-complement MSB-first bits for each real then imaginary component, +followed by a blank. Every coefficient has the same fixed common grid; the +program changes neither that grid nor its interpretation. The first native +coordinate a0 is the slow selected block. + +Supply 29 genuinely distinct private owners, disjoint from HEADER and DATA. +Their entry heads and the public heads are at their respective origins, +which may be different or negative. Private cells from origin-1 through the +predecessor bounds and the two whole-call V-bit windows are physically blank. +The fixed program discovers ends only by local scans. Opaque exteriors are +outside these windows. Whole-tail blankness is not inferred from a few local +cells. The old 23-field coded descriptor, LSB/delimiter conversion, gapped or +interleaved placement, public occurrence emission, transport corridors and +the actual caller's numerical producer remain separately paid caller work. + +The abstract source owner 415 is represented by the supplied public DATA +owner. This is an exact MOVE boundary for that source event, not an emitted +full-word dispatcher that locates owner 415 in an enclosing implementation. + +## 3. Relocation, source order and complete tensor addresses + +The public ports are HEADER=0 and DATA=1. WORK=2 is one whole-call private +payload bank and TRACE=3 is its public-owner return trace. Every retained +module's HEADER port maps to 0, DATA maps to WORK, and private port t>=2 maps +to t+2. The largest private port is #7429's 28, so the global ports are +exactly 0,...,30. The map is injective within each retained module and does +not identify a private port with WORK, TRACE or a public owner. + +`insert()` copies every retained instruction, renames its fixed PC labels +and tape numbers, and changes its successful halt to one fixed goto. Its +alphabet, scanned-symbol branches, writes and unit moves are unchanged. +An empty branch remains empty. A retained execution is literally simulated +with equal step count through its successful terminal instruction, whose +replacement has the same unit cost. Construction-time loops produce a +fixed table; they perform no runtime size or scalar work. + +The six factor graphs execute in this order: + +| Order | Complete factor | Literal implementation | +|---|---|---| +| 1 | right input-coordinate phase | #7426, actual right recipe | +| 2 | right binary G | #7430, 19 fixed CNOTs on all f columns | +| 3 | right offset 1, after G | #7428, complete a0 reversal | +| 4 | positive central `C^(tensor f)` | #7429, all f low-bit-first axes | +| 5 | left input-coordinate phase | #7426 fixed specialization below | +| 6 | left binary G | #7430, 27 fixed CNOTs on all f columns | + +The left phase is explicitly present. Its source linear coefficients are +`(2,0,0,0,0,0,0,0,0)`, its quadratic rows are zero and its constant is zero. +#7426's `compile_phase` accepts precisely such fixed recipes; its generic +counter/geometry proof applies with m=9. The extra factor is +`(-1)^popcount(a0)`. The right constant is one, so its tensor phase is `i^f`; +the graph initializes that repeated constant using f, not once per call or +once per coefficient. + +For a native monomial `(G,b,Q,l,c)`, its action on complete column-address +tuples is the source convention + +`e_a -> i^[fc+sum_i l_i popcount(ai)+2sum_(i=0 every real and +imaginary input numerator is divisible by `2^f`, has absolute value <=M, and + +`2^f M <= 2^(w-1)-1`. + +The entrance phase is a Gaussian unit and G/offset are permutations, so the +divisibility and component bound M survive the right boundary. After j C +axes the numerators are divisible by `2^(f-j)`: each next row is a signed +sum of four incoming integers, divided by two. This proves every integrality +guard through j=f. The four-term formula also bounds each next component +by twice the preceding component maximum. The j-axis maximum is therefore +`2^j M<=2^f M`, inside the symmetric signed interval +`[-(2^(w-1)-1),2^(w-1)-1]`. The exit Gaussian-unit phase and final permutation +also fit. This proves success for every positive f with arbitrary joint +inputs and complete spectators. It is sufficient and not claimed sharp. + +This is a supplied numerator reserve. No scale, widening, grid conversion or +unscaling is installed. A caller obtaining it by changing its common grid or +width must implement and pay that conversion and the larger V. #7468 proves +a sharper endpoint-dependent arithmetic scale while leaving physical +conversion/range/owner costs open; it is relevant follow-up, not a dependency +used here. Integral final endpoints alone remain insufficient for the +current unwrapped leaf. + +## 5. Whole-call ownership, transaction and failure boundary + +The wrapper installs guards on WORK and TRACE, copies the entire original +DATA body onto WORK, and records each source advance on TRACE. At the blank +endpoint it returns the original DATA head by consuming TRACE, then returns +the WORK head by its own guard. Public DATA has received no write. Public +HEADER is never written by either wrapper or factors. + +All six module commits target WORK. Each successful graph restores all its +private cells/guards and heads. The same 27 module-private owners can +therefore be reused serially across graphs even when their role names +differ. WORK's outer guard persists and is neither identified with a module +private guard nor retired by an intermediate module. TRACE remains blank +while factors execute. Induction over completed graphs establishes each +next graph's physical entry. Algebraic concatenation alone would not prove +this shared-bank lifecycle premise. + +Only after successful factor 6 does the wrapper copy WORK to the original +public DATA owner, erase WORK and rebuild TRACE. It returns the public head +using TRACE, returns the blank WORK head, erases both outer guards and halts. +Exactly V public DATA writes occur, all in this sole final commit. No owner +object or backing interval is replaced. Every private body and opaque +exterior is restored on success. + +For any finite component rejection before the final commit, public DATA and +HEADER values remain original, even if earlier factors already committed +on WORK. The checker explicitly reaches a central nonintegral rejection +after the first three factors completed and observes zero public writes. +Rejection need not restore heads or retire private work, and rejecting +banks are not promised reusable. Interruption, nontermination, arbitrary +malformed-tail costs and post-failure retry are unclaimed. #7477 transforms +a reversal's rejection cleanup; it does not already transform this complete +joined program. + +## 6. Complete time, storage and the cutoff gate + +All instructions, including fixed jumps and terminal instructions, cost one. +There is one initial wrapper clone and one final wrapper commit. The clone +plus source/WORK returns costs `15V+13` instructions. The final commit, +returns, guard retirement and halt cost `16V+14`. Thus new wrapper overhead +is exactly `31V+27` on a successful legal packet. Module halts become +unit-cost gotos; call/return is not free or omitted. + +Use the complete credited bounds at unchanged source bytes: + +| Graph | Complete instruction upper bound | +|---|---| +| two linear factors and central leaf | each `65536(fV+E+1)` | +| each phase, m=9 | `65536[E+10f+r+P+S+w+100P2^(9f)+V+1]` | +| translation, descriptor producer and reversal | `4096(V+E+1)` | +| new outer wrapper | `31V+27` | + +The predecessors' five-field E is <=the present six-field E. Since +`P2^(9f)<=V/2` and `f,r,P,S,w<=V`, each phase is at most +`65536(E+65V+1)`. Bound translation by `65536(V+E+1)` and wrapper by +`65536(V+1)`. Summing gives + +`T <=65536[3fV+132V+6E+7] <=2^24(fV+E+1)`. + +This includes all Gamma decoding, actual descriptor arithmetic, constant +phase repetition, coefficient loops, every signed scalar row, C axis, CNOT +column, source read, staging, intermediate commit, head return, guide reset, +guard initialization and erasure. No common-grid conversion is hidden in +this bill. No recursive child work is omitted: the direct child graph is one +summand. For f>cutoff the child guard rejects; this gives no nonleaf supplier. + +For history, each linear factor and leaf has complete additional bound +`64(V+E+1)`; translation has `32(V+E+1)`. Each phase has credited bound + +`2V+4E+13f+4(r+P+S)+8w+256 <=256(V+E+1)`. + +The new wrapper visits only the original DATA interval `[0,V]` and private +WORK/TRACE intervals `[-1,V]`, relative to their own origins. It adds at most +`3V+5<=8(V+E+1)`. Adding successive historical increases, never subtracting +erased cells, gives `(512+128+64+32+8)(V+E+1)=744(V+E+1)`, below the declared +1024 bound. It counts all 31 owners, including HEADER and WORK positions +also visited by other graphs. Double counting is harmless. No owned field +earns productive credit. + +At fixed origins successful reuse retains each owner's visited interval +union, or per-owner maximum span before summing. Prior successful retirement +supplies blank tails and restored heads; a shorter call scans only its actual +current body, not old capacity. Its current time bound is independent of old +high-water marks. Changed origins require actual absolute interval unions +and separately paid transport corridors. Renaming an origin releases no +history. Public packet replacement in fixtures is supplied work, not free +caller acquisition. + +## 7. Evidence and remaining obligations + +The independent stdlib dense CPU executes the complete table. The direct +oracle inverts the two address matrices and evaluates sparse Gaussian tensor +entries. It uses no CNOT word, incremental counter, butterfly implementation +or tape arithmetic. The full nonzero actual m=9,f=1 packet has 512 addresses +and 4096 bits and takes 14,429,950 transitions. Shorter same-owner reuse has +a 258-bit cutoff value and 2048 payload bits, taking 7,499,800 transitions. +All successful header/head/private/exterior, owner and complete-write checks +pass. Central rejection after three completed factors takes 4,723,409 +transitions and preserves both publics. Four whole-program mutants delete +absolute phase, exchange right-factor order, omit offset or corrupt final +commit, and all fail the direct kernel. The address oracle checks all 512 +one-column and 262,144 two-column addresses plus 1,025 three-column addresses. +Finite evidence corroborates the universal predecessor invariants and +composition proof. No full f=2 joined tape execution is claimed. + +Still unproved here are the selected caller's old-codec/packing bridge and +entry producer; actual owner lookup/emission and transport; its common-grid, +divisibility, headroom and cutoff admission; global owned reset and stock; +a faster nonleaf supplier and complete recursive invoice; enclosing compiler, +precision and analytic-recovery applications. All five selected assumptions +and the selected conditional bound remain unchanged. The source archive was +authenticated and its exact event/frames re-extracted, but no complete +catalogue, selected cold replay, Lean or Docker run is claimed. Independent +human and formal proof-kernel review remain unclaimed. + +## 8. Literal endpoint scale/width extension + +The frozen core theorem above remains unchanged. endpoint.py supplies a +separate literal wrapper that physically installs the sharp endpoint scale +from #7468 and sufficient common signed width. Under the supplied promise +that original input x and complete output Ux are Gaussian integral and in +the symmetric signed-w component range, it computes +`k=floor((f+2)/4)`, builds a private width `w'=w+2k` header, emits actual +signed scaling, executes the unchanged complete core, validates exact +unscale/fit into staged original-width output and performs the sole public +original-owner commit. The transfer uses central endpoints `R x` and +`L^-1 Ux`. ENDPOINT-PROOF.md states and proves the full extension, its +52-tape lifecycle and complete direct `2^26(fV'+E+1)` time and +`K_entry+4096(V'+E+1)` historical bounds. V' includes the actual widening. +This supplies local conversion; actual selected producer admission and +the global assumptions remain open. diff --git a/research/selected-move-old-coded-full/inputs/core/SOURCES.json b/research/selected-move-old-coded-full/inputs/core/SOURCES.json new file mode 100644 index 0000000000..8a2db1259a --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/SOURCES.json @@ -0,0 +1,161 @@ +{ + "canonical_main": "e54523517d0f03e58352e647c403a5af3e525a57", + "files": [ + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "39b40c465f7636a4bb6d70af28595fe8f70f4f3f", + "path": "research/literal-selected-linear-maps/linear.py", + "local": "reference/linear/linear.py", + "bytes": 13102, + "sha256": "d56704082b82e37d4a360b8aad7e0af63499f4160c6bbcfd338804453c46fa33", + "blob": "6aad40a6c47ed4415917c86fabbd5227a3819a41" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "39b40c465f7636a4bb6d70af28595fe8f70f4f3f", + "path": "research/literal-selected-linear-maps/inputs/controller_reference.py", + "local": "reference/linear/inputs/controller_reference.py", + "bytes": 5938, + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "39b40c465f7636a4bb6d70af28595fe8f70f4f3f", + "path": "research/literal-selected-linear-maps/NOTICE.md", + "local": "reference/linear/NOTICE.md", + "bytes": 2180, + "sha256": "2ac2051c0fbedfd9d11348493456bf479dbdd3104a4e106c8bf36251a72b6a50", + "blob": "3a3030f23df347c1e45ddf92d2083f89ed16cc67" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/phase.py", + "local": "reference/phase/phase.py", + "bytes": 11734, + "sha256": "2be149aa1be504509bb480f85396f0be302082d638e81422f747daee5a3c1ce7", + "blob": "d48978145821fc4a62d534bef2bef9449bda883a" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/inputs/controller_reference.py", + "local": "reference/phase/inputs/controller_reference.py", + "bytes": 5938, + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/RECIPE.json", + "local": "reference/RECIPE.json", + "bytes": 1798, + "sha256": "96fadb44c3316be93c6c02f50cd2c841a9541d67b98fd94fc47b73fa64dd404c", + "blob": "ea2bc6909e02d8aa61e170d65bb707da7279d0ab" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/NOTICE", + "local": "reference/phase/NOTICE", + "bytes": 808, + "sha256": "5654eeb7fdc1acd6a6d246ef87b1155812efdcd0949f54be78e048fe905fbae0", + "blob": "7a1f1da9c59d40b1e72905fee5344a8db9ca4353" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1a555e469b89af70d309bc966f8f813ac11dc887", + "path": "research/literal-positive-c-leaf/leaf.py", + "local": "reference/leaf/leaf.py", + "bytes": 17526, + "sha256": "bb46c1a55f1119957a52cd61f2cd957f3f7ad1e9b818c54a852bde09a0773744", + "blob": "bdcc80cbd8b64c601e6d69b7d25ece444b8b1ae2" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1a555e469b89af70d309bc966f8f813ac11dc887", + "path": "research/literal-positive-c-leaf/inputs/controller_reference.py", + "local": "reference/leaf/inputs/controller_reference.py", + "bytes": 5938, + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1a555e469b89af70d309bc966f8f813ac11dc887", + "path": "research/literal-positive-c-leaf/NOTICE.md", + "local": "reference/leaf/NOTICE.md", + "bytes": 1900, + "sha256": "773921ac301cf7e37de97ed8a0066e6bbb69ec1150cc2b5f74a12cb20103f3cf", + "blob": "71c5f6dae2c799ce5d76c544e98d1ee7c52ef76c" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1dbdaa414cfe4a4a0f015e88a04b52e146566786", + "path": "research/native-translation-descriptor/translate.py", + "local": "reference/translation/translate.py", + "bytes": 7703, + "sha256": "e2750fef8c2b9c8019d67285df3ca0d04340cd241782c7845665b7de621ca3bd", + "blob": "5e1149f8ab45e0d5b4ecd963674ff8659d7f014b" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1dbdaa414cfe4a4a0f015e88a04b52e146566786", + "path": "research/native-translation-descriptor/reference/reverse.py", + "local": "reference/translation/reference/reverse.py", + "bytes": 6649, + "sha256": "4b516d85baf3303db809bc1174394009b1fc71a8f7d17fb6c729ec8bb6aba245", + "blob": "60fce51dd8c3336e2bcf2873df254190e2203e14" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1dbdaa414cfe4a4a0f015e88a04b52e146566786", + "path": "research/native-translation-descriptor/reference/inputs/controller_reference.py", + "local": "reference/translation/reference/inputs/controller_reference.py", + "bytes": 5938, + "sha256": "e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73", + "blob": "3ab6d0361f35038ffcdf0cf81a157f7a17b40e72" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "1dbdaa414cfe4a4a0f015e88a04b52e146566786", + "path": "research/native-translation-descriptor/NOTICE.md", + "local": "reference/translation/NOTICE.md", + "bytes": 1201, + "sha256": "24f5e9957fcd8f6cfdc021ff5bc91bf89e50587997e2a2cb18053949c0e0d205", + "blob": "903e332da2844843fbb1ad716b6d470f175e8de9" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/reference/clifford_exact.py", + "local": "reference/source/clifford_exact.py", + "bytes": 6824, + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "blob": "166841a037f069249f6f7f6dedb89248812f59e2" + }, + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/reference/native_verify.py", + "local": "reference/source/native_verify.py", + "bytes": 12323, + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38", + "blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c" + } + ], + "upstream_artifacts": [ + { + "repository": "CubeJerry/integer-mult-bounds", + "commit": "172f4535ce8dcff79f626410af845f757c1563be", + "path": "research/literal-native-quadratic-phase/reference/selected-native.json.gz", + "bytes": 350722, + "sha256": "2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883", + "blob": "74563a7867d9d762b6588f65362369668841bb3e", + "derived_local": "reference/SOURCE-FRAMES.json", + "extraction": "event 24472; complete frames named by event[2:4]; canonical JSON word hash is recorded in RECIPE.json; source archive is not vendored" + } + ] +} diff --git a/research/selected-move-old-coded-full/inputs/core/bind_source.py b/research/selected-move-old-coded-full/inputs/core/bind_source.py new file mode 100644 index 0000000000..fbd9305a02 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/bind_source.py @@ -0,0 +1,88 @@ +"""Rebuild the retained lowering and match every exact source column. + +SOURCE-FRAMES.json is the 151-byte extraction of the pinned archive, whose +350,722 bytes are deliberately not vendored. --source-repo re-extracts it +read-only from the exact commit:path and authenticates the complete archive. +""" +from pathlib import Path +import argparse +import copy +import gzip +import hashlib +import json +import subprocess +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import move as m + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def verify_source(repo=None): + m.authenticate() + record = json.loads((HERE / 'reference/RECIPE.json').read_text()) + witness = json.loads((HERE / 'reference/SOURCE-FRAMES.json').read_text()) + need(witness['event_index'] == record['native_event_index'] == 24472, 'event index') + need(witness['event'] == record['event'] == ['MOVE', 415, 3, 99, False], 'actual MOVE') + if repo is not None: + pin = json.loads((HERE / 'SOURCES.json').read_text())['upstream_artifacts'][0] + raw = subprocess.check_output(['git', 'show', pin['commit'] + ':' + pin['path']], cwd=repo) + need(len(raw) == pin['bytes'] and hashlib.sha256(raw).hexdigest() == pin['sha256'], + 'complete selected archive binding') + word = json.loads(gzip.decompress(raw)) + canonical = json.dumps(word, separators=(',', ':'), sort_keys=True).encode() + need(hashlib.sha256(canonical).hexdigest() == record['native_canonical_sha256'], + 'complete selected canonical word') + extracted = dict(event_index=24472, event=word['program'][24472], + frames={str(i): word['frames'][i] for i in word['program'][24472][2:4]}) + need(extracted == witness, 'compact frame extraction') + compiler = m.load('move_join_source_compiler', 'source/clifford_exact.py') + independent = m.load('move_join_source_independent', 'source/native_verify.py') + before, after = witness['event'][2:4] + a, b = (compiler.canonical_frame(9, tuple(witness['frames'][str(i)])) for i in (before, after)) + recipe, _ = compiler.lower_child(a.adjoint().then(b)) + recipe = json.loads(json.dumps(recipe)) + need(recipe == record['lowered_recipe'] and recipe['rank'] == 1, 'source lowering') + target = independent.adjoint(independent.frame(witness['frames'][str(before)], 9)) + target += independent.frame(witness['frames'][str(after)], 9) + independent.equal(independent.recipe(recipe), target, 'complete selected MOVE kernel') + # Compare all 512 columns, including Gaussian normalization and phase, + # with a separate explicit two-term formula for the joined recipe. + from verify import linear, phase, rotate + right, left = recipe['right'], recipe['left'] + for source in range(512): + x = tuple((source >> i) & 1 for i in range(9)) + t = tuple(a ^ ((right['offset'] >> i) & 1) + for i, a in enumerate(linear(right['matrix_rows'], x))) + expected = {} + for bit in (0, 1): + z = (bit,) + t[1:] + out = linear(left['matrix_rows'], z) + address = sum(a << i for i, a in enumerate(out)) + expected[address] = rotate((1, 1 if bit == t[0] else -1), + phase(right, x, 1) + phase(left, z, 1)) + values, denominator = independent.state(target, source) + need(denominator == 1 and values == expected, 'source column ' + str(source)) + wrong = copy.deepcopy(recipe) + wrong['right']['phase'] = (wrong['right']['phase'] + 1) % 4 + try: + independent.equal(independent.recipe(wrong), target, 'absolute phase mutation') + except ValueError: + pass + else: + raise ValueError('source phase mutation missed') + return dict(marker='PASS_COMPLETE_MOVE_SOURCE_BINDING', source_index=24472, + owner=415, frames=[before, after], basis_columns=512, + full_archive_reextracted=repo is not None, negative_controls=['absolute phase']) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('--source-repo', type=Path) + args = parser.parse_args() + print(json.dumps(verify_source(args.source_repo), indent=2, sort_keys=True)) diff --git a/research/selected-move-old-coded-full/inputs/core/move.py b/research/selected-move-old-coded-full/inputs/core/move.py new file mode 100644 index 0000000000..3c11397a02 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/move.py @@ -0,0 +1,148 @@ +"""One fixed literal direct implementation of selected #7000 MOVE24472. + +The source modules are retained byte for byte. Construction-time relabeling +joins their local-symbol graphs; no runtime callback implements a factor. +Apache-2.0. Prepared with substantial OpenAI Codex assistance. +""" +from pathlib import Path +import hashlib +import importlib.util +import json +import sys + +HERE = Path(__file__).resolve().parent + + +def authenticate(): + for pin in json.loads((HERE / 'SOURCES.json').read_text())['files']: + raw = (HERE / pin['local']).read_bytes() + if len(raw) != pin['bytes'] or hashlib.sha256(raw).hexdigest() != pin['sha256']: + raise ValueError('source drift: ' + pin['local']) + blob = hashlib.sha1(b'blob ' + str(len(raw)).encode() + b'\0' + raw).hexdigest() + if blob != pin['blob']: + raise ValueError('Git blob drift: ' + pin['local']) + + +def load(name, path): + spec = importlib.util.spec_from_file_location(name, HERE / 'reference' / path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +authenticate() +LINEAR = load('move_join_linear', 'linear/linear.py') +PHASE = load('move_join_phase', 'phase/phase.py') +LEAF = load('move_join_leaf', 'leaf/leaf.py') +TRANSLATION = load('move_join_translation', 'translation/translate.py') +Builder, Tape, Machine = LINEAR.Builder, LINEAR.Tape, LINEAR.Machine +BLANK, ONE, MARK = LINEAR.BLANK, LINEAR.ONE, LINEAR.MARK +HEADER, DATA, WORK, TRACE = range(4) +TAPES = 31 +BITS = ('0', ONE) + + +def return_source(a): + """Erase the paid trace and return the original DATA head.""" + a.op('move', TRACE, -1) + a.mark('return_' + str(len(a.code))) + loop = 'return_' + str(len(a.code)) + # mark() does not append code, so loop is the label just installed. + a.op('read', TRACE, {ONE: loop + '_bit', MARK: loop + '_done'}) + a.mark(loop + '_bit') + a.op('write', TRACE, BLANK) + a.op('move', TRACE, -1) + a.op('move', DATA, -1) + a.op('goto', loop) + a.mark(loop + '_done') + a.op('move', TRACE, 1) + + +def insert(a, name, code, alphabet, after): + """Only fixed jump addresses and fixed tape ports are renamed.""" + if alphabet != (BLANK, '0', ONE, MARK): + raise ValueError('module alphabet') + ports = lambda t: HEADER if t == 0 else WORK if t == 1 else t + 2 + for pc, (op, *args) in enumerate(code): + a.mark(name + str(pc)) + if op == 'read': + a.op(op, ports(args[0]), {s: name + str(dst) for s, dst in args[1].items()}) + elif op in ('write', 'move'): + a.op(op, ports(args[0]), args[1]) + elif op == 'goto': + a.op(op, name + str(args[0])) + elif op == 'halt': + a.op('goto', after) + else: + raise ValueError('nonlocal retained opcode') + + +def _compile_move(mutation=None): + recipe = json.loads((HERE / 'reference/RECIPE.json').read_text())['lowered_recipe'] + right = recipe['right'] + left = recipe['left'] + factors = [ + ('right_phase_', PHASE.compile_phase(right['linear_Z4'], right['quadratic_rows'], + 0 if mutation == 'drop_absolute_phase' else right['phase'])), + ('right_linear_', LINEAR.compile_linear('right')), + ('right_offset_', TRANSLATION.compile_translation()), + ('positive_child_', LEAF.compile_leaf()), + ('left_phase_', PHASE.compile_phase(left['linear_Z4'], left['quadratic_rows'], left['phase'])), + ('left_linear_', LINEAR.compile_linear('left')), + ] + if mutation == 'swap_right_order': + factors[0], factors[1] = factors[1], factors[0] + if mutation == 'omit_offset': + factors = [item for item in factors if item[0] != 'right_offset_'] + a = Builder() + for tape in (WORK, TRACE): + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + a.mark('clone') + a.op('read', DATA, {'0': 'clone0', ONE: 'clone1', BLANK: 'cloned'}) + for bit in BITS: + a.mark('clone' + bit) + a.op('write', WORK, bit) + a.op('move', WORK, 1) + a.op('move', DATA, 1) + a.op('write', TRACE, ONE) + a.op('move', TRACE, 1) + a.op('goto', 'clone') + a.mark('cloned') + return_source(a) + a.rewind(WORK, BITS) + entries = {} + for index, (name, (code, alphabet)) in enumerate(factors): + entries[name] = len(a.code) + after = factors[index + 1][0] + '0' if index + 1 < len(factors) else 'commit' + insert(a, name, code, alphabet, after) + a.mark('commit') + entries['commit'] = len(a.code) + a.op('read', WORK, {'0': 'commit0', ONE: 'commit1', BLANK: 'committed'}) + for bit in BITS: + a.mark('commit' + bit) + a.op('write', DATA, '1' if mutation == 'corrupt_commit' else bit) + a.op('write', WORK, BLANK) + a.op('move', WORK, 1) + a.op('move', DATA, 1) + a.op('write', TRACE, ONE) + a.op('move', TRACE, 1) + a.op('goto', 'commit') + a.mark('committed') + return_source(a) + a.rewind(WORK, (BLANK,)) + for tape in (WORK, TRACE): + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + code, alphabet = a.finish((BLANK, '0', ONE, MARK)) + return code, alphabet, entries + + +def compile_move(): + """Fixed science table: no runtime size, scalar, child or recipe argument.""" + code, alphabet, _ = _compile_move() + return code, alphabet diff --git a/research/selected-move-old-coded-full/inputs/core/reference/RECIPE.json b/research/selected-move-old-coded-full/inputs/core/reference/RECIPE.json new file mode 100644 index 0000000000..ea2bc6909e --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/RECIPE.json @@ -0,0 +1,130 @@ +{ + "base_commit": "e54523517d0f03e58352e647c403a5af3e525a57", + "native_event_index": 24472, + "event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "side": "right", + "rank": 1, + "recipe": { + "matrix_rows": [ + 239, + 129, + 130, + 132, + 136, + 16, + 160, + 192, + 256 + ], + "offset": 1, + "quadratic_rows": [ + 111, + 111, + 111, + 111, + 0, + 111, + 111, + 0, + 0 + ], + "linear_Z4": [ + 3, + 3, + 3, + 3, + 0, + 3, + 3, + 2, + 0 + ], + "phase": 1 + }, + "lowered_recipe": { + "rank": 1, + "left": { + "matrix_rows": [ + 3, + 5, + 9, + 17, + 32, + 65, + 129, + 1, + 256 + ], + "offset": 0, + "quadratic_rows": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "linear_Z4": [ + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "phase": 0 + }, + "right": { + "matrix_rows": [ + 239, + 129, + 130, + 132, + 136, + 16, + 160, + 192, + 256 + ], + "offset": 1, + "quadratic_rows": [ + 111, + 111, + 111, + 111, + 0, + 111, + 111, + 0, + 0 + ], + "linear_Z4": [ + 3, + 3, + 3, + 3, + 0, + 3, + 3, + 2, + 0 + ], + "phase": 1 + } + }, + "catalogue_pairs_examined": 1, + "native_compressed_sha256": "2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883", + "native_canonical_sha256": "91429a6b96729292a8764836e00c87a6f7cd3b76f05159033f4867f69a98d097" +} diff --git a/research/selected-move-old-coded-full/inputs/core/reference/SOURCE-FRAMES.json b/research/selected-move-old-coded-full/inputs/core/reference/SOURCE-FRAMES.json new file mode 100644 index 0000000000..478d9eddde --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/SOURCE-FRAMES.json @@ -0,0 +1,16 @@ +{ + "event_index": 24472, + "event": [ + "MOVE", + 415, + 3, + 99, + false + ], + "frames": { + "3": [], + "99": [ + 239 + ] + } +} diff --git a/research/selected-move-old-coded-full/inputs/core/reference/leaf/NOTICE.md b/research/selected-move-old-coded-full/inputs/core/reference/leaf/NOTICE.md new file mode 100644 index 0000000000..71c5f6dae2 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/leaf/NOTICE.md @@ -0,0 +1,34 @@ +# Attribution and license + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +New material is Apache-2.0; copied predecessors retain their original notices. + +Jose Manuel (jmbarrancoml), CrocSwap/integer-mult-bounds#3091, supplies the +Gaussian C numerator rows, exact carry/parity/signed-fit argument, physical +complete-axis strategy and direct tensor tariff. Credit its #3055/#3087 +physical lineage, Alejandro Zarzuelo Urdiales's #45 Gaussian tensor reserve +and norm results, James Chang's #1869 ripple arithmetic, AAAmirinu's #2327 +prefix audit, and Nick Petalas's #2772/#3089 prefix/capacity work. + +@CubeJerry's #6967 current-coded leaf supplies the earlier source/format/ +lifecycle binding and explicitly leaves literal numerical export open. +#6978, #6986 and #6989 provide distinct all-source, cutoff-transport and +rounded wrappers. Their stronger failure-retirement and old coded interfaces +are not silently inherited by this packed component. + +The actual #7000 source, Clifford compiler and retained independent Gaussian +verifier are credited to DreamingOfClouds, Ali Romman, Cinna Davis, zxv, +unpaidmoon, icekylinx, CubeJerry and the earlier authors named by the retained +sources. The construction, lowering and matrix identities are not claimed anew. + +The packed ABI is published at +`172f4535ce8dcff79f626410af845f757c1563be`. Unary/Gamma/trace patterns follow +literal-layer-phase at `8b549ca6557ccbb3017b104b27ea35051f990416`, which credits +literal-layer-egress at `51ab0539059214fcfa044938c36a0b6017232be5`. The exact +Builder/Machine originates in #7349, head +`9dfe6747b8553fd11b408f2b045c5954ef1e6eaa`. + +The parent's dense execution/oracle and literal_layer_boundary's independent +source/Gaussian/universal-cost review are separately attributed in REVIEW.md. +Their artifacts are unchanged. Independent AI work is not human approval or +formal proof-kernel acceptance. diff --git a/research/selected-move-old-coded-full/inputs/core/reference/leaf/inputs/controller_reference.py b/research/selected-move-old-coded-full/inputs/core/reference/leaf/inputs/controller_reference.py new file mode 100644 index 0000000000..3ab6d0361f --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/leaf/inputs/controller_reference.py @@ -0,0 +1,112 @@ +"""Finite three-tape online rank-recursion control; Apache-2.0. +Only PC and local symbols affect execution. Metrics/event logs are observers. +""" +from dataclasses import dataclass, field +BLANK, ONE, MARK = '_', '1', '|' +WIDTH, CHILD, STACK = range(3) + +class Builder: + def __init__(self): self.code, self.labels, self.serial = [], {}, 0 + def mark(self,n): + if n in self.labels: raise ValueError('duplicate label') + self.labels[n]=len(self.code) + def op(self,*x): self.code.append(x) + def rewind(self,t,symbols): + self.serial+=1; loop=f'rw{self.serial}'; done=loop+'done' + self.op('move',t,-1); self.mark(loop) + self.op('read',t,{s:loop+'step' for s in symbols}|{MARK:done}) + self.mark(loop+'step'); self.op('move',t,-1); self.op('goto',loop) + self.mark(done); self.op('move',t,1) + def finish(self,alphabet): + result=[] + for op,*a in self.code: + if op=='goto': a[0]=self.labels[a[0]] + elif op=='read': a[1]={s:self.labels[n] for s,n in a[1].items()} + result.append((op,*a)) + return tuple(result),tuple(alphabet) + +def compile_controller(m,ranks): + """Parameters are compile-time constants, absent from run-time state.""" + if type(m) is not int or m<2 or not ranks: raise ValueError('bad fixed profile') + if any(type(r) is not int or not 1<=r=budget: raise ValueError('finite verifier budget') + self.step() + return self + +def initial_tapes(width,origins=(0,0,0),ancestor=('0','1','t0','_','|','0')): + if width<1: raise ValueError('positive width') + u,c,p=origins + return [Tape({u-1:MARK,**{u+i:ONE for i in range(width)}},u),Tape({c-1:MARK},c), + Tape({p-1:MARK,**{p-2-i:s for i,s in enumerate(ancestor) if s!=BLANK}},p)] diff --git a/research/selected-move-old-coded-full/inputs/core/reference/leaf/leaf.py b/research/selected-move-old-coded-full/inputs/core/reference/leaf/leaf.py new file mode 100644 index 0000000000..bdcc80cbd8 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/leaf/leaf.py @@ -0,0 +1,564 @@ +"""Literal positive rank-one Gaussian C tensor leaf on a packed m=9 field. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. C arithmetic and tensor algebra are credited #3091 predecessors. +Only fixed local instructions execute; encoded inputs do not specialize code. +""" +from pathlib import Path +import hashlib +import sys + +HERE = Path(__file__).resolve().parent +MACHINE = HERE / 'inputs' / 'controller_reference.py' +EXPECTED_MACHINE = 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73' +if hashlib.sha256(MACHINE.read_bytes()).hexdigest() != EXPECTED_MACHINE: + raise ValueError('frozen literal machine source drift') +sys.path.insert(0, str(MACHINE.parent)) +from controller_reference import Builder, Machine, Tape, BLANK, ONE, MARK + +(HEADER, DATA, A, B, MODE, HTRACE, LENGTH, DOUBLE, F, R, P, S, WIDTH, + FBIN, FLEN, TBIN, TLEN, PREFIX, SUFFIX, LEFT, RIGHT, LOUT, ROUT, + AR, AI, BR, BI, NUM, DTRACE) = range(29) +PRIVATE = tuple(range(2, 29)) +BITS = ('0', ONE) +INPUTS = (AR, AI, BR, BI) +ROWS = ((1, -1, 1, 1), (1, 1, -1, 1), + (1, 1, 1, -1), (-1, 1, 1, 1)) +NATIVE_DIMENSION = 9 + + +def fresh(a, stem): + a.serial += 1 + return stem + str(a.serial) + + +def clear(a, tape, symbols=(ONE,)): + k = fresh(a, 'clear') + a.mark(k) + a.op('read', tape, {s: k+'bit' for s in symbols} | {BLANK: k+'done'}) + a.mark(k+'bit') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + + +def unary_copy(a, source, target, *, repeat=1, extra=0, erase=False): + k = fresh(a, 'copy') + a.mark(k) + a.op('read', source, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + for _ in range(repeat): + a.op('write', target, ONE) + a.op('move', target, 1) + if erase: + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + for _ in range(extra): + a.op('write', target, ONE) + a.op('move', target, 1) + a.rewind(source, (BLANK,) if erase else (ONE,)) + a.rewind(target, (ONE,)) + + +def trace_return(a, tape, trace): + k = fresh(a, 'return') + a.op('move', trace, -1) + a.mark(k) + a.op('read', trace, {ONE: k+'bit', MARK: k+'done'}) + a.mark(k+'bit') + a.op('write', trace, BLANK) + a.op('move', trace, -1) + a.op('move', tape, -1) + a.op('goto', k) + a.mark(k+'done') + a.op('move', trace, 1) + + +def header_step(a): + a.op('write', HTRACE, ONE) + a.op('move', HTRACE, 1) + a.op('move', HEADER, 1) + + +def gamma(a, target, capture=None): + """Unary decode for parameters bounded by the actual field volume.""" + k = fresh(a, 'gamma') + a.mark(k+'prefix') + a.op('read', HEADER, {'0': k+'zero', ONE: k+'one'}) + a.mark(k+'zero') + a.op('write', LENGTH, ONE) + a.op('move', LENGTH, 1) + header_step(a) + a.op('goto', k+'prefix') + a.mark(k+'one') + header_step(a) + a.op('write', target, ONE) + if capture: + for tape, bit in ((capture[0], ONE), (capture[1], ONE)): + a.op('write', tape, bit) + a.op('move', tape, 1) + a.op('move', LENGTH, -1) + a.mark(k+'tail') + a.op('read', LENGTH, {ONE: k+'tailbit', MARK: k+'done'}) + a.mark(k+'tailbit') + a.op('write', LENGTH, BLANK) + a.op('read', HEADER, {str(b): k+'digit'+str(b) for b in (0, 1)}) + for bit in (0, 1): + a.mark(k+'digit'+str(bit)) + unary_copy(a, target, DOUBLE, repeat=2, extra=bit) + clear(a, target) + unary_copy(a, DOUBLE, target, erase=True) + if capture: + for tape, symbol in ((capture[0], str(bit)), (capture[1], ONE)): + a.op('write', tape, symbol) + a.op('move', tape, 1) + header_step(a) + a.op('move', LENGTH, -1) + a.op('goto', k+'tail') + a.mark(k+'done') + a.op('move', LENGTH, 1) + if capture: + a.rewind(capture[0], BITS) + a.rewind(capture[1], (ONE,)) + + +def gamma_binary(a): + """Keep cutoff in binary: its represented value can exceed V arbitrarily.""" + k = fresh(a, 'threshold') + a.mark(k+'prefix') + a.op('read', HEADER, {'0': k+'zero', ONE: k+'one'}) + a.mark(k+'zero') + a.op('write', LENGTH, ONE) + a.op('move', LENGTH, 1) + header_step(a) + a.op('goto', k+'prefix') + a.mark(k+'one') + a.op('write', TBIN, ONE) + a.op('move', TBIN, 1) + a.op('write', TLEN, ONE) + a.op('move', TLEN, 1) + header_step(a) + a.op('move', LENGTH, -1) + a.mark(k+'tail') + a.op('read', LENGTH, {ONE: k+'read', MARK: k+'done'}) + a.mark(k+'read') + a.op('write', LENGTH, BLANK) + a.op('read', HEADER, {str(b): k+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', TBIN, bit) + a.op('move', TBIN, 1) + a.op('write', TLEN, ONE) + a.op('move', TLEN, 1) + header_step(a) + a.op('move', LENGTH, -1) + a.op('goto', k+'tail') + a.mark(k+'done') + a.op('move', LENGTH, 1) + a.rewind(TBIN, BITS) + a.rewind(TLEN, (ONE,)) + + +def cutoff_guard(a): + k = fresh(a, 'compare') + a.mark(k+'length') + a.op('read', FLEN, {ONE: k+'fmore', BLANK: k+'fend'}) + a.mark(k+'fmore') + a.op('read', TLEN, {ONE: k+'step', BLANK: 'reject'}) + a.mark(k+'step') + a.op('move', FLEN, 1) + a.op('move', TLEN, 1) + a.op('goto', k+'length') + a.mark(k+'fend') + a.op('read', TLEN, {ONE: k+'done', BLANK: k+'equal_length'}) + a.mark(k+'equal_length') + a.rewind(FLEN, (ONE,)) + a.rewind(TLEN, (ONE,)) + a.mark(k+'lex') + a.op('read', FBIN, {'0': k+'f0', ONE: k+'f1', BLANK: k+'equal'}) + a.mark(k+'f0') + a.op('read', TBIN, {'0': k+'same', ONE: k+'done'}) + a.mark(k+'f1') + a.op('read', TBIN, {'0': 'reject', ONE: k+'same'}) + a.mark(k+'same') + a.op('move', FBIN, 1) + a.op('move', TBIN, 1) + a.op('goto', k+'lex') + a.mark(k+'equal') + a.op('read', TBIN, {BLANK: k+'done'}) + a.mark(k+'done') + for tape, symbols in ((FLEN, (ONE,)), (TLEN, (ONE,)), (FBIN, BITS), (TBIN, BITS)): + a.rewind(tape, symbols) + clear(a, tape, symbols) + + +def double(a, tape): + unary_copy(a, tape, DOUBLE, repeat=2) + clear(a, tape) + unary_copy(a, DOUBLE, tape, erase=True) + + +def halve(a, tape): + k = fresh(a, 'halve') + a.mark(k) + a.op('read', tape, {ONE: k+'first', BLANK: k+'done'}) + a.mark(k+'first') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('read', tape, {ONE: k+'second', BLANK: 'reject'}) + a.mark(k+'second') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('write', DOUBLE, ONE) + a.op('move', DOUBLE, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + a.rewind(DOUBLE, (ONE,)) + unary_copy(a, DOUBLE, tape, erase=True) + + +def product(a, left, right, target): + k = fresh(a, 'product') + a.mark(k+'outer') + a.op('read', left, {ONE: k+'inner', BLANK: k+'done'}) + a.mark(k+'inner') + a.op('read', right, {ONE: k+'bit', BLANK: k+'row'}) + a.mark(k+'bit') + a.op('write', target, ONE) + a.op('move', target, 1) + a.op('move', right, 1) + a.op('goto', k+'inner') + a.mark(k+'row') + a.rewind(right, (ONE,)) + a.op('move', left, 1) + a.op('goto', k+'outer') + a.mark(k+'done') + a.rewind(left, (ONE,)) + a.rewind(target, (ONE,)) + + +def geometry(a): + product(a, S, R, SUFFIX) + unary_copy(a, P, PREFIX) + k = fresh(a, 'geometry') + a.mark(k+'suffix') + a.op('read', F, {ONE: k+'block', BLANK: k+'suffix_done'}) + a.mark(k+'block') + for _ in range(NATIVE_DIMENSION-1): + double(a, SUFFIX) + a.op('move', F, 1) + a.op('goto', k+'suffix') + a.mark(k+'suffix_done') + a.rewind(F, (ONE,)) + a.op('move', F, 1) + a.mark(k+'prefix') + a.op('read', F, {ONE: k+'more', BLANK: k+'done'}) + a.mark(k+'more') + double(a, PREFIX) + a.op('move', F, 1) + a.op('goto', k+'prefix') + a.mark(k+'done') + a.rewind(F, (ONE,)) + for tape in (P, R, S): + clear(a, tape) + + +def copy_width(a, source, target, *, rewind_target=False): + k = fresh(a, 'widthcopy') + a.mark(k) + a.op('read', WIDTH, {ONE: k+'read', BLANK: k+'done'}) + a.mark(k+'read') + a.op('read', source, {str(b): k+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', target, bit) + a.op('move', target, 1) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('move', WIDTH, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(WIDTH, (ONE,)) + if rewind_target: + a.rewind(target, BITS) + + +def load_suffix(a, source, target): + k = fresh(a, 'suffix') + a.mark(k) + a.op('read', SUFFIX, {ONE: k+'pair', BLANK: k+'done'}) + a.mark(k+'pair') + for _ in range(2): + copy_width(a, source, target) + a.op('move', SUFFIX, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(SUFFIX, (ONE,)) + a.rewind(target, BITS) + + +def emit_stream(a, source, target): + k = fresh(a, 'stream') + a.mark(k) + a.op('read', source, {str(b): k+str(b) for b in (0, 1)} | {BLANK: k+'done'}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', target, bit) + a.op('move', target, 1) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(source, (BLANK,)) + + +def tuple_branch(a, label, emit, prefix=()): + """Compile the fixed sixteen branches of a four-symbol read.""" + name = label+''.join(map(str, prefix)) + a.mark(name) + if len(prefix) == 4: + emit(prefix) + else: + a.op('read', INPUTS[len(prefix)], {str(b): name+str(b) for b in (0, 1)}) + for bit in (0, 1): + tuple_branch(a, label, emit, prefix+(bit,)) + + +def c_component(a, signs, output): + """Exact four-input numerator, two sign extensions, halving and fit.""" + k = fresh(a, 'C') + a.mark(k+'seek') + a.op('read', WIDTH, {ONE: k+'seekbit', BLANK: k+'seekend'}) + a.mark(k+'seekbit') + for tape in INPUTS: + a.op('move', tape, 1) + a.op('move', WIDTH, 1) + a.op('goto', k+'seek') + a.mark(k+'seekend') + a.rewind(WIDTH, (ONE,)) + for tape in INPUTS: + a.op('move', tape, -1) + a.op('goto', k+'digit0') + for carry in (-1, 0, 1, 2): + label = k+'digit'+str(carry) + a.mark(label) + a.op('read', WIDTH, {ONE: label+'read', BLANK: k+'extend'+str(carry)}) + def digit(bits, carry=carry): + total = carry+sum(s*b for s, b in zip(signs, bits)) + a.op('write', NUM, str(total % 2)) + a.op('move', NUM, 1) + for tape in INPUTS: + a.op('move', tape, -1) + a.op('move', WIDTH, 1) + a.op('goto', k+'digit'+str(total//2)) + tuple_branch(a, label+'read', digit) + a.mark(k+'extend'+str(carry)) + for tape in INPUTS: + a.op('move', tape, 1) + a.rewind(WIDTH, (ONE,)) + a.op('goto', k+'sign1c'+str(carry)) + for stage in (1, 2): + for carry in (-1, 0, 1, 2): + def extension(bits, carry=carry, stage=stage): + total = carry+sum(s*b for s, b in zip(signs, bits)) + a.op('write', NUM, str(total % 2)) + a.op('move', NUM, 1) + a.op('goto', k+'sign2c'+str(total//2) if stage == 1 else k+'check') + tuple_branch(a, k+'sign'+str(stage)+'c'+str(carry), extension) + a.mark(k+'check') + a.rewind(NUM, BITS) + a.op('read', NUM, {'0': k+'even', ONE: 'reject'}) + a.mark(k+'even') + a.op('write', NUM, BLANK) + a.op('move', NUM, 1) + a.mark(k+'highseek') + a.op('read', NUM, {'0': k+'highstep', ONE: k+'highstep', BLANK: k+'highend'}) + a.mark(k+'highstep') + a.op('move', NUM, 1) + a.op('goto', k+'highseek') + a.mark(k+'highend') + a.op('move', NUM, -1) + a.op('read', NUM, {str(b): k+'top'+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark(k+'top'+bit) + a.op('write', NUM, BLANK) + a.op('move', NUM, -1) + a.op('read', NUM, {bit: k+'emit'}) + a.mark(k+'emit') + a.op('read', WIDTH, {ONE: k+'emitread', BLANK: k+'done'}) + a.mark(k+'emitread') + a.op('read', NUM, {str(b): k+'emit'+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark(k+'emit'+bit) + a.op('write', output, bit) + a.op('move', output, 1) + a.op('write', NUM, BLANK) + a.op('move', NUM, -1) + a.op('move', WIDTH, 1) + a.op('goto', k+'emit') + a.mark(k+'done') + a.rewind(WIDTH, (ONE,)) + + +def clone_source(a): + """Clone exactly the generated volume; reject short/excess cardinality.""" + k = fresh(a, 'clone') + a.mark(k+'prefix') + a.op('read', PREFIX, {ONE: k+'blocks', BLANK: k+'done'}) + a.mark(k+'blocks') + for side in range(2): + name = k+'side'+str(side) + a.mark(name) + a.op('read', SUFFIX, {ONE: name+'coefficient', BLANK: name+'done'}) + a.mark(name+'coefficient') + for component in range(2): + field = name+'field'+str(component) + a.mark(field) + a.op('read', WIDTH, {ONE: field+'read', BLANK: field+'done'}) + a.mark(field+'read') + a.op('read', DATA, {str(b): field+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark(field+bit) + a.op('write', A, bit) + a.op('move', A, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('move', WIDTH, 1) + a.op('goto', field) + a.mark(field+'done') + a.rewind(WIDTH, (ONE,)) + a.op('move', SUFFIX, 1) + a.op('goto', name) + a.mark(name+'done') + a.rewind(SUFFIX, (ONE,)) + a.op('move', PREFIX, 1) + a.op('goto', k+'prefix') + a.mark(k+'done') + a.rewind(PREFIX, (ONE,)) + a.op('read', DATA, {BLANK: k+'verified'}) + a.mark(k+'verified') + trace_return(a, DATA, DTRACE) + a.rewind(A, BITS) + + +def commit(a, source): + k = fresh(a, 'commit') + a.mark(k) + a.op('read', source, {str(b): k+str(b) for b in (0, 1)} | {BLANK: k+'done'}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', DATA, bit) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('goto', k) + a.mark(k+'done') + trace_return(a, DATA, DTRACE) + a.rewind(source, (BLANK,)) + + +def compile_leaf(): + a = Builder() + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + gamma(a, F, (FBIN, FLEN)) + for tape in (R, P, S, WIDTH): + gamma(a, tape) + gamma_binary(a) + trace_return(a, HEADER, HTRACE) + cutoff_guard(a) + for i in range(2): + a.op('read', WIDTH, {ONE: 'width'+str(i)}) + a.mark('width'+str(i)) + a.op('move', WIDTH, 1) + a.rewind(WIDTH, (ONE,)) + geometry(a) + clone_source(a) + a.op('write', MODE, '0') + a.mark('prefix') + a.op('read', PREFIX, {ONE: 'load_select', BLANK: 'axis_end'}) + a.mark('load_select') + a.op('read', MODE, {'0': 'loadA', ONE: 'loadB'}) + for mode, source in enumerate((A, B)): + a.mark('load'+('A' if mode == 0 else 'B')) + load_suffix(a, source, LEFT) + load_suffix(a, source, RIGHT) + a.op('goto', 'pairs') + a.mark('pairs') + a.op('read', SUFFIX, {ONE: 'pair', BLANK: 'pairs_done'}) + a.mark('pair') + for source, target in ((LEFT, AR), (LEFT, AI), (RIGHT, BR), (RIGHT, BI)): + copy_width(a, source, target, rewind_target=True) + for signs, output in zip(ROWS, (LOUT, LOUT, ROUT, ROUT)): + c_component(a, signs, output) + for tape in INPUTS: + clear(a, tape, BITS) + a.op('move', SUFFIX, 1) + a.op('goto', 'pairs') + a.mark('pairs_done') + a.rewind(SUFFIX, (ONE,)) + for tape in (LEFT, RIGHT): + a.rewind(tape, (BLANK,)) + for tape in (LOUT, ROUT): + a.rewind(tape, BITS) + a.op('read', MODE, {'0': 'mergeB', ONE: 'mergeA'}) + for name, target in (('mergeB', B), ('mergeA', A)): + a.mark(name) + emit_stream(a, LOUT, target) + emit_stream(a, ROUT, target) + a.op('goto', 'prefix_done') + a.mark('prefix_done') + a.op('move', PREFIX, 1) + a.op('goto', 'prefix') + a.mark('axis_end') + a.op('read', MODE, {'0': 'endA', ONE: 'endB'}) + for mode, source, target in ((0, A, B), (1, B, A)): + name = 'end'+('A' if mode == 0 else 'B') + a.mark(name) + a.op('read', source, {BLANK: name+'valid'}) + a.mark(name+'valid') + a.rewind(source, (BLANK,)) + a.rewind(target, BITS) + a.op('write', MODE, str(1-mode)) + a.op('goto', 'axis_done') + a.mark('axis_done') + a.rewind(PREFIX, (ONE,)) + a.op('move', F, 1) + a.op('read', F, {ONE: 'next_axis', BLANK: 'finish'}) + a.mark('next_axis') + double(a, SUFFIX) + halve(a, PREFIX) + a.op('goto', 'prefix') + a.mark('finish') + a.op('read', MODE, {'0': 'commitA', ONE: 'commitB'}) + for name, source in (('commitA', A), ('commitB', B)): + a.mark(name) + commit(a, source) + a.op('goto', 'retire') + a.mark('retire') + a.rewind(F, (ONE,)) + for tape in (F, WIDTH, PREFIX, SUFFIX): + clear(a, tape) + clear(a, MODE, BITS) + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + a.mark('reject') + a.op('read', HEADER, {}) + return a.finish((BLANK, '0', ONE, MARK)) + + + + diff --git a/research/selected-move-old-coded-full/inputs/core/reference/linear/NOTICE.md b/research/selected-move-old-coded-full/inputs/core/reference/linear/NOTICE.md new file mode 100644 index 0000000000..3a3030f23d --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/linear/NOTICE.md @@ -0,0 +1,36 @@ +# Attribution and scope + +New construction, source binding, uniform complete-cost proof, author checks +and packaging were prepared for Jerry Chen (@CubeJerry), with substantial +OpenAI assistance. Independent receipts identify the separate executing +reviewer and distinct methods. No human or proof-kernel verification of the +multiplication theorem is claimed. New work is Apache-2.0. + +Credit Matarener's #3825 controlled reversal and #3834's finite identity +check; David Arias's #2776/fixed-tape-ordered-shear split/merge, unary conversion +and local return method; the fixed-tape-affine-shear runtime-coefficient +extension and its credited Charles Bethin unit-carry predecessor; JoyboyBrian's +#5188 complete literal interchange and binary-alphabet successor; Jose Manuel's +physical Gaussian monomial and #3087/#4172 lineage; the selected monomial +record lift; and #6992's current serial-column implication and conditional +bill. These algebraic and routing methods are not new claims here. + +The #7000 selected native/compiler/application-review authors supply the +actual word, exact Clifford lowering, signed Gaussian interpreter and phase +conventions. Their retained source notices are unchanged. + +The published controller `9dfe6747b8553fd11b408f2b045c5954ef1e6eaa` supplies +Builder/Machine/Tape. The literal layer phase +`8b549ca6557ccbb3017b104b27ea35051f990416`, selected quadratic phase +`172f4535ce8dcff79f626410af845f757c1563be`, and positive C leaf +`1a555e469b89af70d309bc966f8f813ac11dc887` supply the shared packed interface +and reusable local acquisition/copy/return patterns. Exact reference copies +and source pins are retained. The new `fresh` adds a label delimiter to avoid +decimal label collisions in the larger compile-time word. + +C4's dense author-test interpreter is retained as a source reference. This +package changes its fixed inventory from 29 to 27 and raises only its external +watchdog. That reuse is not presented as independently written review. Root's +independent interpreter/oracle were written separately and are retained +unchanged. No invented PR number is used for newly published fork branches; +they are identified by exact commits until a PR exists. diff --git a/research/selected-move-old-coded-full/inputs/core/reference/linear/inputs/controller_reference.py b/research/selected-move-old-coded-full/inputs/core/reference/linear/inputs/controller_reference.py new file mode 100644 index 0000000000..3ab6d0361f --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/linear/inputs/controller_reference.py @@ -0,0 +1,112 @@ +"""Finite three-tape online rank-recursion control; Apache-2.0. +Only PC and local symbols affect execution. Metrics/event logs are observers. +""" +from dataclasses import dataclass, field +BLANK, ONE, MARK = '_', '1', '|' +WIDTH, CHILD, STACK = range(3) + +class Builder: + def __init__(self): self.code, self.labels, self.serial = [], {}, 0 + def mark(self,n): + if n in self.labels: raise ValueError('duplicate label') + self.labels[n]=len(self.code) + def op(self,*x): self.code.append(x) + def rewind(self,t,symbols): + self.serial+=1; loop=f'rw{self.serial}'; done=loop+'done' + self.op('move',t,-1); self.mark(loop) + self.op('read',t,{s:loop+'step' for s in symbols}|{MARK:done}) + self.mark(loop+'step'); self.op('move',t,-1); self.op('goto',loop) + self.mark(done); self.op('move',t,1) + def finish(self,alphabet): + result=[] + for op,*a in self.code: + if op=='goto': a[0]=self.labels[a[0]] + elif op=='read': a[1]={s:self.labels[n] for s,n in a[1].items()} + result.append((op,*a)) + return tuple(result),tuple(alphabet) + +def compile_controller(m,ranks): + """Parameters are compile-time constants, absent from run-time state.""" + if type(m) is not int or m<2 or not ranks: raise ValueError('bad fixed profile') + if any(type(r) is not int or not 1<=r=budget: raise ValueError('finite verifier budget') + self.step() + return self + +def initial_tapes(width,origins=(0,0,0),ancestor=('0','1','t0','_','|','0')): + if width<1: raise ValueError('positive width') + u,c,p=origins + return [Tape({u-1:MARK,**{u+i:ONE for i in range(width)}},u),Tape({c-1:MARK},c), + Tape({p-1:MARK,**{p-2-i:s for i,s in enumerate(ancestor) if s!=BLANK}},p)] diff --git a/research/selected-move-old-coded-full/inputs/core/reference/linear/linear.py b/research/selected-move-old-coded-full/inputs/core/reference/linear/linear.py new file mode 100644 index 0000000000..6aad40a6c4 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/linear/linear.py @@ -0,0 +1,435 @@ +"""Literal selected nine-coordinate linear maps on a packed Gaussian field. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. Split/merge, unary clocks and CNOT decomposition are credited +predecessor methods; this is their exact encoded all-column selected join. +""" +from pathlib import Path +import hashlib +import sys + +HERE = Path(__file__).resolve().parent +MACHINE = HERE/'inputs/controller_reference.py' +EXPECTED_MACHINE = 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73' +if hashlib.sha256(MACHINE.read_bytes()).hexdigest() != EXPECTED_MACHINE: + raise ValueError('frozen local machine source drift') +sys.path.insert(0, str(MACHINE.parent)) +from controller_reference import Builder, Machine, Tape, BLANK, ONE, MARK + +(HEADER, DATA, A, B, MODE, HTRACE, LENGTH, DOUBLE, F, R, P, S, WIDTH, + VOLUME, AUX, PREFIX, MIDDLE, BLOCK, LEFT, RIGHT, LOUT, ROUT, + Q0, Q1, Q2, Q3, DTRACE) = range(27) +PRIVATE = tuple(range(2, 27)) +BITS = ('0', ONE) +CHUNKS = (Q0, Q1, Q2, Q3) +MATRICES = { + 'right': (239,129,130,132,136,16,160,192,256), + 'left': (3,5,9,17,32,65,129,1,256), +} +DIMENSION = 9 + + +def cnot_word(rows): + """Fixed-data Gaussian elimination; no input header is consulted.""" + if len(rows) != DIMENSION or any(type(x) is not int or not 0 <= x < 1 << DIMENSION for x in rows): + raise ValueError('fixed nine-coordinate matrix') + choices = [] + for order in (range(DIMENSION), range(DIMENSION-1, -1, -1)): + a, eliminated, word = list(rows), set(), [] + def add(target, control): + a[target] ^= a[control] + word.append((target, control)) + for j in order: + if not (a[j] >> j) & 1: + candidates = [i for i in range(DIMENSION) if i not in eliminated and (a[i] >> j) & 1] + if not candidates: + raise ValueError('singular fixed matrix') + k = candidates[0] + add(j, k); add(k, j); add(j, k) + for i in range(DIMENSION): + if i != j and (a[i] >> j) & 1: + add(i, j) + eliminated.add(j) + if a != [1 << i for i in range(DIMENSION)]: + raise ValueError('fixed elimination invariant') + choices.append(tuple(reversed(word))) + return min(choices, key=lambda x: (len(x), x)) + + +def fresh(a, stem): + a.serial += 1 + return stem + str(a.serial) + '_' + + + +def clear(a, tape, symbols=(ONE,)): + k = fresh(a, 'clear') + a.mark(k) + a.op('read', tape, {s: k+'bit' for s in symbols} | {BLANK: k+'done'}) + a.mark(k+'bit') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + + + +def unary_copy(a, source, target, *, repeat=1, extra=0, erase=False): + k = fresh(a, 'copy') + a.mark(k) + a.op('read', source, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + for _ in range(repeat): + a.op('write', target, ONE) + a.op('move', target, 1) + if erase: + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + for _ in range(extra): + a.op('write', target, ONE) + a.op('move', target, 1) + a.rewind(source, (BLANK,) if erase else (ONE,)) + a.rewind(target, (ONE,)) + + + +def header_step(a): + a.op('write', HTRACE, ONE) + a.op('move', HTRACE, 1) + a.op('move', HEADER, 1) + + + +def gamma(a, target): + """Actual positive Gamma code to unary, using only literal operations.""" + k = fresh(a, 'gamma') + a.mark(k+'prefix') + a.op('read', HEADER, {'0': k+'zero', ONE: k+'one'}) + a.mark(k+'zero') + a.op('write', LENGTH, ONE) + a.op('move', LENGTH, 1) + header_step(a) + a.op('goto', k+'prefix') + a.mark(k+'one') + header_step(a) + a.op('write', target, ONE) + a.op('move', LENGTH, -1) + a.mark(k+'tail') + a.op('read', LENGTH, {ONE: k+'tailbit', MARK: k+'done'}) + a.mark(k+'tailbit') + a.op('write', LENGTH, BLANK) + a.op('read', HEADER, {str(b): k+'digit'+str(b) for b in (0, 1)}) + for b in (0, 1): + a.mark(k+'digit'+str(b)) + unary_copy(a, target, DOUBLE, repeat=2, extra=b) + clear(a, target) + unary_copy(a, DOUBLE, target, erase=True) + header_step(a) + a.op('move', LENGTH, -1) + a.op('goto', k+'tail') + a.mark(k+'done') + a.op('move', LENGTH, 1) + + + +def trace_return(a, tape, trace): + k = fresh(a, 'return') + a.op('move', trace, -1) + a.mark(k) + a.op('read', trace, {ONE: k+'bit', MARK: k+'done'}) + a.mark(k+'bit') + a.op('write', trace, BLANK) + a.op('move', trace, -1) + a.op('move', tape, -1) + a.op('goto', k) + a.mark(k+'done') + a.op('move', trace, 1) + + + +def double(a, tape): + unary_copy(a, tape, DOUBLE, repeat=2) + clear(a, tape) + unary_copy(a, DOUBLE, tape, erase=True) + + + +def halve(a, tape): + k = fresh(a, 'halve') + a.mark(k) + a.op('read', tape, {ONE: k+'first', BLANK: k+'done'}) + a.mark(k+'first') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('read', tape, {ONE: k+'second', BLANK: 'reject'}) + a.mark(k+'second') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('write', DOUBLE, ONE) + a.op('move', DOUBLE, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + a.rewind(DOUBLE, (ONE,)) + unary_copy(a, DOUBLE, tape, erase=True) + + + +def product(a, left, right, target): + k = fresh(a, 'product') + a.mark(k+'outer') + a.op('read', left, {ONE: k+'inner', BLANK: k+'done'}) + a.mark(k+'inner') + a.op('read', right, {ONE: k+'bit', BLANK: k+'row'}) + a.mark(k+'bit') + a.op('write', target, ONE) + a.op('move', target, 1) + a.op('move', right, 1) + a.op('goto', k+'inner') + a.mark(k+'row') + a.rewind(right, (ONE,)) + a.op('move', left, 1) + a.op('goto', k+'outer') + a.mark(k+'done') + a.rewind(left, (ONE,)) + a.rewind(target, (ONE,)) + + + +def emit_stream(a, source, target): + k = fresh(a, 'stream') + a.mark(k) + a.op('read', source, {str(b): k+str(b) for b in (0, 1)} | {BLANK: k+'done'}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', target, bit) + a.op('move', target, 1) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(source, (BLANK,)) + + + +def commit(a, source): + k = fresh(a, 'commit') + a.mark(k) + a.op('read', source, {str(b): k+str(b) for b in (0, 1)} | {BLANK: k+'done'}) + for bit in ('0', ONE): + a.mark(k+bit) + a.op('write', DATA, bit) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('goto', k) + a.mark(k+'done') + trace_return(a, DATA, DTRACE) + a.rewind(source, (BLANK,)) + + + +def multiply_guide(a, target, factor): + product(a, target, factor, AUX) + clear(a, target) + unary_copy(a, AUX, target, erase=True) + + +def column_doublings(a, target, times): + """times is fixed construction data; the actual F loop survives.""" + k = fresh(a, 'column_double') + a.mark(k) + a.op('read', F, {ONE: k+'more', BLANK: k+'done'}) + a.mark(k+'more') + for _ in range(times): + double(a, target) + a.op('move', F, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(F, (ONE,)) + + +def volume(a): + unary_copy(a, P, VOLUME) + for factor in (R, S, WIDTH): + multiply_guide(a, VOLUME, factor) + column_doublings(a, VOLUME, DIMENSION) + double(a, VOLUME) + + +def geometry(a, high, low): + # At j=0: A=P*2^((high+1)f-1), M=2^((low-high)f-1), + # B=2wrS*2^((8-low)f). Temporary doubles are also paid. + unary_copy(a, P, PREFIX) + column_doublings(a, PREFIX, high+1) + halve(a, PREFIX) + a.op('write', MIDDLE, ONE) + column_doublings(a, MIDDLE, low-high) + halve(a, MIDDLE) + product(a, R, S, BLOCK) + multiply_guide(a, BLOCK, WIDTH) + double(a, BLOCK) + column_doublings(a, BLOCK, DIMENSION-1-low) + + +def clone(a): + k = fresh(a, 'clone') + a.mark(k) + a.op('read', VOLUME, {ONE: k+'read', BLANK: k+'done'}) + a.mark(k+'read') + a.op('read', DATA, {str(b): k+str(b) for b in (0, 1)}) + for bit in BITS: + a.mark(k+bit) + a.op('write', A, bit) + a.op('move', A, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('move', VOLUME, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(VOLUME, (ONE,)) + a.op('read', DATA, {BLANK: k+'valid'}) + a.mark(k+'valid') + trace_return(a, DATA, DTRACE) + a.rewind(A, BITS) + + +def copy_block(a, source, target, *, return_target=False): + k = fresh(a, 'block_copy') + a.mark(k) + a.op('read', BLOCK, {ONE: k+'read', BLANK: k+'done'}) + a.mark(k+'read') + a.op('read', source, {str(b): k+str(b) for b in (0, 1)}) + for bit in BITS: + a.mark(k+bit) + a.op('write', target, bit) + a.op('move', target, 1) + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('move', BLOCK, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(BLOCK, (ONE,)) + if return_target: + a.rewind(target, BITS) + + +def load_half(a, source, target): + k = fresh(a, 'half') + a.mark(k) + a.op('read', MIDDLE, {ONE: k+'two', BLANK: k+'done'}) + a.mark(k+'two') + for _ in range(2): + copy_block(a, source, target) + a.op('move', MIDDLE, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(MIDDLE, (ONE,)) + a.rewind(target, BITS) + + +def cnot_columns(a, target, control): + """All encoded F columns of one fixed CNOT, both physical directions.""" + high, low = min(target, control), max(target, control) + permutation = (0, 1, 3, 2) if control == high else (0, 3, 2, 1) + geometry(a, high, low) + k = fresh(a, 'cnot') + a.mark(k+'prefix') + a.op('read', PREFIX, {ONE: k+'load_select', BLANK: k+'end'}) + a.mark(k+'load_select') + a.op('read', MODE, {'0': k+'loadA', ONE: k+'loadB'}) + for source, label in ((A, 'A'), (B, 'B')): + a.mark(k+'load'+label) + load_half(a, source, LEFT) + load_half(a, source, RIGHT) + a.op('goto', k+'middle') + a.mark(k+'middle') + a.op('read', MIDDLE, {ONE: k+'chunks', BLANK: k+'middle_done'}) + a.mark(k+'chunks') + for source, chunk in ((LEFT, Q0), (LEFT, Q1), (RIGHT, Q2), (RIGHT, Q3)): + copy_block(a, source, chunk, return_target=True) + for i, index in enumerate(permutation): + emit_stream(a, CHUNKS[index], LOUT if i < 2 else ROUT) + a.op('move', MIDDLE, 1) + a.op('goto', k+'middle') + a.mark(k+'middle_done') + a.rewind(MIDDLE, (ONE,)) + for tape in (LEFT, RIGHT): + a.rewind(tape, (BLANK,)) + for tape in (LOUT, ROUT): + a.rewind(tape, BITS) + a.op('read', MODE, {'0': k+'mergeB', ONE: k+'mergeA'}) + for label, destination in (('mergeB', B), ('mergeA', A)): + a.mark(k+label) + emit_stream(a, LOUT, destination) + emit_stream(a, ROUT, destination) + a.op('goto', k+'prefix_done') + a.mark(k+'prefix_done') + a.op('move', PREFIX, 1) + a.op('goto', k+'prefix') + a.mark(k+'end') + a.op('read', MODE, {'0': k+'endA', ONE: k+'endB'}) + for mode, source, destination in ((0, A, B), (1, B, A)): + label = k+'end'+('A' if mode == 0 else 'B') + a.mark(label) + a.op('read', source, {BLANK: label+'valid'}) + a.mark(label+'valid') + a.rewind(source, (BLANK,)) + a.rewind(destination, BITS) + a.op('write', MODE, str(1-mode)) + a.op('goto', k+'column_done') + a.mark(k+'column_done') + a.rewind(PREFIX, (ONE,)) + a.op('move', F, 1) + a.op('read', F, {ONE: k+'next_column', BLANK: k+'finished'}) + a.mark(k+'next_column') + double(a, BLOCK) + halve(a, PREFIX) + a.op('goto', k+'prefix') + a.mark(k+'finished') + a.rewind(F, (ONE,)) + for tape in (PREFIX, MIDDLE, BLOCK): + clear(a, tape) + + +def compile_linear(side): + """side is fixed construction data: exactly 'left' or 'right'.""" + if side not in MATRICES: + raise ValueError('one of the two selected fixed linear maps is required') + word = cnot_word(MATRICES[side]) + a = Builder() + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + for target in (F, R, P, S, WIDTH): + gamma(a, target) + trace_return(a, HEADER, HTRACE) + volume(a) + clone(a) + a.op('write', MODE, '0') + for target, control in word: + cnot_columns(a, target, control) + a.op('read', MODE, {'0': 'commitA', ONE: 'commitB'}) + for label, source in (('commitA', A), ('commitB', B)): + a.mark(label) + commit(a, source) + a.op('goto', 'retire') + a.mark('retire') + for tape in (F, R, P, S, WIDTH, VOLUME): + clear(a, tape) + clear(a, MODE, BITS) + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + a.mark('reject') + a.op('read', HEADER, {}) + return a.finish((BLANK, '0', ONE, MARK)) diff --git a/research/selected-move-old-coded-full/inputs/core/reference/phase/NOTICE b/research/selected-move-old-coded-full/inputs/core/reference/phase/NOTICE new file mode 100644 index 0000000000..7a1f1da9c5 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/phase/NOTICE @@ -0,0 +1,11 @@ +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. New contribution: literal local lowering, scoped proof and package. +Ali Romman/#5375 supplies the incremental phase and repeated constant. +The retained reference files preserve original source text. +#7000 and its native/Gaussian lineage supply the selected source and engines; +credit DreamingOfClouds, Ali Romman, Cinna Davis, zxv, unpaidmoon, icekylinx, +CubeJerry and earlier authors named by the retained source. +C2 literal-layer-phase supplies Gamma and signed staging/return. B1 literal- +layer-egress supplies owner staging, and #7349 the retained literal machine. +Exact original/copy source pins are in SOURCES.json. No predecessor identity, +compiler, source construction or general monomial theorem is claimed as new. diff --git a/research/selected-move-old-coded-full/inputs/core/reference/phase/inputs/controller_reference.py b/research/selected-move-old-coded-full/inputs/core/reference/phase/inputs/controller_reference.py new file mode 100644 index 0000000000..3ab6d0361f --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/phase/inputs/controller_reference.py @@ -0,0 +1,112 @@ +"""Finite three-tape online rank-recursion control; Apache-2.0. +Only PC and local symbols affect execution. Metrics/event logs are observers. +""" +from dataclasses import dataclass, field +BLANK, ONE, MARK = '_', '1', '|' +WIDTH, CHILD, STACK = range(3) + +class Builder: + def __init__(self): self.code, self.labels, self.serial = [], {}, 0 + def mark(self,n): + if n in self.labels: raise ValueError('duplicate label') + self.labels[n]=len(self.code) + def op(self,*x): self.code.append(x) + def rewind(self,t,symbols): + self.serial+=1; loop=f'rw{self.serial}'; done=loop+'done' + self.op('move',t,-1); self.mark(loop) + self.op('read',t,{s:loop+'step' for s in symbols}|{MARK:done}) + self.mark(loop+'step'); self.op('move',t,-1); self.op('goto',loop) + self.mark(done); self.op('move',t,1) + def finish(self,alphabet): + result=[] + for op,*a in self.code: + if op=='goto': a[0]=self.labels[a[0]] + elif op=='read': a[1]={s:self.labels[n] for s,n in a[1].items()} + result.append((op,*a)) + return tuple(result),tuple(alphabet) + +def compile_controller(m,ranks): + """Parameters are compile-time constants, absent from run-time state.""" + if type(m) is not int or m<2 or not ranks: raise ValueError('bad fixed profile') + if any(type(r) is not int or not 1<=r=budget: raise ValueError('finite verifier budget') + self.step() + return self + +def initial_tapes(width,origins=(0,0,0),ancestor=('0','1','t0','_','|','0')): + if width<1: raise ValueError('positive width') + u,c,p=origins + return [Tape({u-1:MARK,**{u+i:ONE for i in range(width)}},u),Tape({c-1:MARK},c), + Tape({p-1:MARK,**{p-2-i:s for i,s in enumerate(ancestor) if s!=BLANK}},p)] diff --git a/research/selected-move-old-coded-full/inputs/core/reference/phase/phase.py b/research/selected-move-old-coded-full/inputs/core/reference/phase/phase.py new file mode 100644 index 0000000000..d489781458 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/phase/phase.py @@ -0,0 +1,335 @@ +"""Literal selected native quadratic phase, with complete owner commit. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. The multi-counter phase algorithm is credited to #5375. Header, +signed staging and return helpers are retained from the frozen C2 phase. +Only fixed-table read/write/unit-move/goto/halt instructions execute. +""" +from pathlib import Path +import hashlib +import sys + +HERE = Path(__file__).resolve().parent +MACHINE = HERE / 'inputs' / 'controller_reference.py' +EXPECTED_MACHINE = 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73' +if hashlib.sha256(MACHINE.read_bytes()).hexdigest() != EXPECTED_MACHINE: + raise ValueError('frozen literal machine source drift') +sys.path.insert(0, str(MACHINE.parent)) +from controller_reference import Builder, Machine, Tape, BLANK, ONE, MARK + +(HEADER, DATA, OUTPUT, HTRACE, LENGTH, DOUBLE, COLUMNS, COEFF, OUTER, + SPECTATOR, WIDTH, REAL, IMAG, DTRACE) = range(14) +COUNTERS = tuple(range(14, 23)) +PRIVATE = tuple(range(2, 23)) +BITS = ('0', ONE) +SELECTED_LINEAR = (3, 3, 3, 3, 0, 3, 3, 2, 0) +SELECTED_ROWS = (111, 111, 111, 111, 0, 111, 111, 0, 0) +SELECTED_CONSTANT = 1 + + +def fresh(a, stem): + a.serial += 1 + return stem + str(a.serial) + + +def clear(a, tape, symbols=(ONE,)): + k = fresh(a, 'clear') + a.mark(k) + a.op('read', tape, {s: k+'bit' for s in symbols} | {BLANK: k+'done'}) + a.mark(k+'bit') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + + +def unary_copy(a, source, target, *, repeat=1, extra=0, erase=False): + k = fresh(a, 'copy') + a.mark(k) + a.op('read', source, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + for _ in range(repeat): + a.op('write', target, ONE) + a.op('move', target, 1) + if erase: + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + for _ in range(extra): + a.op('write', target, ONE) + a.op('move', target, 1) + a.rewind(source, (BLANK,) if erase else (ONE,)) + a.rewind(target, (ONE,)) + + +def header_step(a): + a.op('write', HTRACE, ONE) + a.op('move', HTRACE, 1) + a.op('move', HEADER, 1) + + +def gamma(a, target): + """Actual positive Gamma code to unary, using only literal operations.""" + k = fresh(a, 'gamma') + a.mark(k+'prefix') + a.op('read', HEADER, {'0': k+'zero', ONE: k+'one'}) + a.mark(k+'zero') + a.op('write', LENGTH, ONE) + a.op('move', LENGTH, 1) + header_step(a) + a.op('goto', k+'prefix') + a.mark(k+'one') + header_step(a) + a.op('write', target, ONE) + a.op('move', LENGTH, -1) + a.mark(k+'tail') + a.op('read', LENGTH, {ONE: k+'tailbit', MARK: k+'done'}) + a.mark(k+'tailbit') + a.op('write', LENGTH, BLANK) + a.op('read', HEADER, {str(b): k+'digit'+str(b) for b in (0, 1)}) + for b in (0, 1): + a.mark(k+'digit'+str(b)) + unary_copy(a, target, DOUBLE, repeat=2, extra=b) + clear(a, target) + unary_copy(a, DOUBLE, target, erase=True) + header_step(a) + a.op('move', LENGTH, -1) + a.op('goto', k+'tail') + a.mark(k+'done') + a.op('move', LENGTH, 1) + + +def trace_return(a, tape, trace): + k = fresh(a, 'return') + a.op('move', trace, -1) + a.mark(k) + a.op('read', trace, {ONE: k+'bit', MARK: k+'done'}) + a.mark(k+'bit') + a.op('write', trace, BLANK) + a.op('move', trace, -1) + a.op('move', tape, -1) + a.op('goto', k) + a.mark(k+'done') + a.op('move', trace, 1) + + +def load_component(a, target): + k = fresh(a, 'load') + a.mark(k) + a.op('read', WIDTH, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + a.op('read', DATA, {str(b): k+str(b) for b in (0, 1)}) + for b in (0, 1): + a.mark(k+str(b)) + a.op('write', target, str(b)) + a.op('move', target, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('move', WIDTH, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(WIDTH, (ONE,)) + a.rewind(target, BITS) + + +def negate(a, tape): + """Exact w-bit integer negation; reject the unrepresentable minimum.""" + k = fresh(a, 'neg') + a.mark(k+'seek') + a.op('read', tape, {'0': k+'step', ONE: k+'step', BLANK: k+'last'}) + a.mark(k+'step') + a.op('move', tape, 1) + a.op('goto', k+'seek') + a.mark(k+'last') + a.op('move', tape, -1) + a.op('goto', k+'c1x0y0') + for carry in (0, 1): + for old_sign in (0, 1): + for new_sign in (0, 1): + name = k+f'c{carry}x{old_sign}y{new_sign}' + a.mark(name) + a.op('read', tape, {str(b): name+'b'+str(b) for b in (0, 1)} | + {MARK: 'reject' if old_sign and new_sign else k+'done'}) + for bit in (0, 1): + total = 1-bit+carry + digit, nxt = total % 2, total//2 + a.mark(name+'b'+str(bit)) + a.op('write', tape, str(digit)) + a.op('move', tape, -1) + a.op('goto', k+f'c{nxt}x{bit}y{digit}') + a.mark(k+'done') + a.op('move', tape, 1) + + +def stage_component(a, tape): + k = fresh(a, 'stage') + a.mark(k) + a.op('read', tape, {str(b): k+str(b) for b in (0, 1)} | {BLANK: k+'done'}) + for b in (0, 1): + a.mark(k+str(b)) + a.op('write', OUTPUT, str(b)) + a.op('move', OUTPUT, 1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + + +def initialize(a, counters, constant): + """Generate f zero bits on each counter and retain constant*f mod 4.""" + a.op('goto', 'initialize0') + for mode in range(4): + name = 'initialize'+str(mode) + a.mark(name) + a.op('read', COLUMNS, {ONE: name+'bit', BLANK: name+'done'}) + a.mark(name+'bit') + for tape in counters: + a.op('write', tape, '0') + a.op('move', tape, 1) + a.op('move', COLUMNS, 1) + a.op('goto', 'initialize'+str((mode+constant) % 4)) + a.mark(name+'done') + a.rewind(COLUMNS, (ONE,)) + for tape in counters: + a.rewind(tape, BITS) + a.op('goto', 'record'+str(mode)) + + +def advance(a, counters, linear, rows): + """Fixed finite lowering of the credited synchronized counter updater.""" + m = len(counters) + for i in range(m): + neighbors = tuple(j for j in range(m) if j != i and + (rows[min(i, j)] >> max(i, j)) & 1) + for mode in range(4): + name = f'advance{i}q{mode}' + a.mark(name) + a.op('read', counters[i], {str(b): name+'b'+str(b) for b in (0, 1)} | + {BLANK: name+'overflow'}) + for bit in (0, 1): + stem = name+'b'+str(bit) + a.mark(stem) + nxt = (mode+(1-2*bit)*linear[i]) % 4 + a.op('goto', stem+f'n0q{nxt}') + for k, j in enumerate(neighbors): + for value in range(4): + label = stem+f'n{k}q{value}' + a.mark(label) + a.op('read', counters[j], { + str(b): stem+f'n{k+1}q{(value+2*b) % 4}' + for b in (0, 1)}) + for value in range(4): + a.mark(stem+f'n{len(neighbors)}q{value}') + a.op('write', counters[i], str(1-bit)) + for tape in counters: + a.op('move', tape, 1) + a.op('goto', f'advance{i}q{value}' if bit else + 'advanced'+str(value)) + a.mark(name+'overflow') + for tape in counters: + target = fresh(a, 'all_end') + a.op('read', tape, {BLANK: target}) + a.mark(target) + for tape in counters: + a.rewind(tape, BITS) + if i: + a.op('goto', f'advance{i-1}q{mode}') + else: + a.op('move', OUTER, 1) + a.op('read', OUTER, {ONE: 'record'+str(mode), BLANK: 'finish'}) + for mode in range(4): + a.mark('advanced'+str(mode)) + for tape in counters: + a.rewind(tape, BITS) + a.op('goto', 'record'+str(mode)) + + +def compile_phase(linear=SELECTED_LINEAR, rows=SELECTED_ROWS, + constant=SELECTED_CONSTANT): + """Recipe is finite construction-time data; no runtime size is an argument.""" + m = len(linear) + if not 1 <= m <= len(COUNTERS) or len(rows) != m: + raise ValueError('fixed recipe dimension') + if type(constant) is not int or not 0 <= constant < 4: + raise ValueError('fixed constant phase') + if any(type(x) is not int or not 0 <= x < 4 for x in linear): + raise ValueError('fixed linear phase') + if any(type(x) is not int or not 0 <= x < 1 << m for x in rows): + raise ValueError('fixed quadratic rows') + if any(((rows[i] >> j) ^ (rows[j] >> i)) & 1 + for i in range(m) for j in range(m)): + raise ValueError('symmetric source quadratic matrix') + if any((linear[i] ^ (rows[i] >> i)) & 1 for i in range(m)): + raise ValueError('source diagonal parity') + counters = COUNTERS[:m] + a = Builder() + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + # Supplied local ABI: Gamma(f), Gamma(r), Gamma(P), Gamma(S), Gamma(w). + for target in (COLUMNS, COEFF, OUTER, SPECTATOR, WIDTH): + gamma(a, target) + trace_return(a, HEADER, HTRACE) + initialize(a, counters, constant) + for mode in range(4): + a.mark('record'+str(mode)) + a.op('read', SPECTATOR, {ONE: 'coefficient'+str(mode), BLANK: 'record_end'+str(mode)}) + a.mark('coefficient'+str(mode)) + a.op('read', COEFF, {ONE: 'payload'+str(mode), BLANK: 'coefficient_end'+str(mode)}) + a.mark('payload'+str(mode)) + load_component(a, REAL) + load_component(a, IMAG) + if mode in (2, 3): + negate(a, REAL) + if mode in (1, 2): + negate(a, IMAG) + order = (IMAG, REAL) if mode % 2 else (REAL, IMAG) + for tape in order: + stage_component(a, tape) + a.op('move', COEFF, 1) + a.op('goto', 'coefficient'+str(mode)) + a.mark('coefficient_end'+str(mode)) + a.rewind(COEFF, (ONE,)) + a.op('move', SPECTATOR, 1) + a.op('goto', 'record'+str(mode)) + a.mark('record_end'+str(mode)) + a.rewind(SPECTATOR, (ONE,)) + a.op('goto', f'advance{m-1}q{mode}') + advance(a, counters, linear, rows) + a.mark('finish') + a.op('read', DATA, {BLANK: 'verified', '0': 'reject', ONE: 'reject'}) + a.mark('verified') + trace_return(a, DATA, DTRACE) + a.rewind(OUTPUT, BITS) + a.mark('commit') + a.op('read', OUTPUT, {str(b): 'commit'+str(b) for b in (0, 1)} | {BLANK: 'committed'}) + for bit in ('0', ONE): + a.mark('commit'+bit) + a.op('write', DATA, bit) + a.op('write', OUTPUT, BLANK) + a.op('move', OUTPUT, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('goto', 'commit') + a.mark('committed') + trace_return(a, DATA, DTRACE) + a.rewind(OUTPUT, (BLANK,)) + a.rewind(OUTER, (ONE,)) + for tape in (COLUMNS, OUTER, COEFF, SPECTATOR, WIDTH): + clear(a, tape) + for tape in counters: + clear(a, tape, BITS) + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + a.mark('reject') + a.op('read', HEADER, {}) + return a.finish((BLANK, '0', ONE, MARK)) diff --git a/research/selected-move-old-coded-full/inputs/core/reference/source/clifford_exact.py b/research/selected-move-old-coded-full/inputs/core/reference/source/clifford_exact.py new file mode 100644 index 0000000000..166841a037 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/source/clifford_exact.py @@ -0,0 +1,149 @@ +"""Small exact Gaussian-dyadic Clifford compiler, independent of gx internals. +Paulis use i^p X^x Z^z. State vectors use integer Gaussian numerators / 2^d. +The tableau is supplemented by a literal circuit, so global phases are kept. +""" +from dataclasses import dataclass + +def parity(x):return x.bit_count()&1 +def rank(rows): + p={} + for x in rows: + while x: + b=x.bit_length()-1 + if b not in p:p[b]=x;break + x^=p[b] + return len(p) +def transpose(rows,n):return tuple(sum(((rows[j]>>i)&1)<>j&1);a[j],a[k]=a[k],a[j] + for i in range(n): + if i!=j and a[i]>>j&1:a[i]^=a[j] + assert [r&((1<>n for r in a) +def basis_extend(cols,n): + out=[] + for x in list(cols)+[1<len(out):out.append(x) + assert len(out)==n + return tuple(out) +def nullspace(rows,n): + a=list(rows);p=[];k=0 + for j in range(n): + t=next((i for i in range(k,len(a)) if a[i]>>j&1),None) + if t is None:continue + a[t],a[k]=a[k],a[t] + for i in range(len(a)): + if i!=k and a[i]>>j&1:a[i]^=a[k] + p.append(j);k+=1 + return tuple((1<>j)&1)<>i&1:out=pmul(out,T[i]) + for i in range(n): + if z>>i&1:out=pmul(out,T[n+i]) + return out +def compose(A,B):return tuple(apply(A,p) for p in B) +def inverse(T): + n=len(T)//2;cols=[x|(z<>n;u,v,p=apply(T,(x,z,0));assert (u,v)==identity(n)[j][:2];out.append((x,z,(-p)%4)) + return tuple(out) +def qvalue(Q,alpha,x,n): + return (sum(alpha[i] for i in range(n) if x>>i&1)+2*sum(parity((Q[i]>>(i+1))&(x>>(i+1))) for i in range(n) if x>>i&1))%4 +def mul_i(a,p): + x,y=a;p%=4 + return [(x,y),(-y,x),(-x,-y),(y,-x)][p] +@dataclass +class Op: + n:int + tab:tuple + circuit:list + def then(self,b): + assert self.n==b.n + return Op(self.n,compose(b.tab,self.tab),self.circuit+b.circuit) + def adjoint(self): + circ=[] + for e in reversed(self.circuit): + if e[0]=='P':circ.append(('P',inv(e[1],self.n))) + elif e[0]=='D':circ.append(('D',e[1],tuple((-x)%4 for x in e[2]))) + elif e[0]=='C':circ.append(('C',e[1],-e[2])) + elif e[0]=='phase':circ.append(('phase',(-e[1])%4)) + else:circ.append(e) + return Op(self.n,inverse(self.tab),circ) + def zero_state(self,basis=0): + N=1<>i)&1 for i in range(n)) + assert all(alpha[i]%2==(Q[i]>>i)&1 for i in range(n)) + return Op(n,tuple([(1<>i&1 else 0,1<>i&1 else 0) for i in range(n)]),[('C',q,sgn)]) +def xgate(n,b):return Op(n,tuple([(1<>i)&1)) for i in range(n)]),[('X',b)]) +def fourier(n,axes=None): + out=ident(n) + for i in range(n) if axes is None else axes:out=out.then(cgate(n,1<len(selected):picks.append(j);selected.append(x) + assert len(picks)==r and all(x>>r==0 for x in Bcols) + Br=transpose(selected,r);Bi=inv(Br,r);Dr=transpose([Dcols[j]&((1<> j) & 1) << i for i, row in enumerate(matrix)) for j in range(len(matrix))) + + +def inverse(matrix): + n = len(matrix) + rows = [row | (1 << (n+i)) for i, row in enumerate(matrix)] + for j in range(n): + pivot = next((i for i in range(j, n) if rows[i] >> j & 1), None) + require(pivot is not None, 'singular binary chart') + rows[j], rows[pivot] = rows[pivot], rows[j] + for i in range(n): + if i != j and rows[i] >> j & 1: + rows[i] ^= rows[j] + require([row & ((1 << n)-1) for row in rows] == [1 << i for i in range(n)], 'binary inverse') + return tuple(row >> n for row in rows) + + +def extend(vectors, n): + columns, pivots = [], {} + for value in tuple(vectors) + tuple(1 << i for i in range(n)): + reduced = value + while reduced: + j = reduced.bit_length()-1 + if j not in pivots: + pivots[j] = reduced + columns.append(value) + break + reduced ^= pivots[j] + require(len(columns) == n, 'frame basis extension') + return tuple(columns) + + +def adjoint(circuit): + out = [] + for gate in reversed(circuit): + if gate[0] == 'P': + out.append(('P', inverse(gate[1]))) + elif gate[0] == 'D': + out.append(('D', gate[1], tuple(-a % 4 for a in gate[2]))) + elif gate[0] == 'C': + out.append(('C', gate[1], -gate[2])) + elif gate[0] == 'phase': + out.append(('phase', -gate[1] % 4)) + else: + require(gate[0] == 'X', 'adjoint gate type') + out.append(gate) + return tuple(out) + + +def fourier(rank): + return tuple(('C', 1 << i, 1) for i in range(rank)) + + +def frame(vectors, n): + rank = len(vectors) + if rank == 0: + return () + if rank == n: + return fourier(n) + matrix = transpose(extend(vectors, n)) + columns = transpose(inverse(matrix)) + quadratic = tuple((1 << i) ^ sum(parity(a & b) << j for j, b in enumerate(columns)) for i, a in enumerate(columns)) + diagonal = tuple((row >> i) & 1 for i, row in enumerate(quadratic)) + chart = (('P', matrix), ('D', quadratic, diagonal)) + return adjoint(chart) + fourier(rank) + chart + + +def monomial(record): + matrix = tuple(record['matrix_rows']) + quadratic = tuple(record['quadratic_rows']) + linear = tuple(record['linear_Z4']) + require(transpose(quadratic) == quadratic, 'quadratic symmetry') + require(len(matrix) == len(quadratic) == len(linear) == 9, 'monomial dimension') + require(all(a % 2 == (quadratic[i] >> i) & 1 for i, a in enumerate(linear)), 'diagonal parity') + inverse(matrix) + return (('D', quadratic, linear), ('P', matrix), ('X', record['offset']), ('phase', record['phase'])) + + +def recipe(record): + rank = record['rank'] + require(isinstance(rank, int) and 0 <= rank <= 9, 'child rank') + if rank == 0: + require(record['right'] is None, 'rank zero right factor') + return monomial(record['left']) + return monomial(record['right']) + fourier(rank) + monomial(record['left']) + + +def tableau(circuit, n=9): + rows = [(1 << i, 0, 0) for i in range(n)] + [(0, 1 << i, 0) for i in range(n)] + for gate in circuit: + tag = gate[0] + out = [] + inverse_transpose = transpose(inverse(gate[1])) if tag == 'P' else None + for x, z, phase in rows: + if tag == 'P': + x, z = mul(gate[1], x), mul(inverse_transpose, z) + elif tag == 'X': + phase += 2 * parity(z & gate[1]) + elif tag == 'C': + if parity(z & gate[1]): + x ^= gate[1] + phase += 3 * gate[2] + elif tag == 'D': + quadratic, linear = gate[1:] + phase += sum(linear[i] for i in range(n) if x >> i & 1) + phase += 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(n) if x >> i & 1) + z ^= mul(quadratic, x) + else: + require(tag == 'phase', 'tableau gate type') + out.append((x, z, phase % 4)) + rows = out + return tuple(rows) + + +@lru_cache(maxsize=512) +def action(gate): + if gate[0] == 'P': + return tuple(mul(gate[1], x) for x in range(512)) + require(gate[0] == 'D', 'state action type') + quadratic, linear = gate[1:] + return tuple((sum(linear[i] for i in range(9) if x >> i & 1) + + 2 * sum(parity((quadratic[i] >> (i+1)) & (x >> (i+1))) for i in range(9) if x >> i & 1)) % 4 for x in range(512)) + + +def rotate(pair, power): + a, b = pair + return ((a, b), (-b, a), (-a, -b), (b, -a))[power % 4] + + +def state(circuit, basis=0): + value, denominator = {basis: (1, 0)}, 0 + for gate in circuit: + tag = gate[0] + result = {} + if tag == "C": + direction, sign = gate[1:] + for address, (a, b) in value.items(): + for target, pair in ((address, (a - sign*b, b + sign*a)), + (address ^ direction, (a + sign*b, b - sign*a))): + old = result.get(target, (0, 0)) + result[target] = (old[0] + pair[0], old[1] + pair[1]) + denominator += 1 + else: + for address, pair in value.items(): + if tag == "P": + target = mul(gate[1], address) + elif tag == "X": + target = address ^ gate[1] + else: + target = address + if tag == "D": + pair = rotate(pair, action(gate)[address]) + else: + require(tag == "phase", "Unknown Gaussian state gate") + pair = rotate(pair, gate[1]) + require(target not in result, "A monomial address map is not injective") + result[target] = pair + value = {address: pair for address, pair in result.items() if pair != (0, 0)} + while denominator and all((a | b) % 2 == 0 for a, b in value.values()): + denominator -= 1 + value = {address: (a//2, b//2) for address, (a, b) in value.items()} + return value, denominator + + +def equal(actual, expected, label): + require(tableau(actual) == tableau(expected), label + ": signed Pauli action") + require(state(actual) == state(expected), label + ": exact global phase") + + +def verify(data, certificate): + word = data["word"] + original, clean = data["programs"], data["clean_programs"] + source_recipes = data["recipes"] + residuals = data["residuals"]["recipes"] + native_tags = {"climb", "adapter", "residual_adapter"} + for orientation in ("forward", "backward"): + native = [event for event in clean[orientation] if event[0] in native_tags] + require(native == [event for event in original[orientation] if event[0] in native_tags], + "A retained native event changed") + require(len(native) == 5056, "The retained native event count changed") + frames = [frame(tuple(vectors), 9) for vectors in word["frames"]] + used = {(event[3], event[4]) for program in clean.values() + for event in program if event[0] == "climb"} + children = {(record["old"], record["new"]): record for record in source_recipes["children"]} + require(len(children) == len(source_recipes["children"]) and used <= set(children), + "The retained child recipe coverage is incomplete") + for old, new in sorted(used): + record = children[old, new] + require(record["rank"] == len(word["frames"][new]) - len(word["frames"][old]), + "A retained child has the wrong rank") + equal(recipe(record), adjoint(frames[old]) + frames[new], "Retained child") + endpoints = {(record["role"], record["port"]): record + for record in source_recipes["endpoint_adapters"]} + require(len(endpoints) == len(source_recipes["endpoint_adapters"]) + and set(endpoints) == {(role, p) for role in ("source", "target") for p in range(112)}, + "The endpoint adapter coverage is incomplete") + for (role, port), record in endpoints.items(): + direction = word["ports"][port] + conventional = (("C", direction, 1),) if role == "source" else ( + ("C", direction, -1),) + fourier(9) + index = word["start"][port] if role == "source" else word["final"][112 + port] + require(record["frame"] == index and record["rank"] == 0, "An endpoint frame changed") + equal(recipe(record), adjoint(conventional) + frames[index], "Endpoint adapter") + used_residuals = set() + for program in clean.values(): + for event in program: + if event[0] != "residual_adapter": + continue + _, position, register, entry, *tail = event + terminal = tail[0] if tail else 1 + key = str(entry) if terminal == 1 else str(entry) + ":" + str(terminal) + require(key in residuals and position in ("pre", "post"), "A residual binding changed") + require(entry == word["start"][register] and terminal == word["final"][register], + "A residual endpoint changed") + used_residuals.add(key) + for key in sorted(used_residuals): + record = residuals[key] + equal(recipe(record), adjoint(frames[record["frame"]]) + frames[record.get("terminal", 1)], + "Residual adapter") + records = certificate["input_recipes"] + ports = certificate["compensation_ports"] + require([record["port"] for record in records] == ports and len(records) == 8, + "The eight input recipes changed") + columns = 0 + for item in records: + port, label = item["port"], item["label"] + require(label == word["ports"][port] and item["canonical_start_frame_id"] == word["start"][port], + "An input recipe has the wrong supplier label") + record = item["recipe"] + require(record["rank"] == 1, "An input copy has the wrong child rank") + for side in ("left", "right"): + factor = record[side] + require(factor["quadratic_rows"] == [0] * 9 and factor["linear_Z4"] == [0] * 9 + and factor["offset"] == factor["phase"] == 0, + "An input factor is not an address permutation") + actual, expected = recipe(record), (("C", label, 1),) + equal(actual, expected, "Positive inherited input line") + for basis in range(512): + require(state(actual, basis) == state(expected, basis), "A complete input Gaussian column differs") + columns += 1 + negative = monomial(record["right"]) + (("C", 1, -1),) + monomial(record["left"]) + require(tableau(negative) != tableau(expected) or state(negative) != state(expected), + "An inverse input child was not detected") + phased = actual + (("phase", 1),) + require(tableau(phased) == tableau(actual) and state(phased) != state(expected), + "An input phase-only error was not detected") + return {"status": "PASS_EXACT_INPUT_NATIVE_FRAMES", "retained_native_events_per_orientation": 5056, + "retained_child_recipes": len(used), "endpoint_adapter_recipes": len(endpoints), + "residual_adapter_recipes": len(used_residuals), "new_input_recipes": len(records), + "new_exact_gaussian_columns": columns, "inverse_input_child_controls": len(records), + "phase_only_controls": len(records), "address_permutation_factors": 2 * len(records), + "method": "Independent signed Pauli and exact Gaussian interpretation; no compiler import", + "scope": "Positive inherited input frames before every retained adapter. No recursive hosting claim."} diff --git a/research/selected-move-old-coded-full/inputs/core/reference/translation/NOTICE.md b/research/selected-move-old-coded-full/inputs/core/reference/translation/NOTICE.md new file mode 100644 index 0000000000..903e332da2 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/translation/NOTICE.md @@ -0,0 +1,20 @@ +# Credit and assistance + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +New work is Apache-2.0. Exact retained sources preserve their original notices. + +The selected #7000 source, its application and predecessor native/Clifford +contributors supply the actual event and operator decomposition. The published +literal-native-quadratic-phase package supplies the exact current recipe +binding and five-Gamma/raw packed ABI. The published literal-row-reversal +package supplies the unchanged literal record-reversal graph, classical +two-stack implementation and exact cost/history theorem. The phase lineage +supplies the retained Gamma/unary helpers, and #7349 supplies the finite +machine grammar and builder. The earlier serial monomial descriptor iterator +is a distinct predecessor, not a solved numerical join on this ABI. + +This package contributes literal collapsed-descriptor production and the +actual fixed-graph join for one source-bound post-matrix translation. It does +not claim the source recipe, tensor translation identity, reversal algorithm, +or classical unary/binary conversion as new. Independent AI review, where +recorded, is not human or formal-kernel acceptance. diff --git a/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/inputs/controller_reference.py b/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/inputs/controller_reference.py new file mode 100644 index 0000000000..3ab6d0361f --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/inputs/controller_reference.py @@ -0,0 +1,112 @@ +"""Finite three-tape online rank-recursion control; Apache-2.0. +Only PC and local symbols affect execution. Metrics/event logs are observers. +""" +from dataclasses import dataclass, field +BLANK, ONE, MARK = '_', '1', '|' +WIDTH, CHILD, STACK = range(3) + +class Builder: + def __init__(self): self.code, self.labels, self.serial = [], {}, 0 + def mark(self,n): + if n in self.labels: raise ValueError('duplicate label') + self.labels[n]=len(self.code) + def op(self,*x): self.code.append(x) + def rewind(self,t,symbols): + self.serial+=1; loop=f'rw{self.serial}'; done=loop+'done' + self.op('move',t,-1); self.mark(loop) + self.op('read',t,{s:loop+'step' for s in symbols}|{MARK:done}) + self.mark(loop+'step'); self.op('move',t,-1); self.op('goto',loop) + self.mark(done); self.op('move',t,1) + def finish(self,alphabet): + result=[] + for op,*a in self.code: + if op=='goto': a[0]=self.labels[a[0]] + elif op=='read': a[1]={s:self.labels[n] for s,n in a[1].items()} + result.append((op,*a)) + return tuple(result),tuple(alphabet) + +def compile_controller(m,ranks): + """Parameters are compile-time constants, absent from run-time state.""" + if type(m) is not int or m<2 or not ranks: raise ValueError('bad fixed profile') + if any(type(r) is not int or not 1<=r=budget: raise ValueError('finite verifier budget') + self.step() + return self + +def initial_tapes(width,origins=(0,0,0),ancestor=('0','1','t0','_','|','0')): + if width<1: raise ValueError('positive width') + u,c,p=origins + return [Tape({u-1:MARK,**{u+i:ONE for i in range(width)}},u),Tape({c-1:MARK},c), + Tape({p-1:MARK,**{p-2-i:s for i,s in enumerate(ancestor) if s!=BLANK}},p)] diff --git a/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/reverse.py b/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/reverse.py new file mode 100644 index 0000000000..60fce51dd8 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/translation/reference/reverse.py @@ -0,0 +1,207 @@ +"""Literal complete-record reversal from three encoded binary descriptors. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. The two-stack algorithm is classical and already in 02-streams; +the unary/trace helper patterns come from the credited literal S_D package. +This zero-argument compiler emits one fixed local-symbol instruction graph. +""" +from pathlib import Path +import hashlib +import sys + +HERE = Path(__file__).resolve().parent +MACHINE = HERE / 'inputs' / 'controller_reference.py' +EXPECTED_MACHINE = 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73' +if hashlib.sha256(MACHINE.read_bytes()).hexdigest() != EXPECTED_MACHINE: + raise ValueError('frozen literal machine source drift') +sys.path.insert(0, str(MACHINE.parent)) +from controller_reference import Builder, Machine, Tape, BLANK, ONE, MARK + +(PDESC, RDESC, BDESC, DATA, OUTPUT, PTR, RTR, BTR, DOUBLE, + HTRACE, GROUP, RECORD, DTRACE) = range(13) +PRIVATE = tuple(range(4, 13)) +BITS = ('0', ONE) + + +def fresh(a, stem): + a.serial += 1 + return stem + str(a.serial) + + +def clear(a, tape, symbols=(ONE,)): + k = fresh(a, 'clear') + a.mark(k) + a.op('read', tape, {s: k+'bit' for s in symbols} | {BLANK: k+'done'}) + a.mark(k+'bit') + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(tape, (BLANK,)) + + +def unary_copy(a, source, target, *, repeat=1, extra=0, erase=False): + k = fresh(a, 'copy') + a.mark(k) + a.op('read', source, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + for _ in range(repeat): + a.op('write', target, ONE) + a.op('move', target, 1) + if erase: + a.op('write', source, BLANK) + a.op('move', source, 1) + a.op('goto', k) + a.mark(k+'done') + for _ in range(extra): + a.op('write', target, ONE) + a.op('move', target, 1) + a.rewind(source, (BLANK,) if erase else (ONE,)) + a.rewind(target, (ONE,)) + + +def trace_return(a, tape, trace): + k = fresh(a, 'return') + a.op('move', trace, -1) + a.mark(k) + a.op('read', trace, {ONE: k+'bit', MARK: k+'done'}) + a.mark(k+'bit') + a.op('write', trace, BLANK) + a.op('move', trace, -1) + a.op('move', tape, -1) + a.op('goto', k) + a.mark(k+'done') + a.op('move', trace, 1) + + +def descriptor_step(a, descriptor): + a.op('write', HTRACE, ONE) + a.op('move', HTRACE, 1) + a.op('move', descriptor, 1) + + +def binary_descriptor(a, descriptor, target): + """A positive canonical MSB-first binary word to a unary guide.""" + k = fresh(a, 'binary') + a.op('read', descriptor, {ONE: k+'first'}) + a.mark(k+'first') + a.op('write', target, ONE) + descriptor_step(a, descriptor) + a.mark(k+'digit') + a.op('read', descriptor, {str(b): k+str(b) for b in (0, 1)} | + {BLANK: k+'done'}) + for bit in (0, 1): + a.mark(k+str(bit)) + unary_copy(a, target, DOUBLE, repeat=2, extra=bit) + clear(a, target) + unary_copy(a, DOUBLE, target, erase=True) + descriptor_step(a, descriptor) + a.op('goto', k+'digit') + a.mark(k+'done') + trace_return(a, descriptor, HTRACE) + + +def compile_reverse(): + """Compile once; no descriptor, shape, payload or origin argument.""" + a = Builder() + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + for descriptor, target in ((PDESC, PTR), (RDESC, RTR), (BDESC, BTR)): + binary_descriptor(a, descriptor, target) + a.mark('prefix') + a.op('read', PTR, {ONE: 'load_record', BLANK: 'finish'}) + a.mark('load_record') + a.op('read', RTR, {ONE: 'load_bit', BLANK: 'group_loaded'}) + a.mark('load_bit') + a.op('read', BTR, {ONE: 'read_bit', BLANK: 'record_loaded'}) + a.mark('read_bit') + a.op('read', DATA, {str(b): 'load'+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark('load'+bit) + a.op('write', GROUP, bit) + a.op('move', GROUP, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('move', BTR, 1) + a.op('goto', 'load_bit') + a.mark('record_loaded') + a.rewind(BTR, (ONE,)) + a.op('move', RTR, 1) + a.op('goto', 'load_record') + a.mark('group_loaded') + a.rewind(RTR, (ONE,)) + a.op('move', GROUP, -1) + a.mark('pop_record') + a.op('read', RTR, {ONE: 'pop_bit', BLANK: 'group_popped'}) + a.mark('pop_bit') + a.op('read', BTR, {ONE: 'pop_read', BLANK: 'record_popped'}) + a.mark('pop_read') + a.op('read', GROUP, {str(b): 'pop'+str(b) for b in (0, 1)}) + for bit in ('0', ONE): + a.mark('pop'+bit) + a.op('write', RECORD, bit) + a.op('move', RECORD, 1) + a.op('write', GROUP, BLANK) + a.op('move', GROUP, -1) + a.op('move', BTR, 1) + a.op('goto', 'pop_bit') + a.mark('record_popped') + a.rewind(BTR, (ONE,)) + a.op('move', RECORD, -1) + a.mark('emit_record') + a.op('read', RECORD, {str(b): 'emit'+str(b) for b in (0, 1)} | + {MARK: 'record_emitted'}) + for bit in ('0', ONE): + a.mark('emit'+bit) + a.op('write', OUTPUT, bit) + a.op('move', OUTPUT, 1) + a.op('write', RECORD, BLANK) + a.op('move', RECORD, -1) + a.op('goto', 'emit_record') + a.mark('record_emitted') + a.op('move', RECORD, 1) + a.op('move', RTR, 1) + a.op('goto', 'pop_record') + a.mark('group_popped') + a.op('read', GROUP, {MARK: 'prefix_done'}) + a.mark('prefix_done') + a.op('move', GROUP, 1) + a.rewind(RTR, (ONE,)) + a.op('move', PTR, 1) + a.op('goto', 'prefix') + a.mark('finish') + # Exact cardinality is derived from descriptor guides before DATA writes. + a.op('read', DATA, {BLANK: 'verified', '0': 'reject', ONE: 'reject'}) + a.mark('verified') + trace_return(a, DATA, DTRACE) + a.rewind(OUTPUT, BITS) + a.mark('commit') + a.op('read', OUTPUT, {str(b): 'commit'+str(b) for b in (0, 1)} | + {BLANK: 'committed'}) + for bit in ('0', ONE): + a.mark('commit'+bit) + a.op('write', DATA, bit) + a.op('write', OUTPUT, BLANK) + a.op('move', OUTPUT, 1) + a.op('move', DATA, 1) + a.op('write', DTRACE, ONE) + a.op('move', DTRACE, 1) + a.op('goto', 'commit') + a.mark('committed') + trace_return(a, DATA, DTRACE) + a.rewind(OUTPUT, (BLANK,)) + a.rewind(PTR, (ONE,)) + for tape in (PTR, RTR, BTR): + clear(a, tape) + for tape in PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + a.mark('reject') + a.op('read', DATA, {}) + return a.finish((BLANK, '0', ONE, MARK)) + diff --git a/research/selected-move-old-coded-full/inputs/core/reference/translation/translate.py b/research/selected-move-old-coded-full/inputs/core/reference/translation/translate.py new file mode 100644 index 0000000000..5e1149f8ab --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/reference/translation/translate.py @@ -0,0 +1,221 @@ +"""Literal descriptor production and selected post-matrix X_1 translation. + +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Apache-2.0. Gamma/unary patterns are credited to the retained native phase; +the complete-record permutation is the unchanged retained row-reversal graph. +All integer arithmetic below is fixed-table construction, never runtime work. +""" +from pathlib import Path +import hashlib +import importlib.util +import sys + +HERE = Path(__file__).resolve().parent +PINS = { + 'reference/reverse.py': '4b516d85baf3303db809bc1174394009b1fc71a8f7d17fb6c729ec8bb6aba245', + 'reference/inputs/controller_reference.py': 'e664a748e6b6797d4b60f60a7a7dd68b59a5608acf56b9c5d8b466f363755f73', +} +for path, expected in PINS.items(): + if hashlib.sha256((HERE / path).read_bytes()).hexdigest() != expected: + raise ValueError('frozen source bytes: ' + path) +spec = importlib.util.spec_from_file_location('translation_retained_reverse', HERE / 'reference/reverse.py') +REV = importlib.util.module_from_spec(spec) +sys.modules[spec.name] = REV +spec.loader.exec_module(REV) +Builder, BLANK, ONE, MARK = REV.Builder, REV.BLANK, REV.ONE, REV.MARK +clear, unary_copy, trace_return, fresh = REV.clear, REV.unary_copy, REV.trace_return, REV.fresh +BITS = ('0', ONE) + +HEADER, DATA, PDESC, RDESC, BDESC = range(5) +# The retained reversal's nine private ports become 5,...,13. +HTRACE, LENGTH, DOUBLE, F, COEFF, OUTER, SPECTATOR, WIDTH, PRODUCT, HALF, DIGITS = range(14, 25) +PRODUCER_PRIVATE = (PDESC, RDESC, BDESC) + tuple(range(14, 25)) +ALL_PRIVATE = tuple(range(2, 25)) +REVERSE_PORTS = (PDESC, RDESC, BDESC, DATA) + tuple(range(5, 14)) + + +def header_step(a): + a.op('write', HTRACE, ONE) + a.op('move', HTRACE, 1) + a.op('move', HEADER, 1) + + +def gamma(a, target): + """Retained five-Gamma decoding pattern on this fixed private inventory.""" + k = fresh(a, 'gamma') + a.mark(k+'prefix') + a.op('read', HEADER, {'0': k+'zero', ONE: k+'one'}) + a.mark(k+'zero') + a.op('write', LENGTH, ONE) + a.op('move', LENGTH, 1) + header_step(a) + a.op('goto', k+'prefix') + a.mark(k+'one') + header_step(a) + a.op('write', target, ONE) + a.op('move', LENGTH, -1) + a.mark(k+'tail') + a.op('read', LENGTH, {ONE: k+'tailbit', MARK: k+'done'}) + a.mark(k+'tailbit') + a.op('write', LENGTH, BLANK) + a.op('read', HEADER, {str(b): k+'digit'+str(b) for b in (0, 1)}) + for bit in (0, 1): + a.mark(k+'digit'+str(bit)) + unary_copy(a, target, DOUBLE, repeat=2, extra=bit) + clear(a, target) + unary_copy(a, DOUBLE, target, erase=True) + header_step(a) + a.op('move', LENGTH, -1) + a.op('goto', k+'tail') + a.mark(k+'done') + a.op('move', LENGTH, 1) + + +def power_descriptor(a): + """Write the canonical descriptor 1 followed by f zeroes, not unary 2^f.""" + a.op('write', RDESC, ONE) + a.op('move', RDESC, 1) + k = fresh(a, 'power') + a.mark(k) + a.op('read', F, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + a.op('write', RDESC, '0') + a.op('move', RDESC, 1) + a.op('move', F, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(F, (ONE,)) + a.rewind(RDESC, BITS) + + +def product_guide(a): + """Generate exactly 2*S*r*w unary marks by actual nested local scans.""" + k = fresh(a, 'product') + a.mark(k+'s') + a.op('read', SPECTATOR, {ONE: k+'r', BLANK: k+'done'}) + a.mark(k+'r') + a.op('read', COEFF, {ONE: k+'w', BLANK: k+'r_done'}) + a.mark(k+'w') + a.op('read', WIDTH, {ONE: k+'bit', BLANK: k+'w_done'}) + a.mark(k+'bit') + for _ in range(2): + a.op('write', PRODUCT, ONE) + a.op('move', PRODUCT, 1) + a.op('move', WIDTH, 1) + a.op('goto', k+'w') + a.mark(k+'w_done') + a.rewind(WIDTH, (ONE,)) + a.op('move', COEFF, 1) + a.op('goto', k+'r') + a.mark(k+'r_done') + a.rewind(COEFF, (ONE,)) + a.op('move', SPECTATOR, 1) + a.op('goto', k+'s') + a.mark(k+'done') + a.rewind(SPECTATOR, (ONE,)) + a.rewind(PRODUCT, (ONE,)) + + +def suffix_power(a): + """Multiply the PRODUCT guide by 2^(8f), in eight fixed doublings per mark.""" + k = fresh(a, 'suffix') + a.mark(k) + a.op('read', F, {ONE: k+'bit', BLANK: k+'done'}) + a.mark(k+'bit') + for _ in range(8): + unary_copy(a, PRODUCT, DOUBLE, repeat=2) + clear(a, PRODUCT) + unary_copy(a, DOUBLE, PRODUCT, erase=True) + a.op('move', F, 1) + a.op('goto', k) + a.mark(k+'done') + a.rewind(F, (ONE,)) + + +def unary_binary(a, source, destination): + """Consume positive unary n; emit canonical MSB-first binary n in O(n). + + source, HALF, DIGITS and destination are distinct guarded physical roles. + Every parity, quotient and termination choice is a local scanned branch. + """ + k = fresh(a, 'encode') + a.op('goto', k+'p0q0') + for phase, (current, quotient) in enumerate(((source, HALF), (HALF, source))): + for parity in (0, 1): + name = k+f'p{phase}q{parity}' + a.mark(name) + a.op('read', current, {ONE: name+'bit', BLANK: name+'done'}) + a.mark(name+'bit') + a.op('write', current, BLANK) + if parity: + a.op('write', quotient, ONE) + a.op('move', quotient, 1) + a.op('move', current, 1) + a.op('goto', k+f'p{phase}q{1-parity}') + a.mark(name+'done') + a.rewind(current, (BLANK,)) + a.rewind(quotient, (ONE,)) + a.op('write', DIGITS, str(parity)) + a.op('move', DIGITS, 1) + a.op('read', quotient, {ONE: k+f'p{1-phase}q0', BLANK: k+'emit_start'}) + a.mark(k+'emit_start') + a.op('move', DIGITS, -1) + a.mark(k+'emit') + a.op('read', DIGITS, {str(b): k+'emit'+str(b) for b in (0, 1)} | {MARK: k+'done'}) + for bit in (0, 1): + a.mark(k+'emit'+str(bit)) + a.op('write', destination, str(bit)) + a.op('move', destination, 1) + a.op('write', DIGITS, BLANK) + a.op('move', DIGITS, -1) + a.op('goto', k+'emit') + a.mark(k+'done') + a.op('move', DIGITS, 1) + a.rewind(destination, BITS) + + +def retained_reversal(a, after): + """Construction-only relabeling; every retained runtime instruction remains local.""" + code, alphabet = REV.compile_reverse() + if alphabet != (BLANK, '0', ONE, MARK): + raise ValueError('retained alphabet') + for pc, instruction in enumerate(code): + a.mark('reverse_'+str(pc)) + op, *args = instruction + if op == 'read': + a.op(op, REVERSE_PORTS[args[0]], {s: 'reverse_'+str(dst) for s, dst in args[1].items()}) + elif op in ('write', 'move'): + a.op(op, REVERSE_PORTS[args[0]], args[1]) + elif op == 'goto': + a.op(op, 'reverse_'+str(args[0])) + elif op == 'halt': + a.op('goto', after) + else: + raise ValueError('nonlocal retained opcode') + + +def compile_translation(): + """One fixed 25-tape program; no runtime integer or recipe argument.""" + a = Builder() + for tape in PRODUCER_PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, MARK) + a.op('move', tape, 1) + for target in (F, COEFF, OUTER, SPECTATOR, WIDTH): + gamma(a, target) + trace_return(a, HEADER, HTRACE) + power_descriptor(a) + product_guide(a) + suffix_power(a) + unary_binary(a, OUTER, PDESC) + unary_binary(a, PRODUCT, BDESC) + retained_reversal(a, 'retire_descriptors') + a.mark('retire_descriptors') + for tape in PRODUCER_PRIVATE: + clear(a, tape, BITS) + for tape in PRODUCER_PRIVATE: + a.op('move', tape, -1) + a.op('write', tape, BLANK) + a.op('move', tape, 1) + a.op('halt') + return a.finish((BLANK, '0', ONE, MARK)) diff --git a/research/selected-move-old-coded-full/inputs/core/verify.py b/research/selected-move-old-coded-full/inputs/core/verify.py new file mode 100644 index 0000000000..1aa0ba169c --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/core/verify.py @@ -0,0 +1,316 @@ +"""Stdlib-only, independent dense CPU and direct Gaussian kernel checks. + +The oracle uses sparse tensor matrix entries and inverse addresses. It does +not execute CNOT words, incremental phase counters or C butterfly rows. +""" +from pathlib import Path +import argparse +import hashlib +import json +import random +import sys + +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import move as m + + +def require(ok, message): + if not ok: + raise ValueError(message) + + +def gamma(n): + bits = bin(n)[2:] + return '0' * (len(bits) - 1) + bits + + +def header(shape): + return ''.join(map(gamma, shape)) + + +def signed(n, w): + require(-(1 << (w - 1)) <= n < (1 << (w - 1)), 'fixture signed range') + return format(n % (1 << w), '0' + str(w) + 'b') + + +def encode(values, w): + return ''.join(signed(a, w) + signed(b, w) for a, b in values) + + +def mul(a, b): + return a[0] * b[0] - a[1] * b[1], a[0] * b[1] + a[1] * b[0] + + +def rotate(z, q): + return (z, (-z[1], z[0]), (-z[0], -z[1]), (z[1], -z[0]))[q % 4] + + +def unpack(address, f): + mask = (1 << f) - 1 + return tuple((address >> ((8 - i) * f)) & mask for i in range(9)) + + +def pack(coordinates, f): + out = 0 + for coordinate in coordinates: + out = (out << f) | coordinate + return out + + +def linear(rows, coordinates): + result = [] + for row in rows: + value = 0 + for i, coordinate in enumerate(coordinates): + if row >> i & 1: + value ^= coordinate + result.append(value) + return tuple(result) + + +def inverse(rows): + aug = [row | (1 << (9 + i)) for i, row in enumerate(rows)] + for i in range(9): + pivot = next(j for j in range(i, 9) if aug[j] >> i & 1) + aug[i], aug[pivot] = aug[pivot], aug[i] + for j in range(9): + if j != i and aug[j] >> i & 1: + aug[j] ^= aug[i] + require([row & 511 for row in aug] == [1 << i for i in range(9)], 'inverse') + return tuple(row >> 9 for row in aug) + + +def phase(recipe, coordinates, f): + value = f * recipe['phase'] + for i in range(9): + value += recipe['linear_Z4'][i] * coordinates[i].bit_count() + for j in range(i + 1, 9): + if recipe['quadratic_rows'][i] >> j & 1: + value += 2 * (coordinates[i] & coordinates[j]).bit_count() + return value % 4 + + +RECIPE = json.loads((HERE / 'reference/RECIPE.json').read_text()) +RIGHT, LEFT = RECIPE['lowered_recipe']['right'], RECIPE['lowered_recipe']['left'] +IRIGHT, ILEFT = inverse(RIGHT['matrix_rows']), inverse(LEFT['matrix_rows']) + + +def oracle(values, shape, *, omit_constant=False, first_axis=False): + f, r, p, s, w, _ = shape + q, tail = 1 << f, s * r + block = 1 << (9 * f) + weights = [] + for x in range(q): + z = (1, 0) + for j in range(f): + z = mul(z, (1, -1 if x >> j & 1 else 1)) + weights.append(z) + result = [] + for outer in range(p): + for output in range(block): + z = linear(ILEFT, unpack(output, f)) + for suffix in range(tail): + total = (0, 0) + for t0 in range(q): + t = (t0,) + z[1:] + translated = tuple(a ^ (q - 1 if RIGHT['offset'] >> i & 1 else 0) + for i, a in enumerate(t)) + source = linear(IRIGHT, translated) + exponent = phase(RIGHT, source, f) + phase(LEFT, z, f) + if omit_constant: + exponent -= f * RIGHT['phase'] + coeff = rotate(weights[z[0] ^ t0], exponent) + original = values[(outer * block + pack(source, f)) * tail + suffix] + term = mul(coeff, original) + total = total[0] + term[0], total[1] + term[1] + require(total[0] % q == total[1] % q == 0, 'oracle nonintegral final image') + result.append((total[0] // q, total[1] // q)) + return encode(result, w) + + +SYMBOLS = {'_': 0, '0': 1, '1': 2, '|': 3} + + +def numeric(code): + result = [] + for op, *args in code: + if op == 'read': + branch = [-1] * 4 + for symbol, target in args[1].items(): + branch[SYMBOLS[symbol]] = target + result.append((0, args[0], branch)) + elif op == 'write': + result.append((1, args[0], SYMBOLS[args[1]])) + elif op == 'move': + require(args[1] in (-1, 1), 'nonunit move') + result.append((2, args[0], args[1])) + elif op == 'goto': + result.append((3, args[0], None)) + elif op == 'halt': + result.append((4, 0, None)) + else: + raise ValueError('nonliteral opcode') + return tuple(result) + + +def packet(shape, word, *, tapes=None): + e, v = len(header(shape)), len(word) + capacity = 4 * (e + v + 10) + if tapes is None: + tapes = [bytearray(capacity + 7) for _ in range(m.TAPES)] + for tape in tapes: + tape[0:2] = b'\x02\x03' + tape[-2:] = b'\x01\x03' + for tape in tapes: + require(len(tape) >= e + v + 20, 'fixture allocation') + for index, text in enumerate((header(shape) + '|01|', word)): + # Opaque tail starts after six codes. Only DATA's exact blank endpoint + # belongs to packet geometry. + tapes[index][2] = 2 + tapes[index][3:3 + len(text)] = bytes(SYMBOLS[x] for x in text) + tapes[index][3 + len(text)] = 0 + return tapes + + +def execute(code, tapes, entries, *, budget): + code = numeric(code) + heads, lows, highs = [3] * m.TAPES, [3] * m.TAPES, [3] * m.TAPES + milestones = sorted((pc, name) for name, pc in entries.items()) + next_mark, marked, cursor = milestones[0][0], {}, 0 + pc = steps = writes = early = 0 + rejected = False + while True: + if pc == next_mark: + marked[milestones[cursor][1]] = steps + cursor += 1 + next_mark = milestones[cursor][0] if cursor < len(milestones) else -1 + op, tape, arg = code[pc] + steps += 1 + if steps > budget: + raise ValueError('finite verifier budget') + if op == 0: + pc = arg[tapes[tape][heads[tape]]] + if pc < 0: + rejected = True + break + elif op == 1: + tapes[tape][heads[tape]] = arg + if tape == m.DATA: + writes += 1 + early += pc < entries['commit'] + pc += 1 + elif op == 2: + heads[tape] += arg + if heads[tape] < lows[tape]: + lows[tape] = heads[tape] + if heads[tape] > highs[tape]: + highs[tape] = heads[tape] + require(0 <= heads[tape] < len(tapes[tape]), 'fixture boundary escaped') + pc += 1 + elif op == 3: + pc = tape + else: + break + return dict(steps=steps, rejected=rejected, writes=writes, early=early, + heads=heads, lows=lows, highs=highs, milestones=marked) + + +def run_case(name, shape, values, *, accept=True, mutation=None, expected=None, tapes=None): + word = encode(values, shape[4]) + tapes = packet(shape, word, tapes=tapes) + owners = tuple(map(id, tapes)) + before = tuple(bytes(tape) for tape in tapes) + code, _, entries = m._compile_move(mutation) + f, e, v = shape[0], len(header(shape)), len(word) + receipt = execute(code, tapes, entries, budget=(1 << 24) * (f * v + e + 1)) + require(receipt['rejected'] != accept, name + ': unexpected acceptance') + require(tuple(map(id, tapes)) == owners, name + ': owner replacement') + require(bytes(tapes[0]) == before[0], name + ': public HEADER value changed') + require(receipt['early'] == 0, name + ': early public DATA write') + if accept: + expected = oracle(values, shape) if expected is None else expected + target = bytearray(before[1]) + target[3:3 + v] = bytes(SYMBOLS[x] for x in expected) + require(tapes[1] == target, name + ': complete direct kernel mismatch') + require(receipt['writes'] == v, name + ': incomplete public commit') + require(receipt['heads'] == [3] * m.TAPES, name + ': head return') + require(all(bytes(tape) == before[i] for i, tape in enumerate(tapes) if i != 1), + name + ': private/header/exterior not restored') + history = sum(hi - lo + 1 for lo, hi in zip(receipt['lows'], receipt['highs'])) + require(history <= m.TAPES + 1024 * (v + e + 1), name + ': historical charge') + receipt['history'] = history + else: + require(bytes(tapes[1]) == before[1], name + ': rejection changed original DATA') + require(receipt['writes'] == 0, name + ': rejecting public commit') + return dict(name=name, shape=shape, bits=v, **receipt), tapes + + +def verify(quick=False): + m.authenticate() + require(RECIPE['base_commit'] == 'e54523517d0f03e58352e647c403a5af3e525a57', 'base pin') + require(RECIPE['event'] == ['MOVE', 415, 3, 99, False] and RECIPE['native_event_index'] == 24472, + 'selected source event') + require(RECIPE['rank'] == RECIPE['lowered_recipe']['rank'] == 1, 'positive child rank') + code, alphabet, entries = m._compile_move() + numeric(code) + require(alphabet == ('_', '0', '1', '|'), 'alphabet') + require(max(args[0] for op, *args in code if op in ('read', 'write', 'move')) == 30, + 'fixed owner inventory') + for f in (1, 2, 3): + q = 1 << f + for address in range(1 << (9 * f)) if f < 3 else range(0, 1 << (9 * f), 131071): + x = unpack(address, f) + require(linear(IRIGHT, linear(RIGHT['matrix_rows'], x)) == x, 'right inverse address') + require(linear(ILEFT, linear(LEFT['matrix_rows'], x)) == x, 'left inverse address') + require(pack(x, f) == address and all(a < q for a in x), 'complete packing') + rng = random.Random(24472) + shape = (1, 1, 1, 1, 4, 1) + values = [(2 * rng.randrange(-1, 2), 2 * rng.randrange(-1, 2)) for _ in range(512)] + expected = oracle(values, shape) + require(expected != oracle(values, shape, omit_constant=True), 'absolute phase control') + require(len(expected) == 4096, 'complete m=9 field') + summary = dict(marker='PASS_LITERAL_SELECTED_MOVE_JOIN', locations=len(code), tapes=m.TAPES, + alphabet=alphabet, graph_sha256=hashlib.sha256(repr(code).encode()).hexdigest(), + source_event=RECIPE['event'], source_index=24472, + finite_address_checks=512 + 262144 + 1025, receipts=[], controls=[]) + if quick: + summary['marker'] = 'PASS_LITERAL_SELECTED_MOVE_JOIN_QUICK_ONLY' + return summary + receipt, tapes = run_case('complete_nonzero_f1', shape, values, expected=expected) + summary['receipts'].append(receipt) + # Same fixed physical owners, shorter signed fields, huge binary cutoff, + # and a following opaque tail. Historical capacities are retained. + short = (1, 1, 1, 1, 2, 1 << 257) + # Restore the clean previous DATA origin before replacing its supplied body. + tapes[1][3:3 + len(expected)] = bytes(len(expected)) + receipt, _ = run_case('shorter_reuse_huge_cutoff', short, [(0, 0)] * 512, tapes=tapes) + summary['receipts'].append(receipt) + bad = [(0, 0)] * 512 + bad[0] = (1, 0) + receipt, _ = run_case('child_nonintegral_after_three_completed_factors', (1, 1, 1, 1, 3, 1), + bad, accept=False) + require('positive_child_' in receipt['milestones'], 'child rejection coverage') + summary['receipts'].append(receipt) + for mutation in ('drop_absolute_phase', 'swap_right_order', 'omit_offset', 'corrupt_commit'): + try: + run_case(mutation, shape, values, mutation=mutation, expected=expected) + except ValueError as exc: + require('complete direct kernel mismatch' in str(exc), 'unexpected mutation failure: ' + str(exc)) + summary['controls'].append(mutation) + else: + raise ValueError('undetected mutation: ' + mutation) + return summary + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('--quick', action='store_true', help='assembly/address checks only; not full replay') + parser.add_argument('--write', action='store_true', help='explicitly replace RESULT.json') + args = parser.parse_args() + require(not (args.quick and args.write), 'quick mode cannot write accepted evidence') + result = verify(args.quick) + rendered = json.dumps(result, indent=2, sort_keys=True) + '\n' + if args.write: + (HERE / 'RESULT.json').write_text(rendered) + print(rendered, end='') diff --git a/research/selected-move-old-coded-full/inputs/grid-interface-PROOF.md b/research/selected-move-old-coded-full/inputs/grid-interface-PROOF.md new file mode 100644 index 0000000000..a9c224b2f9 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/grid-interface-PROOF.md @@ -0,0 +1,246 @@ +# Selected common-grid admission to one literal all-column Gaussian leaf + +This is a scoped enabling implication and interface reduction for selected +#7000, not a discharge of native_all_columns. The canonical base is +e54523517d0f03e58352e647c403a5af3e525a57; exact byte, Git-blob and SHA256 +bindings are in SOURCES.json. The selected +application review SHA256 is +4501502c2ceb9759b20372435fe4beb51082c5a5e2910c1fd5dbe6edca415055. + +The chosen actual native event is zero-based 24472, +`["MOVE",415,3,99,false]`, in selected `data/final.json.gz`, SHA256 +2b94953dc14a122e3ef089633f05b58ec689ec5156feb7c784ed3e137dc01883. +Its exact lowered recipe has rank 1, right constant phase 1 and left constant +phase 0. The complete record SHA256 is +064d51e9c347dbcfd9e172e5b5cab75f96912e0eb9a6f9537d53540cf4780ca9. +The literal positive leaf in #7429 is pinned at CubeJerry commit +1a555e469b89af70d309bc966f8f813ac11dc887. Its proof and source are copied +at exact Git bytes, including their original line endings. + +## 1. Premise and conclusion + +Write n for the number of bits in the complete selected root factor. This +is distinct from an array's vector-space dimension in the block theorem. +Assume the selected root/precision invariant at the entrance of this MOVE: + +* Each original real/imaginary input component is on grid 2^-p and has + absolute value strictly below 2^h, with p,h>=0. +* Every ideal current field is a finite sum c U x on that same complete + n-bit factor. U is a Gaussian-dyadic Clifford; all genuine spectators + and external rows remain complete. Exterior coefficients have denominator + height at most 178t and total Gaussian coefficient mass at most + 2*2^(161t). The selected depth condition is 356t3. + +This immediately refutes a header-only drop-in adapter on the unchanged old +physical DATA word. The literal leaf's clone expects exactly V_packed bits +and a blank; the old word still has physical bits there. Its cardinality +guard rejects before numerical execution. Changing the descriptor width to +make lengths match would change the coefficient arithmetic interpretation. +This is a concrete interface obstruction, not a counterexample to the +selected conditional theorem or to a correctly implemented bridge. + +A correct bridge owes physical source access, complete codec conversion, +component orientation, all selected and spectator address transport, the +six Gamma values with actual cutoff, one common quantum and width, genuinely +separate bank ownership, head returns and inverse conversion to the original +owner. In the explicit separate packed-bank model it has worst-case payload +work at least Omega(V_old+V_packed): arbitrary last input coefficients force +the old source head to visit its far data end, and the new full field has +to be materialized. In particular E-only descriptor work cannot pay it. +This lower bound does not preclude an admissible linear or fast ordinary +bridge; no such complete upper tariff is proved here. Reentry retains the +absolute per-role history union, not merely current field sizes. + +## 5. Exact premise-to-conclusion map and remaining gap + +| Premise/source | What it supplies | What it does not supply | +| --- | --- | --- | +| Selected #7000 application, sections 2 and 5 | Full normalized source products, exterior scalars, phase, complete root/spectators, exact-grid/depth specialization | Literal occurrence packing and physical tariff | +| Earlier #6890 | Already proved source-specific algebraic tensor/caller closure for older #6030 | A new #7000 physical provider | +| #6974 | Protected raw #6030 current_local event 9896 join under its 23-field format and direct-leaf premises | New selected source token, enclosing placement, nonleaf service | +| #7426/#7428/#7430 | Literal phase, post-matrix translation descriptor, and both binary linear factors for #7000 event 24472 | Their complete same-occurrence join and old-format acquisition | +| #7429 plus section 2 above | Exact literal positive C on every column; common-root precision forces every-axis admission on its supplied packed ABI | Codec/strided packing, whole MOVE failure retirement, fast nonleaf dispatch | + +The still-missing uniform interface is a selected-occurrence paid physical +bridge and dispatcher from actual retained field/owner/descriptor state to +that packed ABI and back, with complete monomial/child composition, complete +stock and recursive return. Algebraic A tensor identity normalization is +already settled conditional on exact primitive actions; it cannot replace +this bridge. No operator may be silently evaluated on a projected role or +partial spectator view. A literal final-image calculation alone cannot +establish the numerical domain either, as the exact control below shows. + +The enabling implication above removes a separate per-axis numerical +precondition once the selected complete-root invariant and faithful bridge +are supplied. It leaves physical all-column admission, owned erasure, +compiler closure, precision/tape implementation and analytic recovery +explicit. The selected conditional kappa remains 0.00363005817. + +## 6. Bounded evidence and controls + +`verify.py` authenticates the exact selected source exports and remote Git +blobs, regenerates the actual event 24472 recipe, and executes exact sparse +Gaussian-rational controls. Starting after the actual right monomial with +the f=2 fibre [1,0,0,1], it constructs the exact pre-right native entrance. +Both complete native entrance and complete native endpoint are integral, +while the first central Gaussian prefix is half-integral. This rejects the +weaker endpoint-only provider premise. It is not asserted reachable from +the selected guarded root pipeline. Multiplying the full native entrance +by 2^18 under the explicit n=18,p=0,h=1,F=18,w=40 control admits both prefixes. +The script also checks complete spectator-preserving packing permutations +and exact volumes for three legal strided geometries. A 5,000-value integer +scan corroborates the depth inequalities; their universal proof is section2. +No heavy literal f=2 packet or historical native catalogue was rerun. + +The remote overlap check covered exact #7421 through #7430 metadata and +targeted all-column, native dispatch, coded-remap and MOVE24472 PR queries. +#7462 shortens the left linear word, and #7503 proves a phase-observation +lower bound; neither claims the remaining bridge. Metadata coverage is +recorded in README.md and is not a proof that no unsearched work exists. +All predecessors keep their authorship; no already settled Kronecker or +Clifford-row lemma is claimed as new. Prepared for Jerry Chen / CubeJerry +with substantial OpenAI assistance; no independent human or proof-kernel +acceptance is claimed. diff --git a/research/selected-move-old-coded-full/inputs/notices/common-grid-NOTICE.md b/research/selected-move-old-coded-full/inputs/notices/common-grid-NOTICE.md new file mode 100644 index 0000000000..51fa9d494c --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/notices/common-grid-NOTICE.md @@ -0,0 +1,20 @@ +# Credit and retained source notice + +Prepared for @CubeJerry with substantial OpenAI assistance. Apache-2.0. + +The five files under `source/` are unchanged snapshots from DreamingOfClouds' +`research/p104-shared-odd-native` at +`4e13b7acdbea1c9f12aa88126435360eecea7401`. Their original LICENSE and NOTICE +are retained alongside them. The original word, caller, scale1125 certificate, +strictification parameters and candidate bound are their contributors' work. + +The proof explicitly credits #104's odd clearing and #6901's fixed-root +precision theorem, with the #4586/#5443/#6878 compiler and occurrence lineage. +Credit icekylinx, Ross Richardson, zxv, Jacob Alan Sussman and all authors +identified by those predecessor packages. No predecessor method, endpoint +identity or independent human acceptance is claimed as a new result here. + +The rational audit and fixed-grid/transfer-matrix audit were authored by +different same-session AI research agents. That separation supplies an +independent method and review; it does not imply external authorship or +formal proof verification. diff --git a/research/selected-move-old-coded-full/inputs/notices/grid-interface-NOTICE b/research/selected-move-old-coded-full/inputs/notices/grid-interface-NOTICE new file mode 100644 index 0000000000..dcfe84cbdd --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/notices/grid-interface-NOTICE @@ -0,0 +1,28 @@ +Selected MOVE packed-grid numerical interface +Prepared for Jerry Chen / CubeJerry with substantial OpenAI assistance. +Copyright 2026. Licensed under Apache License 2.0; see LICENSE. + +This package applies, rather than reclaims, the complete-root Clifford, +common-grid and depth invariants, selected source lowering and literal-leaf +contracts of its predecessors. The bundled inputs retain exact source bytes. + +Retain the notices in inputs/notices/: +- selected-NOTICE: selected shared-native construction, frame/compiler, + helper split and caller predecessors. +- common-grid-NOTICE.md: odd scalar precision, complete-root Clifford and + compiler-depth lineage. +- old-coded-NOTICE.md: current coded Gaussian MOVE/codec and physical + monomial/positive leaf predecessors. +- literal-leaf-NOTICE.md: the pending literal positive C provider and its + numerical, layout and machine predecessors. + +The source includes the retained exact Clifford compiler. Its source hash, +Git blob and canonical path are listed in SOURCES.json; source authors keep +their original credit. The Gaussian row kernel follows Jose Manuel's #3091 +lineage; common-root and odd clearing follow the authors identified in the +retained precision proof. Classical tensor, Clifford norm and fixed-rational +arguments are not claimed as new. + +No physical full bridge, whole MOVE, nonleaf dispatcher, foundational +assumption discharge, independent human/formal acceptance or new kappa is +asserted. All original selected five assumptions remain explicit. diff --git a/research/selected-move-old-coded-full/inputs/notices/literal-leaf-NOTICE.md b/research/selected-move-old-coded-full/inputs/notices/literal-leaf-NOTICE.md new file mode 100644 index 0000000000..71c5f6dae2 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/notices/literal-leaf-NOTICE.md @@ -0,0 +1,34 @@ +# Attribution and license + +Prepared for Jerry Chen / @CubeJerry with substantial OpenAI assistance. +New material is Apache-2.0; copied predecessors retain their original notices. + +Jose Manuel (jmbarrancoml), CrocSwap/integer-mult-bounds#3091, supplies the +Gaussian C numerator rows, exact carry/parity/signed-fit argument, physical +complete-axis strategy and direct tensor tariff. Credit its #3055/#3087 +physical lineage, Alejandro Zarzuelo Urdiales's #45 Gaussian tensor reserve +and norm results, James Chang's #1869 ripple arithmetic, AAAmirinu's #2327 +prefix audit, and Nick Petalas's #2772/#3089 prefix/capacity work. + +@CubeJerry's #6967 current-coded leaf supplies the earlier source/format/ +lifecycle binding and explicitly leaves literal numerical export open. +#6978, #6986 and #6989 provide distinct all-source, cutoff-transport and +rounded wrappers. Their stronger failure-retirement and old coded interfaces +are not silently inherited by this packed component. + +The actual #7000 source, Clifford compiler and retained independent Gaussian +verifier are credited to DreamingOfClouds, Ali Romman, Cinna Davis, zxv, +unpaidmoon, icekylinx, CubeJerry and the earlier authors named by the retained +sources. The construction, lowering and matrix identities are not claimed anew. + +The packed ABI is published at +`172f4535ce8dcff79f626410af845f757c1563be`. Unary/Gamma/trace patterns follow +literal-layer-phase at `8b549ca6557ccbb3017b104b27ea35051f990416`, which credits +literal-layer-egress at `51ab0539059214fcfa044938c36a0b6017232be5`. The exact +Builder/Machine originates in #7349, head +`9dfe6747b8553fd11b408f2b045c5954ef1e6eaa`. + +The parent's dense execution/oracle and literal_layer_boundary's independent +source/Gaussian/universal-cost review are separately attributed in REVIEW.md. +Their artifacts are unchanged. Independent AI work is not human approval or +formal proof-kernel acceptance. diff --git a/research/selected-move-old-coded-full/inputs/notices/old-coded-NOTICE.md b/research/selected-move-old-coded-full/inputs/notices/old-coded-NOTICE.md new file mode 100644 index 0000000000..9ec74ef605 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/notices/old-coded-NOTICE.md @@ -0,0 +1,25 @@ +# Attribution and scope + +Prepared for @CubeJerry with substantial OpenAI assistance in source analysis, +composition proof, implementation, independent matrix/arithmetic checks and +documentation. Apache-2.0. Same-session lead review is author-side evidence, +not independent human or formal-kernel acceptance. + +The published current coded monomial and positive leaf are exact dependencies, +not new algorithms in this package. Their computational files and attribution +are retained unchanged; public source pins are in DEPENDENCIES.json and +REMOTE-SOURCE-TREES.json. Shared runtime copies inside the monomial closure +retain their original notices. The thin leaf source closure is connected by +this package's discovery shim to that identical shared physical vocabulary. + +Credit Jose Manuel (`jmbarrancoml`) for #3087 and #3091 with OpenAI assistance, +and the #3055/#2250/#2378/#2422 physical permutation and coefficient lineage. +Credit Chris R (`Clear1nsight`) for #4129's older prepared common-grid binding. +Credit DreamingOfClouds and the selected #6030 construction, Ali Romman and +the retained native compiler/source lineage, #6293, unpaidmoon #6930, and +Ali Romman's distinct stochastic-rounding use of event9896 in #6532. + +Only the whole-occurrence protected current join, its explicit full invoice, +independent original-source matrix evaluation and bounded verification +composition are claimed here. No new kappa or universal selected assumption +discharge follows. diff --git a/research/selected-move-old-coded-full/inputs/notices/selected-NOTICE b/research/selected-move-old-coded-full/inputs/notices/selected-NOTICE new file mode 100644 index 0000000000..a3687d65a0 --- /dev/null +++ b/research/selected-move-old-coded-full/inputs/notices/selected-NOTICE @@ -0,0 +1,9 @@ +New shared-wire composition, seventeenth wire, and two enabling splits: developed with substantial OpenAI assistance, 2026. Apache-2.0. + +Frozen predecessor native words and odd verifier: DreamingOfClouds, with Claude Opus 5.5 (Anthropic), from #6936 and #6937. + +Retained Clifford compiler and exact native interpreter retain their original headers and lineage from #6833: native source by DreamingOfClouds; independent-helper mechanism by Ali Romman; inventory, retiming and helper-retirement extensions by Jerry Chen / @CubeJerry with OpenAI assistance. + +Helper-split lemma: Ali Romman (#5599). Shared native applications: CubeJerry (#6916). Caller blocks: CubeJerry (#6912). Owned-rise argument: CubeJerry (#6914). Width-2 phase convention: unpaidmoon (#6930). Odd-grid precedent: icekylinx (#104). + +The higher-level caller and BIT integration require their own source attribution and pins. diff --git a/research/selected-move-old-coded-full/verify.py b/research/selected-move-old-coded-full/verify.py new file mode 100644 index 0000000000..1251122842 --- /dev/null +++ b/research/selected-move-old-coded-full/verify.py @@ -0,0 +1,215 @@ +"""Direct old-address/source-frame checks of the uninterrupted full MOVE. +All decoded arithmetic here is verifier-only. Apache-2.0; prepared for +@CubeJerry with substantial OpenAI assistance and credited source oracle. +""" +from pathlib import Path +from hashlib import sha1, sha256 +import json +import random +import sys +import types + +HERE = Path(__file__).resolve().parent + + +def need(ok, message): + if not ok: raise ValueError(message) + + +def module(path, name): + m=types.ModuleType(name);m.__file__=str(path);sys.modules[name]=m + exec(compile(path.read_bytes(),str(path),'exec'),m.__dict__);return m + + +C=module(HERE/'compose.py','_checked_full_composition') +SCHEMA=('outer','rows','stock','row_bits','within_bits','record_bits','p','d', + 'K','G','H','q0','qF','qB','D','f','rho','active_start','back_start', + 'selected_axes','entry_start','remainder','cutoff') + + +def authenticate(): + path=HERE/'SOURCE-PINS.json' + entries=json.loads(path.read_text())['files'] + for e in entries: + data=(HERE/e['local']).read_bytes() + def matches(raw): + return len(raw)==e['bytes'] and sha256(raw).hexdigest()==e['sha256'] and sha1(b'blob '+str(len(raw)).encode()+b'\0'+raw).hexdigest()==e['git_blob'] + need(matches(data),'source byte binding '+e['local']);need(not matches(data+b' '),'source mutation control') + return len(entries) + + +def source_kernel(): + path=HERE/'inputs/core/reference/source/native_verify.py' + need(sha256(path.read_bytes()).hexdigest()=='3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38','source oracle pin') + witness=HERE/'inputs/core/reference/SOURCE-FRAMES.json' + need(sha256(witness.read_bytes()).hexdigest()=='58f784587d1f21d6aaa1f6a14932779ff1f24d232496b042240e832939c9010d','source witness pin') + frame=json.loads(witness.read_text()) + need(frame=={'event_index':24472,'event':['MOVE',415,3,99,False],'frames':{'3':[],'99':[239]}},'actual selected source event') + n=module(path,'_independent_selected_source_kernel') + circuit=n.adjoint(n.frame(frame['frames']['3'],9))+n.frame(frame['frames']['99'],9) + columns=[] + for source in range(512): + values,denominator=n.state(circuit,source) + need(denominator==1 and len(values)==2,'exact two-term source kernel') + columns.append(tuple(sorted((target,pair[0],pair[1]) for target,pair in values.items()))) + return tuple(columns) + + +KERNEL=source_kernel() + + +def old_header(values): + result=[] + for name in SCHEMA: + bits=list(map(int,bin(values[name])[2:][::-1]));result.extend([1]*len(bits)+[0]+bits) + return result + + +def old_data(values,width): + result=[] + for value in values: + for bit in range(width):result.extend((0,0,(value>>bit)&1)) + result.extend((0,1,0)) + return result + + +def fixture(width=4,r=1,scale=2,cutoff=1,seed=24472): + h=dict.fromkeys(SCHEMA,0) + h.update(outer=1,rows=1,row_bits=512*6*r*(width+1),within_bits=9, + record_bits=6*r*(width+1),f=1,K=1,rho=0,active_start=0, + cutoff=cutoff,G=1,H=1,d=9,selected_axes=9,back_start=8) + rng=random.Random(seed) + values=[scale*rng.randrange(-1,2) for _ in range(512*2*r)] + return h,r,width,values + + +def oracle(values,h,r,width): + """Direct source-frame columns on old addresses; no lowered factors used.""" + result=list(values);a=h['within_bits'];size=1<>i&1) + for coefficient in range(r): + at=((row*size+address)*r+coefficient)*2 + to=((row*size+destination)*r+coefficient)*2 + ar,ai=result[at:at+2] + numerators[to]+=cr*ar-ci*ai;numerators[to+1]+=cr*ai+ci*ar + need(all(x%2==0 for x in numerators),'source-kernel image not integral') + result=[x//2 for x in numerators] + need(all(-(1<<(width-1))<=x<(1<<(width-1)) for x in result),'source-kernel endpoint outside width') + return result + + +def tapes_for(data,header): + ts=[C.Tape(origin=3+i%7,permanent_guard=i<43) for i in range(72)] + ts[0]=C.Tape(data,origin=3);ts[1]=C.Tape(header,origin=4);return ts + + +def body(t): + end=t.origin + while end=t.origin-1,'all72 origins/exteriors') + need(t.cells[t.origin-2]==7,'opaque exterior preserved') + need(t.cells[t.origin-1]==(C.LEFT if i<43 else C.BLANK),'43 permanent/29 retired guards') + if i>=2:need(all(s==C.BLANK for s in t.cells[t.origin:]),'all70 private bodies blank') + + +def positive(code,labels,args,common_root=False): + h,r,width,values=fixture(**args);expected=oracle(values,h,r,width) + need(expected!=values,'nonidentity full MOVE fixture') + data,header=old_data(values,width),old_header(h);ts=tapes_for(data,header);owner=ts[0] + cpu=C.CPU(code,ts,labels);need(cpu.run(limit=300_000_000)=='DONE','uninterrupted actual full MOVE') + need(cpu.core_entries==cpu.exit_entries==1,'one complete core invocation/return') + need(ts[0] is owner,'original old owner identity');returned(ts,old_data(expected,width),header) + history=sum(t.high-t.low+1 for t in ts[2:]);V,E=len(data),len(header) + need(cpu.steps<=2**25*(h['f']*V+E+1),'complete time envelope') + need(history<=2048*(V+E+1),'complete retained history envelope') + if common_root: + need(width==22 and all(x%512==0 and abs(x)<1024 for x in values),'n9 p0 h1 t0 common-root input') + return {'parameters':args,'old_bits':V,'header_bits':E,'transitions':cpu.steps, + 'private_history':history,'common_root_numeric_model':common_root,'changed_exact_output':True} + + +def reject(code,labels,record,reason,short=False,before_c=False): + h,r,width,values=record;data=old_data(values,width);header=old_header(h) + if short:data=data[:-1] + ts=tapes_for(data,header);cpu=C.CPU(code,ts,labels) + need(cpu.run(limit=80_000_000)=='REJECT','required rejection: '+reason) + need(body(ts[0])==data and ts[0].writes==0,'failure original source unchanged') + need(body(ts[1])==header and ts[1].writes==0,'failure original descriptor unchanged') + if before_c:need(cpu.core_entries==1 and cpu.first_numerator_write is None,'phase rejection before central C') + return {'control':reason,'steps':cpu.steps,'entered_core':bool(cpu.core_entries), + 'entered_C_arithmetic':cpu.first_numerator_write is not None,'public_writes':ts[0].writes} + + +def mutated_core(code,labels,mutation): + """Verifier-only alternative; the claimed graph never accepts a mutation.""" + retained=sys.modules['_joined_selected_core'] + child,alphabet,_=retained._compile_move(mutation) + need(alphabet==('_','0','1','|'),'mutant source alphabet') + out=list(code[:labels['CORE']]);offset=len(out);newlabels=dict(labels) + for op,*args in child: + if op=='read':out.append(('R',C.PORT_MAP[args[0]],{C.SYMBOL[s]:offset+q for s,q in args[1].items()})) + elif op=='write':out.append(('W',C.PORT_MAP[args[0]],C.SYMBOL[args[1]])) + elif op=='move':out.append(('M',C.PORT_MAP[args[0]],args[1])) + elif op=='goto':out.append(('J',offset+args[0])) + elif op=='halt':newlabels['CORE_RETURN']=len(out);out.append(('J',labels['EXIT'])) + else:raise ValueError('nonlocal mutant') + return tuple(out),newlabels + + +def controls(code,labels): + receipts=[];h,r,width,zeros=fixture(width=2,scale=0) + # Independent review witness: native a0=a7=1 maps to old address258. + bad=list(zeros);bad[2*258]=-2;final=oracle(bad,h,r,width) + need(sum(x!=0 for x in final)==4 and all(abs(x)<=1 for x in final),'fitting integral endpoint witness') + receipts.append(reject(code,labels,(h,r,width,bad),'actual endpoint-only phase overflow at old address258',before_c=True)) + odd=list(zeros);odd[0]=1 + receipts.append(reject(code,labels,(h,r,width,odd),'nonintegral central C after three actual right factors')) + need(receipts[-1]['entered_C_arithmetic'],'actual central rejection reached') + receipts.append(reject(code,labels,(h,r,width,zeros),'truncated old-coded field',short=True)) + for mutation in ('drop_absolute_phase','omit_offset'): + altered,entry=mutated_core(code,labels,mutation) + mh,mr,mw,values=fixture(width=4,scale=2,seed=24472) + expected=old_data(oracle(values,mh,mr,mw),mw);data=old_data(values,mw);header=old_header(mh) + ts=tapes_for(data,header);cpu=C.CPU(altered,ts,entry) + need(cpu.run(limit=100_000_000)=='DONE','mutant should complete physical return') + need(body(ts[0])!=expected,'source kernel detects '+mutation) + receipts.append({'control':mutation,'steps':cpu.steps,'detected_by_direct_source_kernel':True}) + ts=tapes_for(old_data(zeros,width),old_header(h));ts[71]=ts[70] + try:C.CPU(code,ts,labels) + except ValueError:receipts.append({'control':'aliased added owner','detected':True}) + else:raise ValueError('alias binding escaped') + return receipts + + +def main(): + sources=authenticate();code,labels=C.compile_composition() + need(len(code)==88816 and C.TAPES==72,'fixed full composition size') + need(max(ins[1] for ins in code if ins[0] in ('R','W','M'))==71,'complete port inventory') + cases=[positive(code,labels,{'r':2,'width':4,'scale':2}), + positive(code,labels,{'width':22,'scale':512,'cutoff':(1<<137)+3},True)] + negative=controls(code,labels) + print(json.dumps({'status':'PASS_OLD_CODED_COMPLETE_SELECTED_MOVE','source_event':['MOVE',415,3,99,False], + 'source_event_index':24472,'fixed_tapes':72,'instructions':len(code), + 'graph_sha256':C.digest(code),'compose_sha256':sha256((HERE/'compose.py').read_bytes()).hexdigest(), + 'kernel_sha256':sha256(json.dumps(KERNEL,separators=(',',':')).encode()).hexdigest(), + 'authenticated_sources':sources,'source_mutations_detected':sources, + 'positive_cases':cases,'negative_controls':negative, + 'full_f2_run':False,'assumptions_discharged':[],'new_kappa':False},indent=2)) + + +if __name__=='__main__':main()