diff --git a/research/paired-helper-frame-ledger/INPUTS.json b/research/paired-helper-frame-ledger/INPUTS.json new file mode 100644 index 0000000000..d2ce0f0617 --- /dev/null +++ b/research/paired-helper-frame-ledger/INPUTS.json @@ -0,0 +1,105 @@ +{ + "source_repository": "CrocSwap/integer-mult-bounds", + "source_pr": 2917, + "source_commit": "224bd5e56041c40078ff6b5fa7393733a215de5c", + "files": [ + { + "path": "data/PARENT-base.json.gz", + "source_path": "research/paired-helper-extension/data/PARENT-base.json.gz", + "git_blob": "6303cfd847033481d1e662e2a2fd467caf5f6429", + "sha256": "3657ad53ebe5f156f307a903479e919f2fe812811ce5d5f15e72c3aaf68dfde3", + "bytes": 69992 + }, + { + "path": "data/PARENT-extra.json.gz", + "source_path": "research/paired-helper-extension/data/PARENT-extra.json.gz", + "git_blob": "38af2b6ea76002df44de3c8045b24ce622782b9f", + "sha256": "b975492ff4cbec0d619cdf2da34f55ce3b20c8a541132e4339cc6c8ae3b2e487", + "bytes": 69989 + }, + { + "path": "data/TRANSFORM-299.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-299.json", + "git_blob": "897a8917195dbcc334293d6509215640a9c852ad", + "sha256": "781585f68449c30f63e40ee4bf58d1fa194e4faf8cf4394505437fc15137ba34", + "bytes": 2881 + }, + { + "path": "data/TRANSFORM-304.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-304.json", + "git_blob": "e04d29425033122f76dcd7c6658ea95a6cf27d3d", + "sha256": "024515c6e47d952dfaf307fcefda9f2106049ccc28875ae620d95241fdec72ed", + "bytes": 3084 + }, + { + "path": "data/TRANSFORM-320.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-320.json", + "git_blob": "9c8490c8643214e00eebcc50f45089e4e866d1c4", + "sha256": "0e4c0216221ab21c4bf48a11eab34ff6cc245014d664dc1523cfae9d437dc00d", + "bytes": 2630 + }, + { + "path": "data/TRANSFORM-331.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-331.json", + "git_blob": "7d35aab299dcd034ec9ecd67877bbe911c1a960c", + "sha256": "355bcfd60ffcb672f66882e66bae1b046d1bfb979f725b411b034f811dfb68bb", + "bytes": 2812 + }, + { + "path": "data/TRANSFORM-412.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-412.json", + "git_blob": "e62dd449d7ce79fc99cd128855d324ee6b554cd8", + "sha256": "54328a8436d7abed6433da5e4384a36ad95b266070479b496e0e96416a5f5a79", + "bytes": 2498 + }, + { + "path": "data/TRANSFORM-424.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-424.json", + "git_blob": "4fae6d1bb371f8407a8cd33b47dda8ccd64be7c6", + "sha256": "42747fa1332af1ca0827edebfff7490ee761f84f662527f593e975a502400dbc", + "bytes": 2399 + }, + { + "path": "data/TRANSFORM-428.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-428.json", + "git_blob": "1593c52045af30bbb15063d29ec1460c79d84ef9", + "sha256": "89e8fbd5a5d1d64d386cdc38f257cae18d8e7428e868f618ed1f0be5a22aba3e", + "bytes": 2501 + }, + { + "path": "data/TRANSFORM-499.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-499.json", + "git_blob": "7c22cd7a667f9fab088174aae93768d474794061", + "sha256": "f86eef40cd96b45c67755903eae6a86432e2aeb6d53812621222db7c062d88f6", + "bytes": 3463 + }, + { + "path": "data/TRANSFORM-511.json", + "source_path": "research/paired-helper-extension/data/TRANSFORM-511.json", + "git_blob": "7c7bf4b1a18ccdce241d2e8f7d5c1149c5dd3fbe", + "sha256": "48e0749f1c82594841c88923a38b0308ed777639631a4c3f2414500617f2e34b", + "bytes": 3109 + }, + { + "path": "data/WORD-base.json.gz", + "source_path": "research/paired-helper-extension/data/WORD-base.json.gz", + "git_blob": "9be0aa5349dbc8c928a46089a7695e224d0e4d16", + "sha256": "fec3c120db1a35022944628d34b56a36f2456248c274c2eaba1a325cdc690ce8", + "bytes": 69818 + }, + { + "path": "data/WORD-extra.json.gz", + "source_path": "research/paired-helper-extension/data/WORD-extra.json.gz", + "git_blob": "40b38365ea4b841101405ebd2c4fdcadcb8b9808", + "sha256": "e4d0c617df85bf8a824ff68310ca3373dc017c1ebf9ea733056a3ee4a784b36f", + "bytes": 69814 + }, + { + "path": "SOURCE-CREDITS.md", + "source_path": "research/paired-helper-extension/CREDITS.md", + "git_blob": "153868a3ebcf56962716f6222f0f542a9417e502", + "sha256": "a4e845cbd7cd430d7b53899b3148fb908c3af1924137412e44f19a9031fdc86a", + "bytes": 2337 + } + ] +} diff --git a/research/paired-helper-frame-ledger/README.md b/research/paired-helper-frame-ledger/README.md new file mode 100644 index 0000000000..8b4460456d --- /dev/null +++ b/research/paired-helper-frame-ledger/README.md @@ -0,0 +1,161 @@ +# Independent finite frame ledger for PR2917 + +**Finite accounting audit; no new κ or supplier admission.** This package checks +Mason Hale's nine additional paired-helper extractions in +[PR2917](https://github.com/CrocSwap/integer-mult-bounds/pull/2917), pinned at +`224bd5e56041c40078ff6b5fa7393733a215de5c`. Both `base` and `extra` providers pass. +The immediate parent is Jeremy Diviney's [PR2908](https://github.com/CrocSwap/integer-mult-bounds/pull/2908) +at `51309592971e3b5be935599eed2a95404dc7781e`. + +## What this adds + +The predecessor `vendor/preload_move.py:frame_report` and +`vendor/audit_local.py` both use essentially the same pivot-basis and climb +calculation. Here a frame is its complete subset of `GF(2)^9`: at most 512 +vectors, constructed by XOR closure. Dimensions are obtained from cardinality; +containment and equality are set operations. No predecessor Python is imported +or executed. This is a different implementation of the **frame implication**, +not a claim of independent verification of the whole construction. + +The new replay derives every positive climb, every separate centre descent, +and the terminal climbs from the ordered operations. It checks actual subspaces, +not merely dimensions, including signed prelude warps, all 512 images of each +invertible warp map, dual perpendicular transport, lifted frame maps and the +symplectic identity. It then compares the derived histogram with the word's +report. It reconstructs nine sequential **frame projections**, checks each +declared old-frame preimage and candidate index, and compares the final +frame-bearing sections with the frozen final word. Compensation algebra is not +part of that projection. + +| Derived quantity, for either provider | Parent | Final | +| --- | ---: | ---: | +| Paid profile | 2407 H1 + 640 H2 + 262 H3 + 128 H4 + 26 H5 + 8 H8 | 2416 H1 + 640 H2 + 280 H3 + 110 H4 + 26 H5 + 8 H8 | +| Positive paid events | 3471 | 3480 | +| Paid rank mass | 5179 | 5170 | +| Sum of 408 helper widths | 3323 | 3314 | +| Width inventory | 4:26, 5:2, 7:62, 8:87, 9:231 | 4:26, 5:2, 7:62, 8:96, 9:222 | +| Private cleanup buffers | 73 | 82 | + +The extraction order is `424, 428, 412, 331, 299, 320, 511, 304, 499`. +Each of the first three steps changes the profile by `3 H1 - 2 H2`; each of +the last six changes it by `H2 + 3 H3 - 3 H4`. Therefore the net change is +`9 H1 + 18 H3 - 18 H4`. Each extracted helper changes width from nine to eight; +all other widths are unchanged. + +All **13** declared frame edits satisfy the stronger geometric identity +`new_frame = old_frame ∩ E_normal`, with `E_normal` the extraction hyperplane. +Twelve edits lower an A-operation frame from dimension eight to seven. The +thirteenth lowers helper499's inherited `restore[40]` scale frame from nine to +eight. Restoring only that frame to FULL makes its later rank-eight touch at +`restore[114]` illegal, although the scalar operation itself is unchanged. + +A useful cross-check telescopes the frame dimensions. Warps preserve dimension; +ordinary climbs sum to endpoint dimension minus entrance dimension. Centre +readout descents are charged separately and do not lower the main-word carrier. +The source/target contribution is `112*8 + 112*8 = 1792`; eight centre descents +contribute 64. Thus: + +``` +parent: 1792 + 3323 + 64 = 5179 +final: 1792 + 3314 + 64 = 5170 +``` + +The cleanup audit independently constructs the inverse-reverse **syntax** of +the forward non-target program, omitting the prelude, and substitutes `704+h` +for every protected helper `h`. It checks every actual cleanup operation, +reciprocal/negated coefficient, inverse warp identifier, full frame and private +buffer name. The buffer sets equal exactly `704 + helper_final`, with no direct +cleanup reference to a protected helper. This does **not** prove that those +buffers return to zero. Intermediate stage cleanup is derived syntax, not +comparison against separately stored stage words. + +## Reproduce + +Python 3.12, standard library only. From repository root: + +```sh +python3.12 -I -B research/paired-helper-frame-ledger/verify.py +python3.12 -I -B research/paired-helper-frame-ledger/test_verify.py +python3.12 -I -B -O research/paired-helper-frame-ledger/verify.py +python3.12 -I -B -O research/paired-helper-frame-ledger/test_verify.py +python3.12 -B scripts/research_package.py --package research/paired-helper-frame-ledger +``` + +Expected marker: `PASS_PAIRED_HELPER_FRAME_LEDGER`. Verification is read-only. +The local environment, successful commands and reviewed code hashes are recorded +in [VALIDATION.json](VALIDATION.json); hosted CI is separate. +`RESULT.json` records both providers, all stage profiles, exact edit locations, +section histograms and hashes of the derived event ledgers. To inspect every +paid event and helper width, use `verify.py --details` and redirect stdout to a +file **outside** the package. This output is freshly calculated, not loaded from +the frozen receipt. Exact comparison uses canonical JSON so that Boolean and +floating aliases cannot stand in for integer receipts. + +`INPUTS.json` pins the four gzip words, nine transform JSON files and retained +credit text by SHA256, byte length and Git blob. The wrapper also pins the +manifest itself. These are immutable source bytes, not regenerated compressed +outputs. The source commit and original paths were authenticated against Git +at intake; offline replay checks the frozen source inventory and bytes. +`SOURCES.json` pins the original catalogue and selected-record provenance; +they are not live mathematical inputs. The generic metadata check needs that +base Git history. The standalone replay needs only this directory. + +Controls cover equal-rank unequal frames, chronological ordering, warp preimages +and invertible but wrong maps, omitted endpoint charges, forged inventories, +the helper499 scale refit, cleanup aliases/inverses/types, transform bindings, +input corruption and strict JSON. A separate XOR-pivot oracle checks all 128 +generating subsets of the seven nonzero three-bit vectors, their 16 subspaces +and all 256 ordered containment pairs. Checks remain active under `-O`. + +## Scope and overlap + +The `independent-moment` card was selected with OS nonce +`9e2c1aa952cf9f74c87b48ad6e7d6ac1` from priority revision 5 at main +`8c8bcecb03def61bca701dd3b045932d39c48022`. Its rank-ledger method was refined +to this new nine-step input. The +[canonical claim](https://github.com/CrocSwap/integer-mult-bounds/discussions/2612#discussioncomment-18972911) +records the boundary with mdumitrean's concurrent allocation work on PR2917. +The entry overlap search covered 476 open PR bodies including drafts, 2657 +local notes/tasks/ledger records, and manually inspected relevant current +Discussion threads. Cached PR pagination is a non-atomic snapshot; Discussion +pagination, arbitrary diffs and unpublished work were not exhaustively covered. +No matches would not certify novelty. See `TASK.json` for exact coverage and +remaining questions. + +This audit does not replay the predecessor's scalar or free-operator identities, +compensation correctness, 632-column forward/dual audit, native implementation, +buffer-zero proof, owner allocation, physical stock, precision, moment/root +calculation, outer admission or all-size/compiler hypotheses. It does not +change the selected record, any predecessor package, or the frontier. The +82 cleanup names do not establish an 82-register feasible physical schedule; +the inherited ambient dimension 73 is a different quantity. + +## Open next questions + +1. Does the pinned final word, including compensation and cleanup, have the + claimed operator endpoint and zero-buffer behavior? A reviewer can first + authenticate PR2917's full source closure and replay its declared operator + checks. This package supplies only the frame/accounting component; primary + success and independent coverage must remain separate. +2. Does a source-bound native owner allocation for that unchanged word satisfy + complete physical-stock, precision and outer-admission obligations? Continue + from the current canonical allocation claim, first checking its exact word + and allocation pins. A local cap or profile alone cannot discharge those + obligations. That work is intentionally left to its active owner. + +## Credit + +Prepared by ToikY with substantial OpenAI Codex assistance, including separate +AI implementation, adversarial-test and mathematical-review agents. This is +not independent human review or proof-assistant verification. New code and +documentation are Apache-2.0. + +Mason Hale contributed the nine extractions and 13 enabling frame edits in +PR2917. Jeremy Diviney supplied the immediate paired-helper408 construction +and compensation/cleanup architecture in PR2908. Jeremy Kothe supplied the +preload and frame chronology in PR2894 (`18d03c447886895ef9abf888398178e0428533ca`) +and PR2833. Retained upstream attribution, including Yiyang Lu, Dugongue, +Marius-Paul Dumitrean, Philippe Van Velzen, Tekalign and icekylinx, appears in +the byte-identical [SOURCE-CREDITS.md](SOURCE-CREDITS.md). Its descriptions of +the primary package's replay are predecessor statements, not checks claimed +by this audit. No predecessor executable code is vendored here. diff --git a/research/paired-helper-frame-ledger/RESULT.json b/research/paired-helper-frame-ledger/RESULT.json new file mode 100644 index 0000000000..bb07c8c263 --- /dev/null +++ b/research/paired-helper-frame-ledger/RESULT.json @@ -0,0 +1,1728 @@ +{ + "chains": { + "base": { + "buffer_count_after": 82, + "buffer_count_before": 73, + "changed_helpers": [ + 299, + 304, + 320, + 331, + 412, + 424, + 428, + 499, + 511 + ], + "final_event_ledger_sha256": "33daf04bbdd450dcdecc40f05c25ba0e04380943573633990a47c8b26b91dea8", + "frame_edits": [ + { + "candidate_index": 3651, + "from_dimension": 8, + "helper": 331, + "new_span_sha256": "dc89cd351a8af45367d54bc73baa3c99595986e30951d98abf8717a37fccd830", + "old_span_sha256": "4ebc3780540c8fcc5c683833dbdf14375648901c4e660068a8cec8c5ecf1eb3e", + "parent_index": 3633, + "section": "A", + "step": 4, + "to_dimension": 7 + }, + { + "candidate_index": 3652, + "from_dimension": 8, + "helper": 331, + "new_span_sha256": "dc89cd351a8af45367d54bc73baa3c99595986e30951d98abf8717a37fccd830", + "old_span_sha256": "4ebc3780540c8fcc5c683833dbdf14375648901c4e660068a8cec8c5ecf1eb3e", + "parent_index": 3634, + "section": "A", + "step": 4, + "to_dimension": 7 + }, + { + "candidate_index": 3664, + "from_dimension": 8, + "helper": 299, + "new_span_sha256": "69ad7523b0a21deb996f19d6d93baaf73370c98aad3ba4484f04c79651090496", + "old_span_sha256": "40cc187f8f5825ad4831ed21da97af9bb7438b394732fd5c053ecdf0f820183b", + "parent_index": 3645, + "section": "A", + "step": 5, + "to_dimension": 7 + }, + { + "candidate_index": 3665, + "from_dimension": 8, + "helper": 299, + "new_span_sha256": "69ad7523b0a21deb996f19d6d93baaf73370c98aad3ba4484f04c79651090496", + "old_span_sha256": "40cc187f8f5825ad4831ed21da97af9bb7438b394732fd5c053ecdf0f820183b", + "parent_index": 3646, + "section": "A", + "step": 5, + "to_dimension": 7 + }, + { + "candidate_index": 3706, + "from_dimension": 8, + "helper": 320, + "new_span_sha256": "e1e1bac96f49a7ca282cd5c94bad9b094d3aae0d9e6063c0a4081bd7efe25c1e", + "old_span_sha256": "0acb2bc5936caea7a87000fcd106bc9a1cef4945ed84fb5c86c5aef239c26ac4", + "parent_index": 3688, + "section": "A", + "step": 6, + "to_dimension": 7 + }, + { + "candidate_index": 3707, + "from_dimension": 8, + "helper": 320, + "new_span_sha256": "e1e1bac96f49a7ca282cd5c94bad9b094d3aae0d9e6063c0a4081bd7efe25c1e", + "old_span_sha256": "0acb2bc5936caea7a87000fcd106bc9a1cef4945ed84fb5c86c5aef239c26ac4", + "parent_index": 3689, + "section": "A", + "step": 6, + "to_dimension": 7 + }, + { + "candidate_index": 3722, + "from_dimension": 8, + "helper": 511, + "new_span_sha256": "d0ca0bf574a48007cb74121587ba26e59090e752af3e9761582215ec3307c509", + "old_span_sha256": "518ec4a75b278eeb2dc2c9504391473a405e7fec03967031b3240005050cf41d", + "parent_index": 3700, + "section": "A", + "step": 7, + "to_dimension": 7 + }, + { + "candidate_index": 3723, + "from_dimension": 8, + "helper": 511, + "new_span_sha256": "d0ca0bf574a48007cb74121587ba26e59090e752af3e9761582215ec3307c509", + "old_span_sha256": "518ec4a75b278eeb2dc2c9504391473a405e7fec03967031b3240005050cf41d", + "parent_index": 3701, + "section": "A", + "step": 7, + "to_dimension": 7 + }, + { + "candidate_index": 3758, + "from_dimension": 8, + "helper": 304, + "new_span_sha256": "031be785d281abb715d9962ca45d4b764662d23733ca4a13b952950a04801cc0", + "old_span_sha256": "7c5801dc48303004557b9e4fd5f72b31e11992ef3179b660e1703b30c5fc39cd", + "parent_index": 3734, + "section": "A", + "step": 8, + "to_dimension": 7 + }, + { + "candidate_index": 3759, + "from_dimension": 8, + "helper": 304, + "new_span_sha256": "031be785d281abb715d9962ca45d4b764662d23733ca4a13b952950a04801cc0", + "old_span_sha256": "7c5801dc48303004557b9e4fd5f72b31e11992ef3179b660e1703b30c5fc39cd", + "parent_index": 3735, + "section": "A", + "step": 8, + "to_dimension": 7 + }, + { + "candidate_index": 3761, + "from_dimension": 8, + "helper": 499, + "new_span_sha256": "b75d2cf1ecc579645b30853bf62e1af3b06f61c6ceca252227a07215c152671e", + "old_span_sha256": "955ddec25a50749e29e4cb389ff15f505a9a51d86999cee5a4f8aa2782ab0a4d", + "parent_index": 3740, + "section": "A", + "step": 9, + "to_dimension": 7 + }, + { + "candidate_index": 3762, + "from_dimension": 8, + "helper": 499, + "new_span_sha256": "b75d2cf1ecc579645b30853bf62e1af3b06f61c6ceca252227a07215c152671e", + "old_span_sha256": "955ddec25a50749e29e4cb389ff15f505a9a51d86999cee5a4f8aa2782ab0a4d", + "parent_index": 3741, + "section": "A", + "step": 9, + "to_dimension": 7 + }, + { + "candidate_index": 40, + "from_dimension": 9, + "helper": 499, + "new_span_sha256": "51059fc188aae1804ab10b7033ae56696faa63b18a888cd154288115af3b2a3a", + "old_span_sha256": "61f3f6fd3aa109e05aa31cc4d74f333d17c8f73ced22284db2209e96a39884af", + "parent_index": 40, + "section": "restore", + "step": 9, + "to_dimension": 8 + } + ], + "frame_sections_checked": [ + "A", + "B", + "restore", + "helper_final", + "start_extra", + "centers", + "center_frames", + "target_levels", + "cut", + "warps", + "ports", + "removed", + "prelude_events" + ], + "parent_event_ledger_sha256": "1c7cbfbfcd9be00c61bbe1baf50822ad4fb567d1bc8a0221e5f8a389a2b3aae0", + "profile_delta": { + "1": 9, + "3": 18, + "4": -18 + }, + "rank_mass_delta": -9, + "scope": "Sequential frame projection and cleanup syntax only; compensation algebra and paired scalar/free-operator identities are inherited, not replayed.", + "stages": [ + { + "buffer_count": 74, + "event_ledger_sha256": "7e154a541b1343c543d4fdaaccb569bd94e0b6fd5dd8e6151c2a344a85cef8b8", + "frame_edits": 0, + "frame_projection_sha256": "ee7bcd7b43f521749abbcfacb5823a7fda87aaf5e5c5f4ec1a74f85d68b71c0b", + "helper": 424, + "input_gates": 24, + "normal": 52, + "output_gates": 3, + "profile": { + "1": 2410, + "2": 638, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5178, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 319, + "2": 70, + "3": 56 + }, + "restore": { + "1": 51, + "2": 38, + "3": 8 + } + }, + "step": 1, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 88, + "9": 230 + } + }, + { + "buffer_count": 75, + "event_ledger_sha256": "0754bae6f16a525b8bcaf927a8c7b5c9ae04b670a6368f1c9a9c08e822052a74", + "frame_edits": 0, + "frame_projection_sha256": "24e7da862155e5bc114e067280a8bda186775981f681bf821eda4e0da31fd92f", + "helper": 428, + "input_gates": 23, + "normal": 76, + "output_gates": 4, + "profile": { + "1": 2413, + "2": 636, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5177, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 320, + "2": 68, + "3": 56 + }, + "restore": { + "1": 53, + "2": 38, + "3": 8 + } + }, + "step": 2, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 89, + "9": 229 + } + }, + { + "buffer_count": 76, + "event_ledger_sha256": "5b9331fe4389104a0b4c50e32878a4e1752df84d1a25e672bddb618c5e7657a5", + "frame_edits": 0, + "frame_projection_sha256": "539541295eb96a14d4046dfd6d59ca5d3b3f449bcdc69e431d65bfd6591ba5ca", + "helper": 412, + "input_gates": 23, + "normal": 127, + "output_gates": 4, + "profile": { + "1": 2416, + "2": 634, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5176, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 321, + "2": 66, + "3": 56 + }, + "restore": { + "1": 55, + "2": 38, + "3": 8 + } + }, + "step": 3, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 90, + "9": 228 + } + }, + { + "buffer_count": 77, + "event_ledger_sha256": "d41e3feac6b675f7ac719694961d8fdbe22ffa001aa6ff1d4c23bffa121e51a4", + "frame_edits": 2, + "frame_projection_sha256": "56ddadcd535f89d0d862a8d3c2e2ce032630ac929305c0106d7cff33aacffb59", + "helper": 331, + "input_gates": 18, + "normal": 30, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 635, + "3": 265, + "4": 125, + "5": 26, + "8": 8 + }, + "rank_mass": 5175, + "section_profiles": { + "A": { + "1": 945, + "2": 12, + "3": 3, + "4": 53 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 319, + "2": 67, + "3": 56 + }, + "restore": { + "1": 56, + "2": 38, + "3": 8 + } + }, + "step": 4, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 91, + "9": 227 + } + }, + { + "buffer_count": 78, + "event_ledger_sha256": "b6db61a4e95765d4115f770536d1585524e3141a27863d6b4aa482df50af47b6", + "frame_edits": 2, + "frame_projection_sha256": "714675920669d41f3609e363ae77857d882733a943d29441f65dd9003462f8f8", + "helper": 299, + "input_gates": 19, + "normal": 51, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 636, + "3": 268, + "4": 122, + "5": 26, + "8": 8 + }, + "rank_mass": 5174, + "section_profiles": { + "A": { + "1": 946, + "2": 12, + "3": 6, + "4": 50 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 317, + "2": 68, + "3": 56 + }, + "restore": { + "1": 57, + "2": 38, + "3": 8 + } + }, + "step": 5, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 92, + "9": 226 + } + }, + { + "buffer_count": 79, + "event_ledger_sha256": "7b23346971af7249a2148abdc5a1f37a57b414c443bae247c071154a7348bac2", + "frame_edits": 2, + "frame_projection_sha256": "1cb9ac6b337983d4ac2dc7378924fd99a16a3ea3b1a0af702e1b4ec609c85ed5", + "helper": 320, + "input_gates": 18, + "normal": 75, + "output_gates": 2, + "profile": { + "1": 2416, + "2": 637, + "3": 271, + "4": 119, + "5": 26, + "8": 8 + }, + "rank_mass": 5173, + "section_profiles": { + "A": { + "1": 947, + "2": 12, + "3": 9, + "4": 47 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 315, + "2": 69, + "3": 56 + }, + "restore": { + "1": 58, + "2": 38, + "3": 8 + } + }, + "step": 6, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 93, + "9": 225 + } + }, + { + "buffer_count": 80, + "event_ledger_sha256": "6c93e4dbb96ec7565b63d2a99be81fa7035b1b55e3eade16ab6e2a656a593874", + "frame_edits": 2, + "frame_projection_sha256": "9ff4fb8f4066b278f8cf014bd32b77ed38937398352166254f00f35c119040ac", + "helper": 511, + "input_gates": 22, + "normal": 85, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 638, + "3": 274, + "4": 116, + "5": 26, + "8": 8 + }, + "rank_mass": 5172, + "section_profiles": { + "A": { + "1": 948, + "2": 12, + "3": 12, + "4": 44 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 313, + "2": 70, + "3": 56 + }, + "restore": { + "1": 59, + "2": 38, + "3": 8 + } + }, + "step": 7, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 94, + "9": 224 + } + }, + { + "buffer_count": 81, + "event_ledger_sha256": "70617ee641ac3173a15c5ef7ba4b9ce1b0c359a9ea2e11410487569189aa261d", + "frame_edits": 2, + "frame_projection_sha256": "60184835c91f6d306b4a1df25317df58f0e335391749bc8b6c0833a2565cafcb", + "helper": 304, + "input_gates": 24, + "normal": 102, + "output_gates": 2, + "profile": { + "1": 2416, + "2": 639, + "3": 277, + "4": 113, + "5": 26, + "8": 8 + }, + "rank_mass": 5171, + "section_profiles": { + "A": { + "1": 949, + "2": 12, + "3": 15, + "4": 41 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 311, + "2": 71, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "step": 8, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 95, + "9": 223 + } + }, + { + "buffer_count": 82, + "event_ledger_sha256": "33daf04bbdd450dcdecc40f05c25ba0e04380943573633990a47c8b26b91dea8", + "frame_edits": 3, + "frame_projection_sha256": "d015ee36d9db9cea430bd0ebdb15ad64f145f96e3d4408f900092461441ac6f2", + "helper": 499, + "input_gates": 21, + "normal": 120, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 640, + "3": 280, + "4": 110, + "5": 26, + "8": 8 + }, + "rank_mass": 5170, + "section_profiles": { + "A": { + "1": 950, + "2": 12, + "3": 18, + "4": 38 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 310, + "2": 72, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "step": 9, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 96, + "9": 222 + } + } + ] + }, + "extra": { + "buffer_count_after": 82, + "buffer_count_before": 73, + "changed_helpers": [ + 299, + 304, + 320, + 331, + 412, + 424, + 428, + 499, + 511 + ], + "final_event_ledger_sha256": "65c270409b388760b22ec96335e998938146969d0d44e671a1797212572ae3ff", + "frame_edits": [ + { + "candidate_index": 3651, + "from_dimension": 8, + "helper": 331, + "new_span_sha256": "dc89cd351a8af45367d54bc73baa3c99595986e30951d98abf8717a37fccd830", + "old_span_sha256": "4ebc3780540c8fcc5c683833dbdf14375648901c4e660068a8cec8c5ecf1eb3e", + "parent_index": 3633, + "section": "A", + "step": 4, + "to_dimension": 7 + }, + { + "candidate_index": 3652, + "from_dimension": 8, + "helper": 331, + "new_span_sha256": "dc89cd351a8af45367d54bc73baa3c99595986e30951d98abf8717a37fccd830", + "old_span_sha256": "4ebc3780540c8fcc5c683833dbdf14375648901c4e660068a8cec8c5ecf1eb3e", + "parent_index": 3634, + "section": "A", + "step": 4, + "to_dimension": 7 + }, + { + "candidate_index": 3664, + "from_dimension": 8, + "helper": 299, + "new_span_sha256": "69ad7523b0a21deb996f19d6d93baaf73370c98aad3ba4484f04c79651090496", + "old_span_sha256": "40cc187f8f5825ad4831ed21da97af9bb7438b394732fd5c053ecdf0f820183b", + "parent_index": 3645, + "section": "A", + "step": 5, + "to_dimension": 7 + }, + { + "candidate_index": 3665, + "from_dimension": 8, + "helper": 299, + "new_span_sha256": "69ad7523b0a21deb996f19d6d93baaf73370c98aad3ba4484f04c79651090496", + "old_span_sha256": "40cc187f8f5825ad4831ed21da97af9bb7438b394732fd5c053ecdf0f820183b", + "parent_index": 3646, + "section": "A", + "step": 5, + "to_dimension": 7 + }, + { + "candidate_index": 3706, + "from_dimension": 8, + "helper": 320, + "new_span_sha256": "e1e1bac96f49a7ca282cd5c94bad9b094d3aae0d9e6063c0a4081bd7efe25c1e", + "old_span_sha256": "0acb2bc5936caea7a87000fcd106bc9a1cef4945ed84fb5c86c5aef239c26ac4", + "parent_index": 3688, + "section": "A", + "step": 6, + "to_dimension": 7 + }, + { + "candidate_index": 3707, + "from_dimension": 8, + "helper": 320, + "new_span_sha256": "e1e1bac96f49a7ca282cd5c94bad9b094d3aae0d9e6063c0a4081bd7efe25c1e", + "old_span_sha256": "0acb2bc5936caea7a87000fcd106bc9a1cef4945ed84fb5c86c5aef239c26ac4", + "parent_index": 3689, + "section": "A", + "step": 6, + "to_dimension": 7 + }, + { + "candidate_index": 3722, + "from_dimension": 8, + "helper": 511, + "new_span_sha256": "d0ca0bf574a48007cb74121587ba26e59090e752af3e9761582215ec3307c509", + "old_span_sha256": "518ec4a75b278eeb2dc2c9504391473a405e7fec03967031b3240005050cf41d", + "parent_index": 3700, + "section": "A", + "step": 7, + "to_dimension": 7 + }, + { + "candidate_index": 3723, + "from_dimension": 8, + "helper": 511, + "new_span_sha256": "d0ca0bf574a48007cb74121587ba26e59090e752af3e9761582215ec3307c509", + "old_span_sha256": "518ec4a75b278eeb2dc2c9504391473a405e7fec03967031b3240005050cf41d", + "parent_index": 3701, + "section": "A", + "step": 7, + "to_dimension": 7 + }, + { + "candidate_index": 3758, + "from_dimension": 8, + "helper": 304, + "new_span_sha256": "031be785d281abb715d9962ca45d4b764662d23733ca4a13b952950a04801cc0", + "old_span_sha256": "7c5801dc48303004557b9e4fd5f72b31e11992ef3179b660e1703b30c5fc39cd", + "parent_index": 3734, + "section": "A", + "step": 8, + "to_dimension": 7 + }, + { + "candidate_index": 3759, + "from_dimension": 8, + "helper": 304, + "new_span_sha256": "031be785d281abb715d9962ca45d4b764662d23733ca4a13b952950a04801cc0", + "old_span_sha256": "7c5801dc48303004557b9e4fd5f72b31e11992ef3179b660e1703b30c5fc39cd", + "parent_index": 3735, + "section": "A", + "step": 8, + "to_dimension": 7 + }, + { + "candidate_index": 3761, + "from_dimension": 8, + "helper": 499, + "new_span_sha256": "b75d2cf1ecc579645b30853bf62e1af3b06f61c6ceca252227a07215c152671e", + "old_span_sha256": "955ddec25a50749e29e4cb389ff15f505a9a51d86999cee5a4f8aa2782ab0a4d", + "parent_index": 3740, + "section": "A", + "step": 9, + "to_dimension": 7 + }, + { + "candidate_index": 3762, + "from_dimension": 8, + "helper": 499, + "new_span_sha256": "b75d2cf1ecc579645b30853bf62e1af3b06f61c6ceca252227a07215c152671e", + "old_span_sha256": "955ddec25a50749e29e4cb389ff15f505a9a51d86999cee5a4f8aa2782ab0a4d", + "parent_index": 3741, + "section": "A", + "step": 9, + "to_dimension": 7 + }, + { + "candidate_index": 40, + "from_dimension": 9, + "helper": 499, + "new_span_sha256": "51059fc188aae1804ab10b7033ae56696faa63b18a888cd154288115af3b2a3a", + "old_span_sha256": "61f3f6fd3aa109e05aa31cc4d74f333d17c8f73ced22284db2209e96a39884af", + "parent_index": 40, + "section": "restore", + "step": 9, + "to_dimension": 8 + } + ], + "frame_sections_checked": [ + "A", + "B", + "restore", + "helper_final", + "start_extra", + "centers", + "center_frames", + "target_levels", + "cut", + "warps", + "ports", + "removed", + "prelude_events" + ], + "parent_event_ledger_sha256": "de0e98707a1be56c3458ee82f1fde92885e546ba51774ce1d212949e5e85aaec", + "profile_delta": { + "1": 9, + "3": 18, + "4": -18 + }, + "rank_mass_delta": -9, + "scope": "Sequential frame projection and cleanup syntax only; compensation algebra and paired scalar/free-operator identities are inherited, not replayed.", + "stages": [ + { + "buffer_count": 74, + "event_ledger_sha256": "edc700892c36b307d810e4c9fa973487ba854a1ea2e84124c467194d1c7c7077", + "frame_edits": 0, + "frame_projection_sha256": "55cae1782a4da1ecc1448c2c43cf0c3fa9e5793c26548817214da71fb95d56d3", + "helper": 424, + "input_gates": 24, + "normal": 52, + "output_gates": 3, + "profile": { + "1": 2410, + "2": 638, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5178, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 319, + "2": 70, + "3": 56 + }, + "restore": { + "1": 51, + "2": 38, + "3": 8 + } + }, + "step": 1, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 88, + "9": 230 + } + }, + { + "buffer_count": 75, + "event_ledger_sha256": "2bf8a2510b3d82cdacc466f98694b6cc4eef012d7aa514e7ed5f876a1345c165", + "frame_edits": 0, + "frame_projection_sha256": "f3108e386e092aa3e2488d3fa8c7de4300523653490328942adc0f2a8eb8492a", + "helper": 428, + "input_gates": 23, + "normal": 76, + "output_gates": 4, + "profile": { + "1": 2413, + "2": 636, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5177, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 320, + "2": 68, + "3": 56 + }, + "restore": { + "1": 53, + "2": 38, + "3": 8 + } + }, + "step": 2, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 89, + "9": 229 + } + }, + { + "buffer_count": 76, + "event_ledger_sha256": "2222351a064f0c6e7fbfa58f73c1dd11b7bc5d2617de6a644e0636482e9e53fb", + "frame_edits": 0, + "frame_projection_sha256": "06134b173c810e083e4d398f3c486bb781ea07eae884dca0e26f078b5723c994", + "helper": 412, + "input_gates": 23, + "normal": 127, + "output_gates": 4, + "profile": { + "1": 2416, + "2": 634, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5176, + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 321, + "2": 66, + "3": 56 + }, + "restore": { + "1": 55, + "2": 38, + "3": 8 + } + }, + "step": 3, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 90, + "9": 228 + } + }, + { + "buffer_count": 77, + "event_ledger_sha256": "cf35a3281618bd3923702a3def3d92d2b9daada8681bc7f1b42b372d56e3bf9f", + "frame_edits": 2, + "frame_projection_sha256": "f4dcde4b907359705c892187fe92ec0ac1e6b71ba9b1487490e0eefbf8c507a8", + "helper": 331, + "input_gates": 18, + "normal": 30, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 635, + "3": 265, + "4": 125, + "5": 26, + "8": 8 + }, + "rank_mass": 5175, + "section_profiles": { + "A": { + "1": 945, + "2": 12, + "3": 3, + "4": 53 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 319, + "2": 67, + "3": 56 + }, + "restore": { + "1": 56, + "2": 38, + "3": 8 + } + }, + "step": 4, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 91, + "9": 227 + } + }, + { + "buffer_count": 78, + "event_ledger_sha256": "1978698f5de36478e6efd7c4e6a18fed378093140dde21c0b7417639f85eb4f9", + "frame_edits": 2, + "frame_projection_sha256": "5ee8e03116694cc6e434be14e2acc7040195eee4ffa895591d5e37108ba93fad", + "helper": 299, + "input_gates": 19, + "normal": 51, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 636, + "3": 268, + "4": 122, + "5": 26, + "8": 8 + }, + "rank_mass": 5174, + "section_profiles": { + "A": { + "1": 946, + "2": 12, + "3": 6, + "4": 50 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 317, + "2": 68, + "3": 56 + }, + "restore": { + "1": 57, + "2": 38, + "3": 8 + } + }, + "step": 5, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 92, + "9": 226 + } + }, + { + "buffer_count": 79, + "event_ledger_sha256": "bf20ecb17464986f4ec5bcdfe852318d67c943dd26b398850be3e424217f8d27", + "frame_edits": 2, + "frame_projection_sha256": "8584387eef080f87635200118b5a99492aa9dd22787f1872291a637b8ea79622", + "helper": 320, + "input_gates": 18, + "normal": 75, + "output_gates": 2, + "profile": { + "1": 2416, + "2": 637, + "3": 271, + "4": 119, + "5": 26, + "8": 8 + }, + "rank_mass": 5173, + "section_profiles": { + "A": { + "1": 947, + "2": 12, + "3": 9, + "4": 47 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 315, + "2": 69, + "3": 56 + }, + "restore": { + "1": 58, + "2": 38, + "3": 8 + } + }, + "step": 6, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 93, + "9": 225 + } + }, + { + "buffer_count": 80, + "event_ledger_sha256": "5b8c0a115808a6242317c8f7024fdefea17cbbf7ee40fd77f48e6a3528765c01", + "frame_edits": 2, + "frame_projection_sha256": "68aa71fb5154ac6ba9f0c5c51c7dee4843282f82b8f659232814077510077b36", + "helper": 511, + "input_gates": 22, + "normal": 85, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 638, + "3": 274, + "4": 116, + "5": 26, + "8": 8 + }, + "rank_mass": 5172, + "section_profiles": { + "A": { + "1": 948, + "2": 12, + "3": 12, + "4": 44 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 313, + "2": 70, + "3": 56 + }, + "restore": { + "1": 59, + "2": 38, + "3": 8 + } + }, + "step": 7, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 94, + "9": 224 + } + }, + { + "buffer_count": 81, + "event_ledger_sha256": "25c8038185ed46fc50a71478b22b5aa02f8587297f3e799c1a296bc3c2c80ff3", + "frame_edits": 2, + "frame_projection_sha256": "200dc61b8a9504519af3377d5f873343c99a1ccfd374a20c04c94890705474fb", + "helper": 304, + "input_gates": 24, + "normal": 102, + "output_gates": 2, + "profile": { + "1": 2416, + "2": 639, + "3": 277, + "4": 113, + "5": 26, + "8": 8 + }, + "rank_mass": 5171, + "section_profiles": { + "A": { + "1": 949, + "2": 12, + "3": 15, + "4": 41 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 311, + "2": 71, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "step": 8, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 95, + "9": 223 + } + }, + { + "buffer_count": 82, + "event_ledger_sha256": "65c270409b388760b22ec96335e998938146969d0d44e671a1797212572ae3ff", + "frame_edits": 3, + "frame_projection_sha256": "a16f8eeedbf838df73abf474057440d2db29e6866b7d60407e53d5729367f584", + "helper": 499, + "input_gates": 21, + "normal": 120, + "output_gates": 3, + "profile": { + "1": 2416, + "2": 640, + "3": 280, + "4": 110, + "5": 26, + "8": 8 + }, + "rank_mass": 5170, + "section_profiles": { + "A": { + "1": 950, + "2": 12, + "3": 18, + "4": 38 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 310, + "2": 72, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "step": 9, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 96, + "9": 222 + } + } + ] + } + }, + "inputs_sha256": "09e49a4edffa3f98b0845289a5041d31ebfa5780e908b70686e6602cec82a9b1", + "scope": "Finite frame/rank/cleanup-syntax audit only; no new kappa, operator endpoint, zero-buffer, native, allocation or full supplier certification.", + "source_commit": "224bd5e56041c40078ff6b5fa7393733a215de5c", + "status": "PASS_PAIRED_HELPER_FRAME_LEDGER", + "words": { + "PARENT-base": { + "buffer_count": 73, + "charge_columns": [ + "section", + "event", + "role", + "from_dimension", + "to_dimension", + "rank", + "from_span_sha256", + "to_span_sha256" + ], + "charges_count": 3471, + "charges_sha256": "1c7cbfbfcd9be00c61bbe1baf50822ad4fb567d1bc8a0221e5f8a389a2b3aae0", + "cleanup_events": 4610, + "cleanup_structure_sha256": "6c078427ad8ef3875309ec33b39ded4117fe26e55844312d0e5e1443988c7bac", + "frame_projection_sha256": "4716c571fc4b2a53ee888c130871e19dbda646a753455becb044858741cafc7a", + "helper_widths_count": 408, + "helper_widths_sha256": "feab2eb02480de87a986a4bd30da10d1931170a75192e9dcc36709cad37bdee6", + "independent_roles": 632, + "live_helpers": 408, + "mass_identity": { + "centre_descent": 64, + "endpoint_increase": 5115, + "helper_endpoint_increase": 3323, + "paid_total": 5179 + }, + "private_buffers_count": 73, + "private_buffers_sha256": "95d514b04b5972825e010851f7493fe9ece55b1a0b970da2676272fb40f35ff8", + "profile": { + "1": 2407, + "2": 640, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5179, + "restored_helpers_count": 73, + "restored_helpers_sha256": "cc00379e8c9888af7103b9dd90bbb2a18bfa4d8fbcd7eed02b3fd29a0b00ec3a", + "role_profiles_count": 632, + "role_profiles_sha256": "b64b0b5c3af60ba61233271e113520b9621beb768ccd5fb5ebd78204f9d3aa33", + "scope": "Exact frame sets, event-derived ranks, helper widths and inverse-reverse cleanup syntax; no scalar/operator endpoint or buffer-zero theorem.", + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 318, + "2": 72, + "3": 56 + }, + "restore": { + "1": 49, + "2": 38, + "3": 8 + } + }, + "warp_event_columns": [ + "section", + "event", + "role", + "signed_id", + "dimension", + "from_span_sha256", + "to_span_sha256" + ], + "warp_events_count": 96, + "warp_events_sha256": "002c2710ca10ef3521917ed792e1ab3d376cca9833b9a949a2fdce1933544e9b", + "warp_records": 72, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 87, + "9": 231 + } + }, + "PARENT-extra": { + "buffer_count": 73, + "charge_columns": [ + "section", + "event", + "role", + "from_dimension", + "to_dimension", + "rank", + "from_span_sha256", + "to_span_sha256" + ], + "charges_count": 3471, + "charges_sha256": "de0e98707a1be56c3458ee82f1fde92885e546ba51774ce1d212949e5e85aaec", + "cleanup_events": 4610, + "cleanup_structure_sha256": "6c078427ad8ef3875309ec33b39ded4117fe26e55844312d0e5e1443988c7bac", + "frame_projection_sha256": "a230223043b62d473bcfabad74c65e6464d82ccd8127055f0767d4918c010ba7", + "helper_widths_count": 408, + "helper_widths_sha256": "feab2eb02480de87a986a4bd30da10d1931170a75192e9dcc36709cad37bdee6", + "independent_roles": 632, + "live_helpers": 408, + "mass_identity": { + "centre_descent": 64, + "endpoint_increase": 5115, + "helper_endpoint_increase": 3323, + "paid_total": 5179 + }, + "private_buffers_count": 73, + "private_buffers_sha256": "95d514b04b5972825e010851f7493fe9ece55b1a0b970da2676272fb40f35ff8", + "profile": { + "1": 2407, + "2": 640, + "3": 262, + "4": 128, + "5": 26, + "8": 8 + }, + "rank_mass": 5179, + "restored_helpers_count": 73, + "restored_helpers_sha256": "cc00379e8c9888af7103b9dd90bbb2a18bfa4d8fbcd7eed02b3fd29a0b00ec3a", + "role_profiles_count": 632, + "role_profiles_sha256": "b64b0b5c3af60ba61233271e113520b9621beb768ccd5fb5ebd78204f9d3aa33", + "scope": "Exact frame sets, event-derived ranks, helper widths and inverse-reverse cleanup syntax; no scalar/operator endpoint or buffer-zero theorem.", + "section_profiles": { + "A": { + "1": 944, + "2": 12, + "4": 56 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 318, + "2": 72, + "3": 56 + }, + "restore": { + "1": 49, + "2": 38, + "3": 8 + } + }, + "warp_event_columns": [ + "section", + "event", + "role", + "signed_id", + "dimension", + "from_span_sha256", + "to_span_sha256" + ], + "warp_events_count": 96, + "warp_events_sha256": "d402dca5e53357cd5c62746b8b27602d0865d696fc75882b7a16d7ba1c484c00", + "warp_records": 72, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 87, + "9": 231 + } + }, + "WORD-base": { + "buffer_count": 82, + "charge_columns": [ + "section", + "event", + "role", + "from_dimension", + "to_dimension", + "rank", + "from_span_sha256", + "to_span_sha256" + ], + "charges_count": 3480, + "charges_sha256": "33daf04bbdd450dcdecc40f05c25ba0e04380943573633990a47c8b26b91dea8", + "cleanup_events": 4829, + "cleanup_structure_sha256": "fb56b7467054b7418a3300c4f97bfa64ebd08f09df51fd36fc45b4a7b96497fa", + "frame_projection_sha256": "d015ee36d9db9cea430bd0ebdb15ad64f145f96e3d4408f900092461441ac6f2", + "helper_widths_count": 408, + "helper_widths_sha256": "8cc74d4de5e40640af432b6aea40ca39693cdc25d54f6ce2572fc96739f8b84b", + "independent_roles": 632, + "live_helpers": 408, + "mass_identity": { + "centre_descent": 64, + "endpoint_increase": 5106, + "helper_endpoint_increase": 3314, + "paid_total": 5170 + }, + "private_buffers_count": 82, + "private_buffers_sha256": "dc7ac9cd6b795b0ab6de0a8057212f37c5253b570dbf0c6b8ab119741d2e1cbb", + "profile": { + "1": 2416, + "2": 640, + "3": 280, + "4": 110, + "5": 26, + "8": 8 + }, + "rank_mass": 5170, + "restored_helpers_count": 82, + "restored_helpers_sha256": "35125ded3707d16020604e4ce56412b9f68834010ac2b81f6ea4bef6b71556d8", + "role_profiles_count": 632, + "role_profiles_sha256": "f0b0e5a533d15d6830736d08cc451c18be646f73b4f2806e14e207cd99d2a117", + "scope": "Exact frame sets, event-derived ranks, helper widths and inverse-reverse cleanup syntax; no scalar/operator endpoint or buffer-zero theorem.", + "section_profiles": { + "A": { + "1": 950, + "2": 12, + "3": 18, + "4": 38 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 310, + "2": 72, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "warp_event_columns": [ + "section", + "event", + "role", + "signed_id", + "dimension", + "from_span_sha256", + "to_span_sha256" + ], + "warp_events_count": 96, + "warp_events_sha256": "002c2710ca10ef3521917ed792e1ab3d376cca9833b9a949a2fdce1933544e9b", + "warp_records": 72, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 96, + "9": 222 + } + }, + "WORD-extra": { + "buffer_count": 82, + "charge_columns": [ + "section", + "event", + "role", + "from_dimension", + "to_dimension", + "rank", + "from_span_sha256", + "to_span_sha256" + ], + "charges_count": 3480, + "charges_sha256": "65c270409b388760b22ec96335e998938146969d0d44e671a1797212572ae3ff", + "cleanup_events": 4829, + "cleanup_structure_sha256": "fb56b7467054b7418a3300c4f97bfa64ebd08f09df51fd36fc45b4a7b96497fa", + "frame_projection_sha256": "a16f8eeedbf838df73abf474057440d2db29e6866b7d60407e53d5729367f584", + "helper_widths_count": 408, + "helper_widths_sha256": "8cc74d4de5e40640af432b6aea40ca39693cdc25d54f6ce2572fc96739f8b84b", + "independent_roles": 632, + "live_helpers": 408, + "mass_identity": { + "centre_descent": 64, + "endpoint_increase": 5106, + "helper_endpoint_increase": 3314, + "paid_total": 5170 + }, + "private_buffers_count": 82, + "private_buffers_sha256": "dc7ac9cd6b795b0ab6de0a8057212f37c5253b570dbf0c6b8ab119741d2e1cbb", + "profile": { + "1": 2416, + "2": 640, + "3": 280, + "4": 110, + "5": 26, + "8": 8 + }, + "rank_mass": 5170, + "restored_helpers_count": 82, + "restored_helpers_sha256": "35125ded3707d16020604e4ce56412b9f68834010ac2b81f6ea4bef6b71556d8", + "role_profiles_count": 632, + "role_profiles_sha256": "f0b0e5a533d15d6830736d08cc451c18be646f73b4f2806e14e207cd99d2a117", + "scope": "Exact frame sets, event-derived ranks, helper widths and inverse-reverse cleanup syntax; no scalar/operator endpoint or buffer-zero theorem.", + "section_profiles": { + "A": { + "1": 950, + "2": 12, + "3": 18, + "4": 38 + }, + "B": { + "1": 1096, + "2": 518, + "3": 198, + "4": 72, + "5": 26 + }, + "centre": { + "8": 8 + }, + "endpoint": { + "1": 310, + "2": 72, + "3": 56 + }, + "restore": { + "1": 60, + "2": 38, + "3": 8 + } + }, + "warp_event_columns": [ + "section", + "event", + "role", + "signed_id", + "dimension", + "from_span_sha256", + "to_span_sha256" + ], + "warp_events_count": 96, + "warp_events_sha256": "d402dca5e53357cd5c62746b8b27602d0865d696fc75882b7a16d7ba1c484c00", + "warp_records": 72, + "width_inventory": { + "4": 26, + "5": 2, + "7": 62, + "8": 96, + "9": 222 + } + } + } +} diff --git a/research/paired-helper-frame-ledger/SOURCE-CREDITS.md b/research/paired-helper-frame-ledger/SOURCE-CREDITS.md new file mode 100644 index 0000000000..153868a3eb --- /dev/null +++ b/research/paired-helper-frame-ledger/SOURCE-CREDITS.md @@ -0,0 +1,40 @@ +# Credit and scope + +Mason Hale, with substantial OpenAI Codex assistance, contributed the ordered +nine-step paired extraction, the explicit frame refits enabling six of those +steps, the actual allocation repair, and the source-bound 82-buffer integration. +Parallel Codex agents searched, implemented and cross-checked the construction; +this is not independent human review. + +The immediate predecessor is Jeremy Diviney's PR2908 at +`51309592971e3b5be935599eed2a95404dc7781e`. His paired input/output extraction +of helper408, structural certificate, compensation rule, owner repair and +73-buffer integration are the foundation of this contribution. +`structure.py` is unchanged from that package. This work uses ordinary exact +linear algebra and does not claim to invent basis changes or nullspaces. + +Jeremy Kothe / `jeremykothe2`'s PR2894 at +`18d03c447886895ef9abf888398178e0428533ca` supplies the preload-resynthesized +quartets, T74 chronology, packing and inverse cleanup conventions. +`vendor/preload_move.py` is unchanged from the pinned parent package. + +The inherited chain includes Yiyang Lu / `Lyy-iiis`'s PR2857 staged shared +kernels and native/overlay/release tools; Dugongue's PR2863 packing; +Marius-Paul Dumitrean's PR2843/2802 pattern-flow and retired-helper lineage; +Jeremy Kothe's PR2833 dirt-entry supplier; Philippe Van Velzen's PR2853 cost +and block-energy work; and Tekalign's PR2751/2839 owner and admission tools. +The exact free-operator auditor retains icekylinx's attribution. The full +native replay retains the PR2768 sparse engine and PR2226 Clifford/operator +notices, without modifying their frozen sources. + +The public replay exports exact predecessor Git objects and checks their +complete manifests before executing their code. Admission adapters are derived +with explicit, counted source substitutions, preserving all inherited checks. +Changes include the declared source identity, the nine additional buffers and +the comparison against PR2908. The dimension73 and Sp(72,2) stock factor remain +the inherited quantities; neither is a buffer count. + +All new material is Apache-2.0. Source-specific notices remain in the pinned +predecessor exports and copied files. The selected result is unchanged. A +passing finite certificate remains conditional on the inherited all-size, +compiler and outer-theorem hypotheses. diff --git a/research/paired-helper-frame-ledger/SOURCES.json b/research/paired-helper-frame-ledger/SOURCES.json new file mode 100644 index 0000000000..cf040a8c19 --- /dev/null +++ b/research/paired-helper-frame-ledger/SOURCES.json @@ -0,0 +1,29 @@ +{ + "schema_version": 1, + "base_commit": "8c8bcecb03def61bca701dd3b045932d39c48022", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "889b95d936746df124872133ae1e7cc339adcb92", + "sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6" + } + ], + "upstream_inputs": { + "source_commit": "224bd5e56041c40078ff6b5fa7393733a215de5c", + "pr": 2917, + "manifest": "INPUTS.json", + "manifest_sha256": "09e49a4edffa3f98b0845289a5041d31ebfa5780e908b70686e6602cec82a9b1", + "authentication": "All copied bytes matched Git blob objects resolved from the exact PR2917 head at intake. Offline verifier checks immutable manifest, SHA256, size and Git blob addresses; it does not query GitHub." + }, + "predecessor_commits": { + "2908": "51309592971e3b5be935599eed2a95404dc7781e", + "2894": "18d03c447886895ef9abf888398178e0428533ca" + } +} diff --git a/research/paired-helper-frame-ledger/TASK.json b/research/paired-helper-frame-ledger/TASK.json new file mode 100644 index 0000000000..a47b120cc2 --- /dev/null +++ b/research/paired-helper-frame-ledger/TASK.json @@ -0,0 +1,108 @@ +{ + "schema_version": 1, + "task_id": "independent-moment", + "priority_revision": 5, + "base_commit": "8c8bcecb03def61bca701dd3b045932d39c48022", + "original_card": { + "id": "independent-moment", + "question": "Does one changed supplier or assembly claim lack a source-bound independent check of a specific new implication?", + "starting_points": [ + "certificates/selected-result.json" + ], + "methods": [ + "Reconstruct the rank ledger from original operations rather than trusting its aggregate.", + "Implement certified moment inequalities through a different exact enclosure method." + ], + "acceptance_gate": "Demonstrate independence, source binding, positive cases and semantic failure controls. Name the existing checks and the missing coverage. More digits or another equivalent evaluation of an unchanged root is not by itself new verification coverage.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Record the selected certificate and complex_profile rather than taking a PR headline as input.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "List the existing independent checks for the exact selected or candidate sources. Pick a new changed input, missing binding or distinct failure mode; stop with a handoff if the proposed arithmetic check is already covered.", + "bottleneck_link": "Independent pricing prevents unsupported frontier claims and can reveal genuine accounting slack.", + "allowed_variations": [ + "Reconstruct either a source ledger or a numeric enclosure with a different method." + ], + "scope_change_triggers": [ + "Importing the primary function and calling its output independent verification." + ], + "overlap_terms": [ + "independent moment", + "rank histogram", + "exact enclosure" + ] + }, + "scope_status": "refined", + "actual_scope": "Independently reconstruct the frame ledger, 13 refits, helper widths and cleanup syntax for both providers of PR2917 and its nine paired-helper extraction stages.", + "scope_change_reason": "Use the selected card rank-ledger method on a changed candidate input with a concrete gap: the two inherited frame reports repeat essentially the same pivot/climb implementation. This audit uses exhaustive GF(2)^9 sets and semantic controls.", + "bottleneck_link": "The paid profile is a fixed input to active allocation and admission work on the candidate. A source-bound implementation with a different frame representation checks that input without another equivalent root calculation.", + "budget_minutes": 60, + "stop_rule": "Freeze construction work by 2026-10-16T12:44:11Z; reserve remaining 15 minutes for verification, overlap refresh and public handoff. Stop without kappa or admission claims if the finite checks fail or duplicate coverage appears.", + "outcome": "completed", + "evidence": "RESULT.json records both providers, four words, nine stage projections/provider and 13 exact refits/provider; verify.py derives the event ledger from pinned operations. test_verify.py contains geometry, chronology, report, cleanup, transform and input failure controls.", + "author": "ToikY", + "ai_assistance": "Substantial OpenAI Codex assistance for implementation, tests, documentation and separate AI mathematical review; no independent human or proof-assistant review.", + "selection": { + "seed": "9e2c1aa952cf9f74c87b48ad6e7d6ac1", + "track": "independent-verification", + "base_commit": "8c8bcecb03def61bca701dd3b045932d39c48022", + "priority_revision": 5, + "catalog_sha256": "7d185cd8c2af35988d638d969748ad7b670f902606444dbfc748e4402c340df6", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "scope_key": "c6f2494b197df3bc3591", + "method": "Reconstruct the rank ledger from original operations rather than trusting its aggregate." + }, + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2612#discussioncomment-18972911", + "overlap": { + "entry_fetched_at": "2026-10-16T12:01:50+00:00", + "open_pr_bodies_including_drafts": 476, + "complete_pagination": true, + "local_records": 2657, + "local_expansion": "All current-main research/*/README.md and TASK.json materialized before expanded search.", + "manual_discussions": [ + 1163, + 1166, + 2612 + ], + "manual_coverage": "Start-here guidance and relevant recent handoffs; canonical2612 active allocation claim; active board titles. Not all older comments or board pages were expanded.", + "boundary": "Complements mdumitrean active PR2917 allocation claim; no allocation search, new word, supplier, native replay or kappa claim.", + "limitations": "API pagination is non-atomic. Cached Discussion data unavailable; manual current relevant threads only. Arbitrary PR diffs, closed work beyond local ledger, and unpublished work are not exhaustive.", + "pre_submission": { + "main": "4e8ceb80ecbc11049a44856b91f74a7448a75e93", + "fetched_at": "2026-10-16T12:17:30+00:00", + "open_pr_bodies_including_drafts": 469, + "complete_pagination": true, + "guidance_catalog_selected_record": "unchanged Git blobs", + "pr2917_head": "224bd5e56041c40078ff6b5fa7393733a215de5c", + "review_ledger": "PR2917 and PR2908 still partially reviewed", + "canonical_discussion": "Re-read current2612 claims; mdumitrean allocation work remains distinct.", + "coverage_limit": "Same manual Discussion and non-atomic pagination limits as entry.", + "local_records": 2671 + } + }, + "open_questions": [ + { + "question": "Do compensation and cleanup satisfy the claimed scalar/free-operator endpoints and zero-buffer restoration for the exact frozen words?", + "why_it_matters": "Frame admissibility and cleanup syntax do not establish their operator semantics.", + "first_step": "Authenticate PR2917 full source closure at224bd5e56041c40078ff6b5fa7393733a215de5c and replay its declared operator checks, distinguishing existing primary checks from any new independent implication.", + "blocked_by": "Outside the bounded frame audit; no conceptual obstruction asserted." + }, + { + "question": "Does the active allocation for these unchanged words satisfy complete native/physical-stock, precision and outer-admission checks?", + "why_it_matters": "Local profile or numerical cap alone is not supplier admission or a kappa improvement.", + "first_step": "Consult the current canonical2612 allocation claim, verify exact word/allocation pins and reproduce its complete declared admission closure.", + "blocked_by": "Concurrent allocation owner work; this session does not claim or duplicate it." + } + ], + "baseline_orientation": { + "status": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "selected_kappa": "836330098538459/500000000000000000", + "scope": "Selected source inventory, certificate and proof-supplement bindings only; no full selected replay." + } +} diff --git a/research/paired-helper-frame-ledger/VALIDATION.json b/research/paired-helper-frame-ledger/VALIDATION.json new file mode 100644 index 0000000000..582d53869d --- /dev/null +++ b/research/paired-helper-frame-ledger/VALIDATION.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "checked_at_utc": "2026-10-16T12:20:28.342219+00:00", + "environment": { + "python": "3.12.14", + "implementation": "CPython", + "system": "Darwin", + "release": "25.5.0", + "machine": "arm64" + }, + "registered_command": [ + "python3.12", + "-B", + "scripts/research_package.py", + "--package", + "research/paired-helper-frame-ledger" + ], + "outcome": "PASS_REGISTERED_RESEARCH_PACKAGE", + "commands": "All four exact commands in VERIFY.json passed; 10 unittest groups in each normal/optimized run.", + "bindings": "SOURCE-CREDITS and13 data files authenticated against PR2917 Git objects; PR2908 actual WORD Git blobs equal the carried PARENT blobs.", + "reviewed_files_sha256": { + "ledger.py": "391b0087f0bf3a5e9f863d2232d17d36c1cce3d56722f4b05e5cb028429ca00b", + "verify.py": "07cf924713a64a99f56ba1c1ad76e5eb6374659416fab18812766f9679bea573", + "test_verify.py": "19299596c27c07adaf4575db2f3f09e35a9f86165125e9b241b546fbb0bf4802", + "INPUTS.json": "09e49a4edffa3f98b0845289a5041d31ebfa5780e908b70686e6602cec82a9b1", + "RESULT.json": "afa2fd065ceda585d65963f28052dad1ea67b10a28a52f6f9ace3fb40ea92ca0" + }, + "semantic_control_scope": "Frame geometry/chronology, warp map and preimage, endpoint charges, width report, helper499 scale refit, cleanup alias/inverse/types, transform old frame/index/scale, byte inventory, strict JSON and receipt type comparison.", + "not_run": [ + "Complete PR2917 supplier/native/admission replay", + "Selected frontier cold replay", + "Hosted CI at time of this local receipt", + "Proof-assistant or independent human verification" + ], + "remaining_obligations": "Operator endpoint and buffer-zero semantics, native owner/physical-stock/precision/moment/outer admission and retained all-size/compiler hypotheses are outside this audit." +} diff --git a/research/paired-helper-frame-ledger/VERIFY.json b/research/paired-helper-frame-ledger/VERIFY.json new file mode 100644 index 0000000000..06c2c48975 --- /dev/null +++ b/research/paired-helper-frame-ledger/VERIFY.json @@ -0,0 +1,51 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source-pinned frame ledger, stage/cleanup syntax and frozen receipt equality" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "Finite rank oracle and semantic/input corruption controls" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source-pinned frame ledger, stage/cleanup syntax and frozen receipt equality with Python optimization enabled" + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/test_verify.py" + ], + "timeout_seconds": 120, + "checks": "Finite rank oracle and semantic/input corruption controls with Python optimization enabled" + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/PARENT-base.json.gz b/research/paired-helper-frame-ledger/data/PARENT-base.json.gz new file mode 100644 index 0000000000..6303cfd847 Binary files /dev/null and b/research/paired-helper-frame-ledger/data/PARENT-base.json.gz differ diff --git a/research/paired-helper-frame-ledger/data/PARENT-extra.json.gz b/research/paired-helper-frame-ledger/data/PARENT-extra.json.gz new file mode 100644 index 0000000000..38af2b6ea7 Binary files /dev/null and b/research/paired-helper-frame-ledger/data/PARENT-extra.json.gz differ diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-299.json b/research/paired-helper-frame-ledger/data/TRANSFORM-299.json new file mode 100644 index 0000000000..897a891719 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-299.json @@ -0,0 +1,274 @@ +{ + "helper": 299, + "normal": 51, + "before": [ + [ + "add", + 302, + 299, + 1, + 4, + [] + ], + [ + "add", + 297, + 299, + -1, + 4, + [] + ], + [ + "add", + 295, + 299, + 1, + 4, + [] + ], + [ + "add", + 294, + 299, + -1, + 4, + [] + ], + [ + "add", + 288, + 299, + 1, + 4, + [] + ], + [ + "add", + 239, + 299, + 1, + 4, + [] + ], + [ + "add", + 238, + 299, + 1, + 4, + [] + ], + [ + "add", + 237, + 299, + -1, + 4, + [] + ], + [ + "add", + 236, + 299, + -1, + 4, + [] + ], + [ + "add", + 231, + 299, + -1, + 4, + [] + ], + [ + "add", + 229, + 299, + 1, + 4, + [] + ], + [ + "add", + 227, + 299, + -1, + 4, + [] + ], + [ + "add", + 225, + 299, + 1, + 4, + [] + ], + [ + "add", + 299, + 303, + 2, + 1, + [] + ], + [ + "add", + 299, + 302, + -1, + 1, + [] + ], + [ + "add", + 299, + 296, + 1, + 1, + [] + ], + [ + "add", + 299, + 292, + -1, + 1, + [] + ], + [ + "add", + 299, + 288, + -1, + 1, + [] + ], + [ + "scale", + 299, + 1, + -2, + [] + ] + ], + "after": [ + [ + "add", + 299, + 40, + 1, + 1, + [ + 256, + 128, + 64, + 33, + 17, + 8, + 4, + 3 + ] + ], + [ + "add", + 299, + 54, + -1, + 1, + [ + 256, + 128, + 64, + 33, + 17, + 8, + 4, + 3 + ] + ], + [ + "add", + 40, + 299, + -1, + 1, + [ + 256, + 128, + 64, + 33, + 17, + 8, + 4, + 3 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3645, + "candidate_index": 3664, + "gate": [ + "add", + 81, + 17, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 64, + 32, + 17, + 9, + 4, + 2 + ], + "new_frame": [ + 256, + 128, + 64, + 34, + 17, + 11, + 4 + ] + }, + { + "section": "A", + "parent_index": 3646, + "candidate_index": 3665, + "gate": [ + "add", + 81, + 40, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 64, + 32, + 17, + 9, + 4, + 2 + ], + "new_frame": [ + 256, + 128, + 64, + 34, + 17, + 11, + 4 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-304.json b/research/paired-helper-frame-ledger/data/TRANSFORM-304.json new file mode 100644 index 0000000000..e04d294250 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-304.json @@ -0,0 +1,296 @@ +{ + "helper": 304, + "normal": 102, + "before": [ + [ + "add", + 319, + 304, + -1, + 4, + [] + ], + [ + "add", + 316, + 304, + -1, + 4, + [] + ], + [ + "add", + 313, + 304, + 1, + 4, + [] + ], + [ + "add", + 312, + 304, + 1, + 4, + [] + ], + [ + "add", + 310, + 304, + 1, + 4, + [] + ], + [ + "add", + 306, + 304, + -1, + 4, + [] + ], + [ + "add", + 271, + 304, + 1, + 4, + [] + ], + [ + "add", + 268, + 304, + 1, + 4, + [] + ], + [ + "add", + 266, + 304, + -1, + 4, + [] + ], + [ + "add", + 265, + 304, + -1, + 4, + [] + ], + [ + "add", + 263, + 304, + -1, + 4, + [] + ], + [ + "add", + 262, + 304, + -1, + 4, + [] + ], + [ + "add", + 258, + 304, + 1, + 4, + [] + ], + [ + "add", + 304, + 499, + 1, + 1, + [] + ], + [ + "add", + 304, + 319, + 2, + 1, + [] + ], + [ + "add", + 304, + 318, + -1, + 1, + [] + ], + [ + "add", + 304, + 315, + 2, + 1, + [] + ], + [ + "add", + 304, + 313, + -2, + 1, + [] + ], + [ + "add", + 304, + 308, + -1, + 1, + [] + ], + [ + "scale", + 304, + 1, + -1, + [] + ], + [ + "scale", + 306, + 1, + -1, + [] + ], + [ + "add", + 304, + 306, + -1, + 1, + [] + ], + [ + "add", + 306, + 304, + 1, + 1, + [] + ], + [ + "add", + 304, + 306, + -1, + 1, + [] + ] + ], + "after": [ + [ + "add", + 304, + 308, + -1, + 1, + [ + 256, + 128, + 66, + 34, + 16, + 8, + 6, + 1 + ] + ], + [ + "add", + 304, + 310, + 1, + 1, + [ + 256, + 128, + 66, + 34, + 16, + 8, + 6, + 1 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3734, + "candidate_index": 3758, + "gate": [ + "add", + 256, + 288, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ], + "new_frame": [ + 256, + 128, + 68, + 34, + 16, + 14, + 1 + ] + }, + { + "section": "A", + "parent_index": 3735, + "candidate_index": 3759, + "gate": [ + "add", + 256, + 304, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ], + "new_frame": [ + 256, + 128, + 68, + 34, + 16, + 14, + 1 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-320.json b/research/paired-helper-frame-ledger/data/TRANSFORM-320.json new file mode 100644 index 0000000000..9c8490c864 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-320.json @@ -0,0 +1,249 @@ +{ + "helper": 320, + "normal": 75, + "before": [ + [ + "add", + 335, + 320, + -1, + 4, + [] + ], + [ + "add", + 332, + 320, + -1, + 4, + [] + ], + [ + "add", + 329, + 320, + 1, + 4, + [] + ], + [ + "add", + 328, + 320, + 1, + 4, + [] + ], + [ + "add", + 326, + 320, + 1, + 4, + [] + ], + [ + "add", + 271, + 320, + 1, + 4, + [] + ], + [ + "add", + 270, + 320, + 1, + 4, + [] + ], + [ + "add", + 269, + 320, + -1, + 4, + [] + ], + [ + "add", + 268, + 320, + -1, + 4, + [] + ], + [ + "add", + 263, + 320, + -1, + 4, + [] + ], + [ + "add", + 261, + 320, + 1, + 4, + [] + ], + [ + "add", + 259, + 320, + -1, + 4, + [] + ], + [ + "add", + 257, + 320, + 1, + 4, + [] + ], + [ + "add", + 320, + 511, + 1, + 1, + [] + ], + [ + "add", + 320, + 335, + 1, + 1, + [] + ], + [ + "add", + 320, + 329, + -2, + 1, + [] + ], + [ + "add", + 320, + 322, + 1, + 1, + [] + ], + [ + "scale", + 320, + 1, + -1, + [] + ] + ], + "after": [ + [ + "add", + 320, + 324, + -1, + 1, + [ + 256, + 128, + 65, + 32, + 16, + 9, + 4, + 3 + ] + ], + [ + "add", + 320, + 326, + 1, + 1, + [ + 256, + 128, + 65, + 32, + 16, + 9, + 4, + 3 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3688, + "candidate_index": 3706, + "gate": [ + "add", + 9, + 272, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 65, + 33, + 16, + 8, + 4, + 2 + ], + "new_frame": [ + 256, + 128, + 65, + 35, + 16, + 10, + 4 + ] + }, + { + "section": "A", + "parent_index": 3689, + "candidate_index": 3707, + "gate": [ + "add", + 9, + 320, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 65, + 33, + 16, + 8, + 4, + 2 + ], + "new_frame": [ + 256, + 128, + 65, + 35, + 16, + 10, + 4 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-331.json b/research/paired-helper-frame-ledger/data/TRANSFORM-331.json new file mode 100644 index 0000000000..7d35aab299 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-331.json @@ -0,0 +1,266 @@ +{ + "helper": 331, + "normal": 30, + "before": [ + [ + "add", + 511, + 331, + 1, + 4, + [] + ], + [ + "add", + 334, + 331, + 1, + 4, + [] + ], + [ + "add", + 329, + 331, + -1, + 4, + [] + ], + [ + "add", + 326, + 331, + -1, + 4, + [] + ], + [ + "add", + 320, + 331, + 1, + 4, + [] + ], + [ + "add", + 239, + 331, + 1, + 4, + [] + ], + [ + "add", + 236, + 331, + 1, + 4, + [] + ], + [ + "add", + 234, + 331, + -1, + 4, + [] + ], + [ + "add", + 233, + 331, + -1, + 4, + [] + ], + [ + "add", + 231, + 331, + -1, + 4, + [] + ], + [ + "add", + 230, + 331, + -1, + 4, + [] + ], + [ + "add", + 227, + 331, + 1, + 4, + [] + ], + [ + "add", + 226, + 331, + 1, + 4, + [] + ], + [ + "add", + 331, + 335, + 1, + 1, + [] + ], + [ + "add", + 331, + 334, + -1, + 1, + [] + ], + [ + "add", + 331, + 324, + -1, + 1, + [] + ], + [ + "add", + 331, + 320, + -1, + 1, + [] + ], + [ + "scale", + 331, + 1, + -2, + [] + ] + ], + "after": [ + [ + "add", + 331, + 22, + 1, + 1, + [ + 256, + 128, + 64, + 32, + 18, + 10, + 6, + 1 + ] + ], + [ + "add", + 331, + 34, + -1, + 1, + [ + 256, + 128, + 64, + 32, + 18, + 10, + 6, + 1 + ] + ], + [ + "add", + 22, + 331, + -1, + 1, + [ + 256, + 128, + 64, + 32, + 18, + 10, + 6, + 1 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3633, + "candidate_index": 3651, + "gate": [ + "add", + 224, + 107, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 64, + 36, + 20, + 8, + 2, + 1 + ], + "new_frame": [ + 256, + 128, + 64, + 38, + 20, + 10, + 1 + ] + }, + { + "section": "A", + "parent_index": 3634, + "candidate_index": 3652, + "gate": [ + "add", + 224, + 22, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 64, + 36, + 20, + 8, + 2, + 1 + ], + "new_frame": [ + 256, + 128, + 64, + 38, + 20, + 10, + 1 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-412.json b/research/paired-helper-frame-ledger/data/TRANSFORM-412.json new file mode 100644 index 0000000000..e62dd449d7 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-412.json @@ -0,0 +1,258 @@ +{ + "helper": 412, + "normal": 127, + "before": [ + [ + "add", + 415, + 412, + -1, + 2, + [] + ], + [ + "add", + 410, + 412, + 1, + 2, + [] + ], + [ + "add", + 409, + 412, + 1, + 2, + [] + ], + [ + "add", + 407, + 412, + 1, + 2, + [] + ], + [ + "add", + 406, + 412, + 1, + 2, + [] + ], + [ + "add", + 403, + 412, + -1, + 2, + [] + ], + [ + "add", + 402, + 412, + -1, + 2, + [] + ], + [ + "add", + 255, + 412, + 1, + 2, + [] + ], + [ + "add", + 252, + 412, + 1, + 2, + [] + ], + [ + "add", + 250, + 412, + -1, + 2, + [] + ], + [ + "add", + 249, + 412, + -1, + 2, + [] + ], + [ + "add", + 247, + 412, + -1, + 2, + [] + ], + [ + "add", + 246, + 412, + -1, + 2, + [] + ], + [ + "add", + 242, + 412, + 1, + 2, + [] + ], + [ + "add", + 412, + 415, + 1, + 1, + [] + ], + [ + "add", + 412, + 414, + -1, + 1, + [] + ], + [ + "add", + 412, + 413, + -1, + 2, + [] + ], + [ + "add", + 412, + 411, + 1, + 2, + [] + ], + [ + "add", + 412, + 410, + -1, + 2, + [] + ], + [ + "add", + 412, + 407, + -1, + 2, + [] + ], + [ + "add", + 412, + 406, + 1, + 2, + [] + ], + [ + "add", + 412, + 401, + -1, + 2, + [] + ], + [ + "scale", + 412, + 2, + -1, + [] + ] + ], + "after": [ + [ + "scale", + 412, + -1, + 1, + [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ] + ], + [ + "add", + 412, + 400, + 1, + 2, + [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ] + ], + [ + "add", + 412, + 414, + 1, + 1, + [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ] + ], + [ + "add", + 400, + 412, + -2, + 1, + [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ] + ] + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-424.json b/research/paired-helper-frame-ledger/data/TRANSFORM-424.json new file mode 100644 index 0000000000..4fae6d1bb3 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-424.json @@ -0,0 +1,250 @@ +{ + "helper": 424, + "normal": 52, + "before": [ + [ + "add", + 430, + 424, + 1, + 2, + [] + ], + [ + "add", + 427, + 424, + -1, + 2, + [] + ], + [ + "add", + 426, + 424, + -1, + 2, + [] + ], + [ + "add", + 423, + 424, + -1, + 2, + [] + ], + [ + "add", + 419, + 424, + 1, + 2, + [] + ], + [ + "add", + 418, + 424, + 1, + 2, + [] + ], + [ + "add", + 417, + 424, + -1, + 2, + [] + ], + [ + "add", + 239, + 424, + 1, + 2, + [] + ], + [ + "add", + 236, + 424, + 1, + 2, + [] + ], + [ + "add", + 234, + 424, + -1, + 2, + [] + ], + [ + "add", + 233, + 424, + -1, + 2, + [] + ], + [ + "add", + 231, + 424, + -1, + 2, + [] + ], + [ + "add", + 230, + 424, + -1, + 2, + [] + ], + [ + "add", + 227, + 424, + 1, + 2, + [] + ], + [ + "add", + 226, + 424, + 1, + 2, + [] + ], + [ + "add", + 424, + 431, + 1, + 2, + [] + ], + [ + "add", + 424, + 430, + -1, + 2, + [] + ], + [ + "add", + 424, + 425, + 1, + 2, + [] + ], + [ + "add", + 424, + 421, + -1, + 2, + [] + ], + [ + "add", + 424, + 420, + 1, + 2, + [] + ], + [ + "add", + 424, + 419, + 1, + 2, + [] + ], + [ + "add", + 424, + 418, + -1, + 2, + [] + ], + [ + "add", + 424, + 417, + 1, + 1, + [] + ], + [ + "scale", + 424, + 2, + 1, + [] + ] + ], + "after": [ + [ + "add", + 424, + 16, + 1, + 2, + [ + 256, + 128, + 64, + 36, + 20, + 8, + 2, + 1 + ] + ], + [ + "add", + 424, + 44, + 1, + 1, + [ + 256, + 128, + 64, + 36, + 20, + 8, + 2, + 1 + ] + ], + [ + "add", + 16, + 424, + -2, + 1, + [ + 256, + 128, + 64, + 36, + 20, + 8, + 2, + 1 + ] + ] + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-428.json b/research/paired-helper-frame-ledger/data/TRANSFORM-428.json new file mode 100644 index 0000000000..1593c52045 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-428.json @@ -0,0 +1,258 @@ +{ + "helper": 428, + "normal": 76, + "before": [ + [ + "add", + 431, + 428, + -1, + 2, + [] + ], + [ + "add", + 426, + 428, + 1, + 2, + [] + ], + [ + "add", + 425, + 428, + 1, + 2, + [] + ], + [ + "add", + 423, + 428, + 1, + 2, + [] + ], + [ + "add", + 422, + 428, + 1, + 2, + [] + ], + [ + "add", + 419, + 428, + -1, + 2, + [] + ], + [ + "add", + 418, + 428, + -1, + 2, + [] + ], + [ + "add", + 271, + 428, + 1, + 2, + [] + ], + [ + "add", + 268, + 428, + 1, + 2, + [] + ], + [ + "add", + 266, + 428, + -1, + 2, + [] + ], + [ + "add", + 265, + 428, + -1, + 2, + [] + ], + [ + "add", + 263, + 428, + -1, + 2, + [] + ], + [ + "add", + 262, + 428, + -1, + 2, + [] + ], + [ + "add", + 258, + 428, + 1, + 2, + [] + ], + [ + "add", + 428, + 431, + 1, + 1, + [] + ], + [ + "add", + 428, + 430, + -1, + 1, + [] + ], + [ + "add", + 428, + 429, + -1, + 2, + [] + ], + [ + "add", + 428, + 427, + 1, + 2, + [] + ], + [ + "add", + 428, + 426, + -1, + 2, + [] + ], + [ + "add", + 428, + 423, + -1, + 2, + [] + ], + [ + "add", + 428, + 422, + 1, + 2, + [] + ], + [ + "add", + 428, + 417, + -1, + 2, + [] + ], + [ + "scale", + 428, + 2, + -1, + [] + ] + ], + "after": [ + [ + "scale", + 428, + -1, + 1, + [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ] + ], + [ + "add", + 428, + 416, + 1, + 2, + [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ] + ], + [ + "add", + 428, + 430, + 1, + 1, + [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ] + ], + [ + "add", + 416, + 428, + -2, + 1, + [ + 256, + 128, + 68, + 32, + 16, + 12, + 2, + 1 + ] + ] + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-499.json b/research/paired-helper-frame-ledger/data/TRANSFORM-499.json new file mode 100644 index 0000000000..7c22cd7a66 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-499.json @@ -0,0 +1,322 @@ +{ + "helper": 499, + "normal": 120, + "before": [ + [ + "add", + 319, + 499, + -1, + 4, + [] + ], + [ + "add", + 318, + 499, + -1, + 4, + [] + ], + [ + "add", + 317, + 499, + 1, + 4, + [] + ], + [ + "add", + 316, + 499, + 1, + 4, + [] + ], + [ + "add", + 308, + 499, + -1, + 4, + [] + ], + [ + "add", + 255, + 499, + 1, + 4, + [] + ], + [ + "add", + 254, + 499, + 1, + 4, + [] + ], + [ + "add", + 253, + 499, + -1, + 4, + [] + ], + [ + "add", + 252, + 499, + -1, + 4, + [] + ], + [ + "add", + 247, + 499, + -1, + 4, + [] + ], + [ + "add", + 245, + 499, + 1, + 4, + [] + ], + [ + "add", + 243, + 499, + -1, + 4, + [] + ], + [ + "add", + 241, + 499, + 1, + 4, + [] + ], + [ + "add", + 499, + 319, + 2, + 1, + [] + ], + [ + "add", + 499, + 316, + -1, + 1, + [] + ], + [ + "add", + 499, + 315, + 1, + 1, + [] + ], + [ + "add", + 499, + 312, + 2, + 1, + [] + ], + [ + "scale", + 310, + 1, + -1, + [] + ], + [ + "add", + 499, + 310, + -1, + 1, + [] + ], + [ + "add", + 310, + 499, + 1, + 1, + [] + ], + [ + "add", + 499, + 310, + -1, + 1, + [] + ] + ], + "after": [ + [ + "add", + 499, + 35, + 1, + 1, + [ + 256, + 128, + 72, + 40, + 24, + 4, + 2, + 1 + ] + ], + [ + "add", + 499, + 306, + -1, + 1, + [ + 256, + 128, + 72, + 40, + 24, + 4, + 2, + 1 + ] + ], + [ + "add", + 35, + 499, + -1, + 1, + [ + 256, + 128, + 72, + 40, + 24, + 4, + 2, + 1 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3740, + "candidate_index": 3761, + "gate": [ + "add", + 11, + 77, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 66, + 32, + 18, + 8, + 4, + 1 + ], + "new_frame": [ + 256, + 128, + 74, + 40, + 26, + 4, + 1 + ] + }, + { + "section": "A", + "parent_index": 3741, + "candidate_index": 3762, + "gate": [ + "add", + 11, + 35, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 66, + 32, + 18, + 8, + 4, + 1 + ], + "new_frame": [ + 256, + 128, + 74, + 40, + 26, + 4, + 1 + ] + }, + { + "section": "restore", + "parent_index": 40, + "candidate_index": 40, + "gate": [ + "scale", + 499, + -1, + 1 + ], + "old_frame": [ + 256, + 128, + 64, + 32, + 16, + 8, + 4, + 2, + 1 + ], + "new_frame": [ + 256, + 128, + 72, + 40, + 24, + 4, + 2, + 1 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/TRANSFORM-511.json b/research/paired-helper-frame-ledger/data/TRANSFORM-511.json new file mode 100644 index 0000000000..7c7bf4b1a1 --- /dev/null +++ b/research/paired-helper-frame-ledger/data/TRANSFORM-511.json @@ -0,0 +1,298 @@ +{ + "helper": 511, + "normal": 85, + "before": [ + [ + "add", + 335, + 511, + -1, + 4, + [] + ], + [ + "add", + 334, + 511, + -1, + 4, + [] + ], + [ + "add", + 333, + 511, + 1, + 4, + [] + ], + [ + "add", + 332, + 511, + 1, + 4, + [] + ], + [ + "add", + 326, + 511, + 1, + 4, + [] + ], + [ + "add", + 324, + 511, + -1, + 4, + [] + ], + [ + "add", + 255, + 511, + 1, + 4, + [] + ], + [ + "add", + 252, + 511, + 1, + 4, + [] + ], + [ + "add", + 250, + 511, + -1, + 4, + [] + ], + [ + "add", + 249, + 511, + -1, + 4, + [] + ], + [ + "add", + 247, + 511, + -1, + 4, + [] + ], + [ + "add", + 246, + 511, + -1, + 4, + [] + ], + [ + "add", + 242, + 511, + 1, + 4, + [] + ], + [ + "add", + 511, + 335, + 1, + 1, + [] + ], + [ + "add", + 511, + 334, + 1, + 2, + [] + ], + [ + "add", + 511, + 332, + -1, + 1, + [] + ], + [ + "add", + 511, + 329, + 1, + 1, + [] + ], + [ + "add", + 511, + 328, + 2, + 1, + [] + ], + [ + "add", + 511, + 326, + -1, + 1, + [] + ], + [ + "add", + 511, + 324, + 1, + 2, + [] + ], + [ + "add", + 511, + 322, + -1, + 2, + [] + ], + [ + "scale", + 511, + 2, + 1, + [] + ] + ], + "after": [ + [ + "add", + 511, + 23, + 1, + 1, + [ + 256, + 128, + 65, + 32, + 17, + 8, + 5, + 2 + ] + ], + [ + "add", + 511, + 322, + -1, + 1, + [ + 256, + 128, + 65, + 32, + 17, + 8, + 5, + 2 + ] + ], + [ + "add", + 23, + 511, + -1, + 1, + [ + 256, + 128, + 65, + 32, + 17, + 8, + 5, + 2 + ] + ] + ], + "frame_changes": [ + { + "section": "A", + "parent_index": 3700, + "candidate_index": 3722, + "gate": [ + "add", + 240, + 39, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ], + "new_frame": [ + 256, + 128, + 65, + 34, + 17, + 10, + 5 + ] + }, + { + "section": "A", + "parent_index": 3701, + "candidate_index": 3723, + "gate": [ + "add", + 240, + 23, + 1, + 1 + ], + "old_frame": [ + 256, + 128, + 65, + 33, + 17, + 9, + 5, + 3 + ], + "new_frame": [ + 256, + 128, + 65, + 34, + 17, + 10, + 5 + ] + } + ] +} diff --git a/research/paired-helper-frame-ledger/data/WORD-base.json.gz b/research/paired-helper-frame-ledger/data/WORD-base.json.gz new file mode 100644 index 0000000000..9be0aa5349 Binary files /dev/null and b/research/paired-helper-frame-ledger/data/WORD-base.json.gz differ diff --git a/research/paired-helper-frame-ledger/data/WORD-extra.json.gz b/research/paired-helper-frame-ledger/data/WORD-extra.json.gz new file mode 100644 index 0000000000..40b38365ea Binary files /dev/null and b/research/paired-helper-frame-ledger/data/WORD-extra.json.gz differ diff --git a/research/paired-helper-frame-ledger/ledger.py b/research/paired-helper-frame-ledger/ledger.py new file mode 100644 index 0000000000..6631af6410 --- /dev/null +++ b/research/paired-helper-frame-ledger/ledger.py @@ -0,0 +1,558 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Finite frame and cleanup-structure audit using literal GF(2)^9 sets. + +No predecessor implementation is imported. Scalar/operator endpoint identities, +zero-buffer restoration, native phases, allocation and moment certification are +outside this module. A frame is its complete set of at most 512 vectors; no +Gaussian elimination or pivot representation is used. +""" +from collections import Counter, defaultdict +from copy import deepcopy +from fractions import Fraction +from functools import lru_cache +import hashlib +import json + + +DIMENSION = 9 +VECTORS = frozenset(range(1 << DIMENSION)) +ZERO = frozenset({0}) +FIRST_TARGET, FIRST_HELPER, ORDINARY_ROLES = 112, 224, 704 +HELPERS = (424, 428, 412, 331, 299, 320, 511, 304, 499) +NORMALS = (52, 76, 127, 30, 51, 75, 85, 102, 120) +PARENT_PROFILE = {1: 2407, 2: 640, 3: 262, 4: 128, 5: 26, 8: 8} +FRAME_SECTIONS = ( + 'A', 'B', 'restore', 'helper_final', 'start_extra', 'centers', + 'center_frames', 'target_levels', 'cut', 'warps', 'ports', 'removed', + 'prelude_events', +) + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def integer(value, message): + require(type(value) is int, message) + return value + + +def canonical_hash(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, + separators=(',', ':')).encode()).hexdigest() + + +@lru_cache(maxsize=8192) +def _span(generators): + result = {0} + for generator in generators: + result.update(x ^ generator for x in tuple(result)) + return frozenset(result) + + +def span(generators): + require(type(generators) is list, 'frame must be a vector list') + require(all(type(x) is int and 0 <= x < 512 for x in generators), + 'frame vector outside GF(2)^9') + return _span(tuple(generators)) + + +def dimension(space): + size = len(space) + require(size > 0 and size & (size - 1) == 0, 'non-subspace cardinality') + return size.bit_length() - 1 + + +def frame_basis(generators): + result = span(generators) + require(dimension(result) == len(generators), 'dependent frame generators') + return result + + +def parity(a, b): + return (a & b).bit_count() & 1 + + +@lru_cache(maxsize=8192) +def perpendicular(space): + return frozenset(x for x in VECTORS if all(not parity(x, u) for u in space)) + + +def hyperplane(normal): + require(type(normal) is int and 0 < normal < 512, 'invalid hyperplane normal') + return frozenset(x for x in VECTORS if not parity(x, normal)) + + +@lru_cache(maxsize=512) +def linear_table(columns): + require(len(columns) == 9 and all(type(x) is int and 0 <= x < 512 + for x in columns), 'warp column shape') + images = [0] * 512 + for x in range(1, 512): + bit = x & -x + images[x] = images[x ^ bit] ^ columns[bit.bit_length() - 1] + require(len(set(images)) == 512, 'singular warp map') + return tuple(images) + + +@lru_cache(maxsize=2048) +def check_map(columns, source, target): + """Full 512-point permutation, dual-perpendicular and frame-lift checks.""" + image = linear_table(columns) + require(frozenset(image[x] for x in source) == target, 'warp image frame mismatch') + inverse = [0] * 512 + for x, y in enumerate(image): + inverse[y] = x + # G^-T(z) is characterized directly by dot(G^-T z, e_i)=dot(z,G^-1 e_i). + dual = tuple(sum(parity(z, inverse[1 << i]) << i for i in range(9)) + for z in range(512)) + require(frozenset(dual[z] for z in perpendicular(source)) == perpendicular(target), + 'dual warp perpendicular mismatch') + + def lifted(point): + x, z = point & 511, point >> 9 + gx = image[x] + return gx | ((gx ^ dual[x] ^ dual[z]) << 9) + + def lagrangian(space): + return {x | ((x ^ p) << 9) for x in space for p in perpendicular(space)} + + require({lifted(x) for x in lagrangian(source)} == lagrangian(target), + 'lifted warp frame mismatch') + require({lifted(x) for x in lagrangian(ZERO)} == lagrangian(ZERO), + 'warp does not fix zero frame') + require({lifted(x) for x in lagrangian(VECTORS)} == lagrangian(VECTORS), + 'warp does not fix full frame') + generators = [1 << i for i in range(18)] + def symplectic(a, b): + return parity(a & 511, b >> 9) ^ parity(a >> 9, b & 511) + require(all(symplectic(lifted(a), lifted(b)) == symplectic(a, b) + for a in generators for b in generators), 'warp symplectic mismatch') + return True + + +def role_map(value, live, label): + require(type(value) is dict, label + ' must be an object') + result = {} + for key, generators in value.items(): + require(type(key) is str and key.isascii() and key.isdecimal() + and str(int(key)) == key, label + ' role key') + role = int(key) + require(role in live and role >= FIRST_HELPER, label + ' removed or invalid helper') + result[role] = frame_basis(generators) + return result + + +def target_role(role): + return FIRST_TARGET <= role < FIRST_HELPER + + +def scalar_gate(gate, allowed, frame_required=True): + require(type(gate) is list and gate and gate[0] in ('add', 'scale'), + 'unknown scalar gate') + require(len(gate) == (6 if gate[0] == 'add' else 5), 'scalar gate shape') + roles = gate[1:3] if gate[0] == 'add' else gate[1:2] + require(all(type(r) is int and r in allowed for r in roles), + 'gate references removed or invalid role') + if gate[0] == 'add': + require(roles[0] != roles[1], 'self addition') + numerator, denominator = gate[3:5] + else: + numerator, denominator = gate[2:4] + require(type(numerator) is int and type(denominator) is int and denominator != 0, + 'invalid scalar rational') + coefficient = Fraction(numerator, denominator) + require(coefficient.denominator & (coefficient.denominator - 1) == 0, + 'non-dyadic gate') + if gate[0] == 'scale': + numerator_abs = abs(coefficient.numerator) + require(numerator_abs and numerator_abs & (numerator_abs - 1) == 0, + 'noninvertible dyadic scaling') + if frame_required: + frame_basis(gate[-1]) + else: + require(gate[-1] is None, 'cut must have unframed gate') + return tuple(roles) + + +def _histogram(counter): + return {str(k): v for k, v in sorted(counter.items()) if v} + + +def _claimed_histogram(value, label): + require(type(value) is dict, label + ' must be an object') + result = {} + for k, v in value.items(): + require(type(k) is str and k.isascii() and k.isdecimal() + and str(int(k)) == k and int(k) > 0, label + ' rank key') + require(type(v) is int and v > 0, label + ' count') + result[k] = v + return result + + +def cleanup_projection(word): + """Expected inverse-reverse syntax; does not prove its semantic endpoint.""" + restored = {int(r) for r in word['helper_final']} + forward = list(word['A'][word['prelude_events']:]) + scheduled = defaultdict(list) + for identity, record in enumerate(word['warps'], 1): + scheduled[record[0]].append(['warp', record[1], identity]) + for index in range(len(word['B']) + 1): + forward.extend(scheduled[index]) + if index < len(word['B']): + forward.append(word['B'][index]) + forward.extend(word['restore']) + forward = [g for g in forward if g[0] == 'warp' or not target_role(g[1])] + result = [] + full = [1 << i for i in reversed(range(9))] + def buffer(role): + return role + ORDINARY_ROLES if role in restored else role + for gate in reversed(forward): + if gate[0] == 'warp': + result.append(['warp', buffer(gate[1]), -gate[2], full]) + elif gate[0] == 'add': + result.append(['add', buffer(gate[1]), buffer(gate[2]), + -gate[3], gate[4], full]) + else: + result.append(['scale', buffer(gate[1]), gate[3], gate[2], full]) + return result + + +def _audit(word, check_report, check_cleanup): + require(type(word) is dict, 'word must be an object') + for key in FRAME_SECTIONS + ('report', 'cleanup'): + require(key in word, 'missing word section ' + key) + report = word['report'] + require(type(report) is dict and all(type(report.get(k)) is int + for k in ('v', 'h', 'R')), 'integer source geometry') + require((report['v'], report['h'], report['R']) == (112, 9, 480), + 'unsupported source geometry') + removed_list = word['removed'] + require(type(removed_list) is list and all(type(r) is int and 224 <= r < 704 + for r in removed_list) and len(set(removed_list)) == len(removed_list), + 'removed helper inventory') + live = set(range(704)) - set(removed_list) + require(len(live) == 632, 'expected 632 independent ordinary roles') + helpers = sorted(live - set(range(224))) + restored = role_map(word['helper_final'], live, 'helper_final') + entering = role_map(word['start_extra'], live, 'start_extra') + ports = word['ports'] + require(type(ports) is list and len(ports) == 112 and len(set(ports)) == 112, + 'port inventory') + require(all(type(p) is int and 0 < p < 512 for p in ports), 'port vector') + start = {r: ZERO for r in live} + finish = {r: VECTORS for r in live} + for r, port in enumerate(ports): + start[r] = span([port]) + finish[r + 112] = hyperplane(port) + start.update(entering) + finish.update(restored) + current = dict(start) + charges = [] + warp_events = [] + paid, by_section = Counter(), defaultdict(Counter) + by_role = defaultdict(Counter) + + def charge(section, index, role, old, new, descending=False): + amount = dimension(old) - dimension(new) if descending else dimension(new) - dimension(old) + if amount: + require(amount > 0, 'negative paid rank') + paid[amount] += 1 + by_section[section][amount] += 1 + by_role[role][amount] += 1 + charges.append([section, index, role, dimension(old), dimension(new), amount, + canonical_hash(sorted(old)), canonical_hash(sorted(new))]) + + def climb(section, index, role, destination): + old = current[role] + require(old <= destination, f'nonmonotone frame at {section}:{index} role {role}') + charge(section, index, role, old, destination) + current[role] = destination + + warps = word['warps'] + require(type(warps) is list, 'warp records') + schedules = defaultdict(list) + for identity, record in enumerate(warps, 1): + require(type(record) is list and len(record) == 5, 'warp record shape') + position, role, columns, raw_source, raw_target = record + require(type(position) is int and 0 <= position <= len(word['B']), 'warp position') + require(type(role) is int and role in live and not target_role(role), 'warp role') + require(type(columns) is list, 'warp columns') + source, target = frame_basis(raw_source), frame_basis(raw_target) + require(dimension(source) == dimension(target), 'warp changes dimension') + check_map(tuple(columns), source, target) + schedules[position].append(identity) + + def warp(section, index, role, identity, source, destination): + require(type(identity) is int and identity != 0 and abs(identity) <= len(warps), + 'warp identity') + record = warps[abs(identity) - 1] + require(role == record[1], 'warp lender mismatch') + columns = tuple(record[2]) + check_map(columns, source if identity > 0 else destination, + destination if identity > 0 else source) + require(current[role] == source, f'warp source frame mismatch at {section}:{index}') + current[role] = destination + warp_events.append([section, index, role, identity, dimension(source), + canonical_hash(sorted(source)), canonical_hash(sorted(destination))]) + + npre = integer(word['prelude_events'], 'prelude count') + require(0 <= npre <= len(word['A']), 'prelude bounds') + for section in ('A', 'B', 'restore'): + require(type(word[section]) is list, section + ' gate list') + + def scalar(section, index, gate): + roles = scalar_gate(gate, live) + if not target_role(gate[1]): + require(all(not target_role(r) for r in roles), 'nontarget reads target') + if section == 'restore': + require(not target_role(gate[1]), 'restore writes target') + destination = span(gate[-1]) + for role in roles: + climb(section, index, role, destination) + + for index, gate in enumerate(word['A']): + require(type(gate) is list and len(gate) >= 2, 'A gate shape') + if gate[0] == 'warp': + require(index < npre and len(gate) == 5, 'warp outside A prelude') + role, identity = gate[1:3] + require(type(role) is int and role in live, 'A warp role') + warp('A', index, role, identity, frame_basis(gate[3]), frame_basis(gate[4])) + else: + if index < npre: + require(target_role(gate[1]), 'prelude scalar must write target') + scalar('A', index, gate) + + levels = word['target_levels'] + require(type(levels) is dict, 'target levels') + target_frames = {} + for key, value in levels.items(): + require(type(key) is str and key.isascii() and key.isdecimal() + and str(int(key)) == key and 0 <= int(key) < 112, 'target level key') + target_frames[int(key)] = frame_basis(value) + require(all(current[112 + t] == target_frames.get(t, ZERO) for t in range(112)), + 'cut target frame unavailable') + centers, center_frames = word['centers'], word['center_frames'] + require(type(centers) is list and type(center_frames) is list + and len(centers) == len(center_frames) == 8 and len(set(centers)) == 8, + 'centre inventory') + require(all(type(r) is int and r in live and not target_role(r) for r in centers), + 'centre role') + served = defaultdict(set) + require(type(word['cut']) is list, 'cut gate list') + for gate in word['cut']: + roles = scalar_gate(gate, live, frame_required=False) + require(gate[0] == 'add' and target_role(roles[0]) and roles[1] in centers, + 'cut gate must read a declared centre into target') + served[roles[1]].add(target_frames.get(roles[0] - 112, ZERO)) + for center_index, (role, raw) in enumerate(zip(centers, center_frames)): + cursor = frame_basis(raw) + require(current[role] == cursor, 'centre entrance frame mismatch') + destinations = sorted(served[role], key=lambda s: (-len(s), tuple(sorted(s)))) + for descent_index, destination in enumerate(destinations): + require(destination <= cursor, 'centre descent is not nested') + charge('centre', center_index * 112 + descent_index, role, cursor, + destination, descending=True) + cursor = destination + # The centre path is a separately charged readout; its main-word frame + # remains the entrance frame for subsequent B operations. + + for index in range(len(word['B']) + 1): + for identity in schedules[index]: + _, role, _, raw_source, raw_target = warps[identity - 1] + warp('B-warp', index, role, identity, + frame_basis(raw_source), frame_basis(raw_target)) + if index < len(word['B']): + scalar('B', index, word['B'][index]) + for index, gate in enumerate(word['restore']): + scalar('restore', index, gate) + for role in sorted(live): + climb('endpoint', role, role, finish[role]) + + widths = {str(role): dimension(finish[role]) - dimension(start[role]) for role in helpers} + require(all(value > 0 for value in widths.values()), 'nonpositive helper width') + inventory = Counter(widths.values()) + profile = _histogram(paid) + if check_report: + require(_claimed_histogram(report.get('local_profile'), 'local_profile') == profile, + 'declared paid profile mismatch') + require(_claimed_histogram(report.get('width_inventory'), 'width_inventory') == _histogram(inventory), + 'declared helper inventory mismatch') + expected_cleanup = cleanup_projection(word) + cleanup = word['cleanup'] + require(type(cleanup) is list, 'cleanup gate list') + buffers = {704 + role for role in restored} + if check_cleanup: + require(len(cleanup) == len(expected_cleanup), 'cleanup length mismatch') + seen_buffers = set() + for index, (actual, expected) in enumerate(zip(cleanup, expected_cleanup)): + require(type(actual) is list and actual, 'cleanup gate shape') + if actual[0] == 'warp': + require(len(actual) == 4 and type(actual[1]) is int + and type(actual[2]) is int, 'cleanup warp shape') + else: + scalar_gate(actual, live | buffers) + require(actual[:-1] == expected[:-1] and frame_basis(actual[-1]) == VECTORS, + f'inverse-reverse cleanup mismatch at {index}') + roles = actual[1:2] if actual[0] != 'add' else actual[1:3] + require(all(type(r) is int and r in live | buffers for r in roles), 'cleanup role') + require(all(r not in restored for r in roles), 'cleanup touches restored helper') + seen_buffers.update(r for r in roles if r >= 704) + require(seen_buffers == buffers, 'private buffer namespace mismatch') + for role in live: + if not target_role(role) and role not in restored: + require(finish[role] == VECTORS, 'cleanup unbuffered low endpoint') + mass = sum(rank * count for rank, count in paid.items()) + endpoint_mass = sum(dimension(finish[role]) - dimension(start[role]) for role in live) + centre_mass = sum(rank * count for rank, count in by_section['centre'].items()) + require(mass == endpoint_mass + centre_mass, + 'telescoping frame-mass identity mismatch') + return { + 'profile': profile, + 'rank_mass': mass, + 'mass_identity': {'endpoint_increase': endpoint_mass, + 'helper_endpoint_increase': sum(widths.values()), + 'centre_descent': centre_mass, 'paid_total': mass}, + 'width_inventory': _histogram(inventory), + 'helper_widths': widths, + 'independent_roles': len(live), + 'live_helpers': len(helpers), + 'restored_helpers': sorted(restored), + 'private_buffers': sorted(buffers), + 'buffer_count': len(buffers), + 'section_profiles': {key: _histogram(value) for key, value in sorted(by_section.items())}, + 'role_profiles': {str(key): _histogram(value) for key, value in sorted(by_role.items())}, + 'charge_columns': ['section', 'event', 'role', 'from_dimension', 'to_dimension', + 'rank', 'from_span_sha256', 'to_span_sha256'], + 'charges': charges, + 'warp_event_columns': ['section', 'event', 'role', 'signed_id', 'dimension', + 'from_span_sha256', 'to_span_sha256'], + 'warp_events': warp_events, + 'warp_records': len(warps), + 'cleanup_events': len(expected_cleanup), + 'cleanup_structure_sha256': canonical_hash(expected_cleanup), + 'frame_projection_sha256': canonical_hash({key: word[key] for key in FRAME_SECTIONS}), + 'scope': 'Exact frame sets, event-derived ranks, helper widths and inverse-reverse cleanup syntax; no scalar/operator endpoint or buffer-zero theorem.', + } + + +def audit_word(word): + """Audit one frozen word, including its declared reports and cleanup syntax.""" + return _audit(word, check_report=True, check_cleanup=True) + + +def audit_chain(parent, final, transforms): + """Reconstruct only frame-bearing sections of the nine sequential stages.""" + require(type(transforms) is list and len(transforms) == 9, 'nine declared transforms required') + before = audit_word(parent) + after = audit_word(final) + require(before['profile'] == _histogram(PARENT_PROFILE), 'unexpected parent profile') + require(before['buffer_count'] == 73, 'expected 73 parent buffers') + current = deepcopy(parent) + records, edits = [], [] + expected_profile = Counter(PARENT_PROFILE) + parent_restored = set(before['restored_helpers']) + for step, (helper, normal, transform) in enumerate(zip(HELPERS, NORMALS, transforms), 1): + require(type(transform) is dict and type(transform.get('helper')) is int + and transform['helper'] == helper and transform.get('normal') == normal, + 'transform order/helper/normal mismatch') + require(str(helper) not in current['helper_final'] + and str(helper) not in current['start_extra'] and helper not in current['removed'], + 'extraction helper is not fresh zero-entry helper') + initial = current.get('initial_corrections') + require(type(initial) is list and all(type(item) is dict and type(item.get('source')) is int + for item in initial), 'initial correction source inventory') + protected = set(map(int, current['helper_final'])) | set(map(int, current['start_extra'])) + protected.update(item['source'] for item in initial) + allowed = set(range(224, 704)) - set(current['removed']) - protected + input_gates, output_gates = transform.get('before'), transform.get('after') + require(type(input_gates) is list and input_gates and type(output_gates) is list + and output_gates, 'transform gate lists') + for gate in input_gates: + scalar_gate(gate, allowed) + require(span(gate[-1]) == ZERO, 'input gate is not at zero frame') + plane = hyperplane(normal) + for gate in output_gates: + scalar_gate(gate, set(range(704)) - set(current['removed'])) + require(not target_role(gate[1]) and span(gate[-1]) == plane, + 'output gate must use exact declared hyperplane') + roles = gate[1:3] if gate[0] == 'add' else gate[1:2] + require(not (set(roles) & set(map(int, current['helper_final']))), + 'output gate touches previously restored endpoint') + seen = set() + changes = transform.get('frame_changes', []) + require(type(changes) is list, 'frame changes list') + require(len(changes) == (0 if step <= 3 else 3 if step == 9 else 2), + 'unexpected stage frame edit count') + for edit in changes: + require(type(edit) is dict, 'frame edit record') + section, index = edit.get('section'), edit.get('parent_index') + require(section in ('A', 'restore') and type(index) is int + and 0 <= index < len(current[section]) and (section, index) not in seen, + 'frame edit index/duplicate') + require(section != 'A' or index >= current['prelude_events'], 'frame edit inside prelude') + seen.add((section, index)) + gate = current[section][index] + require(gate[:-1] == edit.get('gate') and gate[-1] == edit.get('old_frame'), + 'frame edit exact preimage mismatch') + require(gate[0] in ('add', 'scale') and not target_role(gate[1]), 'frame edit gate kind') + old_frame, new_frame = frame_basis(edit['old_frame']), frame_basis(edit['new_frame']) + require(new_frame < old_frame and dimension(old_frame) - dimension(new_frame) == 1, + 'frame edit must lower by one within old span') + require(new_frame == old_frame & plane, + 'frame edit is not intersection with extraction hyperplane') + expected_candidate_index = index + (len(input_gates) if section == 'A' else 0) + require(type(edit.get('candidate_index')) is int + and edit['candidate_index'] == expected_candidate_index, + 'frame edit candidate index mismatch') + gate[-1] = deepcopy(edit['new_frame']) + edits.append({'step': step, 'helper': helper, 'section': section, + 'parent_index': index, 'candidate_index': expected_candidate_index, + 'from_dimension': dimension(old_frame), 'to_dimension': dimension(new_frame), + 'old_span_sha256': canonical_hash(sorted(old_frame)), + 'new_span_sha256': canonical_hash(sorted(new_frame))}) + npre = current['prelude_events'] + current['A'][npre:npre] = deepcopy(input_gates) + current['restore'].extend(deepcopy(output_gates)) + current['helper_final'][str(helper)] = deepcopy(output_gates[0][-1]) + projected = _audit(current, check_report=False, check_cleanup=False) + delta = {1: 3, 2: -2} if step <= 3 else {2: 1, 3: 3, 4: -3} + expected_profile.update(delta) + require(projected['profile'] == _histogram(expected_profile), 'stage paid profile delta mismatch') + require(projected['buffer_count'] == 73 + step, 'stage private buffer count') + require(set(projected['restored_helpers']) == parent_restored | set(HELPERS[:step]), + 'previously restored helper disappeared') + stage_inventory = Counter({int(k): v for k, v in before['width_inventory'].items()}) + stage_inventory[8] += step + stage_inventory[9] -= step + require(projected['width_inventory'] == _histogram(stage_inventory), 'stage helper inventory delta mismatch') + require(all(projected['helper_widths'][role] == width - (int(role) in HELPERS[:step]) + for role, width in before['helper_widths'].items()), + 'stage width changes outside extracted helpers') + records.append({'step': step, 'helper': helper, 'normal': normal, + 'input_gates': len(input_gates), 'output_gates': len(output_gates), + 'frame_edits': len(changes), 'profile': projected['profile'], + 'rank_mass': projected['rank_mass'], 'width_inventory': projected['width_inventory'], + 'buffer_count': projected['buffer_count'], + 'section_profiles': projected['section_profiles'], + 'event_ledger_sha256': canonical_hash(projected['charges']), + 'frame_projection_sha256': projected['frame_projection_sha256']}) + require(len(edits) == 13, 'thirteen frame edits required') + for section in FRAME_SECTIONS: + require(current[section] == final[section], 'final frame-bearing section mismatch: ' + section) + require(cleanup_projection(current) == cleanup_projection(final), 'final cleanup projection mismatch') + changed_widths = [int(role) for role, width in before['helper_widths'].items() + if after['helper_widths'][role] != width] + require(set(changed_widths) == set(HELPERS), 'unexpected changed helper widths') + require(all(before['helper_widths'][str(h)] == 9 and after['helper_widths'][str(h)] == 8 + for h in HELPERS), 'extracted helper width not 9 to 8') + require(after['rank_mass'] - before['rank_mass'] == -9, 'local rank mass delta') + return {'stages': records, 'frame_edits': edits, + 'changed_helpers': sorted(changed_widths), 'rank_mass_delta': -9, + 'profile_delta': {'1': 9, '3': 18, '4': -18}, + 'buffer_count_before': before['buffer_count'], 'buffer_count_after': after['buffer_count'], + 'parent_event_ledger_sha256': canonical_hash(before['charges']), + 'final_event_ledger_sha256': canonical_hash(after['charges']), + 'frame_sections_checked': list(FRAME_SECTIONS), + 'scope': 'Sequential frame projection and cleanup syntax only; compensation algebra and paired scalar/free-operator identities are inherited, not replayed.'} diff --git a/research/paired-helper-frame-ledger/test_verify.py b/research/paired-helper-frame-ledger/test_verify.py new file mode 100644 index 0000000000..04ebcddc53 --- /dev/null +++ b/research/paired-helper-frame-ledger/test_verify.py @@ -0,0 +1,274 @@ +# SPDX-License-Identifier: Apache-2.0 +"""Adversarial controls for the finite frame/cleanup ledger only. + +These tests load the new ledger, not a predecessor producer or checker. The +small-space oracle uses row rank, independently of the ledger set expansion. +They do not check native operator identities or the multiplication theorem. +""" +from collections import Counter +from copy import deepcopy +import gzip +import importlib.util +import json +import shutil +import tempfile +from pathlib import Path +import sys +import unittest + +HERE = Path(__file__).resolve().parent +SPEC = importlib.util.spec_from_file_location("paired_frame_ledger", HERE / "ledger.py") +ledger = importlib.util.module_from_spec(SPEC) +sys.modules[SPEC.name] = ledger +SPEC.loader.exec_module(ledger) +HELPERS = (424, 428, 412, 331, 299, 320, 511, 304, 499) + + +def naive_span(vectors): + """Enumerate each coefficient mask independently, without span extension.""" + values = set() + for mask in range(1 << len(vectors)): + value = 0 + for index, vector in enumerate(vectors): + if mask >> index & 1: + value ^= vector + values.add(value) + return frozenset(values) + + +def binary_rank(vectors): + """Independent oracle using XOR pivot elimination, not span expansion.""" + pivots = {} + for value in vectors: + while value: + pivot = value.bit_length() - 1 + if pivot not in pivots: + pivots[pivot] = value + break + value ^= pivots[pivot] + return len(pivots) + + +def shape_counts(word): + """The dimension-only gate counts cannot distinguish several controls.""" + return Counter((section, gate[0], len(gate[-1])) + for section in ("A", "B", "restore", "cleanup") + for gate in word[section]) + + +class FrameLedgerTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.words = {} + for kind in ("PARENT", "WORD"): + for variant in ("base", "extra"): + name = f"{kind}-{variant}" + with gzip.open(HERE / "data" / f"{name}.json.gz", "rt") as source: + cls.words[name] = json.load(source) + cls.transforms = [] + for helper in HELPERS: + with (HERE / "data" / f"TRANSFORM-{helper}.json").open() as source: + cls.transforms.append(json.load(source)) + + def reject_word(self, word): + with self.assertRaises(ValueError): + ledger.audit_word(word) + + def test_finite_span_oracle(self): + subspaces = {} + # All 128 generating subsets of the seven nonzero 3-bit vectors. + for mask in range(128): + generators = [v for v in range(1, 8) if mask >> (v - 1) & 1] + rank = binary_rank(generators) + expected = frozenset(v for v in range(8) + if binary_rank(generators + [v]) == rank) + actual = ledger.span(generators) + self.assertEqual(actual, expected) + self.assertEqual(ledger.dimension(actual), rank) + if rank == len(generators): + self.assertEqual(ledger.frame_basis(generators), expected) + else: + with self.assertRaises(ValueError): + ledger.frame_basis(generators) + subspaces[actual] = generators + self.assertEqual(len(subspaces), 16) + # Every ordered pair, including equal-rank unequal planes. Containment + # is independently checked by rank of the concatenated generators. + for a, generators_a in subspaces.items(): + for b, generators_b in subspaces.items(): + self.assertEqual(a <= b, binary_rank(generators_a + generators_b) + == binary_rank(generators_b)) + + def test_all_frozen_words_and_chains(self): + for name, word in self.words.items(): + with self.subTest(word=name): + receipt = ledger.audit_word(word) + self.assertEqual(receipt["profile"], word["report"]["local_profile"]) + self.assertEqual(receipt["width_inventory"], word["report"]["width_inventory"]) + self.assertEqual(receipt["independent_roles"], 632) + self.assertEqual(receipt["buffer_count"], 73 if name.startswith("PARENT") else 82) + for variant in ("base", "extra"): + with self.subTest(chain=variant): + receipt = ledger.audit_chain(self.words[f"PARENT-{variant}"], + self.words[f"WORD-{variant}"], self.transforms) + self.assertEqual(len(receipt["stages"]), 9) + self.assertEqual(len(receipt["frame_edits"]), 13) + self.assertEqual(receipt["rank_mass_delta"], -9) + self.assertEqual(receipt["changed_helpers"], sorted(HELPERS)) + + def test_equal_rank_wrong_subspace_and_chronology(self): + original = self.words["WORD-base"] + wrong = deepcopy(original) + self.assertEqual(wrong["A"][13][-1], [45]) + wrong["A"][13][-1] = [43] + self.assertEqual(len(naive_span([45])), len(naive_span([43]))) + self.assertNotEqual(naive_span([45]), naive_span([43])) + self.assertEqual(shape_counts(wrong), shape_counts(original)) + self.reject_word(wrong) + early = deepcopy(original) + # Read the source at frame [45] before the warp from [382]. Same gates. + early["A"][12], early["A"][13] = early["A"][13], early["A"][12] + self.assertEqual(shape_counts(early), shape_counts(original)) + self.reject_word(early) + + def test_wrong_warp_preimage_and_rank_preserving_map(self): + original = self.words["WORD-base"] + wrong = deepcopy(original) + self.assertEqual(wrong["A"][12][3], [382]) + wrong["A"][12][3] = [383] + self.assertEqual(shape_counts(wrong), shape_counts(original)) + self.reject_word(wrong) + shifted = deepcopy(original) + columns = shifted["warps"][0][2] + before = tuple(columns) + # An elementary column operation preserves matrix rank, but need not + # carry the declared source subspace to the declared destination. + columns[0] ^= columns[1] + self.assertEqual(len(naive_span(before)), len(naive_span(columns))) + self.assertEqual(shape_counts(shifted), shape_counts(original)) + self.reject_word(shifted) + + def test_report_cannot_omit_paid_transition(self): + original = self.words["WORD-base"] + receipt = ledger.audit_word(original) + endpoint = receipt["section_profiles"]["endpoint"] + self.assertGreater(sum(endpoint.values()), 0) + wrong = deepcopy(original) + # Simulate the ledger obtained by stopping before the terminal climbs. + for rank, count in endpoint.items(): + wrong["report"]["local_profile"][rank] -= count + if wrong["report"]["local_profile"][rank] == 0: + del wrong["report"]["local_profile"][rank] + self.reject_word(wrong) + wrong = deepcopy(original) + wrong["report"]["width_inventory"]["8"] -= 1 + wrong["report"]["width_inventory"]["9"] += 1 + self.reject_word(wrong) + + def test_helper499_scale_must_use_lowered_frame(self): + wrong = deepcopy(self.words["WORD-base"]) + self.assertEqual(wrong["restore"][40][:4], ["scale", 499, -1, 1]) + self.assertEqual(len(naive_span(wrong["restore"][40][-1])), 256) + wrong["restore"][40][-1] = [256, 128, 64, 32, 16, 8, 4, 2, 1] + self.reject_word(wrong) + + def test_cleanup_buffer_alias_and_wrong_inverse(self): + original = self.words["WORD-base"] + alias = deepcopy(original) + self.assertEqual(alias["cleanup"][0][2], 1203) + alias["cleanup"][0][2] = 499 # 1203 = 704 + 499 is the saved copy. + self.assertEqual(shape_counts(alias), shape_counts(original)) + self.reject_word(alias) + reciprocal = deepcopy(original) + self.assertEqual(reciprocal["cleanup"][603][:4], ["scale", 68, 2, 1]) + reciprocal["cleanup"][603][2:4] = [1, 2] + self.assertEqual(shape_counts(reciprocal), shape_counts(original)) + self.reject_word(reciprocal) + for alias_value in (True, 1.0): + wrong_type = deepcopy(original) + self.assertEqual(wrong_type["cleanup"][0][3], 1) + wrong_type["cleanup"][0][3] = alias_value + with self.subTest(coefficient_type=type(alias_value).__name__): + self.reject_word(wrong_type) + + def test_transform_old_frame_index_and_lowered_scale_binding(self): + parent, final = self.words["PARENT-base"], self.words["WORD-base"] + for control in ("old_frame", "candidate_index", "omitted_scale"): + transforms = deepcopy(self.transforms) + changes = transforms[-1]["frame_changes"] + if control == "old_frame": + # Keep rank eight but change the exact parent subspace. + changes[0]["old_frame"][2] ^= 1 + elif control == "candidate_index": + changes[0]["candidate_index"] += 1 + else: + changes.pop() # The helper499 scale refit is a separate edit. + with self.subTest(control=control), self.assertRaises(ValueError): + ledger.audit_chain(parent, final, transforms) + + +class InputBoundaryTests(unittest.TestCase): + @classmethod + def setUpClass(cls): + spec = importlib.util.spec_from_file_location("paired_frame_wrapper_tests", HERE / "verify.py") + cls.wrapper = importlib.util.module_from_spec(spec) + spec.loader.exec_module(cls.wrapper) + + def test_source_inventory_and_byte_pins(self): + # Copies are confined to a disposable system temporary directory; + # committed fixtures and predecessor programs are never modified. + with tempfile.TemporaryDirectory(prefix="paired-frame-io-") as temporary: + directory = Path(temporary) + shutil.copytree(HERE / "data", directory / "data") + for name in ("INPUTS.json", "SOURCE-CREDITS.md"): + shutil.copyfile(HERE / name, directory / name) + inputs = self.wrapper.load_inputs(directory) + self.assertEqual(set(inputs), + {f"{kind}-{variant}" for kind in ("PARENT", "WORD") + for variant in ("base", "extra")} + | {f"TRANSFORM-{helper}" for helper in HELPERS}) + self.assertEqual(len(inputs["WORD-base"]["helper_final"]), 82) + source = directory / "data" / "WORD-base.json.gz" + original = source.read_bytes() + source.write_bytes(original[:-1] + bytes([original[-1] ^ 1])) + with self.assertRaisesRegex(ValueError, "source bytes changed"): + self.wrapper.load_inputs(directory) + source.write_bytes(original) + saved = directory / "saved-source.gz" + source.rename(saved) + with self.assertRaisesRegex(ValueError, "unexpected data file"): + self.wrapper.load_inputs(directory) + saved.rename(source) + extra = directory / "data" / "unlisted.json" + extra.write_text("{}") + with self.assertRaisesRegex(ValueError, "unexpected data file"): + self.wrapper.load_inputs(directory) + extra.unlink() + manifest = directory / "INPUTS.json" + original_manifest = manifest.read_bytes() + manifest.write_bytes(original_manifest + b"\n") + with self.assertRaisesRegex(ValueError, "source manifest pin mismatch"): + self.wrapper.load_inputs(directory) + manifest.write_bytes(original_manifest) + # Every mutation was repaired; the same copy must pass again. + self.assertEqual(self.wrapper.canonical(self.wrapper.load_inputs(directory)), + self.wrapper.canonical(inputs)) + + def test_strict_json_and_receipt_type_distinctions(self): + for raw in ('{"a":1,"a":2}', '{"outer":{"a":1,"a":2}}', + '{"value":NaN}', '{"value":Infinity}', '{"value":-Infinity}', + '{"value":1e999}', '{"value":-1e999}'): + with self.subTest(raw=raw), self.assertRaises(ValueError): + self.wrapper.strict_json(raw) + values = self.wrapper.strict_json('{"values":[true,1,1.0]}')["values"] + self.assertEqual([type(value) for value in values], [bool, int, float]) + serialized = [self.wrapper.canonical({"value": value}) for value in values] + self.assertEqual(serialized, ['{"value":true}', '{"value":1}', '{"value":1.0}']) + self.assertEqual(len(set(serialized)), 3) + for nonfinite in (float("nan"), float("inf"), -float("inf")): + with self.assertRaises(ValueError): + self.wrapper.canonical({"value": nonfinite}) + + +if __name__ == "__main__": + unittest.main() diff --git a/research/paired-helper-frame-ledger/verify.py b/research/paired-helper-frame-ledger/verify.py new file mode 100644 index 0000000000..ec4578fd93 --- /dev/null +++ b/research/paired-helper-frame-ledger/verify.py @@ -0,0 +1,127 @@ +#!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 +"""Read-only replay of the source-pinned finite frame ledger. + +Use --details to print every derived paid event as JSON. No predecessor Python, +network, external package, subprocess, or cached output enters the calculation. +""" +import argparse +import gzip +import hashlib +import importlib.util +import json +import math +from pathlib import Path +import sys + +HERE = Path(__file__).resolve().parent +SPEC = importlib.util.spec_from_file_location("paired_frame_ledger", HERE / "ledger.py") +ledger = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(ledger) +INPUTS_SHA256 = "09e49a4edffa3f98b0845289a5041d31ebfa5780e908b70686e6602cec82a9b1" +SOURCE_COMMIT = "224bd5e56041c40078ff6b5fa7393733a215de5c" + + +def strict_json(raw): + def pairs(items): + result = {} + for key, value in items: + if key in result: + raise ValueError("duplicate JSON key: " + key) + result[key] = value + return result + + def nonfinite(value): + raise ValueError("nonfinite JSON number: " + value) + + def finite_float(value): + result = float(value) + if not math.isfinite(result): + nonfinite(value) + return result + + return json.loads(raw, object_pairs_hook=pairs, parse_constant=nonfinite, + parse_float=finite_float) + + +def canonical(value): + # Compare serialized JSON, not Python equality (True == 1 == 1.0). + return json.dumps(value, sort_keys=True, separators=(",", ":"), allow_nan=False) + + +def load_inputs(directory=HERE): + manifest_raw = (directory / "INPUTS.json").read_bytes() + ledger.require(hashlib.sha256(manifest_raw).hexdigest() == INPUTS_SHA256, + "source manifest pin mismatch") + manifest = strict_json(manifest_raw) + ledger.require(manifest["source_commit"] == SOURCE_COMMIT, "source commit mismatch") + names = {"data/" + kind + "-" + variant + ".json.gz" + for kind in ("PARENT", "WORD") for variant in ("base", "extra")} + names |= {f"data/TRANSFORM-{helper}.json" for helper in ledger.HELPERS} + names.add("SOURCE-CREDITS.md") + rows = manifest["files"] + ledger.require(len(rows) == len(names) and {row["path"] for row in rows} == names, + "source inventory mismatch") + ledger.require({"data/" + path.name for path in (directory / "data").iterdir()} + == names - {"SOURCE-CREDITS.md"}, "unexpected data file") + result = {} + for row in rows: + path = directory / row["path"] + ledger.require(path.is_file() and not path.is_symlink(), "non-regular source file") + raw = path.read_bytes() + ledger.require(len(raw) == row["bytes"] + and hashlib.sha256(raw).hexdigest() == row["sha256"], + "source bytes changed: " + row["path"]) + blob = hashlib.sha1(b"blob " + str(len(raw)).encode() + b"\0" + raw).hexdigest() + ledger.require(blob == row["git_blob"], "source Git blob mismatch") + if path.suffix == ".gz": + result[path.name[:-8]] = strict_json(gzip.decompress(raw)) + elif path.suffix == ".json": + result[path.stem] = strict_json(raw) + return result + + +def replay(directory=HERE, details=False): + inputs = load_inputs(directory) + words, chains = {}, {} + for variant in ("base", "extra"): + for kind in ("PARENT", "WORD"): + name = kind + "-" + variant + receipt = ledger.audit_word(inputs[name]) + if not details: + receipt = dict(receipt) + for key in ("charges", "warp_events", "helper_widths", "role_profiles", + "restored_helpers", "private_buffers"): + value = receipt.pop(key) + receipt[key + "_sha256"] = ledger.canonical_hash(value) + receipt[key + "_count"] = len(value) + words[name] = receipt + transforms = [inputs[f"TRANSFORM-{helper}"] for helper in ledger.HELPERS] + chains[variant] = ledger.audit_chain(inputs["PARENT-" + variant], + inputs["WORD-" + variant], transforms) + return {"status": "PASS_PAIRED_HELPER_FRAME_LEDGER", "source_commit": SOURCE_COMMIT, + "inputs_sha256": INPUTS_SHA256, "words": words, "chains": chains, + "scope": "Finite frame/rank/cleanup-syntax audit only; no new kappa, operator endpoint, zero-buffer, native, allocation or full supplier certification."} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--details", action="store_true", help="print derived event ledgers to stdout") + args = parser.parse_args() + result = replay() + expected = strict_json((HERE / "RESULT.json").read_bytes()) + ledger.require(canonical(result) == canonical(expected), "frozen RESULT differs from replay") + if args.details: + print(json.dumps(replay(details=True), indent=2, sort_keys=True)) + else: + print(result["status"]) + print("2 providers; 4 words; 9 stages/provider; 13 exact frame edits/provider") + print("rank mass 5179 -> 5170; helper widths 3323 -> 3314; buffers 73 -> 82") + + +if __name__ == "__main__": + try: + main() + except (ValueError, KeyError, TypeError, OSError) as error: + print("FAIL_PAIRED_HELPER_FRAME_LEDGER: " + str(error), file=sys.stderr) + raise SystemExit(1) from error