From 27db45ac6befa99d6c06be920a93845023e81937 Mon Sep 17 00:00:00 2001 From: BigCactusLabs <42389343+BigCactusLabs@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:25:35 -0400 Subject: [PATCH] Audit selected cold wrappers with independent exact amplitudes --- .../cold-wrapper-amplitude-audit.yml | 30 + .../cold-wrapper-amplitude-audit/CLAIM.json | 56 + .../EXPECTED.json | 2112 +++++++++++++++++ .../cold-wrapper-amplitude-audit/NOTICE.md | 37 + .../cold-wrapper-amplitude-audit/README.md | 176 ++ .../cold-wrapper-amplitude-audit/SOURCES.json | 38 + .../VALIDATION.md | 44 + .../test_verify.py | 100 + .../cold-wrapper-amplitude-audit/verify.py | 280 +++ 9 files changed, 2873 insertions(+) create mode 100644 .github/workflows/cold-wrapper-amplitude-audit.yml create mode 100644 research/cold-wrapper-amplitude-audit/CLAIM.json create mode 100644 research/cold-wrapper-amplitude-audit/EXPECTED.json create mode 100644 research/cold-wrapper-amplitude-audit/NOTICE.md create mode 100644 research/cold-wrapper-amplitude-audit/README.md create mode 100644 research/cold-wrapper-amplitude-audit/SOURCES.json create mode 100644 research/cold-wrapper-amplitude-audit/VALIDATION.md create mode 100644 research/cold-wrapper-amplitude-audit/test_verify.py create mode 100644 research/cold-wrapper-amplitude-audit/verify.py diff --git a/.github/workflows/cold-wrapper-amplitude-audit.yml b/.github/workflows/cold-wrapper-amplitude-audit.yml new file mode 100644 index 0000000000..05dab0c6aa --- /dev/null +++ b/.github/workflows/cold-wrapper-amplitude-audit.yml @@ -0,0 +1,30 @@ +name: Cold-wrapper amplitude audit +on: + pull_request: + paths: + - 'research/cold-wrapper-amplitude-audit/**' + - '.github/workflows/cold-wrapper-amplitude-audit.yml' + push: + paths: + - 'research/cold-wrapper-amplitude-audit/**' + - '.github/workflows/cold-wrapper-amplitude-audit.yml' + workflow_dispatch: + +permissions: + contents: read + +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + matrix: + python: ['3.11', '3.14'] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + - run: python -I -O -B research/cold-wrapper-amplitude-audit/verify.py + - run: python -I -O -B research/cold-wrapper-amplitude-audit/test_verify.py + - run: git diff --exit-code diff --git a/research/cold-wrapper-amplitude-audit/CLAIM.json b/research/cold-wrapper-amplitude-audit/CLAIM.json new file mode 100644 index 0000000000..9ab59c2a1f --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/CLAIM.json @@ -0,0 +1,56 @@ +{ + "track": "Adversarial mathematical audit", + "seed": 60, + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "selected_kappa": "51110230636731/31250000000000000", + "selected_source_head": "660de893d27bb7abd1d5b01b1640207528a5c851", + "started_utc": "2026-10-13T04:09:54Z", + "claimed_utc": "2026-10-13T04:13:51.577623+00:00", + "expected_finish_utc": "2026-10-13T04:55:00Z", + "candidates": [ + { + "object": "Selected PR626 cold-helper residual wrappers (E=0, dim U=4)", + "decision": "Chosen: independent all-basis amplitude audit rather than shared Clifford/tableau machinery." + }, + { + "object": "K-triangle leaver-read schedule legality and accounting", + "decision": "Not chosen: active #646, #683 and #687 cover closely related schedules." + }, + { + "object": "Prime-power cyclic inverse resultant/reciprocal obligations", + "decision": "Not chosen: active #666 and #668 supply distinct exact arithmetic evidence." + } + ], + "exact_scope": "Check L^-1 T_U R^-1 = C_[4] tensor I for the selected cold-ended helper pairs using independent Gaussian-integer amplitude kernels on all 512 basis inputs. Audit all unique pairs; use seed 60 for deterministic mutation ordering and representative selection. No generator imports and no new kappa.", + "method": "Derive the canonical-frame kernel from its documented monomial conjugation; compare with an independently decoded serialized L C_[4] R kernel using integer Gaussian numerators. Exhaustive finite matrix entries; no scalar-word/compiler/hosting/all-size audit.", + "expected_deliverable": "One self-contained research audit package with proof, exact receipt, source hashes, attribution and meaningful mutation controls; one focused PR.", + "coordination": "No pinned issues; only open issue #650 asks for a discussion channel. Claim local per sprint instructions. Open PR inventory inspected through #688.", + "plan": [ + "Locate and bind the exact selected cold wrapper inputs and dependency source definitions.", + "Implement two independent kernel constructions and exhaust every basis column; identify a nontrivial phase/interface negative control.", + "Verify output and negative controls under normal and optimized Python, source integrity, changed scope, selected-record check; refresh overlap before one PR." + ], + "status": "completed locally; one focused PR prepared", + "completed_utc": "2026-10-13T04:25:00.607945+00:00", + "result": { + "unique_cold_frames": 14, + "provider_local_helper_instances": 44, + "basis_columns": 7168, + "matrix_entries": 3670016, + "negative_controls": 70, + "finding": "All selected cold-wrapper identities pass. A right-input Z_6 phase preserves width, support and the zero-input column but changes exactly 256 columns. The production tableau checker already rejects it.", + "kappa_change": false, + "receipt": "EXPECTED.json" + }, + "overlap_refresh": { + "open_prs": 518, + "through_pr": 698, + "pinned_sprint_issues": 0, + "related": { + "662": "same archived inputs, acceleration of original tableau engine; new method checks every column without that engine", + "581": "different rank-one literal Lean proof", + "675": "different owner/controller obligation" + }, + "no_duplicate_found": true + } +} diff --git a/research/cold-wrapper-amplitude-audit/EXPECTED.json b/research/cold-wrapper-amplitude-audit/EXPECTED.json new file mode 100644 index 0000000000..64bb189e2e --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/EXPECTED.json @@ -0,0 +1,2112 @@ +{ + "status": "PASS_COLD_WRAPPER_AMPLITUDE_AUDIT", + "seed": 60, + "scope": "Exact finite cold-wrapper matrices only; no multiplication theorem or new kappa.", + "providers": { + "ck": [ + { + "register": 234, + "terminal_frame_id": 52, + "vectors": [ + 448, + 38, + 21, + 11 + ] + }, + { + "register": 250, + "terminal_frame_id": 81, + "vectors": [ + 261, + 133, + 85, + 45 + ] + }, + { + "register": 266, + "terminal_frame_id": 110, + "vectors": [ + 400, + 69, + 35, + 14 + ] + }, + { + "register": 281, + "terminal_frame_id": 139, + "vectors": [ + 388, + 75, + 41, + 26 + ] + }, + { + "register": 282, + "terminal_frame_id": 139, + "vectors": [ + 388, + 75, + 41, + 26 + ] + }, + { + "register": 297, + "terminal_frame_id": 168, + "vectors": [ + 273, + 145, + 85, + 51 + ] + }, + { + "register": 298, + "terminal_frame_id": 168, + "vectors": [ + 273, + 145, + 85, + 51 + ] + }, + { + "register": 313, + "terminal_frame_id": 197, + "vectors": [ + 385, + 74, + 44, + 30 + ] + }, + { + "register": 314, + "terminal_frame_id": 197, + "vectors": [ + 385, + 74, + 44, + 30 + ] + }, + { + "register": 329, + "terminal_frame_id": 226, + "vectors": [ + 266, + 138, + 75, + 30 + ] + }, + { + "register": 330, + "terminal_frame_id": 226, + "vectors": [ + 266, + 138, + 75, + 30 + ] + }, + { + "register": 345, + "terminal_frame_id": 255, + "vectors": [ + 416, + 70, + 19, + 13 + ] + }, + { + "register": 346, + "terminal_frame_id": 255, + "vectors": [ + 416, + 70, + 19, + 13 + ] + }, + { + "register": 361, + "terminal_frame_id": 284, + "vectors": [ + 262, + 134, + 102, + 30 + ] + }, + { + "register": 362, + "terminal_frame_id": 284, + "vectors": [ + 262, + 134, + 102, + 30 + ] + }, + { + "register": 377, + "terminal_frame_id": 313, + "vectors": [ + 392, + 67, + 37, + 22 + ] + }, + { + "register": 378, + "terminal_frame_id": 313, + "vectors": [ + 392, + 67, + 37, + 22 + ] + }, + { + "register": 393, + "terminal_frame_id": 342, + "vectors": [ + 259, + 131, + 75, + 51 + ] + }, + { + "register": 394, + "terminal_frame_id": 342, + "vectors": [ + 259, + 131, + 75, + 51 + ] + }, + { + "register": 410, + "terminal_frame_id": 371, + "vectors": [ + 265, + 137, + 75, + 45 + ] + }, + { + "register": 426, + "terminal_frame_id": 400, + "vectors": [ + 386, + 73, + 45, + 28 + ] + }, + { + "register": 442, + "terminal_frame_id": 429, + "vectors": [ + 268, + 140, + 45, + 30 + ] + } + ], + "jp8": [ + { + "register": 234, + "terminal_frame_id": 36, + "vectors": [ + 448, + 38, + 21, + 11 + ] + }, + { + "register": 250, + "terminal_frame_id": 65, + "vectors": [ + 261, + 133, + 85, + 45 + ] + }, + { + "register": 266, + "terminal_frame_id": 94, + "vectors": [ + 400, + 69, + 35, + 14 + ] + }, + { + "register": 281, + "terminal_frame_id": 123, + "vectors": [ + 388, + 75, + 41, + 26 + ] + }, + { + "register": 282, + "terminal_frame_id": 123, + "vectors": [ + 388, + 75, + 41, + 26 + ] + }, + { + "register": 297, + "terminal_frame_id": 152, + "vectors": [ + 273, + 145, + 85, + 51 + ] + }, + { + "register": 298, + "terminal_frame_id": 152, + "vectors": [ + 273, + 145, + 85, + 51 + ] + }, + { + "register": 313, + "terminal_frame_id": 181, + "vectors": [ + 385, + 74, + 44, + 30 + ] + }, + { + "register": 314, + "terminal_frame_id": 181, + "vectors": [ + 385, + 74, + 44, + 30 + ] + }, + { + "register": 329, + "terminal_frame_id": 210, + "vectors": [ + 266, + 138, + 75, + 30 + ] + }, + { + "register": 330, + "terminal_frame_id": 210, + "vectors": [ + 266, + 138, + 75, + 30 + ] + }, + { + "register": 345, + "terminal_frame_id": 239, + "vectors": [ + 416, + 70, + 19, + 13 + ] + }, + { + "register": 346, + "terminal_frame_id": 239, + "vectors": [ + 416, + 70, + 19, + 13 + ] + }, + { + "register": 361, + "terminal_frame_id": 268, + "vectors": [ + 262, + 134, + 102, + 30 + ] + }, + { + "register": 362, + "terminal_frame_id": 268, + "vectors": [ + 262, + 134, + 102, + 30 + ] + }, + { + "register": 377, + "terminal_frame_id": 297, + "vectors": [ + 392, + 67, + 37, + 22 + ] + }, + { + "register": 378, + "terminal_frame_id": 297, + "vectors": [ + 392, + 67, + 37, + 22 + ] + }, + { + "register": 393, + "terminal_frame_id": 326, + "vectors": [ + 259, + 131, + 75, + 51 + ] + }, + { + "register": 394, + "terminal_frame_id": 326, + "vectors": [ + 259, + 131, + 75, + 51 + ] + }, + { + "register": 410, + "terminal_frame_id": 355, + "vectors": [ + 265, + 137, + 75, + 45 + ] + }, + { + "register": 426, + "terminal_frame_id": 384, + "vectors": [ + 386, + 73, + 45, + 28 + ] + }, + { + "register": 442, + "terminal_frame_id": 413, + "vectors": [ + 268, + 140, + 45, + 30 + ] + } + ] + }, + "unique_frames": 14, + "helper_instances": 44, + "basis_columns": 7168, + "matrix_entries": 3670016, + "nonzero_entries": 114688, + "identities": [ + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "8f2a0b84c4f187cf6fac2d9b6defcf5b20f29edc6d5c6036c4054a96199b651e" + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "d0bb9dac4233e4a43a069ea0bfbcfdbcd8b8e0273bfaaca2b6a7940ce697fc33" + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "b6498916c6618a69b0a38db661a07e2617d87c45be1aff8953af3dcbfa7f9b13" + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "d1d82110a9f39155911b6a0eb8d417766ea152f736ccd2ffc53e28c97bce5486" + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "49fb1ab2f6f0ac678a9f22944dd1a03948b4347471c24617981bf51b1deefa68" + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "27ee4167fbb81ea6aeb8d8c3e168657ffc02996b4a5704e5fe6590241303baa5" + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "9e6c565a69fb1e0985db9b34e268d72c015b0bd95abb1264042fd7f9af8ab0df" + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "9e1b86cd97240433f25cc1a85ca30acb61f910a2ce390149d9e8b0b8dfecf21c" + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "92ef6b16b193daf8a3da28152a401b743d5c48e8c9c3b9ec275580a983593de6" + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "a33423d0342ca9c7669da1e78e6493a2ca383de0a0be335e7b33f49922d6657f" + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "a4811b3e01fcdbdef31add27eebbbea4d7a840133433a8b22481645b7f7e6cb6" + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "bf0c5e9570684448fcb5d6e19da0b22a2709de1c609a280c70b777c2e01dd598" + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "904f1484990f4a832c0b142c7a404306fba84de9f4320d5fc5ad119417b1b9c4" + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "columns": 512, + "matrix_entries": 262144, + "nonzero_entries": 8192, + "amplitude_denominator": 16, + "kernel_sha256": "7c505e9e347979269f10cd2c662b4bbd2c111a189c2e83e0dff5b512709842d0" + } + ], + "negative_controls": [ + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 266, + 138, + 75, + 30 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 11, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 268, + 140, + 45, + 30 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 64, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 273, + 145, + 85, + 51 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 21, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 385, + 74, + 44, + 30 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 10, + "expected_numerator": [ + 0, + 4 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 386, + 73, + 45, + 28 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 9, + "expected_numerator": [ + 0, + 4 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 388, + 75, + 41, + 26 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 11, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 392, + 67, + 37, + 22 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 3, + "expected_numerator": [ + 0, + 4 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 400, + 69, + 35, + 14 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 5, + "expected_numerator": [ + 0, + 4 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 416, + 70, + 19, + 13 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 6, + "expected_numerator": [ + 0, + 4 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 448, + 38, + 21, + 11 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 64, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 259, + 131, + 75, + 51 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 11, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 261, + 133, + 85, + 45 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 21, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 262, + 134, + 102, + 30 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 38, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "mutation": "left_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "mutation": "right_global_phase", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + -4 + ], + "denominator": 16 + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "mutation": "swapped_sides", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "mutation": "left_translation", + "different_columns": 512, + "first_input": 0, + "first_output": 0, + "expected_numerator": [ + -4, + 0 + ], + "actual_numerator": [ + 0, + 0 + ], + "denominator": 16 + }, + { + "frame": [ + 265, + 137, + 75, + 45 + ], + "mutation": "zero_column_blind_phase", + "different_columns": 256, + "first_input": 64, + "first_output": 11, + "expected_numerator": [ + 4, + 0 + ], + "actual_numerator": [ + -4, + 0 + ], + "denominator": 16 + } + ] +} diff --git a/research/cold-wrapper-amplitude-audit/NOTICE.md b/research/cold-wrapper-amplitude-audit/NOTICE.md new file mode 100644 index 0000000000..1af706253a --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/NOTICE.md @@ -0,0 +1,37 @@ +# Attribution and assistance + +Prepared for BigCactusLabs with substantial OpenAI Codex +assistance in mathematical analysis, implementation, verification and writing. +No separate agent or human mathematical review is claimed. Apache-2.0, under +the repository license. + +This contribution independently checks existing operators; it does not +claim their construction or the selected conditional bound. + +- Chafik Boukhalfa / chafreaky: PR626's selected owner map, portable package, + independent accounting and source binding; earlier PR458 paid residual + wrappers and the subsequent construction lineage. +- Jeremy Kothe / jeremykothe2: PR622's K-triangle construction and generalized + helper count, PR623's dispatch, and the earlier hyperplane/cold-end work. +- DreamingOfClouds: PR604's cold-helper construction and generalized wrappers, + PR599's multi-gate and cold-end formal interfaces, and earlier supplier work. + Their notices credit Claude Opus 5.5 / Claude Code assistance. +- icekylinx and the attributed predecessor contributors: the bundled + Gaussian-dyadic Clifford compiler, canonical-frame definitions, scalar + architecture and source packages. Their retained notices credit OpenAI + GPT/Codex assistance and preceding authors. +- eumemic: the retained PR543 bit supplier, which this contribution does not + replay or change. Rohan Arun, GamingPuzzled and the remaining supplier, + hosting, formalization and analytic predecessors retain their existing + credit in the pinned packages and maintainer review. + +Related concurrent evidence is credited in README.md: Charles Bethin's +PR662 performance work uses the same archived native inputs; jamesyc's PR581 +is a different literal Lean operator proof; PR675 audits owner boundaries. +None is imported as an implementation dependency. + +The definitions interpreted here are in the exact source files listed in +SOURCES.json. Their original licenses, notices and AI disclosures remain in +place, particularly `research/complex-k492-owner-repair/NOTICE.md` and the +vendored PR531 `NOTICE.md`. The new amplitude checker imports no predecessor +Python implementation. The result retains every stated theorem limitation. diff --git a/research/cold-wrapper-amplitude-audit/README.md b/research/cold-wrapper-amplitude-audit/README.md new file mode 100644 index 0000000000..6cf73530ad --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/README.md @@ -0,0 +1,176 @@ +# Selected cold-wrapper identities by exact amplitudes + +**Research audit / independent finite verification; no new kappa.** The 14 +distinct cold-ended helper wrappers used by the selected PR626 construction +have the claimed exact operator, including global phase. An independent +amplitude implementation checks all 512 input basis columns for each wrapper. +These identities occur at 22 helper registers in each of the CK and JP8 +providers: 44 provider-local instances, not 44 distinct matrices. + +The result is 7,168 checked columns, determining 3,670,016 matrix entries. +Each column has 16 nonzero entries; equality of the sparse columns also checks +all zero entries. No producer, Clifford tableau, `lower_child`, or state-vector +executor is imported. The new checker derives the canonical-frame kernel and +separately decodes the serialized left and right monomials. Those two paths +share only elementary Gaussian-integer arithmetic and the specified tensor +coefficients of `C`. + +## Replay + +From the repository root, with Python 3.11+ and no additional dependencies: + +```sh +python3 -B research/cold-wrapper-amplitude-audit/verify.py +``` + +Expected output: + +```text +PASS_COLD_WRAPPER_AMPLITUDE_AUDIT: 14 frames; 44 helpers; 7168 columns; 3670016 entries; 70 rejected mutations +``` + +The command reads pinned, committed inputs and compares the complete result +with `EXPECTED.json`; it writes nothing. It also works with `-I -O` and from +another working directory. `--write /new/path.json` writes a fresh receipt and +refuses to overwrite an existing file. `--root` selects a checkout containing +the same pinned inputs. `test_verify.py` exercises failure detection separately. + +## Exact statement and source chain + +At base `66849e1475c930fd7732b1a0067ffee7e1e95f60`, the accepted conditional +result is `51110230636731/31250000000000000`, from PR626 at +`660de893d27bb7abd1d5b01b1640207528a5c851` with the PR543 bit supplier. +The main review explicitly reuses PR622's identical native providers. Its +archived `ck-local` and `jp8-local` canonical words and residual adapters are +the inputs here. Their canonical JSON SHA256 values must match both +`SOURCES.json` and PR626's pinned `data/SPEC.json`. Compressed container bytes +are not an equality criterion. + +For each helper with entrance `E=0` and proper terminal frame `U`, the checker +requires `dim U=4` and extracts the exact recipe `(L,R)` indexed by `0:U`. +It verifies + +```text +T_U = L (C_[4] tensor I_[5]) R, +``` + +equivalently `L^-1 T_U R^-1 = C_[4] tensor I_[5]`. Operators act from right to +left. Here `T_0=I`, so `T_U` is precisely the residual `T_U T_0^-1` in the +predecessor's Lemma A. This is a statement about these finite 512-dimensional +complex-linear operators, and therefore about arbitrary complex input +vectors, not only clean scalar inputs. + +`SOURCES.json` also pins the exact canonical-frame and monomial definitions, +the existing wrapper checker, the helper-interface check and the proof/review +context. It does not download or execute those definitions. The selected +pointer and the original packages are unchanged. + +## Independent kernel derivation + +The primitive in the retained source is + +```text +C = ((1+i) I + (1-i) X) / 2, +``` + +where `X` flips one binary coordinate. It is not an unnormalized Hadamard +matrix. For `r=4`, its tensor kernel on the first four coordinates has +Gaussian-integer numerator + +```text +a_s = (1+i)^(4-|s|) (1-i)^|s|, s in F_2^4, +``` + +and common denominator 16. There are no floating-point calculations. + +For an ordered frame `U`, complete its columns to `G` by taking the first +independent standard basis vectors in order `e_0,...,e_8`. The source defines + +```text +Q = I + (G^-1)^T G^-1 over F_2, +K = D_Q P_G, +T_U = K C_[4] K^-1. +``` + +The checker constructs inverse coordinates by enumerating the entire binary +span. It uses neither the source's row reduction nor its matrix inversion. +For the canonical diagonal define + +```text +q_Q(x) = sum_i Q_ii x_i + 2 sum_(i = i^(phi_M + q_M(x)) |G_M x xor b_M>, +q_M(x) = sum_i alpha_i x_i + 2 sum_(i` is obtained by applying the right affine map, adding +each of the 16 coordinate displacements with coefficient `a_s`, and applying +the left affine map. Both affine maps are checked to be bijections; the +quadratic symmetry and diagonal/linear parity conditions are checked too. +There are exactly 16 distinct outputs in each path, so the sparse comparison +loses neither cancellation nor unlisted entries. Equality on every basis +column establishes the finite operator identity by linearity. It does not +establish an all-size compiler theorem or a proof-assistant formalization. + +## Adversarial control: zero input and support do not fix phase + +For every one of the 14 frames, replace the right wrapper by `R Z_6`. +In the serialized recipe this adds 2 modulo 4 to `linear_Z4[6]`. The mutant +still has the same residual width and the same support in every column, and +its output on `|0>` is unchanged. But its complete operator is + +```text +L C_[4] R Z_6 = T_U Z_6. +``` + +It negates exactly the 256 columns with input bit 6 set. Since `T_U` is +invertible, none of those columns is zero, so all 256 differ. The checker +confirms this for each frame and records exact counterexamples. For the +seed-selected first frame `[266,138,75,30]`, at input 64 and output 11 the +correct amplitude is `4/16=1/4`; the mutant gives `-4/16=-1/4`. + +This is a concrete counterexample to using only width, support and the +zero-input column as an admission test. **It is not a defect in the existing +checker**: that checker also compares full Clifford tableaus, which detect +the `Z_6` change. Its additional zero-state check fixes global phase once the +tableau is known. The all-column implementation supplies evidence from a +different representation of the same obligation. + +The other controls independently change each wrapper's global phase, swap +the two wrappers, or change the left translation. All five controls are +rejected on every frame: 70 exact counterexamples in total. + +## Scope, coverage and overlap + +Assignment seed 60 selects the mathematical audit track, starts at sorted +frame index `60 mod 14`, and selects phase coordinate `60 mod 9=6`. Coverage +is exhaustive over the extracted 14 matrices and all 512 columns; the seed +does not sample or reduce that coverage. The stopping rule is completion of +those matrices and the five stated controls per matrix, followed by source +and receipt checks. There is no search for a better construction. + +The existing `verify_cold617_interface.py` and PR662's performance adapter +already check these residuals with the source Clifford engine. PR662 speeds +up that engine; this package imports none of it and checks all columns with +a direct kernel. PR581 proves one different rank-one child in Lean; this +package concerns all current rank-four cold ends and is not a Lean proof. +PR675 audits owner timing and controller bridges, a different obligation. + +No flaw was found in the claimed cold-wrapper identities. This audit does +not re-establish the full dirty scalar word, wrapper placement, cold-end +no-later-touch conditions, paid invoice, owner charts, entering-helper +wrappers or supplier moments. The inherited common-label/mutable-basis, +pooled hosting, all-size, precision, tape and analytic assumptions remain. +There is no new multiplication kappa, practical speedup or novelty claim +about Clifford algebra. See `NOTICE.md`, `CLAIM.json` and `VALIDATION.md`. diff --git a/research/cold-wrapper-amplitude-audit/SOURCES.json b/research/cold-wrapper-amplitude-audit/SOURCES.json new file mode 100644 index 0000000000..cb6b4a991e --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/SOURCES.json @@ -0,0 +1,38 @@ +{ + "base_commit": "66849e1475c930fd7732b1a0067ffee7e1e95f60", + "selected_source_pr": 626, + "selected_source_head": "660de893d27bb7abd1d5b01b1640207528a5c851", + "provider_source_pr": 622, + "provider_source_head": "f69477f4f6d3c7eb1f740b166881bffed4ffa9f6", + "selected_kappa_at_base": "51110230636731/31250000000000000", + "files": { + "research/complex-k492-owner-repair/data/SPEC.json": "2a2577ac526535826fed9d5f7f83f6e2e0ec058a146c64f7286720b995fa2323", + "research/complex-k492-owner-repair/code/hpe_adapters_local.py": "eb0b5c6c7161e18dc22168da3211448d321586edd15bcfb4b4741174d36993cf", + "research/complex-multicold/vendor/pr558/vendor/pr552/complex-global/vendor531/vendor/clifford/clifford_exact.py": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962", + "research/hyperplane-end-lean/PROOF.md": "1cbce5cf0ff0152f71e8ae7bef25841d1ce13010af248ff7209182d2328c21c9", + "scripts/verify_cold617_interface.py": "95d7a9094c05ad975fb72f5ab7605593003245a503c8456764987e512028fa6a", + "docs/research/community-k492-review.md": "3b731d30e80010b15408a289b0b32192700885474c8b36d48ee3320a7a8c5c47" + }, + "artifacts": { + "ck": { + "CANONICAL-WORD.json.gz": { + "path": "research/community-k492-audit/pr622/replay/ck-local/CANONICAL-WORD.json.gz", + "canonical_json_sha256": "9bbc75dede090cfd7a0a0252424ea9d9f6211e2350d2a801d4e4f2f0784167c7" + }, + "RESIDUAL-ADAPTERS.json": { + "path": "research/community-k492-audit/pr622/replay/ck-local/RESIDUAL-ADAPTERS.json", + "canonical_json_sha256": "8283dfa442fc7e7626f3356385bda8607b8d15eecfdc9515a6271c29da6caa7a" + } + }, + "jp8": { + "CANONICAL-WORD.json.gz": { + "path": "research/community-k492-audit/pr622/replay/jp8-local/CANONICAL-WORD.json.gz", + "canonical_json_sha256": "fb4a8d14ed2a8048698bea6ae16f86163a1aa6c80f2eb622222eee5cdbce9b3b" + }, + "RESIDUAL-ADAPTERS.json": { + "path": "research/community-k492-audit/pr622/replay/jp8-local/RESIDUAL-ADAPTERS.json", + "canonical_json_sha256": "99e1873464e8e718ea25fd80df5aaed0e5508b83e9bf2bdd094ea5c95fdf87c9" + } + } + } +} diff --git a/research/cold-wrapper-amplitude-audit/VALIDATION.md b/research/cold-wrapper-amplitude-audit/VALIDATION.md new file mode 100644 index 0000000000..a3fd8d0625 --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/VALIDATION.md @@ -0,0 +1,44 @@ +# Validation record + +Base: `66849e1475c930fd7732b1a0067ffee7e1e95f60`. +Local platform: macOS arm64. All checks below ran on 2026-10-13 UTC. +The result is finite operator evidence, not a full multiplication proof. + +## Local checks + +| Check | Result | +|---|---| +| `python3 -B research/cold-wrapper-amplitude-audit/verify.py` | PASS on Python 3.15.0; exact receipt | +| Same replay with `-I -O -B` | PASS on Python 3.11.15, 3.13.16 and 3.14.8; identical complete receipt | +| `python3 -I -O -B research/cold-wrapper-amplitude-audit/test_verify.py` | PASS, six tests on Python 3.15.0 | +| Existing `scripts/verify_cold617_interface.py` on both archived PR622 native providers, `--entering 36 --cold 22` | PASS; original scoped interface binding | +| Original `hpe_adapters_local.wrapped_ok` on the 14 good cold recipes and the 14 `R Z_6` mutants | All good recipes accepted; all mutants rejected | +| `actionlint .github/workflows/cold-wrapper-amplitude-audit.yml` | PASS | +| `make selected-record-check` | PASS; selected rational result, source inventory and proof supplement unchanged | + +The six harness tests run the public checker in isolated, optimized Python. +They cover the positive replay; a minimal copied input tree in a path with +spaces after changing gzip compression and timestamp; changed source bytes; +a changed adapter phase; a changed expected rejection result; and refusal to +overwrite an existing output. The latter four cases fail as intended. The +mathematical controls are the 70 exact counterexamples in `EXPECTED.json`, +not merely subprocess failure tests. + +The optional original-checker comparison is corroboration. It is not used +by the new public checker or to construct its expected matrix kernels. It +confirms that the new zero-column control is already rejected by the full +production predicate; the audit does not allege a production defect. + +## Cost and verification boundary + +The public amplitude replay uses no third-party package and takes less than +one second in the observed local runs. This is an observation, not a +comparative performance claim. Each full matrix is stored sparsely with +exact Gaussian-integer numerators and a common denominator of 16. + +No selected constructor, supplier, global invoice, or accepted artifact was +changed. The repository-wide regenerating `make verify` and cold +`make frontier626-verify` suites were not run for this isolated audit. +Their success, remote Linux execution, and full theorem validation are not +implied by these local checks. The added workflow scopes Linux runs to this +package on Python 3.11 and 3.14; a workflow file alone is not a CI result. diff --git a/research/cold-wrapper-amplitude-audit/test_verify.py b/research/cold-wrapper-amplitude-audit/test_verify.py new file mode 100644 index 0000000000..fd5eaa01e8 --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/test_verify.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python3 +"""Failure-detection checks for the standalone finite audit (Apache-2.0).""" + +import gzip +import json +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] + + +class AdmissionTests(unittest.TestCase): + def run_checker(self, package=HERE, root=ROOT, extra=()): + return subprocess.run( + [sys.executable, "-I", "-O", "-B", str(package / "verify.py"), + "--root", str(root), *map(str, extra)], + cwd=package, text=True, capture_output=True, timeout=30, + ) + + def source_fixture(self, destination): + sources = json.loads((HERE / "SOURCES.json").read_text()) + paths = list(sources["files"]) + paths += [p["path"] for artifacts in sources["artifacts"].values() + for p in artifacts.values()] + for path in paths: + target = destination / path + target.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(ROOT / path, target) + return sources + + def test_isolated_optimized_replay(self): + result = self.run_checker() + self.assertEqual(result.returncode, 0, result.stderr) + self.assertIn("70 rejected mutations", result.stdout) + + def test_relocated_minimal_checkout_and_container_independence(self): + with tempfile.TemporaryDirectory(prefix="cold wrapper audit ") as directory: + root = Path(directory) + sources = self.source_fixture(root) + for artifacts in sources["artifacts"].values(): + path = root / artifacts["CANONICAL-WORD.json.gz"]["path"] + payload = gzip.decompress(path.read_bytes()) + path.write_bytes(gzip.compress(payload, compresslevel=1, mtime=123)) + result = self.run_checker(root=root) + self.assertEqual(result.returncode, 0, result.stderr) + + def test_changed_source_is_rejected(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + sources = self.source_fixture(root) + target = root / next(iter(sources["files"])) + with target.open("ab") as stream: + stream.write(b"\n") + result = self.run_checker(root=root) + self.assertNotEqual(result.returncode, 0) + self.assertIn("Source hash mismatch", result.stderr) + + def test_changed_artifact_is_rejected(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + sources = self.source_fixture(root) + path = root / sources["artifacts"]["ck"]["RESIDUAL-ADAPTERS.json"]["path"] + value = json.loads(path.read_text()) + recipe = value["recipes"]["0:52"] + recipe["right"]["phase"] = (recipe["right"]["phase"] + 1) % 4 + path.write_text(json.dumps(value)) + result = self.run_checker(root=root) + self.assertNotEqual(result.returncode, 0) + self.assertIn("Artifact semantic hash mismatch", result.stderr) + + def test_changed_receipt_is_rejected(self): + with tempfile.TemporaryDirectory() as directory: + package = Path(directory) + for name in ("verify.py", "SOURCES.json"): + shutil.copyfile(HERE / name, package / name) + receipt = json.loads((HERE / "EXPECTED.json").read_text()) + receipt["negative_controls"][0]["different_columns"] = 0 + (package / "EXPECTED.json").write_text(json.dumps(receipt)) + result = self.run_checker(package=package) + self.assertNotEqual(result.returncode, 0) + self.assertIn("Receipt differs", result.stderr) + + def test_existing_output_is_preserved(self): + with tempfile.TemporaryDirectory() as directory: + target = Path(directory) / "receipt.json" + target.write_text("keep this output\n") + result = self.run_checker(extra=("--write", target)) + self.assertNotEqual(result.returncode, 0) + self.assertIn("FileExistsError", result.stderr) + self.assertEqual(target.read_text(), "keep this output\n") + + +if __name__ == "__main__": + unittest.main() diff --git a/research/cold-wrapper-amplitude-audit/verify.py b/research/cold-wrapper-amplitude-audit/verify.py new file mode 100644 index 0000000000..379e13dfd9 --- /dev/null +++ b/research/cold-wrapper-amplitude-audit/verify.py @@ -0,0 +1,280 @@ +#!/usr/bin/env python3 +"""Exact all-column audit of the selected cold residual wrappers. + +Standard library only. No producer, Clifford tableau or circuit imports. +Contributor: BigCactusLabs, with OpenAI Codex assistance. +Apache-2.0; see NOTICE.md and README.md for scope and predecessor credit. +""" + +import argparse +import copy +import gzip +import hashlib +import json +from pathlib import Path + + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +N = 9 +SIZE = 1 << N +SEED = 60 +SPEC = "research/complex-k492-owner-repair/data/SPEC.json" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def canonical_json(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")).encode() + + +def digest(value): + return hashlib.sha256(canonical_json(value)).hexdigest() + + +def parity(x): + return x.bit_count() % 2 + + +def times_i(z, exponent): + a, b = z + return ((a, b), (-b, a), (-a, -b), (b, -a))[exponent % 4] + + +def multiply(z, w): + a, b = z + c, d = w + return a * c - b * d, a * d + b * c + + +def fourier_numerators(width): + """Tensor coefficients of ((1+i)I + (1-i)X)/2, denominator 2^width.""" + values = [(1, 0)] + for _ in range(width): + values = [multiply(z, (1, 1)) for z in values] + [ + multiply(z, (1, -1)) for z in values + ] + return values + + +def span_coordinates(columns): + """Enumerate a binary span, without row reduction or matrix inversion.""" + table = {0: 0} + for i, vector in enumerate(columns): + require(0 < vector < SIZE, "Frame vector out of range") + require(vector not in table, "Dependent frame vectors") + table.update({x ^ vector: mask | (1 << i) for x, mask in list(table.items())}) + return table + + +def frame_kernel(frame): + """Direct kernel of K C_[r] K*, where K = D_Q P_G. + + G has the ordered frame vectors as its first columns, completed by + e_0,...,e_8. Q = I + (G^-1)^T G^-1 over F_2. The inverse coordinates + are obtained by enumerating all 512 vectors, not by importing G or Q. + """ + width = len(frame) + require(width == 4, "This audit is restricted to four-dimensional cold ends") + coordinates = span_coordinates(frame) + displacements = [0] * (1 << width) + for vector, mask in coordinates.items(): + displacements[mask] = vector + columns = list(frame) + for i in range(N): + if (1 << i) not in coordinates: + columns.append(1 << i) + coordinates = span_coordinates(columns) + require(len(coordinates) == SIZE, "Incomplete canonical basis") + inverse_columns = [coordinates[1 << i] for i in range(N)] + phases = [] + for x in range(SIZE): + active = [i for i in range(N) if x & (1 << i)] + diagonal = sum(1 ^ parity(inverse_columns[i]) for i in active) + cross = sum( + parity(inverse_columns[i] & inverse_columns[j]) + for i in active for j in active if i < j + ) + phases.append((diagonal + 2 * cross) % 4) + amplitudes = fourier_numerators(width) + return [ + {x ^ delta: times_i(amplitudes[s], phases[x ^ delta] - phases[x]) + for s, delta in enumerate(displacements)} + for x in range(SIZE) + ] + + +def monomial_tables(recipe): + """Decode |x> -> i^(q(x)+phase) |Gx xor offset> directly.""" + keys = {"matrix_rows", "offset", "quadratic_rows", "linear_Z4", "phase"} + require(set(recipe) == keys, "Unknown monomial fields") + rows, quad, linear = [recipe[k] for k in ("matrix_rows", "quadratic_rows", "linear_Z4")] + require(all(len(v) == N for v in (rows, quad, linear)), "Wrong monomial dimension") + require(all(type(v) is int and 0 <= v < SIZE for v in rows + quad), "Invalid binary rows") + require(all(type(v) is int and 0 <= v < 4 for v in linear), "Invalid Z4 coefficient") + require(type(recipe["offset"]) is int and 0 <= recipe["offset"] < SIZE, "Invalid offset") + require(type(recipe["phase"]) is int and 0 <= recipe["phase"] < 4, "Invalid phase") + require(all(((quad[i] >> j) & 1) == ((quad[j] >> i) & 1) + for i in range(N) for j in range(N)), "Nonsymmetric quadratic form") + require(all(linear[i] % 2 == ((quad[i] >> i) & 1) for i in range(N)), + "Quadratic/linear parity mismatch") + destinations, phases = [], [] + for x in range(SIZE): + destinations.append(sum(parity(row & x) << i for i, row in enumerate(rows)) ^ recipe["offset"]) + q = sum(linear[i] for i in range(N) if x & (1 << i)) + for i in range(N): + for j in range(i + 1, N): + if (x >> i) & (x >> j) & (quad[i] >> j) & 1: + q += 2 + phases.append((q + recipe["phase"]) % 4) + require(len(set(destinations)) == SIZE, "Noninvertible monomial") + return destinations, phases + + +def recipe_kernel(recipe): + width = recipe["rank"] + require(width == 4, "Wrong residual width") + right, rq = monomial_tables(recipe["right"]) + left, lq = monomial_tables(recipe["left"]) + coefficients = fourier_numerators(width) + return [ + {left[right[x] ^ s]: times_i(coefficients[s], rq[x] + lq[right[x] ^ s]) + for s in range(1 << width)} + for x in range(SIZE) + ] + + +def difference(expected, actual): + columns = [x for x in range(SIZE) if expected[x] != actual[x]] + if not columns: + return {"different_columns": 0} + x = columns[0] + y = next(y for y in sorted(set(expected[x]) | set(actual[x])) + if expected[x].get(y, (0, 0)) != actual[x].get(y, (0, 0))) + return {"different_columns": len(columns), "first_input": x, "first_output": y, + "expected_numerator": list(expected[x].get(y, (0, 0))), + "actual_numerator": list(actual[x].get(y, (0, 0))), "denominator": 16} + + +def sparse_digest(columns): + return digest([[[y, *a] for y, a in sorted(column.items())] for column in columns]) + + +def read_inputs(root): + sources = json.loads((HERE / "SOURCES.json").read_text()) + for path, wanted in sources["files"].items(): + require(hashlib.sha256((root / path).read_bytes()).hexdigest() == wanted, + "Source hash mismatch: " + path) + spec = json.loads((root / SPEC).read_text()) + unique, providers = {}, {} + for provider, artifacts in sources["artifacts"].items(): + loaded = {} + for name, pin in artifacts.items(): + raw = (root / pin["path"]).read_bytes() + value = json.loads(gzip.decompress(raw) if name.endswith(".gz") else raw) + sha = digest(value) + require(sha == pin["canonical_json_sha256"], "Artifact semantic hash mismatch: " + pin["path"]) + require(sha == spec["providers"][provider]["artifact_semantic_sha256"][name], + "Artifact differs from selected supplier SPEC: " + pin["path"]) + loaded[name] = value + word = loaded["CANONICAL-WORD.json.gz"] + recipes = loaded["RESIDUAL-ADAPTERS.json"]["recipes"] + require((word["v"], word["h"], word["R"]) == (112, N, 492), "Unexpected supplier geometry") + require(word["frames"][0] == [] and len(word["frames"][1]) == N, "Unexpected frame sentinels") + require(len(word["start"]) == len(word["final"]) == 716, "Wrong column count") + instances = [] + for register in range(224, 716): + e, u = word["start"][register], word["final"][register] + if e != 0 or u == 1: + continue + frame = word["frames"][u] + recipe = recipes[f"0:{u}"] + require((recipe["frame"], recipe["terminal"], recipe["entrance_rank"], + recipe["terminal_rank"], recipe["rank"]) == (0, u, 0, 4, 4), "Wrong cold recipe metadata") + require(recipe["vectors"] == [] and recipe["terminal_vectors"] == frame, "Wrong recipe frame") + normalized = {k: recipe[k] for k in ("rank", "left", "right")} + key = tuple(frame) + if key in unique: + require(unique[key] == normalized, "Different recipes for a shared cold frame") + unique[key] = normalized + instances.append({"register": register, "terminal_frame_id": u, "vectors": frame}) + require(len(instances) == 22, "Unexpected cold helper inventory") + providers[provider] = instances + require(len(unique) == 14, "Unexpected unique cold frame count") + return unique, providers + + +def audit(root): + unique, providers = read_inputs(root) + entries, controls = [], [] + ordered = sorted(unique) + # Seed chooses the first tested frame; every frame and column is still covered. + start = SEED % len(ordered) + ordered = ordered[start:] + ordered[:start] + for frame in ordered: + recipe = unique[frame] + expected = frame_kernel(frame) + actual = recipe_kernel(recipe) + require(expected == actual, "Cold wrapper operator mismatch: " + str(frame)) + require(all(len(column) == 16 for column in actual), "Wrong column support") + entries.append({"frame": list(frame), "columns": SIZE, "matrix_entries": SIZE * SIZE, + "nonzero_entries": SIZE * 16, "amplitude_denominator": 16, + "kernel_sha256": sparse_digest(actual)}) + mutants = {} + for side in ("left", "right"): + bad = copy.deepcopy(recipe) + bad[side]["phase"] = (bad[side]["phase"] + 1) % 4 + mutants[side + "_global_phase"] = bad + bad = copy.deepcopy(recipe) + bad["left"], bad["right"] = bad["right"], bad["left"] + mutants["swapped_sides"] = bad + bad = copy.deepcopy(recipe) + bad["left"]["offset"] ^= 1 + mutants["left_translation"] = bad + # Right-compose with Z on a seed-selected input coordinate. It fixes |0> + # and leaves the support/width intact, but negates exactly 256 columns. + axis = SEED % N + bad = copy.deepcopy(recipe) + bad["right"]["linear_Z4"][axis] = (bad["right"]["linear_Z4"][axis] + 2) % 4 + mutants["zero_column_blind_phase"] = bad + for name, mutant in mutants.items(): + result = recipe_kernel(mutant) + witness = difference(expected, result) + require(witness["different_columns"] > 0, "Mutation accepted: " + name) + if name == "zero_column_blind_phase": + require(result[0] == expected[0], "Blind control changed |0>") + require(all(set(a) == set(b) for a, b in zip(expected, result)), "Blind control changed support") + require(witness["different_columns"] == SIZE // 2, "Wrong phase-column count") + controls.append({"frame": list(frame), "mutation": name, **witness}) + return {"status": "PASS_COLD_WRAPPER_AMPLITUDE_AUDIT", "seed": SEED, + "scope": "Exact finite cold-wrapper matrices only; no multiplication theorem or new kappa.", + "providers": providers, "unique_frames": len(entries), "helper_instances": 44, + "basis_columns": sum(e["columns"] for e in entries), + "matrix_entries": sum(e["matrix_entries"] for e in entries), + "nonzero_entries": sum(e["nonzero_entries"] for e in entries), + "identities": entries, "negative_controls": controls} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--root", type=Path, default=ROOT, help="Repository containing the pinned inputs") + parser.add_argument("--write", type=Path, help="Write a new receipt; refuses to overwrite") + args = parser.parse_args() + result = audit(args.root) + if args.write: + with args.write.open("x") as stream: + json.dump(result, stream, indent=2) + stream.write("\n") + else: + expected = json.loads((HERE / "EXPECTED.json").read_text()) + require(result == expected, "Receipt differs from EXPECTED.json") + print(f"{result['status']}: {result['unique_frames']} frames; {result['helper_instances']} helpers; " + f"{result['basis_columns']} columns; {result['matrix_entries']} entries; " + f"{len(result['negative_controls'])} rejected mutations") + + +if __name__ == "__main__": + main()