diff --git a/research/two-site-caller-fusion/.gitattributes b/research/two-site-caller-fusion/.gitattributes new file mode 100644 index 0000000000..fa1385d99a --- /dev/null +++ b/research/two-site-caller-fusion/.gitattributes @@ -0,0 +1 @@ +* -text diff --git a/research/two-site-caller-fusion/.gitignore b/research/two-site-caller-fusion/.gitignore new file mode 100644 index 0000000000..43ae0e2a6c --- /dev/null +++ b/research/two-site-caller-fusion/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.py[cod] diff --git a/research/two-site-caller-fusion/BINDINGS.json b/research/two-site-caller-fusion/BINDINGS.json new file mode 100644 index 0000000000..a87fdb767f --- /dev/null +++ b/research/two-site-caller-fusion/BINDINGS.json @@ -0,0 +1,798 @@ +{ + "author_freeze": { + "manifest_sha256": "44f1e264b3087ab8fdb08b4cd6e27befefbba380852b0119321724b7bc41b5da", + "original_file_map": { + "ADMITTED-TWO-SITE-FUSIONS.json": "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "CONTINUED-ISOLATION-Q2.json": "source/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "CONTROLS.json": "source/two-site-continuation/CONTROLS.json", + "HANDOFF.md": "source/two-site-continuation/HANDOFF.md", + "INPUT-EVENTS.json": "source/two-site-continuation/INPUT-EVENTS.json", + "ISOLATED-FUSION-Q2.json": "source/two-site-continuation/ISOLATED-FUSION-Q2.json", + "ISOLATED-FUSION-Q3.json": "source/two-site-continuation/ISOLATED-FUSION-Q3.json", + "ISOLATED-Q3-RANK-INTAKE.json": "source/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json", + "PROOF.md": "source/two-site-continuation/PROOF.md", + "TWO-SITE-COVER-Q2.json": "source/two-site-continuation/TWO-SITE-COVER-Q2.json", + "TWO-SITE-Q2.json": "source/two-site-continuation/TWO-SITE-Q2.json", + "VALIDATION.json": "source/two-site-continuation/VALIDATION.json", + "admit_fusions.py": "source/two-site-continuation/admit_fusions.py", + "continue_isolated.py": "source/two-site-continuation/continue_isolated.py", + "controls.py": "source/two-site-continuation/controls.py", + "frozen-two-site-v1/INPUT-EVENTS.json": "source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json", + "frozen-two-site-v1/ISOLATED-FUSION-Q2.json": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json", + "frozen-two-site-v1/ISOLATED-FUSION-Q3.json": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json", + "frozen-two-site-v1/isolated_fusion.py": "source/two-site-continuation/frozen-two-site-v1/isolated_fusion.py", + "inputs/REPAIRED-MANIFEST.json": "source/two-site-continuation/inputs/REPAIRED-MANIFEST.json", + "inputs/REPAIRED-SIMPLIFIED-FUSIONS.json": "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "isolated_fusion.py": "source/two-site-continuation/isolated_fusion.py", + "two_site.py": "original/two-site-continuation/two_site.py", + "two_site_cover.py": "source/two-site-continuation/two_site_cover.py" + } + }, + "claims": [ + "isolated-rank-distance-bruhat-lemma", + "complete-q2-q3-two-site-callers", + "bounded-post76-isolated-continuation", + "four-fixed-word-full-stock-retiming-floors" + ], + "compressed_inputs": { + "source/completed-gates-review/PAIRING-AUDIT.json": { + "logical_bytes": 2271466, + "logical_sha256": "e40ad925d1cf4e46bf28f176d74de6d393bddf6d82300757e88734b6e2944912", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/PAIRING-AUDIT.json", + "storage_path": "source/completed-gates-review/PAIRING-AUDIT.json.gz", + "transport_bytes": 37842, + "transport_sha256": "0d49188141e292dd3288d0a6009ab325c973827d7b1d5ef5215ddf93f0501f01" + }, + "source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json": { + "logical_bytes": 4173506, + "logical_sha256": "bac1b61d8f85a5bbe4a8c8d53e9ae54123c0513e51ac4051dbd87f7fbce68bdb", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json", + "storage_path": "source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json.gz", + "transport_bytes": 70854, + "transport_sha256": "518e3599b2342d589b4c21820a29c8c73929c5c5b87ac25176bdf82da23a312b" + }, + "source/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": { + "logical_bytes": 2438797, + "logical_sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json", + "storage_path": "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz", + "transport_bytes": 49046, + "transport_sha256": "ee1b8e64355381f4347c28b6a741e25b00bec83182357896cd803eb3a525aaf0" + }, + "source/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": { + "logical_bytes": 3658155, + "logical_sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json", + "storage_path": "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz", + "transport_bytes": 75233, + "transport_sha256": "7780976645e1aa1e4858b4c109b440faed0327a76cfa51fe58d049f6e5a07276" + }, + "source/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json": { + "logical_bytes": 2777245, + "logical_sha256": "bf09718bbce18a3d7a0ab26074661d48a2f844a447064eba886bf6ce659b2cb5", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json", + "storage_path": "source/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json.gz", + "transport_bytes": 50368, + "transport_sha256": "a537b51f86ba2bd87fc7b5b4d336766cf54d838071b20303540c915282cd2659" + }, + "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json": { + "logical_bytes": 2438797, + "logical_sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "storage_path": "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz", + "transport_bytes": 49046, + "transport_sha256": "ee1b8e64355381f4347c28b6a741e25b00bec83182357896cd803eb3a525aaf0" + }, + "source/two-site-continuation/INPUT-EVENTS.json": { + "logical_bytes": 155971, + "logical_sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/INPUT-EVENTS.json", + "storage_path": "source/two-site-continuation/INPUT-EVENTS.json.gz", + "transport_bytes": 4394, + "transport_sha256": "747b44ffb93abf589e6ad4a1fe119a66312ddea6b805be21802e588e626a3a33" + }, + "source/two-site-continuation/ISOLATED-FUSION-Q2.json": { + "logical_bytes": 627015, + "logical_sha256": "5ee7878ccd08a1eff40b9bc68e2d0476e501819aea39fda75cbeeadfb9f81d2e", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json", + "storage_path": "source/two-site-continuation/ISOLATED-FUSION-Q2.json.gz", + "transport_bytes": 14400, + "transport_sha256": "9fc70782375a85184804040b25fe0ee49fd270043de4f34649a02c787f72dda9" + }, + "source/two-site-continuation/ISOLATED-FUSION-Q3.json": { + "logical_bytes": 1295931, + "logical_sha256": "4997bab27dda2e20d39209f9002af71c1cee42caa1e69b7a8a2f9eb7f4393fd8", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q3.json", + "storage_path": "source/two-site-continuation/ISOLATED-FUSION-Q3.json.gz", + "transport_bytes": 27265, + "transport_sha256": "3a4b7a5966fce55c06e50247c95203f733c8407ff8f49b12c984b8f1770b76b2" + }, + "source/two-site-continuation/TWO-SITE-Q2.json": { + "logical_bytes": 621781, + "logical_sha256": "e826892b6bf5db4bfae631743a50ef6668f1c22fa4583499f4ae1ddbc937b845", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/TWO-SITE-Q2.json", + "storage_path": "source/two-site-continuation/TWO-SITE-Q2.json.gz", + "transport_bytes": 8822, + "transport_sha256": "aaf0b871a48fad0827d76963998c25a83423fbb5c3520fa4a18e2df99e6bf41d" + }, + "source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json": { + "logical_bytes": 155971, + "logical_sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json", + "storage_path": "source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json.gz", + "transport_bytes": 4394, + "transport_sha256": "747b44ffb93abf589e6ad4a1fe119a66312ddea6b805be21802e588e626a3a33" + }, + "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json": { + "logical_bytes": 71998, + "logical_sha256": "ef41f9b005af1580c3f985bee5d3a4b3bdf842d388ddf409f2bbf2a41d72d3a2", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json", + "storage_path": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json.gz", + "transport_bytes": 3890, + "transport_sha256": "48a4906b1c833e2e1022480819217a697ade145d9e877aab0155a1384cc6bd02" + }, + "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json": { + "logical_bytes": 123502, + "logical_sha256": "868b41d5a1360c10bff236dbd4f6a803b2fef93dc9ad25df30617ceac137dab6", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json", + "storage_path": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json.gz", + "transport_bytes": 5744, + "transport_sha256": "d1d4568af335d7cca3c2091be6c645f00cf855d4cf1f11dc84ef887495470b97" + }, + "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json": { + "logical_bytes": 3658155, + "logical_sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "storage_path": "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz", + "transport_bytes": 75233, + "transport_sha256": "7780976645e1aa1e4858b4c109b440faed0327a76cfa51fe58d049f6e5a07276" + } + }, + "files": [ + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/original/caller-joint/joint_algebra.py", + "path": "original/caller-joint/joint_algebra.py", + "sha256": "5782033e347c9b10ad47c01ed12a0a52ea07e901fa9e8f7aa9d3a2a928327232" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/validate_recipe_links.py", + "path": "original/caller-joint/validate_recipe_links.py", + "sha256": "7457b3672d5a73c584d2073b5d3312e6429fd3f433151f15f8f07da33aa4c59a" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/fusion-audit/MANIFEST.json", + "path": "original/independent-inputs/75f0679178d18d29891b7de962823ca54b67c15184bfcbf9739896e72fcaa12f-MANIFEST.json", + "sha256": "75f0679178d18d29891b7de962823ca54b67c15184bfcbf9739896e72fcaa12f" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/joint_prefix.py", + "path": "original/independent-inputs/a4dcaa1ad05ef8dbba60ddd47b3ad44a3095ebb5fd31f6adfb935a7b1c46a2c7-joint_prefix.py", + "sha256": "a4dcaa1ad05ef8dbba60ddd47b3ad44a3095ebb5fd31f6adfb935a7b1c46a2c7" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/literal_events.py", + "path": "original/independent-inputs/cb8e0bb5bc0624efbe534df05c9ebb8b2ed3492059886206cea2d83ffec27536-literal_events.py", + "sha256": "cb8e0bb5bc0624efbe534df05c9ebb8b2ed3492059886206cea2d83ffec27536" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/original/joint-native/joint_coefficient_gate.py", + "path": "original/joint-native/joint_coefficient_gate.py", + "sha256": "43bc5229a10e7ed6af3d5bff057c61cfd6d37a222cc0a2eb2e88cbe0ac410d07" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/original/native-frames/native_model.py", + "path": "original/native-frames/native_model.py", + "sha256": "6397a86bd3d1461be182fcfa8602b0c70c489964a8c14f12436ba2506e11d9e3" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site.py", + "path": "original/two-site-continuation/two_site.py", + "sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/caller-joint/joint_algebra.py", + "path": "source/caller-joint/joint_algebra.py", + "sha256": "6fe4de627845a36e2e08723e705daa86959846fe4ea577e94fca233829d7d5c9" + }, + { + "kind": "verbatim pure consumed functions; no unused producer imports", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/validate_recipe_links.py", + "path": "source/caller-joint/validate_recipe_links.py", + "sha256": "30b9ad84008ff6df9597bb95964174745a6cd978b9bfde968e18b8db396416b8" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/caller/free_ops.py", + "path": "source/caller/free_ops.py", + "sha256": "5806fe91b9fda162d5986b12e085b14eb3df9a4703f749f61c1f10363138ca77" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/caller/nested_family.py", + "path": "source/caller/nested_family.py", + "sha256": "88f425d12baf8a4f849cccd24605f21680eb8ce8d199054db4b4e7734eca72b6" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/caller/nested_prefix.py", + "path": "source/caller/nested_prefix.py", + "sha256": "9ec10cb0243c0c829475ad7290f4953cdff27cb0f90f70b687c4bbee98af676b" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/caller/pivot_plane_probe.py", + "path": "source/caller/pivot_plane_probe.py", + "sha256": "fcd0a4a0a301c4fddfb8b132894e8b5b751b08cacdb0e5ed41e80b0d4903d499" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/MANIFEST.json", + "path": "source/completed-gates-review/MANIFEST.json", + "sha256": "ef3697eece91ee6d52ae3f5e88b95028091829d6961118052dff1e25df212ba3" + }, + { + "kind": "lossless complete JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/PAIRING-AUDIT.json", + "path": "source/completed-gates-review/PAIRING-AUDIT.json.gz", + "sha256": "0d49188141e292dd3288d0a6009ab325c973827d7b1d5ef5215ddf93f0501f01" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/REVIEW.md", + "path": "source/completed-gates-review/REVIEW.md", + "sha256": "c034f3fda71e440978c3a589da95f1f37cb95b44bf996c5295f179e6ed2fefe1" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/audit_gates.py", + "path": "source/completed-gates-review/audit_gates.py", + "sha256": "051ba51e02e9f143b8a8bea0b91d69e7e1e32edf0f98d2d40db290f02043d460" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/completed-gates-review/pairing_audit.py", + "path": "source/completed-gates-review/pairing_audit.py", + "sha256": "f567f9239431d60c915d6bf8ca23c9e74f932a1b08ddb7980a82ba1a855c21dc" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/fusion-audit/audit_fusions.py", + "path": "source/fusion-audit/audit_fusions.py", + "sha256": "26c35f6d61ad6568da1c650a343b82caea174330ff8054c4cdab1fe183ad2173" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/joint-native/joint_coefficient_gate.py", + "path": "source/joint-native/joint_coefficient_gate.py", + "sha256": "e6ff6f323edd360efa3776a381a97cb7202b79aa198e804c9165310e03e83f45" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/joint-native/literal_inverse_binding.py", + "path": "source/joint-native/literal_inverse_binding.py", + "sha256": "74bdbc9c35db4153e00ed15c8d9df27b63e1c50cd76fcd33f987f3f97d412d96" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/EVEN-PARITY-SOURCE.json", + "path": "source/native-frames/EVEN-PARITY-SOURCE.json", + "sha256": "dbeea9cb1abe6fff72cc98e98d9f70eed578d5094cf5f310ed7c500e26af3f3c" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/conjugated_reflection.py", + "path": "source/native-frames/conjugated_reflection.py", + "sha256": "6b68a4a60b160fe28227c31909ed86bd7f80b1f3e07591032cd001dbeb242f6f" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/even_parity_source.py", + "path": "source/native-frames/even_parity_source.py", + "sha256": "961f136e4bc1b5da930bdd4ba9bbb594892b9e27f7ab44749d747d4fe16b4cb3" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/lifted_algebra.py", + "path": "source/native-frames/lifted_algebra.py", + "sha256": "3b9a58a2048a762ab520ac7fdbb28cbfeb7b30345aaeb777d8dabdd9fb1034d9" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/native_model.py", + "path": "source/native-frames/native_model.py", + "sha256": "b4291b2868f91f6e77058e58e936b2efe965a9d9ae58095745fa2dad8c1d5c68" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/native-frames/orthogonal_source_normalizer.py", + "path": "source/native-frames/orthogonal_source_normalizer.py", + "sha256": "c6373762bd15763625cc9237bb280a5e26ab8e53d6bfb034474f068b1525e6fa" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/MANIFEST.json", + "path": "source/pauli-caller-retiming/MANIFEST.json", + "sha256": "b8b89b8a80f3cb0cbfde26695b40294a63a8782f413940c504765e58cd8755c7" + }, + { + "kind": "lossless complete JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json", + "path": "source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json.gz", + "sha256": "518e3599b2342d589b4c21820a29c8c73929c5c5b87ac25176bdf82da23a312b" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/TRAJECTORY-PROOF.md", + "path": "source/pauli-caller-retiming/TRAJECTORY-PROOF.md", + "sha256": "172623b7e7aeb9f5bd4074722ce6a4827a55f031ec161ec78ad7d563b0b3a9f6" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py", + "path": "source/pauli-caller-retiming/trajectory_certificate.py", + "sha256": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/root-chronology/quadratic_charts.py", + "path": "source/root-chronology/quadratic_charts.py", + "sha256": "de2a36f6a6b567360c90477b58da44e2f1b618fd006d058ab1ea04e983952c3f" + }, + { + "kind": "lossless complete JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json", + "path": "source/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json.gz", + "sha256": "a537b51f86ba2bd87fc7b5b4d336766cf54d838071b20303540c915282cd2659" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/HANDOFF.md", + "path": "source/trajectory-pairing-search/HANDOFF.md", + "sha256": "b387deaf497d7de1e7baff5772e5a640931b1e3973750dde25fbb313005dfa7b" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/MANIFEST.json", + "path": "source/trajectory-pairing-search/MANIFEST.json", + "sha256": "623ac76418785a29d3a45868f07cbcae0df6e3176585a701fd6776c98c97d3c8" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/PROOF.md", + "path": "source/trajectory-pairing-search/PROOF.md", + "sha256": "5f9fc20d71ca16d455ab050ac9cb990102e7d10e44c4ab0e1cc23fce1d222673" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json", + "path": "source/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json", + "sha256": "77d344a5498ae87b4111f623e04e73798252a5ddb61c353e627bc9a3a2162636" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json", + "path": "source/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json", + "sha256": "c5bdfcf8bcb3cb5f82bf1ad5c3f02e6133b049f460154cf8159b97469510e46a" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json", + "path": "source/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json", + "sha256": "53b72d0719e2211ae1f61cd29d3310e41728d66f3b8129616c402d65d6d4edf2" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json", + "path": "source/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json", + "sha256": "6e76d41e89491cc2f1a91680eb3858af0484da3f5fddb515f4e71cbc40b6eca0" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/VALIDATION.json", + "path": "source/trajectory-pairing-search/VALIDATION.json", + "sha256": "c92a562b12f4a8eafa479f9b3651d4fd67bbc71c5492a94774b96a02d55bc765" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/admit_pairings.py", + "path": "source/trajectory-pairing-search/admit_pairings.py", + "sha256": "f0ce5196bf3c75ed1ed22a8424e971293f56cf6939be34ccd3f082430440f91c" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/pairing_search.py", + "path": "source/trajectory-pairing-search/pairing_search.py", + "sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023" + }, + { + "kind": "unchanged reviewed fixed-word certificate input", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/trajectory-pairing-search/validate.py", + "path": "source/trajectory-pairing-search/validate.py", + "sha256": "fa1b0928b00678aa1d4e91c0a8572280c07d240be46994ff71c15ecd085b515c" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "path": "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz", + "sha256": "ee1b8e64355381f4347c28b6a741e25b00bec83182357896cd803eb3a525aaf0" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "path": "source/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "sha256": "d944c5b3181442af3cfd855b6f7d059f6bdfaed35755eff549ee7e96c66c5da7" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTROLS.json", + "path": "source/two-site-continuation/CONTROLS.json", + "sha256": "3a140e16dcf32b6c630a9dc6cc0ba642dc5f9511d6501d57f1ec79f8e2d0b7f0" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/HANDOFF.md", + "path": "source/two-site-continuation/HANDOFF.md", + "sha256": "404e01603b99f3e865ce5f7f3fd0a6bd9ca79db4217c105816b7010cc371dbf0" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/INPUT-EVENTS.json", + "path": "source/two-site-continuation/INPUT-EVENTS.json.gz", + "sha256": "747b44ffb93abf589e6ad4a1fe119a66312ddea6b805be21802e588e626a3a33" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json", + "path": "source/two-site-continuation/ISOLATED-FUSION-Q2.json.gz", + "sha256": "9fc70782375a85184804040b25fe0ee49fd270043de4f34649a02c787f72dda9" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q3.json", + "path": "source/two-site-continuation/ISOLATED-FUSION-Q3.json.gz", + "sha256": "3a4b7a5966fce55c06e50247c95203f733c8407ff8f49b12c984b8f1770b76b2" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json", + "path": "source/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json", + "sha256": "d89b23f528bd76b3fc3e4ccb14a33ae0ac53223224f07fe39b7f402fbc2b59a2" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/MANIFEST.json", + "path": "source/two-site-continuation/MANIFEST.json", + "sha256": "44f1e264b3087ab8fdb08b4cd6e27befefbba380852b0119321724b7bc41b5da" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/PROOF.md", + "path": "source/two-site-continuation/PROOF.md", + "sha256": "2506f7a89239d2375f14a1d7084aaaf11678818d6a20eb81e29de0a66a9f751a" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/TWO-SITE-COVER-Q2.json", + "path": "source/two-site-continuation/TWO-SITE-COVER-Q2.json", + "sha256": "2ff79767203b7a06e72a148f49312ad2416540b85550ef10b802f503ff4505bd" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/TWO-SITE-Q2.json", + "path": "source/two-site-continuation/TWO-SITE-Q2.json.gz", + "sha256": "aaf0b871a48fad0827d76963998c25a83423fbb5c3520fa4a18e2df99e6bf41d" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/VALIDATION.json", + "path": "source/two-site-continuation/VALIDATION.json", + "sha256": "acb87ee0dbacb286850346795c6961a56745e61b6d75dc5be112c4e5cb3576e8" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/admit_fusions.py", + "path": "source/two-site-continuation/admit_fusions.py", + "sha256": "15c921045d86fe581725d284b1f9557b4adcdff204951b2e12d0b237b2065b09" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/continue_isolated.py", + "path": "source/two-site-continuation/continue_isolated.py", + "sha256": "89551fe31fbf92cdc1167c7a0149b345733abac09da14aa7e482adc3842442a0" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/controls.py", + "path": "source/two-site-continuation/controls.py", + "sha256": "b1b7543c9d8347dadc242dcf4420e62009e0d410063a3553167b8c4d1d6895b2" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json", + "path": "source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json.gz", + "sha256": "747b44ffb93abf589e6ad4a1fe119a66312ddea6b805be21802e588e626a3a33" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json", + "path": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json.gz", + "sha256": "48a4906b1c833e2e1022480819217a697ade145d9e877aab0155a1384cc6bd02" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json", + "path": "source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json.gz", + "sha256": "d1d4568af335d7cca3c2091be6c645f00cf855d4cf1f11dc84ef887495470b97" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/frozen-two-site-v1/isolated_fusion.py", + "path": "source/two-site-continuation/frozen-two-site-v1/isolated_fusion.py", + "sha256": "f0f3e46e9c581ce0bd9d9e5072c879a3dfdd56a9628a4ab43eff6b93b7f58711" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-MANIFEST.json", + "path": "source/two-site-continuation/inputs/REPAIRED-MANIFEST.json", + "sha256": "dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c" + }, + { + "kind": "lossless immutable JSON transport", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "path": "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz", + "sha256": "7780976645e1aa1e4858b4c109b440faed0327a76cfa51fe58d049f6e5a07276" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/isolated_fusion.py", + "path": "source/two-site-continuation/isolated_fusion.py", + "sha256": "eafc4bd6e0cb0e2136dc9da8454d72ebe2da6f194c7bc62815601ba93d56094e" + }, + { + "kind": "only engine hash repinned to the executed portable path adapter", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site.py", + "path": "source/two-site-continuation/two_site.py", + "sha256": "ee7a777b875c67a398c69f60049d088d39d9ab00031328debdd61675f2468808" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site_cover.py", + "path": "source/two-site-continuation/two_site_cover.py", + "sha256": "ebbef015b85a8d3ba04141cdb7291a7cb47ee8ebd808ca20659ad5b99fbbb5ed" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/AUDIT.json", + "path": "source/two-site-independent-audit/AUDIT.json", + "sha256": "e3333eb9c0166a2b66bec2599e8c837a5fd6459e560abcb190c792653bca2ed7" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/CONTINUATION-REPLAY.json", + "path": "source/two-site-independent-audit/CONTINUATION-REPLAY.json", + "sha256": "9894e740599d348a6a9aed4ef8e45cf5b214caa8f77ca9b40388bb252048dd05" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/HANDOFF.md", + "path": "source/two-site-independent-audit/HANDOFF.md", + "sha256": "2e15f2d03df05ee915ce2d2e4fd25d82f728fa40cb38b589906cd179481acc32" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/MANIFEST.json", + "path": "source/two-site-independent-audit/MANIFEST.json", + "sha256": "4e52d2469b648d73c2af67615116c994b434fdcca2cd0aa573debe98db87324e" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/REVIEW.md", + "path": "source/two-site-independent-audit/REVIEW.md", + "sha256": "418f4124d399955e0873043c55788e59899d6bac468d0aa42e8dfb10734d315b" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/SOURCE-PINS.json", + "path": "source/two-site-independent-audit/SOURCE-PINS.json", + "sha256": "57a041b947794930ad5406713323111ab488d309ae7fff81ea59d77a7db4f58c" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/VALIDATION.json", + "path": "source/two-site-independent-audit/VALIDATION.json", + "sha256": "8e571a9a8e59121fa8dbc4090f3b6cb773d91ea9a3951f2a79cfe6776af5b451" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/audit_two_sites.py", + "path": "source/two-site-independent-audit/audit_two_sites.py", + "sha256": "a20cb5bf3577e508e112abe76bf9177a1c3ec7dc397ab74eef37c05de23eb9c9" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-independent-audit/replay_continuation.py", + "path": "source/two-site-independent-audit/replay_continuation.py", + "sha256": "0ffba268eae17fa0413b1f719d2dbce08af20684f5f2cacd10aca1b8cd2cec95" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/clifford_exact.py", + "path": "source/vendor/clifford_exact.py", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/credits/NOTICE.md", + "path": "source/vendor/credits/NOTICE.md", + "sha256": "538e7634331d7e24791be08dedd737bf458f35a3b46ce651e6aacd905f3dee6e" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/credits/PR533-NOTICE.md", + "path": "source/vendor/credits/PR533-NOTICE.md", + "sha256": "2c1961a07b0976e29e8e6f4da14a9aaeb2f961a3a78d842488065aa433fa2f98" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/credits/vendor/pr531/NOTICE.md", + "path": "source/vendor/credits/vendor/pr531/NOTICE.md", + "sha256": "a92f49c5ced455160fbedcc8954e3c9255e3605e88ad12ae5a84f1c4302986f1" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/credits/vendor/pr531/SOURCES.json", + "path": "source/vendor/credits/vendor/pr531/SOURCES.json", + "sha256": "9e8182e6e659f4671fe0873e324b622cc871df7344157093df40476c8687be5f" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/credits/vendor/pr531/inputs/PR523-ANCESTRY.json", + "path": "source/vendor/credits/vendor/pr531/inputs/PR523-ANCESTRY.json", + "sha256": "0bfce40d86c849f18e8872ee9e8462b0a69a34ed04e01e942a6614645f686f4b" + }, + { + "kind": "unchanged frozen source", + "origin": "/Users/ross/git/math/worktrees/caller-publication-interfaces-20261019T1133Z/research/j-caller-interface-gates/source/vendor/full_stabilizer_bound.py", + "path": "source/vendor/full_stabilizer_bound.py", + "sha256": "f073a00ad4831616e873eb110fd33ad7226010a7c2f6cfa6a6b63167bf58ef75" + } + ], + "independent_freeze": { + "external_input_map": { + "/Users/ross/git/math/.research-automation/runs/kappa-changed-endpoints-20261019T0153Z/stabilizer-escape/full_stabilizer_bound.py": "source/vendor/full_stabilizer_bound.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/caller/free_ops.py": "source/caller/free_ops.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/caller/nested_family.py": "source/caller/nested_family.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/caller/nested_prefix.py": "source/caller/nested_prefix.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/caller/pivot_plane_probe.py": "source/caller/pivot_plane_probe.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/conjugated_reflection.py": "source/native-frames/conjugated_reflection.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/even_parity_source.py": "source/native-frames/even_parity_source.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/lifted_algebra.py": "source/native-frames/lifted_algebra.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/native_model.py": "original/native-frames/native_model.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/orthogonal_source_normalizer.py": "source/native-frames/orthogonal_source_normalizer.py", + "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/root-chronology/quadratic_charts.py": "source/root-chronology/quadratic_charts.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/joint_algebra.py": "original/caller-joint/joint_algebra.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/joint_prefix.py": "original/independent-inputs/a4dcaa1ad05ef8dbba60ddd47b3ad44a3095ebb5fd31f6adfb935a7b1c46a2c7-joint_prefix.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/literal_events.py": "original/independent-inputs/cb8e0bb5bc0624efbe534df05c9ebb8b2ed3492059886206cea2d83ffec27536-literal_events.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/caller-joint/validate_recipe_links.py": "original/caller-joint/validate_recipe_links.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/fusion-audit/MANIFEST.json": "original/independent-inputs/75f0679178d18d29891b7de962823ca54b67c15184bfcbf9739896e72fcaa12f-MANIFEST.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/fusion-audit/audit_fusions.py": "source/fusion-audit/audit_fusions.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/joint-native/joint_coefficient_gate.py": "original/joint-native/joint_coefficient_gate.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/joint-native/literal_inverse_binding.py": "source/joint-native/literal_inverse_binding.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json": "source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTINUED-ISOLATION-Q2.json": "source/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/HANDOFF.md": "source/two-site-continuation/HANDOFF.md", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/INPUT-EVENTS.json": "source/two-site-continuation/INPUT-EVENTS.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json": "source/two-site-continuation/ISOLATED-FUSION-Q2.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q3.json": "source/two-site-continuation/ISOLATED-FUSION-Q3.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/MANIFEST.json": "source/two-site-continuation/MANIFEST.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/PROOF.md": "source/two-site-continuation/PROOF.md", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/admit_fusions.py": "source/two-site-continuation/admit_fusions.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/continue_isolated.py": "source/two-site-continuation/continue_isolated.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-MANIFEST.json": "source/two-site-continuation/inputs/REPAIRED-MANIFEST.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json": "source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/isolated_fusion.py": "source/two-site-continuation/isolated_fusion.py", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site.py": "original/two-site-continuation/two_site.py", + "/Users/ross/git/math/integer-mult-bounds/research/kernel92-frame-composition/vendor/pr531/vendor/clifford/clifford_exact.py": "source/vendor/clifford_exact.py" + }, + "manifest_sha256": "4e52d2469b648d73c2af67615116c994b434fdcca2cd0aa573debe98db87324e", + "original_file_map": { + "AUDIT.json": "source/two-site-independent-audit/AUDIT.json", + "CONTINUATION-REPLAY.json": "source/two-site-independent-audit/CONTINUATION-REPLAY.json", + "HANDOFF.md": "source/two-site-independent-audit/HANDOFF.md", + "REVIEW.md": "source/two-site-independent-audit/REVIEW.md", + "SOURCE-PINS.json": "source/two-site-independent-audit/SOURCE-PINS.json", + "VALIDATION.json": "source/two-site-independent-audit/VALIDATION.json", + "audit_two_sites.py": "source/two-site-independent-audit/audit_two_sites.py", + "replay_continuation.py": "source/two-site-independent-audit/replay_continuation.py" + } + }, + "logical_transport_note": "Every original byte is authenticated. Compression reduces transport, not mathematical review scope. Fixed witnesses are checked without repeating cold synthesis.", + "original_read_aliases": { + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": "source/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": "source/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py": "source/pauli-caller-retiming/trajectory_certificate.py" + }, + "pairing_freeze": { + "closure": "Four actual fixed-word sources, exact path certificates and unchanged graph/admission/independent functions only. Unrelated Pauli/kernel/cubic generators and source archives are not imported. The full earlier trajectory JSON is retained because the independent audit compares the four selected graph edge sets to it.", + "file_map": { + "FULL-STOCK-CERTIFICATES.json": "source/trajectory-pairing-search/FULL-STOCK-CERTIFICATES.json", + "HANDOFF.md": "source/trajectory-pairing-search/HANDOFF.md", + "PROOF.md": "source/trajectory-pairing-search/PROOF.md", + "REPAIRED-Q2-PROPOSAL.json": "source/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json", + "REPAIRED-Q3-PROPOSAL.json": "source/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json", + "TWO-SITE-Q2-PROPOSAL.json": "source/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json", + "TWO-SITE-Q3-PROPOSAL.json": "source/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json", + "VALIDATION.json": "source/trajectory-pairing-search/VALIDATION.json", + "admit_pairings.py": "source/trajectory-pairing-search/admit_pairings.py", + "pairing_search.py": "source/trajectory-pairing-search/pairing_search.py", + "validate.py": "source/trajectory-pairing-search/validate.py" + }, + "manifest_sha256": "623ac76418785a29d3a45868f07cbcae0df6e3176585a701fd6776c98c97d3c8", + "review_file_map": { + "PAIRING-AUDIT.json": "source/completed-gates-review/PAIRING-AUDIT.json", + "REVIEW.md": "source/completed-gates-review/REVIEW.md", + "audit_gates.py": "source/completed-gates-review/audit_gates.py", + "pairing_audit.py": "source/completed-gates-review/pairing_audit.py" + }, + "review_manifest_sha256": "ef3697eece91ee6d52ae3f5e88b95028091829d6961118052dff1e25df212ba3" + }, + "path_adaptations": [ + { + "adapted_sha256": "ee7a777b875c67a398c69f60049d088d39d9ab00031328debdd61675f2468808", + "change": "Only the frozen engine digest changes to the exact executed portable joint_algebra bytes. No algebra, domain or assertion changes.", + "original": "original/two-site-continuation/two_site.py", + "original_sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a", + "path": "source/two-site-continuation/two_site.py" + }, + { + "adapted_sha256": "6fe4de627845a36e2e08723e705daa86959846fe4ea577e94fca233829d7d5c9", + "change": "Only OLD source location and the native_model source hash are rebound to the retained path-adapted implementation; original versions and hashes remain retained. No arithmetic, assertion or coverage change.", + "original_sha256": "5782033e347c9b10ad47c01ed12a0a52ea07e901fa9e8f7aa9d3a2a928327232", + "path": "source/caller-joint/joint_algebra.py", + "via": "PR4074 exact5758f0f3042b740ce872b5b0ae974917bd07016d" + }, + { + "adapted_sha256": "b4291b2868f91f6e77058e58e936b2efe965a9d9ae58095745fa2dad8c1d5c68", + "change": "Three source locations only: package-local BASE and immutable CE/BOUND locations. No arithmetic, assertions, constants or coverage changed.", + "original_sha256": "6397a86bd3d1461be182fcfa8602b0c70c489964a8c14f12436ba2506e11d9e3", + "path": "source/native-frames/native_model.py", + "via": "PR4074 exact5758f0f3042b740ce872b5b0ae974917bd07016d" + }, + { + "adapted_sha256": "e6ff6f323edd360efa3776a381a97cb7202b79aa198e804c9165310e03e83f45", + "change": "Only source-directory resolution and expected hashes of the already documented path-adapted sources change. Original mathematical source and original hashes remain retained.", + "original_sha256": "43bc5229a10e7ed6af3d5bff057c61cfd6d37a222cc0a2eb2e88cbe0ac410d07", + "path": "source/joint-native/joint_coefficient_gate.py", + "via": "PR4074 exact5758f0f3042b740ce872b5b0ae974917bd07016d" + }, + { + "adapted_sha256": "30b9ad84008ff6df9597bb95964174745a6cd978b9bfde968e18b8db396416b8", + "change": "Exactly four consumed compile/embedding functions copied verbatim. Only unrelated imports and unused cold-producer functions are omitted.", + "function_source_sha256": { + "compile_literal": "45e28e5ab777566a7c6625860726aa6c14bab725f0494da5545625bb1ac87609", + "compile_monomial": "9d90ab6cd3555ce7ea816a18adc40f7dac8c31298866c0b7d0cf804ad3c5f0fa", + "compile_recipe": "5ba8984cc42680054a8cb5f4175fb314d2fc097a88665fe4073c32398f11fb7f", + "embedding_circuit": "17c7fa61c90b82413045040760b425c2c18662ff75b825a22c4a52e7ef5cda03" + }, + "original": "original/caller-joint/validate_recipe_links.py", + "original_sha256": "7457b3672d5a73c584d2073b5d3312e6429fd3f433151f15f8f07da33aa4c59a", + "path": "source/caller-joint/validate_recipe_links.py" + } + ], + "prior_publication": { + "head": "5758f0f3042b740ce872b5b0ae974917bd07016d", + "pr": 4074 + }, + "schema_version": 1, + "scientific_base": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "scope": "Complete finite two-site callers and precise fixed-word common-frame ADD-graph retiming floors; no arbitrary-response or all-q caller theorem." +} diff --git a/research/two-site-caller-fusion/FIXED-WORD-REVIEW.md b/research/two-site-caller-fusion/FIXED-WORD-REVIEW.md new file mode 100644 index 0000000000..e9b9788f24 --- /dev/null +++ b/research/two-site-caller-fusion/FIXED-WORD-REVIEW.md @@ -0,0 +1,92 @@ +# Independent fixed-word proof review excerpt + +This exact section is extracted from the unchanged completed review retained +at source/completed-gates-review/REVIEW.md. Other kernel/cubic sections are +outside this contribution. + +## Fixed-graph trajectory theorem + +For equal-dimensional subspaces let `d(U,V)=mf-dim(U intersection V)`. +The intersection dimension inequality proves its triangle inequality; +invertible linear maps act isometrically. Thus an edge operator G and +endpoint Lagrangians L_u,L_v have tariff + + d(L_v,G L_u)=native_rank(T_v^-1 G T_u) + +when `L_x=T_x Z`. Permitting arbitrary Lagrangians at ADD nodes is a +relaxation of the literal requirement that both operands have the same +actual frame representative. For a path, pulling each node frame back by +the chronological partial holonomy makes the sum telescope by triangle +inequality to `d(Z,G_path Z)`. Partitioning every edge once into +boundary-to-boundary paths then gives the sum of these holonomy ranks as +a lower bound, without counting an edge twice or interpreting a path as an +independent value/caller-matrix coefficient. + +The literal input/output boundaries are fixed at Z. The statement is valid +for general Clifford frame gauges on all mf coordinates, including gauges +that mix tensor coordinates. Tensor structure is used only to lift the +fixed source holonomy ranks by a factor f, not to restrict the allowed +retiming frames. Global Gaussian phases do not affect the subspace metric, +but the complete literal circuits and their tensor-phase corrections are +retained and independently checked. + +The eight original straight-pairing source words have independently checked edge-disjoint exhaustive +partitions and physical-label traversals. Pauli DEFAULT and ISOLATED have +sharp floors 60 (q=2) and 112 (q=3), equal to their source rank bills and +endpoint stocks. Repaired SIMPLIFIED and admitted two-site have only the +weaker floors 62 and 118; these are not optimality certificates for those +words. The separate crossed-pairing witnesses below strengthen precisely +these weaker floors. No all-q extrapolation is made from these finite fixtures. + +The scalar SWAP gadget `x+=y; y-=x; x+=y; y*=-1` is an exact all-input +transposition. Crossing strands at its first ADD and keeping the remaining +pairings straight preserves an inherited holonomy partition when expanding +a literal SWAP. Identity segments inserted by the gadget remain edges and +are counted. The final sign SCALE is a paid scalar scan. Reversing this +operation for an existing gadget is conditional on its internal routing +inducing the required crossing; no invariant for arbitrary scalar rewrites +is claimed. The source replay expands all 72 actual SWAPs separately and +checks one identity insertion per fixture. It is a same-engine replay, +distinct from this review's independent edge/operator traversal. + +This theorem fixes the source unary holonomies, common-frame ADD graph and +literal owner/input/output boundary. A changed response, nonlocal scalar +rewrite across native sites, new dirty helpers/interactions, changed right +input chart or owner contract needs a new certificate. The metric controls +rank mass, not the concave positive-exponent moment or native lowering. + +## Stronger finite crossed-pairing witnesses + +The subsequently frozen `../trajectory-pairing-search/` witnesses are also +independently admitted. The four unchanged source words now have floors: + +| Family | q | Paths | Rank of every holonomy per f | Floor | Source mass | +| --- | ---: | ---: | ---: | ---: | ---: | +| Repaired SIMPLIFIED | 2 | 6 | 12 | 72 | 80 | +| Repaired SIMPLIFIED | 3 | 8 | 16 | 128 | 136 | +| Admitted two-site | 2 | 6 | 12 | 72 | 76 | +| Admitted two-site | 3 | 8 | 16 | 128 | 132 | + +`pairing_audit.py` rebuilds every graph edge from literal source events and +checks it is identical to the predecessor straight graph. It decodes each +saved crossing mask against the actual chronological ADD ordinals, constructs +new exhaustive edge-disjoint paths, and compares their operators with a +separate direct crossed-strand traversal. It binds the author's final saved +certificate field by field: source/event hashes, paths, literal circuits, +signed tableaux, all-f phases, ordered source-unary ordinals and literal +inverse circuits with inverse phase vectors. Every path has full ambient +B-rank. Toggling one actual routing bit fails the saved holonomy witness; +the original edge-omission and f=2 phase mutants are separately rejected. + +Thus arbitrary Clifford-frame retiming of each listed fixed graph has rank +mass at least stock for every positive f, even if its frames mix tensor +coordinates. This supersedes 62/118 as the best retained lower bounds for +these graphs. It does **not** prove masses 76/132 or 80/136 optimal, nor does +it bound all equivalent scalar words, changed responses, helper couplings +or endpoint contracts. Since each path rank is at most the ambient rank, +these witnesses maximize the graph-pairing certificate objective; that is +distinct from minimizing the native invoice. No search is rerun in this +independent audit. The proposal counts are historical discovery records, +not proof coverage. No new native supplier recipe is needed for a lower +bound holonomy, which is not an executable child proposal. + diff --git a/research/two-site-caller-fusion/LICENSE b/research/two-site-caller-fusion/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/two-site-caller-fusion/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/two-site-caller-fusion/NOTICE.md b/research/two-site-caller-fusion/NOTICE.md new file mode 100644 index 0000000000..4053f26412 --- /dev/null +++ b/research/two-site-caller-fusion/NOTICE.md @@ -0,0 +1,41 @@ +# Attribution and scope + +Copyright 2026 Ross Richardson. New caller derivations, exact replay adapter +and packaging: Ross Richardson with substantial OpenAI Codex assistance. +Apache-2.0, under the included LICENSE. + +The exact inherited Gaussian-dyadic compiler is not new work. The unchanged +kernel92/PR531 notices, source manifest and PR523 ancestry remain under +source/vendor/credits/. Their source authors and AI disclosures are retained. +The locally frozen predecessor proofs and mathematical scripts are retained +with original bytes and original AI assistance notices, except the explicitly +identified path/source-binding adaptations and narrowed cost-scope paragraph, +whose original versions are also retained. The corrected caller recipe IDs +are source-owner changes; the previous bytes remain as a rejecting control. + +PR3987 (Chris R / Clear1nsight) and PR4002 (ToikY) retain generic signed-lift +and phase-normalization credit. PR3989/4045 retain their separate interface +and physical-volume theorems. Separate BIT PR4021/4023 and older Ross-authored +PR3630/3632/3645/3649/3655 are prior publications, not unpublished new results. +No arithmetic, κ, selected-record or scientific-acceptance claim is imported +from a PR title, publication state, archive or source-integrity check. + +This follow-up extends the source-bound continuation/core interfaces of +PR4069, exact efb1b5a56a52967a4e94223bcdd03b209f4f09f5. Compression +preserves every logical original byte. The single readable q3 prefix +count erratum62 to61 is explicitly mapped to its frozen original. + +The bounded constructive fusion uses the frozen caller retractions/readers, +phase-correct native resource and copied exact source inputs credited in +source/folded-fusion/PROOF.md and INPUT-PINS.json. The separately frozen +independent audit retains its own source pins and AI disclosure. Rejected +metadata history is retained explicitly and is not current evidence. + +This two-site continuation retains PR4074 at5758f0f3042b740ce872b5b0ae974917bd07016d +and PR4069 ancestry. The new independent transport/physical-circuit audit is +retained unchanged with its original source pins. Four consumed recipe +compile/embedding functions are copied verbatim with exact original-byte +mapping; unused cold producer imports are omitted. Ross Richardson with +substantial OpenAI Codex assistance in construction, proof, separate audit +and packaging. Separate AI review is not independent human/formal acceptance. +No new kappa or physical supplier admission. Apache-2.0. diff --git a/research/two-site-caller-fusion/README.md b/research/two-site-caller-fusion/README.md new file mode 100644 index 0000000000..1d91e59654 --- /dev/null +++ b/research/two-site-caller-fusion/README.md @@ -0,0 +1,218 @@ +# Two-site caller cleanup by a phase-complete Bruhat factorization + +The actual q2/q3 J callers improve from stock+8 to **stock+4** by changing +two existing unary sites and deleting the whole U-coordinate tail recovery. +The first replacement is a physical monomial with Gaussian quadratic Z +phases; the second is one native2f child. This is outside the preceding +single-site/X-character restriction. Neither caller has a favorable native +bill or gives a new κ. + +| q | Banks n | Ambient arity m | Changed source sites | Complete histogram | Native mass | Stock | +| --- | --- | --- | --- | --- | --- | --- | +| 2 | 6 | 12 | 31,51 | H2=36,H4=1 | 76 | 72 | +| 3 | 8 | 16 | 39,97 | H2=64,H4=1 | 132 | 128 | + +Histogram ranks are in units of f. The words are complete at the two listed +q values for every positive f. Every independent original field, including +both pivot owners and every public field, ends at its literal `F_k J` gauge. +No right input gauge is discarded. Each original-field column is an exact +operator on all physical addresses, not a clean-input or selected-column test. +No all-q caller is inferred from these two fixtures. + +## Isolated whole-bank rank-distance lemma + +At the two cuts, let V transport the first bank to the second, and let C be +the correction required after deleting the selected tail. The actual words +have both transported direction column and dual row supported on one bank. +The required correction is on that same bank. The two replacement operators +therefore obey + +``` +W = L U^-1 R, +L = C_jj A_j G_i, R = A_j^-1 G_j. +``` + +For a Clifford's binary symplectic matrix `[[A,B],[C,D]]`, put r=rank(B). +Product subadditivity and inverse invariance give +`r(U)+r(W) >= |r(L)-r(R)|`. Exact Gaussian Bruhat factorizations +`L=LL F_a LR` and `R=RL F_b RR` attain the bound with +`U=RL LR`, a physical monomial. Then `W=LL F_a F_b RR` has arity |a−b|; +the overlapping canonical native chirps square exactly to Pauli X. +All Gaussian phases belong in the actual monomial adapters and whole-field +units. This is a general lemma for the stated isolated two-site interface, +not a lower bound for arbitrary callers. + +For the two actual source transports, `(r(L),r(R),r(U),r(W))` is respectively +`(4,2,0,2)` and `(8,6,0,2)`. Offline factoring of L/R is a witness-generation +calculation; neither L nor R is executed by the caller. The emitted U circuit +and selected W recipe are explicit in the retained words. The +[construction proof](source/two-site-continuation/PROOF.md) and +[independent review](source/two-site-independent-audit/REVIEW.md) give the +transport orientation, exact phase vectors and proof boundaries. + +## Complete physical binding and paid work + +[ADMITTED-TWO-SITE-FUSIONS.json.gz](source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz) +contains the current literal event schema, complete serialized inverses and +used-only forward/inverse native pools. Every event's signed tableau is +rebuilt from its literal circuit. Every selected recipe, embedding, global +Gaussian phase and f-mod4 whole-field unit is checked. There are 14 used +definitions per fixture and 74/130 forward-plus-inverse native links. +The actual child arities2f/4f obey the pinned proper-child caps at ambient +12f/16f. No dirty helper or private zero field is introduced. + +`admit_fusions.produce` freshly rebuilds and checks the complete admitted +words from fixed scientific witnesses. The independent `audit_two_sites.check` +does not import that generator or its general-Clifford tensor engine. It +derives the old-source tail correction and two-sided transport with a separate +literal X-character model, checks the emitted general-Clifford U/W in physical +coordinates, and glues the local equality to every original-input column. +It checks the serialized inverse primitive by primitive, so both literal +inverse orders follow for the full word. + +Native rank zero is not zero runtime. Every D/P/X/unit instruction is a paid +full-field scan, and every scalar ADD remains paid. The later replacement's +two monomial adapters use at most eight instructions plus one whole-field +Gaussian-unit control, in addition to the native child. The exact event +lists retain the source's scan macros. Finite controller lowering, address +arithmetic, source access, numerical precision, physical ownership/width +windows, tape/storage and complete outer transfer remain obligations. +The native mass comparison does not pay those costs or admit a supplier. + +## Bounded continuation + +After the q2 mass 76 word, the registered replay checks every nonempty subset +of its three remaining tail natives and every pair of existing prefix unary +sites:7×703=4,921 cases. Of these, 4,887 corrections involve more than one bank +and 34 fail two-sided transport isolation. There is no eligible isolated pair. +This is authenticated reproduction of the author's general-Clifford census, +with independent row-only/column-only rejection controls and a bank-permuted +two-sided positive control. It is not a second independent census engine. + +The census concerns fixed existing sites, a single-unitary-Clifford bank +correction and isolated transported row AND column. Coupled two-bank +corrections, nonisolated annihilation, inserted or additional sites, changed +source/response chronology and owner/output boundaries remain outside it. +The initial finite-ray exploration also leaves homogeneous strata unresolved; +its retained receipts are archival provenance, not a global optimum. + +## Fixed-word retiming boundary + +Four exact path-pairing witnesses prove native rank mass at least stock for +Clifford-frame retiming of each named common-frame ADD graph: + +| Word | q | Source mass | Retiming floor | Path ranks per f | +| --- | --- | --- | --- | --- | +| Repaired two-fusion | 2 | 80 | 72 | 6×12 | +| Repaired two-fusion | 3 | 136 | 128 | 8×16 | +| Admitted two-site | 2 | 76 | 72 | 6×12 | +| Admitted two-site | 3 | 132 | 128 | 8×16 | + +The lower bound is for every positive f and arbitrary Clifford frame gauges, +including gauges that mix tensor coordinates. It fixes the literal physical +input/output boundaries, unary holonomies and common frame at each scalar +ADD. It does not prove source masses 76/132 or 80/136 optimal, and it does not +apply automatically to changed responses, helper couplings, scalar rewrites +across native sites or changed endpoint contracts. It is not a universal +kernel or arbitrary same-matrix caller certificate. + +For equal-dimensional Lagrangians define +`d(U,V)=mf−dim(U∩V)`. Intersection dimension gives a metric, and invertible +linear maps are isometries. A unary edge G between endpoint Lagrangians has +tariff `d(L_v,G L_u)`. Pairing strands straight or crossed at each common-frame +ADD partitions every edge once into boundary-to-boundary paths. The triangle +inequality bounds each path's tariff by its holonomy's native B rank. +All paths in the four witnesses have full ambient rank; their sum is stock. +This maximizes the path-certificate objective, not the minimum source bill. +Pairing graph edges does not swap or copy independent field values at an ADD. + +The [source proof](source/trajectory-pairing-search/PROOF.md), preceding +[metric proof](source/pauli-caller-retiming/TRAJECTORY-PROOF.md) and +[independent review excerpt](FIXED-WORD-REVIEW.md) state the exact model. +The registered replay reconstructs every edge/path, literal holonomy circuit, +signed tableau, all-f phase, source-unary chronology and serialized inverse. +A separate direct crossed-strand traversal agrees. Every independent audit +field is compared to the frozen certificate. Wrong routing, an omitted edge, +omitted actual BANK_SWAP transport and the weaker all-straight witness reject. +No proposer search is rerun; historical trial counts are discovery records. +These holonomies are lower-bound witnesses, not executable child proposals, +so no new native supplier recipe is inferred. + +## Reproduce and source binding + +From the repository root, using Python3.12 and the standard library: + +``` +python3.12 -B scripts/research_package.py --package research/two-site-caller-fusion +python3.12 -B scripts/check_research_commit.py --package research/two-site-caller-fusion --check-source-history +``` + +The registered normal and optimized commands execute the same authenticated +mathematical source bytes with historical assertions active. Direct +`python3.12 -I -B research/two-site-caller-fusion/verify.py` also supports +`-O` and `--json`, needs no Git/network and writes no package files. +The [replay map](REPLAY-MAP.md) lists every executed function and distinguishes +fresh checks from original cold witness generation and archival searches. + +[BINDINGS.json](BINDINGS.json) binds the complete 24-file author freeze, +independent review freeze, every named external input and all runtime bytes. +Large immutable JSON files use deterministic gzip transport, with separate +original logical-byte SHA256/length and transport SHA256/length. Read-only +in-memory aliases preserve every original byte; no files are materialized, +executable data deserialized or runtime dependencies fetched. Compression +does not reduce mathematical review scope. Transport, logical-payload, +malformed-gzip and source-byte mutations reject. + +The portable shared implementations are the unchanged reviewed adapters from +PR4074. Their original sources and exact path/hash deltas are retained. The +new `two_site.py` guard is repinned only to the actual executed engine bytes. +Exactly four recipe compile/embedding functions are copied verbatim from the +original utility, excluding unused cold-producer imports; the verifier checks +their exact source text against the retained original. All assertions in the consumed functions remain unchanged and active; +unused cold producers are outside this registered replay. Original absolute receipt paths are authenticated +provenance, not required local directories. Only registered/direct wrapper +commands are advertised as portable; archival source CLI paths keep context. + +Wrong-direction native pointers, a phase defect only at f=2 mod4, an omitted +first monomial and reversed noncommuting correction order reject. Opposite +whole-field i/−i gauges on U/W are accepted as an equivalent positive control. +The saved independent loader controls are retained; its writing wrapper is +not called in read-only exports. The portable loader directly compiles the +same authenticated bytes without reading bytecode caches, and a live legacy +assertion control also runs under the optimized parent. + +## Task, credit and limits + +Canonical scientific base20ecf2891d80b5acf18d980b2164fb44ea7faa90 and +priority revision 6 are provenance. [TASK.json](TASK.json) records the explicit +assigned continuation and changed `joint-query-controller` card scope; the +original broad card is not solved. [SOURCES.json](SOURCES.json) gives immutable +canonical blobs; pending research bytes have explicit local-source hashes +and original provenance rather than invented Git pins. + +[PR4074](https://github.com/CrocSwap/integer-mult-bounds/pull/4074), exact +5758f0f3042b740ce872b5b0ae974917bd07016d, is the direct source construction. +Its two fusions and earlier scoped gates retain credit. PR4069 supplies the +fixed-core J caller/native ancestry; PR4055/4056/4057 are separate earlier +caller contributions. Generic phase/lift results in Clear1nsight3987 and +ToikY4002, and Clear1nsight's distinct3989/4045 interface/volume work, are not +claimed as new here. icekylinx/PR531, Rohan Arun/kernel92, retained compiler, +Gaussian-phase and caller notices remain intact under +[source/vendor/credits](source/vendor/credits). Existing3630/3632/3645/3649/3655 +and separate BIT4021/4023 are outside this contribution. + +Ross Richardson with substantial OpenAI Codex assistance in construction, +proof, separate audit and packaging; Apache-2.0. Separate AI contexts do not +constitute independent human review or formal-kernel acceptance. Local exact +verification, written proof, hosted CI, physical admission and a multiplication +theorem remain distinct. No global caller obstruction, all-q caller, positive +supplier, compatible BIT, new κ or selected-frontier change is claimed. + +## Open next questions + +[TASK.json](TASK.json) records the question, smallest first step and blockers. +A coupled correction or changed reader/owner boundary must first provide one +complete original-input word and its full native/scan/owner/volume bill. The +remaining four native units cannot be declared saved by a partial inverse +identity. An all-q caller would additionally need its literal transport, +site chronology and owner interface proved; q2/q3 do not supply that induction. diff --git a/research/two-site-caller-fusion/RELATED-WORK.json b/research/two-site-caller-fusion/RELATED-WORK.json new file mode 100644 index 0000000000..da00fd783c --- /dev/null +++ b/research/two-site-caller-fusion/RELATED-WORK.json @@ -0,0 +1,109 @@ +{ + "scientific_base": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "priority_revision": 6, + "coverage": "Exact named PR head/body reads plus parent recent80-open-PR and partial live Discussion delta; not exhaustive code/closed/unpublished overlap.", + "pull_requests": [ + { + "number": 3987, + "title": "Audit staged544 native phases and expose the binary-inverse lift defect", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3987", + "head": "fc536202fdaa924158789a5ef59ac079bbe21922", + "author": "Clear1nsight", + "scope": "Related phase/interface result; not rerun or claimed here." + }, + { + "number": 4002, + "title": "Derive explicit native-lift phase tags and signed-word certificates", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4002", + "head": "d593941ea0a4926021cba9d01fe60500579e464f", + "author": "ToikY", + "scope": "Related phase/interface result; not rerun or claimed here." + }, + { + "number": 3989, + "title": "Construct selected rank-two Pauli fusion and bound its uniform transfer bill", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3989", + "head": "7b6dda7ab6ed10d608ecba357ac2f6924166d38b", + "author": "Clear1nsight", + "scope": "Related phase/interface result; not rerun or claimed here." + }, + { + "number": 4045, + "title": "research: bind joint-child batching to the staged544 native rank interface", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4045", + "head": "91afbb643f7f4ccf6f34b685ecd959eb790a0f94", + "author": "Clear1nsight", + "scope": "Related phase/interface result; not rerun or claimed here." + }, + { + "number": 4021, + "title": "Verify five rank-four BIT terminals and their fixed-controller cost bound", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4021", + "head": "c01f97ecfc7fa64847f6abd8f7b231e1df8c7b70", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 4023, + "title": "Prove sharp fixed-support unary-query bounds with restored dirty banks", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4023", + "head": "9124007ea9029a9a3b88898bb4c350ddb27ffa58", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 3630, + "title": "Bound staged-supplier packing for every replica count", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3630", + "head": "bcac7fe04b9b7f7f5d3c27d620561f96c4ae5608", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 3632, + "title": "Correct the selected P112 scatter covariance and dirty restoration", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3632", + "head": "7e7a889cbf6da2c4461af806fe52a888c621a7e7", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 3645, + "title": "Reduce R438 to 429 helpers with three source snapshots", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3645", + "head": "99b901c9b5ac70cf441b3d7e585cc7b8744b5359", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 3649, + "title": "Classify sharp noncubic ranks of the H6 odd-Gram family", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3649", + "head": "f8768756d8ac4abb263295170a436ba54562fdcd", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 3655, + "title": "Classify H6 dyadic Smith factors and sharp physical-row repair", + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/3655", + "head": "7bf23e128e58a33c019268f57129629f603547f7", + "author": "RossRichardson", + "scope": "Already published separate BIT/prior lineage; excluded from this new contribution." + }, + { + "number": 4069, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4069", + "head": "efb1b5a56a52967a4e94223bcdd03b209f4f09f5", + "author": "RossRichardson", + "scope": "Source-bound fixed-core J theorem, exact whole caller and shared frozen mathematical implementations; current changed interfaces are separate." + } + ], + "direct_predecessor": { + "number": 4074, + "url": "https://github.com/CrocSwap/integer-mult-bounds/pull/4074", + "head": "5758f0f3042b740ce872b5b0ae974917bd07016d", + "author": "RossRichardson", + "relationship": "Exact repaired source caller and eight-unit cross-cut construction; new general physical-monomial two-site rewrite saves four more native units. Shared implementations retain exact originals and source notices." + } +} diff --git a/research/two-site-caller-fusion/REPLAY-MAP.md b/research/two-site-caller-fusion/REPLAY-MAP.md new file mode 100644 index 0000000000..b7469ed102 --- /dev/null +++ b/research/two-site-caller-fusion/REPLAY-MAP.md @@ -0,0 +1,37 @@ +# Source-to-replay assertion map + +| Executed source/function | Fresh registered obligation | Scope | +| --- | --- | --- | +| `admit_fusions.produce` / `bind` | Rebuild every current q2/q3 event from the fixed scientific witnesses and repaired selected source; every original field, full tensor target, both serialized inverse orders, used-only recipe definitions/embeddings, exact Gaussian phases, f-mod4 vectors, proper caps and complete histogram; compare all mathematical fields to ADMITTED. | Fixed q2/q3, every positive f. Cold synthesis of witnesses is not repeated. | +| `audit_two_sites.check`, both fixtures | Separate old-source all-column replay, two-sided transport and tail correction; actual W=L U^-1 R with every Gaussian residue; exact native rank-distance attainment, unchanged-event gluing, every recipe and primitive inverse/counter. Complete case outputs equal frozen AUDIT cases. | Does not import the construction generator or its general tensor engine. Original writing `run`/loader-control wrapper is not executed. | +| `controls.produce` | Exact noncommuting correction product; reversed order rejects. | Synthetic algebra control, not physical admission. | +| `continue_isolated.run(180)` / `replay_continuation.controls` | All seven tail masks and703 prefix pairs per mask; exact complete census payload, counts4,887/34 and no eligible case; no timeout. Independent triangular row-only/column-only controls reject; bank-permuted isolation passes. | Authenticated same-engine census, not a second independent general-Clifford census implementation. Original run wrapper compares absolute source paths and is not called; only separately authenticated provenance is excluded. | +| `validate_recipe_links` four compile/embedding functions | Function source text is byte-identical to retained original; no unrelated cold imports. | Only the four declared consumed functions are compiled. | +| Portable source/JSON loader | Every physical/logical original hash, author and independent manifests/external pins, exact executed adapter bytes, source-function correspondence and legacy assertions; source/transport/logical/malformed-container controls. | Read-only aliases; no bytecode cache, network or executable data. | + +The complete author freeze and independent freeze are authenticated, including +their archival records. `two_site.screen`, `two_site_cover`, historicalv1, +original `isolated_fusion.run` cold lowering and full original loader-control +wrappers are not rerun by the bounded registered command. Those records are +source provenance/witness-generation evidence; the actual emitted words and +every used witness are checked fresh as above. The early ray screens retain +unresolved strata and support no global negative claim. + +Only enumerated provenance keys are removed when comparing replay receipts: +absolute paths, source/producer hashes already authenticated separately, +elapsed time, and executed-source bookkeeping that changes with relocation. +No event, coefficient, phase, recipe, count, accepted/rejected case or scope +field is projected away. BINDINGS records exact function/path/hash adapters. + +## Four fixed-word certificate extension + +`admit_pairings.fixture` reconstructs each of the four complete saved +certificate fixtures and compares every mathematical field. The unrelated +all-input `pin_inputs`/proposer wrappers are not called; the exact consumed +source hashes, proposal pins and original read aliases are authenticated +directly. `pairing_audit.check` independently rebuilds the actual graph and +crossed physical strands and compares its complete frozen output. Neither +search nor kernel/cubic validators run. The three absolute proposal read +paths resolve through exact declared read-only byte aliases; no external +workspace is needed. The whole earlier trajectory JSON is retained only +because the independent check binds these four edge sets to its source graph. diff --git a/research/two-site-caller-fusion/SOURCES.json b/research/two-site-caller-fusion/SOURCES.json new file mode 100644 index 0000000000..68bddcb9b4 --- /dev/null +++ b/research/two-site-caller-fusion/SOURCES.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + }, + { + "path": "research/kernel92-frame-composition/vendor/pr531/vendor/clifford/clifford_exact.py", + "usage": "provenance", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "path": "research/kernel92-frame-composition/NOTICE.md", + "usage": "provenance", + "git_blob": "8d3c3349e13774de4f992591c3a0b9e74029f761", + "sha256": "538e7634331d7e24791be08dedd737bf458f35a3b46ce651e6aacd905f3dee6e" + }, + { + "path": "research/kernel92-frame-composition/PR533-NOTICE.md", + "usage": "provenance", + "git_blob": "6e6d0042d1cf618308e7e57df3e7e8b6958991d0", + "sha256": "2c1961a07b0976e29e8e6f4da14a9aaeb2f961a3a78d842488065aa433fa2f98" + }, + { + "path": "research/kernel92-frame-composition/vendor/pr531/NOTICE.md", + "usage": "provenance", + "git_blob": "f7a8f861be860edd5a78114c5225dec90effa029", + "sha256": "a92f49c5ced455160fbedcc8954e3c9255e3605e88ad12ae5a84f1c4302986f1" + }, + { + "path": "research/kernel92-frame-composition/vendor/pr531/SOURCES.json", + "usage": "provenance", + "git_blob": "78244052aae4866ae9e8e2d2e4c10180870a0fc4", + "sha256": "9e8182e6e659f4671fe0873e324b622cc871df7344157093df40476c8687be5f" + }, + { + "path": "research/kernel92-frame-composition/vendor/pr531/inputs/PR523-ANCESTRY.json", + "usage": "provenance", + "git_blob": "385a202fbc485ceaed1b604d6c21eb3486caa600", + "sha256": "0bfce40d86c849f18e8872ee9e8462b0a69a34ed04e01e942a6614645f686f4b" + }, + { + "path": "LICENSE", + "usage": "provenance", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + } + ] +} diff --git a/research/two-site-caller-fusion/TASK.json b/research/two-site-caller-fusion/TASK.json new file mode 100644 index 0000000000..7daf827b3d --- /dev/null +++ b/research/two-site-caller-fusion/TASK.json @@ -0,0 +1,79 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 6, + "base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "original_card": { + "id": "joint-query-controller", + "question": "Can a literal QQ16 producer meet the proposed completed-output error budgets with dirty helpers and an affordable physical consumer?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/joint-query/README.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "docs/research/community-efficient1000-review.md", + "research/qq16-producer-defect-transfer/README.md" + ], + "methods": [ + "Derive one literal producer's completed-output defects and intermediate dirty-helper bounds, with its physical bill.", + "Design or audit one consumer, retention or hosting boundary and its complete cost for the pinned producer/decoder." + ], + "acceptance_gate": "Name the changed premise of the fixed F0/B1 observation obstruction. Show exactly which query is recovered, legal native reads and restoration, and a full favorable budget including cover maps, helpers and endpoints. Local inverse identities alone do not close the global controller. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the revision-6 family record and #2965 producer-defect transfer after the local QQ16 decoder contract. Its author-checked output-error estimate does not implement producer interiors, bound dirty helpers, or pay for the consumer; independently check the implication used.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "Pin one literal F0/B1 producer and its native-child contracts; derive the actual intermediate magnitude ledger and completed-output defects, including dirty helpers and correlations. Compare with #2965 budgets and price storage, movement, cleanup and F17 consumption. Stop with a precise missing bound if no producer contract supplies it; do not optimize another decoder precision constant in isolation.", + "bottleneck_link": "The native local words exist; retained query information and its physical access are the missing link to a composed recursive interface.", + "allowed_variations": [ + "One paid query, one changed first pair, or one precisely specified affine helper state.", + "A counterexample or lower bound for that exact proposed repair.", + "One unresolved obligation of a newer local decoder, with exact source heads and a distinct claim/domain." + ], + "scope_change_triggers": [ + "Retaining the fixed first pair and ordinary schedule while allowing only homogeneous selected-only control, already excluded by the witness.", + "Treating cover-map counts as zero-cost physical address operations.", + "Recreating the pending complete local decoder or early-record/output-bank coalescing already under investigation without a distinct audit or changed premise.", + "Treating a completed-output defect inequality as a producer-interior, dirty-range or physical-cost certificate." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969", + "2540", + "early record", + "output-bank retention", + "complete native decoder", + "2965", + "producer defect", + "dirty-helper range", + "F17 consumer" + ] + }, + "scope_status": "changed", + "actual_scope": "Isolated whole-bank Clifford rank-distance/Bruhat lemma; complete finite q2/q3 physical two-site cleanup words with native massstock+4; bounded post76 isolated-class continuation. Add four exact fixed-word common-frame ADD-graph stock lower bounds for arbitrary general Clifford frame retiming, finite q2/q3 and all positive f; no universal kernel/caller optimum.", + "scope_change_reason": "Explicit donor-assigned coherent continuation of PR4074. This is not a solution to the broad original QQ16 catalogue card.", + "bottleneck_link": "Original-input inverse support versus actual paid prefix and continuation cuts, with explicit equal-volume/full-scan normalization and retained outer-transfer source binding.", + "budget_minutes": 240, + "stop_rule": "No all-q caller, global two-site optimum, favorable supplier, physical owner/controller/precision/tape admission or new kappa is inferred.", + "outcome": "completed", + "evidence": "README.md, REPLAY-MAP.md, exact source freezes, admitted words and independent transport/native proof. Exact crossed path certificates and separate independent field-by-field graph/strand admission.", + "author": "Ross Richardson", + "ai_assistance": "Substantial OpenAI Codex assistance across the original construction, separate mathematical checking contexts, and publication packaging. AI review is not independent human or formal-kernel acceptance.", + "open_questions": [ + { + "question": "Can a coupled correction or changed reader/owner boundary cross the remaining four native units with a complete paid bill?", + "why_it_matters": "The finite actual callers remain stock+4 and the isolated continuation census leaves coupled corrections outside its domain.", + "first_step": "Name one complete changed word and output contract; verify every original field, native phase/recipe, cleanup and full scan/owner/volume invoice before comparing moments.", + "blocked_by": "No favorable complete bill or physical outer admission is supplied." + } + ] +} diff --git a/research/two-site-caller-fusion/VERIFY.json b/research/two-site-caller-fusion/VERIFY.json new file mode 100644 index 0000000000..2b8afe17e1 --- /dev/null +++ b/research/two-site-caller-fusion/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Complete admitted physical q2/q3 words and serialized inverses, every used native recipe/phase/embedding, independent transport/gluing proof, bounded isolated census and source/transport/domain controls. Historical assertions stay active. Four full-stock fixed-word path certificates with complete author and independent graph/strand/phase admission; no proposer search." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 600, + "checks": "Complete admitted physical q2/q3 words and serialized inverses, every used native recipe/phase/embedding, independent transport/gluing proof, bounded isolated census and source/transport/domain controls. Historical assertions stay active. Four full-stock fixed-word path certificates with complete author and independent graph/strand/phase admission; no proposer search." + } + ] +} diff --git a/research/two-site-caller-fusion/original/caller-joint/joint_algebra.py b/research/two-site-caller-fusion/original/caller-joint/joint_algebra.py new file mode 100644 index 0000000000..e8f539eff8 --- /dev/null +++ b/research/two-site-caller-fusion/original/caller-joint/joint_algebra.py @@ -0,0 +1,113 @@ +"""Pinned exact all-f Gaussian X-character operator algebra. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from pathlib import Path +from fractions import Fraction as F +import hashlib,importlib.util,sys +sys.dont_write_bytecode=True +OLD=Path('/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z') +PINS={ + 'root-chronology/quadratic_charts.py':'de2a36f6a6b567360c90477b58da44e2f1b618fd006d058ab1ea04e983952c3f', + 'native-frames/native_model.py':'6397a86bd3d1461be182fcfa8602b0c70c489964a8c14f12436ba2506e11d9e3', + 'native-frames/even_parity_source.py':'961f136e4bc1b5da930bdd4ba9bbb594892b9e27f7ab44749d747d4fe16b4cb3', + 'caller/nested_prefix.py':'9ec10cb0243c0c829475ad7290f4953cdff27cb0f90f70b687c4bbee98af676b', + 'caller/nested_family.py':'88f425d12baf8a4f849cccd24605f21680eb8ce8d199054db4b4e7734eca72b6', +} +def need(c,m): + if not c:raise ValueError(m) +for p,h in PINS.items():need(hashlib.sha256((OLD/p).read_bytes()).hexdigest()==h,'frozen source pin '+p) +spec=importlib.util.spec_from_file_location('joint_pinned_quadratic',OLD/'root-chronology/quadratic_charts.py') +qc=importlib.util.module_from_spec(spec);sys.modules[spec.name]=qc;spec.loader.exec_module(qc) +sys.path.insert(0,str(OLD/'caller'));sys.path.insert(0,str(OLD/'native-frames')) +from nested_prefix import skeleton +from nested_family import retraction +from native_model import Model,ce,mul,same +from even_parity_source import kernels + +ZERO=(F(0),)*8;ONE=(F(1),F(0))*4 +def rotate(v,c,g): + out=[] + for r in range(4): + a,b=v[2*r:2*r+2];out.extend(((a,b),(-b,a),(-a,-b),(b,-a))[(c*r+g)%4]) + return tuple(out) +def cproduct(a,b): + return tuple(z for r in range(4)for z in(a[2*r]*b[2*r]-a[2*r+1]*b[2*r+1],a[2*r]*b[2*r+1]+a[2*r+1]*b[2*r])) +def normalize(g,v): + return qc.Mono(g.rows,g.offset,g.alpha,g.quad),rotate(v,g.constant,g.global_phase) +def mono(g,c=1): + k,v=normalize(g,tuple(F(c)*x for x in ONE));return{k:v}if any(v)else{} +def add(a,b): + out=dict(a) + for k,v in b.items(): + w=tuple(x+y for x,y in zip(out.get(k,ZERO),v)) + if any(w):out[k]=w + else:out.pop(k,None) + return out +def scale(a,c):return{k:tuple(F(c)*x for x in v)for k,v in a.items()}if c else{} +def product(a,b): + out={} + for g,x in a.items(): + for h,y in b.items(): + k,v=normalize(g@h,cproduct(x,y));out=add(out,{k:v}) + return out +def adjoint(a): + out={} + for g,v in a.items(): + k,w=normalize(g.inv(),tuple(x if i%2==0 else-x for i,x in enumerate(v)));out=add(out,{k:w}) + return out +def summ(items): + out={} + for item in items:out=add(out,item) + return out +def eye(n,m): + I=mono(qc.identity(m));return[[dict(I)if i==j else{}for j in range(n)]for i in range(n)] +def mm(A,B): + n=len(A);return[[summ(product(A[i][k],B[k][j])for k in range(n)if A[i][k]and B[k][j])for j in range(n)]for i in range(n)] +def serial(e):return[{'x_monomial':g.data(),'coefficients_by_f_mod4':[[str(v[2*r]),str(v[2*r+1])]for r in range(4)]}for g,v in sorted(e.items(),key=lambda x:str(x[0]))] +def sm(M):return[[serial(e)for e in row]for row in M] +def n_pair(m,i): + return qc.old_operator({'operator':{'native_blocks':[i],'block_permutation':list(range(m//2)),'sign':1}},m) +def plane_swap(m,i,j): + rows=[1<>i)&1)<=2,'at least two public pairs') + n,k,m=2*q+2,2*q+1,4*q+4 + W=Word(n,m);N=n_pair(m,0);J=j_operator(m);stage=0 + def query(bank,s,inverse=False,label=''): + f=prefix(m,s);g=f@J@f.inv() + if inverse:g=g.inv() + need(qc.rank(g.polar())==2,'source J query has native rank2 per coordinate') + W.unary(bank,g,label,True,{'kind':'J','completed':s,'inverse':inverse}) + def source_swap(bank,s,label):W.unary(bank,plane_swap(m,0,s),label) + def progress(src,s,dst=None): + for bank in range(n): + if bank!=src:W.unary(bank,n_pair(m,s),f'query{s} target fresh'if bank==dst else f'query{s} idle fresh',True,{'kind':'N','plane':s,'inverse':False}) + for r in range(2,q+1):W.add(2*r+1,3,1,'raw c basis') + query(1,0,label='shared initial J exposure');W.add(2,1,1,'shared initial J fanout');query(1,0,True,'shared initial J inverse') + _,ops=skeleton(q,[1]+[0]*(q-1)) + for typ,d,s,z in ops: + if typ=='a': + if z[1]:need(stage==0 and d==2 and s==1 and z[1]==1,'only initial J-valued bridge is shared') + else:W.add(d,s,z[0],'initial nested scalar bridge') + elif typ=='s':W.swap(d,s,'initial nested permutation') + else: + stage+=1;u=retraction(q,stage) + if stage==4: + for bank,(aa,bb)in enumerate(u): + if bank!=s:W.add(bank,s,-aa,'query4 scalar entrance') + break + for bank,(aa,bb)in enumerate(u): + if bank!=s:W.add(bank,s,-aa,f'query{stage} scalar entrance') + query(s,stage-1,label=f'query{stage} source J') + for bank,(aa,bb)in enumerate(u): + if bank!=s:W.add(bank,s,-bb,f'query{stage} source pre-delivery fanout') + W.add(d,s,1,f'query{stage} delivery') + source_swap(s,stage,f'query{stage} source swap');progress(s,stage,d) + if stage==3: + for bank,(aa,bb)in enumerate(u): + if bank!=s:W.add(bank,s,-bb,'query3 source pre-continuation fanout') + query(s,stage,label='query3 retained source continuation') + for bank,(aa,bb)in enumerate(u): + if bank!=s:W.add(bank,s,aa,f'query{stage} scalar exit') + if not omit_raw_a_restore: + for r in range(3,q+1):W.add(0,2*r,-1,'restore independent raw a') + W.add(3,0,-1,'held source subtract raw a') + for r in range(2,q+1):W.add(3,2*r,-1,'held source subtract future raw b') + for r in range(2,q+1): + e,o,b,c=2*r,2*r+1,2*r,2*r+1 + query(1,e-1,label=f'query{e} source J');W.add(1,3,-1,'even isolate c difference');W.swap(1,3,'even source handoff') + source_swap(1,e,f'query{e} source swap');progress(1,e,3);W.swap(3,c,'move completed c difference') + query(b,o-1,label=f'query{o} source J') + for ell in range(r+1,q+1):W.add(2*ell+1,b,1,'odd future-c first fanout') + W.add(3,b,1,'odd delivery');W.swap(b,3,'odd source handoff') + W.add(2,b,-1,'odd b accumulator') + for ell in range(r+1,q+1):W.add(2*ell+1,b,-1,'odd future-c second fanout') + source_swap(b,o,f'query{o} source swap');progress(b,o,3) + if r>i)&1)<=2,f>=1', + 'rank_checks': rank_checks, + 'actual_row_support_checks': row_checks, + 'all_f_phase_checks': phase_checks, + 'support_tariff': 'For the complete bank-by-address linear tail, let r_j be each native query actual arity and S the number of binary bank-ADD primitives. Then sum_j r_j+S >= (2q+4)f. Monomial ADDRESS/bank routing, nonzero Gaussian pointwise scales and phases have row branching1; each ADD has branching<=2; a rank-r native Fourier child with monomial adapters has branching2^r. Arbitrary cancellations and extra dirty/restored banks cannot increase the upper bound.', + 'bounded_word_corollary': 'If sum r_j=R*f and S=o(f), then R>=2q+4 asymptotically. In particular R<2q cannot provide positive native deficit in such a tail. This is an explicit model premise, not an assertion that bounded-in-f scans are a repository default.', + 'growing_scan_requirement': 'If R<2q, S >= (2q+4-R)f >4f. A paid O(f) full/partial scan construction is not excluded by this combinatorial gate. Its outer-transfer allowance belongs to the root source-bound scan audit.', + 'extra_dirty_banks': 'Any number of independent additional dirty banks may be used and restored exactly. The full required inverse is unique on all inputs, so its original-V/current-bank coefficient remains C_tV. Initial/final zero private cells do not improve the maximum-row-support induction either.', + 'limits': ['The full actual all-q physical prefix and source-bound H/L binding are owned by the caller lane and are not inferred from the homogeneous factory formulas alone.', + 'A changed initial core, right input chart/target operator, coupled owner endpoint, nonlinear computation or scan alphabet outside the stated row-branching model is not covered.', + 'Any operator-valued ADD with multiple monomial terms must expose those primitive ADDs or charge its actual row branching; it is not a free scalar ADD.', + 'No kappa, all-size supplier, owner allocation, precision or fixed-tape claim is made.'], + 'no_new_kappa': True, + } + + +if __name__ == '__main__': + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--write', action='store_true') + args = ap.parse_args() + out = json.loads(json.dumps(run())) + path = HERE / 'JOINT-COEFFICIENT-GATE.json' + if args.write: + path.write_text(json.dumps(out, indent=2, sort_keys=True) + '\n') + else: + need(json.loads(path.read_text()) == out, 'saved joint coefficient gate differs') + print(out['status']) + print('native arity (2q+4)f; exact support tariff sum(r_j)+S >= (2q+4)f') diff --git a/research/two-site-caller-fusion/original/native-frames/native_model.py b/research/two-site-caller-fusion/original/native-frames/native_model.py new file mode 100644 index 0000000000..03925dd36e --- /dev/null +++ b/research/two-site-caller-fusion/original/native-frames/native_model.py @@ -0,0 +1,67 @@ +"""Pinned Gaussian Clifford model for common2/fresh2 native bridges. +Apache-2.0; substantial OpenAI Codex assistance. Frozen imports are read only. +""" +from pathlib import Path +import hashlib,importlib.util,sys +sys.dont_write_bytecode=True +BASE=Path('/Users/ross/git/math') +PIN='20ecf2891d80b5acf18d980b2164fb44ea7faa90' +CE_PATH=BASE/'integer-mult-bounds/research/kernel92-frame-composition/vendor/pr531/vendor/clifford/clifford_exact.py' +CE_SHA='2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962' +BOUND_PATH=BASE/'.research-automation/runs/kappa-changed-endpoints-20261019T0153Z/stabilizer-escape/full_stabilizer_bound.py' +BOUND_SHA='f073a00ad4831616e873eb110fd33ad7226010a7c2f6cfa6a6b63167bf58ef75' +def need(ok,why): + if not ok:raise ValueError(why) +def load(name,path,sha): + need(hashlib.sha256(path.read_bytes()).hexdigest()==sha,'source pin '+str(path)) + spec=importlib.util.spec_from_file_location(name,path);mod=importlib.util.module_from_spec(spec);sys.modules[name]=mod;spec.loader.exec_module(mod);return mod +ce=load('native_frames_pinned_clifford',CE_PATH,CE_SHA) +b=load('native_frames_frozen_independent',BOUND_PATH,BOUND_SHA) +def mul(*ops):return b.standard_product(ce,*ops) +def same(a,c,why,phase=True): + need(a.tab==c.tab,why+' signed tableau') + if phase:need(b.sparse_column(a)==b.sparse_column(c),why+' actual Gaussian phase') +def phase(n,p):return ce.Op(n,ce.identity(n),[('phase',p%4)]) +def symplectic_defect_rank(op): + return b.binary_rank(x^y for x,y in zip(b.binary_tableau(op),b.binary_tableau(ce.ident(op.n)))) +def pauli(n,x=0,z=0,p=0): + out=ce.diag(n,[0]*n,[2*((z>>j)&1)for j in range(n)]) + return mul(phase(n,p),ce.xgate(n,x),out) +def conjugated_pauli(op,x=0,z=0,p=0): + triple=ce.apply(op.tab,(x,z,p));return pauli(op.n,*triple),triple +class Model: + def __init__(self,f=1,stages=4): + need(f>=1 and stages>=1,'positive chunk/stages');self.f=f;self.stages=stages;self.n=(2+2*stages)*f;self.I=ce.ident(self.n) + self.N=self.Npair(0,1);self.U=self.Hp(0);self.V=mul(self.N,self.U.adjoint()) + self.P=[self.swap_pair(s+1)for s in range(stages)];self.T=[self.Npair(2+2*s,3+2*s)for s in range(stages)] + self.Q=ce.xgate(self.n,1) + def Hp(self,chunk): + out=self.I + for j in range(self.f): + bit=chunk*self.f+j;alpha=[0]*self.n;alpha[bit]=2 + out=mul(ce.diag(self.n,[0]*self.n,alpha),ce.cgate(self.n,1<=4,'pqqp uses4 stages');gs=[self.I,self.I];controls=[];F=self.I + for s,(kind,W) in enumerate(zip('FGFG',[self.U,self.V,self.V,self.U])): + required=self.phi(gs[1])if kind=='F'else mul(W,self.N.adjoint(),gs[1],self.N,W.adjoint()) + L=mul(required,gs[0].adjoint());controls.append(L);gs[0]=required + if kind=='F':gs=[gs[0],mul(W,self.P[s],gs[1],W.adjoint())] + else:gs=[mul(W.adjoint(),gs[0],W),mul(self.P[s],gs[1])] + F=mul(self.T[s],F) + return gs,controls diff --git a/research/two-site-caller-fusion/original/two-site-continuation/two_site.py b/research/two-site-caller-fusion/original/two-site-continuation/two_site.py new file mode 100644 index 0000000000..74def93c3a --- /dev/null +++ b/research/two-site-caller-fusion/original/two-site-continuation/two_site.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +"""Two-site exact Clifford equation screen on immutable event-only input. +Apache-2.0; substantial OpenAI Codex assistance. No heuristic lower bound. +""" +from pathlib import Path +from collections import Counter +import argparse,hashlib,json,sys,time +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +ENGINE=HERE.parent/'caller-joint/joint_algebra.py' +need_engine='5782033e347c9b10ad47c01ed12a0a52ea07e901fa9e8f7aa9d3a2a928327232' +if hashlib.sha256(ENGINE.read_bytes()).hexdigest()!=need_engine:raise ValueError('frozen exact engine pin') +sys.path.insert(0,str(ENGINE.parent)) +from joint_algebra import * + +def inverse(E,m): + out=[] + for event in reversed(E): + e=dict(event) + if e['kind']=='ADD':e['coefficient']=str(-F(e['coefficient'])) + elif e['kind']=='SCALE':e['coefficient']=str(1/F(e['coefficient'])) + elif e['kind']!='BANK_SWAP':e['x_monomial']=qc.decode(e,m).inv().data() + out.append(e) + return out + +def pullback(C,e,m): + C=[[dict(x)for x in row]for row in C];kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);C[d]=[add(x,scale(y,-c))for x,y in zip(C[d],C[s])] + for row in C:row[s]=add(row[s],scale(row[d],c)) + elif kind=='BANK_SWAP': + i,j=e['banks'];C[i],C[j]=C[j],C[i] + for row in C:row[i],row[j]=row[j],row[i] + elif kind=='SCALE': + b,c=e['bank'],F(e['coefficient']);C[b]=[scale(x,1/c)for x in C[b]] + for row in C:row[b]=scale(row[b],c) + else: + b=e['bank'];G,Gi=mono(qc.decode(e,m)),mono(qc.decode(e,m).inv());C[b]=[product(Gi,x)for x in C[b]] + for row in C:row[b]=product(row[b],G) + return C + +def invertible_ray(E):return len(E)==1 and all(v[2*r]or v[2*r+1]for v in E.values()for r in range(4)) +def ray_inverse(E): + need(invertible_ray(E),'invert only a nonzero single Clifford ray') + v=next(iter(E.values()));norm=[v[2*r]**2+v[2*r+1]**2 for r in range(4)] + return{g:tuple(x/norm[i//2]for i,x in enumerate(w))for g,w in adjoint(E).items()} +def unitary_clifford(E): + if len(E)!=1:return False + v=next(iter(E.values())) + return all((v[2*r],v[2*r+1])in((F(1),F(0)),(F(-1),F(0)),(F(0),F(1)),(F(0),F(-1)))for r in range(4)) + +def pair_columns(P,i,j,n,m): + """A=V e_b, B=e_b^T V^-1, V=E_j...E_(i+1).""" + I=mono(qc.identity(m));b=P[i]['bank'];A=[dict(I)if r==b else{}for r in range(n)];B=[dict(x)for x in A] + for e in P[i+1:j+1]: + kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);A[d]=add(A[d],scale(A[s],c));B[s]=add(B[s],scale(B[d],-c)) + elif kind=='BANK_SWAP': + d,s=e['banks'];A[d],A[s]=A[s],A[d];B[d],B[s]=B[s],B[d] + elif kind=='SCALE': + d,c=e['bank'],F(e['coefficient']);A[d]=scale(A[d],c);B[d]=scale(B[d],1/c) + else: + d=e['bank'];g=qc.decode(e,m);A[d]=product(mono(g),A[d]);B[d]=product(B[d],mono(g.inv())) + need(summ(product(B[r],A[r])for r in range(n))==I,'paired transported row/column BA=I') + return A,B + +def solve(C,A,B,bank,I): + equation=None + for r in range(len(C)): + if r==bank:continue + for c in range(len(C)): + if invertible_ray(A[r])and invertible_ray(B[c]): + rhs=add(add(C[r][c],scale(I[r][c],-1)),product(A[r],B[c])) + X=product(ray_inverse(A[r]),product(rhs,ray_inverse(B[c]))) + equation=(r,c) + if not unitary_clifford(X):return None,'unique-nonunit-or-nonclifford',equation + # Every off-later-bank coefficient is checked, not only the source equation. + XmI=add(X,scale(I[0][0],-1)) + for rr in range(len(C)): + if rr==bank:continue + for cc in range(len(C)): + if add(I[rr][cc],product(A[rr],product(XmI,B[cc])))!=C[rr][cc]:return None,'off-bank-defect',equation + # C Z^-1 must be one literal unitary diagonal bank factor. + CA=[summ(product(C[rr][cc],A[cc])for cc in range(len(C)))for rr in range(len(C))] + XimI=add(adjoint(X),scale(I[0][0],-1));D=[[add(C[rr][cc],product(CA[rr],product(XimI,B[cc])))for cc in range(len(C))]for rr in range(len(C))] + if any(D[rr][cc]!=I[rr][cc]for rr in range(len(C))for cc in range(len(C))if(rr,cc)!=(bank,bank)):return None,'second-bank-defect',equation + if not unitary_clifford(D[bank][bank]):return None,'second-nonunit-or-nonclifford',equation + return(X,D[bank][bank]),'accepted',equation + if any(A[r]for r in range(len(A))if r!=bank):return None,'unresolved-no-invertible-ray-equation',None + if any(C[r][c]!=I[r][c]for r in range(len(C))if r!=bank for c in range(len(C))):return None,'row-confined-effect-cannot-fit',None + return None,'unresolved-row-confined-factorization',None + +def event_replacement(e,R): + g,v=next(iter(R.items()));rank=qc.rank(g.polar());d={k:x for k,x in e.items()if k in('bank','label')} + d.update(kind='NATIVE'if rank else'ADDRESS_OR_UNIT',x_monomial=g.data(),rank_per_f=rank, + scalar_phase_by_f_mod4=[[str(v[2*r]),str(v[2*r+1])]for r in range(4)],label='two-site replacement of '+e['label']) + # The decoder can only carry a global/tensor affine phase. Non-affine fmod4 + # phases are retained explicitly and replayed by the matrix verifier below. + return d + +def replay_replaced(P,T,i,j,Ri,Rj,n,m): + W=eye(n,m) + for at,e in enumerate(P+T): + if at in(i,j): + R=Ri if at==i else Rj;b=e['bank'];W[b]=[product(R,x)for x in W[b]] + else: + k=e['kind'] + if k=='ADD':W[e['dst']]=[add(x,scale(y,F(e['coefficient'])))for x,y in zip(W[e['dst']],W[e['src']])] + elif k=='BANK_SWAP':a,b=e['banks'];W[a],W[b]=W[b],W[a] + elif k=='SCALE':W[e['bank']]=[scale(x,F(e['coefficient']))for x in W[e['bank']]] + else:b=e['bank'];G=mono(qc.decode(e,m));W[b]=[product(G,x)for x in W[b]] + return W + +def screen(f,max_seconds=1200): + start=time.monotonic();q,n,m=f['q'],f['banks'],f['ambient_arity'];P,T=f['prefix_events'],f['tail_events'];I=eye(n,m) + target=qc.replay(P+T,n,m);oldT=qc.replay(T,n,m) + need(sum(e.get('rank_per_f',0)for e in P+T if e['kind']=='NATIVE')==f['source_complete_mass'],'frozen actual event native bill') + sites=[i for i,e in enumerate(P)if e['kind']not in('ADD','SCALE','BANK_SWAP')];tailsites=[i for i,e in enumerate(T)if e['kind']=='NATIVE'];pairs={} + for jj,j in enumerate(sites): + for i in sites[:jj]:pairs[i,j]=pair_columns(P,i,j,n,m) + counts=Counter();accepted=[];improving=[];done=[];timed_out=False;best=f['source_complete_mass'] + for mask in range(1,1<>r&1};newT=[e for at,e in enumerate(T)if at not in removed] + C=mm(qc.replay(inverse(newT,m),n,m),oldT);cuts={} + for at in range(len(P)-1,-1,-1): + if at in sites:cuts[at]=C + C=pullback(C,P[at],m) + removed_mass=sum(T[r]['rank_per_f']for r in removed) + for (i,j),(A,B)in pairs.items(): + result,status,equation=solve(cuts[j],A,B,P[j]['bank'],I);counts[status]+=1 + if result: + X,Y=result;Ri=product(X,mono(qc.decode(P[i],m)));Rj=product(Y,mono(qc.decode(P[j],m))) + need(unitary_clifford(Ri)and unitary_clifford(Rj),'both replacements actual unitary Clifford families') + ri,rj=qc.rank(next(iter(Ri)).polar()),qc.rank(next(iter(Rj)).polar());mass=f['source_complete_mass']-removed_mass-P[i].get('rank_per_f',0)-P[j].get('rank_per_f',0)+ri+rj + witness={'tail_mask':mask,'removed_tail_sites':sorted(removed),'removed_tail_labels':[T[r]['label']for r in sorted(removed)],'sites':[i,j],'banks':[P[i]['bank'],P[j]['bank']], + 'labels':[P[i]['label'],P[j]['label']],'equation':list(equation),'old_ranks':[P[i].get('rank_per_f',0),P[j].get('rank_per_f',0)],'new_ranks':[ri,rj], + 'complete_mass':mass,'stock':f['stock'],'replacement_operators':[serial(Ri),serial(Rj)],'rank_only':True,'selected_native_lowering':False} + if mass<=best: + need(replay_replaced(P,newT,i,j,Ri,Rj,n,m)==target,'candidate complete arbitrary-input physical word every coefficient') + witness['all_original_columns_verified']=n + accepted.append(witness) + if massmax_seconds:timed_out=True;break + if timed_out:break + done.append(mask);print('q',q,'finished mask',mask,'/',(1<>i)&1)<=3 and i%2 else Z]for i in range(n)] + for s,(M,src,dst)in enumerate(pre,1): + B=mm(M,V);w,r=coordinates(q,s) + F.need([add(mul(row[0],w[0]),mul(row[1],w[1]))for row in B]==retraction(q,s), + 'displayed normalized source column lies in the transported fixed plane') + F.need(tuple(B[src])==r,'displayed source functional on both pivot coordinates') + + +def cocycle(): + # Columns(z,A,c,d,b) are independent fields. Po and Pe do not commute. + ZR=[F.I,F.Z,F.Z,F.Z,F.Z];AR=[F.Z,F.I,F.Z,F.Z,F.Z] + CR=[F.Z,F.Z,F.I,F.Z,F.Z];DR=[F.Z,F.Z,F.Z,F.I,F.Z];BR=[F.Z,F.Z,F.Z,F.Z,F.I] + def plus(*rows):return[F.summ(row[j]for row in rows)for j in range(5)] + def left(a,row):return[F.mul(a,x)for x in row] + Po,Pe=F.mono((1,)),F.mono((2,)) + y=plus(left(F.N,ZR),left(F.neg(F.I),AR),left(F.N,CR)) + fodd=plus(left(F.neg(F.I),AR),left(F.N,CR)) + zodd=plus(left(F.mul(Po,F.N),ZR),left(F.add(Po,F.N),fodd)) + even_source=plus(zodd,left(F.N,AR),DR) + F.need(even_source==plus(left(Po,y),DR,left(F.neg(F.I),CR)), + 'next source is the old source through one ADDRESS plus the raw c difference') + feven=plus(left(F.N,AR),DR) + zeven=plus(left(F.mul(F.N,Pe),zodd),left(F.add(F.mul(F.N,Pe),F.neg(F.I)),feven)) + ynext=plus(left(F.N,zeven),left(F.N,DR),left(F.neg(F.I),AR),BR) + rhs=plus(left(F.neg(F.mul(Pe,Po)),y),BR,left(Pe,CR),left(F.neg(Pe),DR)) + F.need(ynext==rhs,'middle two-call affine ADDRESS cocycle on every independent public/pivot column') + return {'source_y':'y_r=N z-A_r+N c_r, A_r=a+sum_(l>r)b_l; c1 means zero public reader', + 'next_even_source':'P_o y_r+c_(r+1)-c_r', + 'next_y':'-P_e P_o y_r+b_(r+1)+P_e(c_r-c_(r+1))', + 'independent_columns':['z','A_r','c_r','c_(r+1)','b_(r+1)'], + 'covered_domain':'Arbitrary independent invertible noncommuting Po,Pe; N^2=-I; literal affine operator identity.', + 'not_native_admission':'The virtual coordinate is a literal source at the odd cut. Holding its chart through the even cut still requires an explicit invertible bank encoder, all public readers at actual frames, and restoration of the other independent dirty field.'} + + +def prove(): + for q in range(1,9):prefix_coordinates(q) + fixtures=[formal(q)for q in(1,2,3,4)] + from nested_six import formal_word + M,Mi,_,_,_=formal_word() + F.need(fixtures[1]['complete_matrix']==F.sm(M)and fixtures[1]['complete_inverse']==F.sm(Mi), + 'q2 direct family agrees exactly with independently compiled NESTED-SIX') + return {'status':'PASS_EXPLICIT_NESTED_SOURCE_FAMILY_AND_ONE_COORDINATE_AFFINE_COCYCLE', + 'scientific_pin':'20ecf2891d80b5acf18d980b2164fb44ea7faa90','fixtures':fixtures,'affine_cocycle':cocycle(), + 'all_parameter_proof':'The ideal nested response skeleton gives N on every field after its output isolation. Its two transported pivot columns obey the displayed source-functional/retraction table. Conjugated source-code insertions therefore act by 2x2 updates I+w(Ptilde-I)r. The first two updates multiply to J(P2,Q1); all middle updates are on only the second coordinate and telescope to Ad_(N^-1)(A3), A3=(-1)^(q-1)P_(2q+1)...P3; the last two updates give the first diagonal factor. Left multiplication by the ideal final N yields H=diag(-P_last P_penult,A3 N)J. No source code or public coupling is discarded.', + 'initial_basis':'At raw ZERO, c_r+=c1 for r>=2. One common N/N^-1 exposure fanouts b1+=N*t only. The inverse c-basis is applied after the last query; its other public rows are retained.', + 'finite_checks':'Every free-operator matrix column and both inverse orders for q1..4. Exact transported-plane/source-functional table for q1..8. q2 entire matrix agrees with NESTED-SIX.', + 'native_invoice':'With the current literal compiler c=2q-1 retained N continuations, two shared input N calls and all separate fresh progress: H2=(2q+2)(2q+3)+2q+1, m=4q+8, n=2q+2, D_before_tail=2. Wide batching changes moment pressure, not this mass. No amortized query removal is asserted.', + 'limits':['H has a bounded five-factory form, but the complete L readers and their native cuts remain part of the contract.', + 'The affine ADDRESS cocycle is an algebraic grouping target, not an implemented shared-native controller.', + 'The finite checks and written all-parameter recurrence are not a formal-kernel proof.'], + 'source_pins':[{'path':str(HERE/p),'sha256':hashlib.sha256((HERE/p).read_bytes()).hexdigest()} + for p in('nested_prefix.py','nested_six.py','NESTED-SIX.json','free_ops.py')], + 'no_new_kappa':True} + + +def main(): + ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--write',action='store_true');args=ap.parse_args() + out=prove();out['producer_sha256']=hashlib.sha256(Path(__file__).read_bytes()).hexdigest();path=HERE/'NESTED-FAMILY.json' + out=json.loads(json.dumps(out)) + if args.write:path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:F.need(json.loads(path.read_text())==out,'saved nested-family receipt differs') + print(out['status']) + + +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/caller/nested_prefix.py b/research/two-site-caller-fusion/source/caller/nested_prefix.py new file mode 100644 index 0000000000..d7e424e224 --- /dev/null +++ b/research/two-site-caller-fusion/source/caller/nested_prefix.py @@ -0,0 +1,113 @@ +"""Exact ideal prefixes for nested three-response replacements. + +This is a construction helper, not a native admission or a receipt. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from fractions import Fraction as F +from itertools import combinations +from pivot_plane_probe import Z, I, N, add, neg, mul, inv, eye, mm, es, null, summ + + +def skeleton(q, betas=None): + n = 2*q+2 + out = [] + def a(d,s,c=I): out.append(('a',d,s,c)) + def query(d,s,depth): + if depth == 0: + out.append(('q',d,s,N)) + return + b,c = 2*depth, 2*depth+1 + a(c,d,neg(I));a(s,b) + query(d,s,depth-1) + a(s,b,neg(I));a(d,c) + out.append(('q',b,d,N)) + a(d,c,neg(I)) + out.append(('q',c,b,N)) + a(b,s);a(c,d);a(d,c,neg(I)) + out.append(('s',b,c,I)) + # All independent incoming b fields use the same paid input exposure. + betas=[F(1)]*q if betas is None else list(map(F,betas)) + for j in range(1,q+1):a(2*j,1,(F(0),betas[j-1])) + query(1,0,q) + out.append(('q',0,1,N));out.append(('q',1,0,N)) + out.append(('s',0,1,I)) + for j in range(1,q+1):a(2*j,1,(F(0),-betas[j-1])) + return n,out + + +def prefixes(q,betas=None): + n,ops=skeleton(q,betas) + M=eye(n);out=[] + for typ,d,s,c in ops: + if typ=='s': + M=[list(row) for row in M] + M[d],M[s]=M[s],M[d] + else: + M=mm(es(n,d,s,c),M) + if typ=='q':out.append((M,s,d)) + target=[[N if i==j else Z for j in range(n)]for i in range(n)] + if M!=target:raise ValueError('nested ideal skeleton not full N') + return ops,out + + +def rref_null(A): + return null(A) + + +def source_choice(B,src,prefer_real=True): + """Choose E-column coefficients with source1, minimizing N-row support. + + B has two E-columns. The search is only the finitely many possible + active constraints of its at-most-two-dimensional affine solution. + """ + n=len(B) + # c_j=a_j+N*b_j. Source normalization is exact (real1,N0). + realrows=[];imagrows=[] + for row in B: + realrows.append([z for x in row for z in (x[0],-x[1])]) + imagrows.append([z for x in row for z in (x[1],x[0])]) + def solve(A,b): + m=len(A);k=4;A=[list(row)+[rhs]for row,rhs in zip(A,b)];r=0;p=[] + for j in range(k): + h=next((h for h in range(r,m)if A[h][j]),None) + if h is None:continue + A[r],A[h]=A[h],A[r];v=A[r][j];A[r]=[x/v for x in A[r]] + for h in range(m): + if h!=r and A[h][j]: + v=A[h][j];A[h]=[x-v*y for x,y in zip(A[h],A[r])] + p.append(j);r+=1 + if any(not any(row[:k]) and row[k]for row in A):return None + x=[F(0)]*k + for h,j in enumerate(p):x[j]=A[h][k] + return x + candidates=[] + # Two normalization constraints leave at most two independent choices. + for count in range(3): + for chosen in combinations(range(n),count): + A=[realrows[src],imagrows[src]]+[imagrows[i]for i in chosen] + x=solve(A,[F(1),F(0)]+[F(0)]*count) + if x is None:continue + u=[summ(mul(z,(x[2*j],x[2*j+1]))for j,z in enumerate(row))for row in B] + if u[src]!=I:raise ValueError('source normalization') + key=(sum(z[1]!=0 for z in u),sum(z!=Z for z in u),sum(abs(z[0])+abs(z[1])for z in u)) + candidates.append((key,u,x)) + if not candidates:return None + return min(candidates,key=lambda t:t[0]) + + +def probe(q,c_weights=None,betas=None): + n=2*q+2;ops,pre=prefixes(q,betas) + weights=[1]*q if c_weights is None else c_weights + V=[[I if i==1 else Z, (F(weights[(i-3)//2]),F(0))if i>=3 and i%2 else Z]for i in range(n)] + rows=[] + for M,src,dst in pre: + answer=source_choice(mm(M,V),src) + rows.append((src,dst,answer)) + return rows + + +if __name__=='__main__': + for q in(1,2,3): + print('q',q) + for src,dst,res in probe(q): + print(src,'->',dst, None if res is None else (res[0],res[1])) diff --git a/research/two-site-caller-fusion/source/caller/pivot_plane_probe.py b/research/two-site-caller-fusion/source/caller/pivot_plane_probe.py new file mode 100644 index 0000000000..fd793eba19 --- /dev/null +++ b/research/two-site-caller-fusion/source/caller/pivot_plane_probe.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python3 +"""Bounded n4 source-retraction screen; actual code/native closure not inferred.""" +from fractions import Fraction as F +from itertools import product +from pathlib import Path +import json, sys +sys.dont_write_bytecode=True +Z=(F(0),F(0));I=(F(1),F(0));N=(F(0),F(1)) +def add(a,b):return(a[0]+b[0],a[1]+b[1]) +def neg(a):return(-a[0],-a[1]) +def mul(a,b):return(a[0]*b[0]-a[1]*b[1],a[0]*b[1]+a[1]*b[0]) +def inv(a): + d=a[0]*a[0]+a[1]*a[1] + if not d:raise ValueError('nonunit') + return(a[0]/d,-a[1]/d) +def eye(n):return [[I if i==j else Z for j in range(n)] for i in range(n)] +def mm(A,B):return [[summ(mul(x,y) for x,y in zip(r,c)) for c in zip(*B)] for r in A] +def summ(xs): + a=Z + for b in xs:a=add(a,b) + return a +def es(n,d,s,c): + A=eye(n);A[d][s]=c;return A +def null(A): + A=[list(r) for r in A];m=len(A);n=len(A[0]);p=[];r=0 + for c in range(n): + k=next((k for k in range(r,m) if A[k][c]),None) + if k is None:continue + A[r],A[k]=A[k],A[r];v=A[r][c];A[r]=[x/v for x in A[r]] + for j in range(m): + if j!=r and A[j][c]: + v=A[j][c];A[j]=[x-v*y for x,y in zip(A[j],A[r])] + p.append(c);r+=1 + if r==m:break + out=[] + for c in range(n): + if c in p:continue + v=[F(0)]*n;v[c]=F(1) + for j,d in enumerate(p):v[d]=-A[j][c] + out.append(v) + return out + +def rank(A): + A=[list(r) for r in A];m=len(A);n=len(A[0]);r=0 + for c in range(n): + k=next((k for k in range(r,m) if A[k][c]!=Z),None) + if k is None:continue + A[r],A[k]=A[k],A[r];v=inv(A[r][c]);A[r]=[mul(x,v) for x in A[r]] + for j in range(m): + if j!=r and A[j][c]!=Z: + v=A[j][c];A[j]=[add(x,neg(mul(v,y))) for x,y in zip(A[j],A[r])] + r+=1 + if r==m:break + return r + +def prefixes(n=4): + ops=[('q',0,1,N),('a',0,2,I),('q',1,0,N),('a',0,2,neg(I)),('a',1,3,I),('q',2,1,N),('a',1,3,neg(I)),('q',3,2,N),('a',1,3,I),('a',2,0,I),('q',0,3,neg(N)),('a',2,0,neg(I))] + M=eye(n);Mi=eye(n);out=[] + for typ,d,s,c in ops: + M=mm(es(n,d,s,c),M);Mi=mm(Mi,es(n,d,s,neg(c))) + if typ=='q':out.append((M,Mi,s,d)) + return out + +def real_source(B,src): + ns=null([[z for x in r for z in (x[1],x[0])] for r in B]) + for v in ns: + u=[summ(mul(x,(v[2*j],v[2*j+1])) for j,x in enumerate(r)) for r in B] + if any(x[1] for x in u):raise ValueError('nonreal null witness') + if u[src][0]:return [x[0]/u[src][0] for x in u] + return None + +def serial(A):return [[[str(x),str(y)] for x,y in r] for r in A] +def run(): + pre=prefixes();found=[];count=0;dimension_fail=0 + for tail1 in product((-1,0,1),repeat=3): + u1=list(map(F,tail1));u1.insert(pre[0][2],F(1)) + v1=mm(pre[0][1],[[(x,F(0))] for x in u1]) + for tail2 in product((-1,0,1),repeat=3): + count+=1;u2=list(map(F,tail2));u2.insert(pre[1][2],F(1)) + v2=mm(pre[1][1],[[(x,F(0))] for x in u2]) + V=[[v1[i][0],v2[i][0]] for i in range(4)] + if rank(V)!=2:dimension_fail+=1;continue + choices=[] + for M,Mi,src,dst in pre: + u=real_source(mm(M,V),src) + if u is None:break + choices.append([str(x) for x in u]) + else:found.append({'first_source':list(map(str,u1)),'second_source':list(map(str,u2)),'input_plane':serial(V),'source_retractions':choices}) + return {'status':'BOUNDED_EXACT_SOURCE_RETRACTION_SCREEN','candidate_pairs':count,'source_tail_alphabet':[-1,0,1],'dimension_failures':dimension_fail,'solutions':found,'scope':'Old n4 five-shear ideal topology only; arbitrary real source-retraction columns allowed at later queries. Source-code algebra, native encoder and actual correction are not inferred.','native_invoice_if_admitted':'Same five raw carriers plus full global fresh progress; constant bank GL source changes only. Any N-dependent initial plane encoder and terminal correction remain paid/open.'} +if __name__=='__main__': + out=run();Path(__file__).with_name('PIVOT-PLANE-PROBE.json').write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(out['status'],out['candidate_pairs'],'pairs',len(out['solutions']),'solutions') + if out['solutions']:print(json.dumps(out['solutions'][0])) diff --git a/research/two-site-caller-fusion/source/completed-gates-review/MANIFEST.json b/research/two-site-caller-fusion/source/completed-gates-review/MANIFEST.json new file mode 100644 index 0000000000..20c54d169b --- /dev/null +++ b/research/two-site-caller-fusion/source/completed-gates-review/MANIFEST.json @@ -0,0 +1,64 @@ +{ + "files": [ + { + "bytes": 15060, + "path": "AUDIT.json", + "sha256": "a2f98dc08085c0fb66e50ce4fb96fba271d4089a8308fca182b0c1668046ad3a" + }, + { + "bytes": 3428, + "path": "HANDOFF.md", + "sha256": "69a8db3dd0c7ece9329e52622deb589b0ad8344b29099f90de5ecd282c49e118" + }, + { + "bytes": 2271466, + "path": "PAIRING-AUDIT.json", + "sha256": "e40ad925d1cf4e46bf28f176d74de6d393bddf6d82300757e88734b6e2944912" + }, + { + "bytes": 10929, + "path": "REVIEW.md", + "sha256": "c034f3fda71e440978c3a589da95f1f37cb95b44bf996c5295f179e6ed2fefe1" + }, + { + "bytes": 19701, + "path": "SOURCE-PINS.json", + "sha256": "3ae658408161bb6c79c81e153c1172e935156d94551c479cd9ccf03ac53d889a" + }, + { + "bytes": 5908, + "path": "SOURCE-REPLAYS.json", + "sha256": "35a37b41cc4ca0199523389453d04130a52705756819f40002e85031421a3591" + }, + { + "bytes": 996, + "path": "VALIDATION.json", + "sha256": "5ab4351bf0840bddeae085a9322a518af9cf21fee375f564480c449e704cafca" + }, + { + "bytes": 17680, + "path": "audit_gates.py", + "sha256": "051ba51e02e9f143b8a8bea0b91d69e7e1e32edf0f98d2d40db290f02043d460" + }, + { + "bytes": 9267, + "path": "pairing_audit.py", + "sha256": "f567f9239431d60c915d6bf8ca23c9e74f932a1b08ddb7980a82ba1a855c21dc" + }, + { + "bytes": 2572, + "path": "replay_sources.py", + "sha256": "a9a5d147b97afca170c49ad71a7cbc061853d0aff7ec5db5a61b7288f56b72aa" + }, + { + "bytes": 943, + "path": "validate_review.py", + "sha256": "8e9eb49b74d9241de8bdaf81c446cdec5da28a6d18f938ef723f3316e0a7b021" + } + ], + "no_new_kappa": true, + "scientific_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "scope": "Independent completed-gate review: fixed-two-site conditional all-q skew implication; finite-q general-frame trajectory and crossed stock certificates; cubic whole-field quadratic trace gate.", + "source_count": 74, + "source_pin_file": "SOURCE-PINS.json" +} diff --git a/research/two-site-caller-fusion/source/completed-gates-review/PAIRING-AUDIT.json.gz b/research/two-site-caller-fusion/source/completed-gates-review/PAIRING-AUDIT.json.gz new file mode 100644 index 0000000000..8aa19498b4 Binary files /dev/null and b/research/two-site-caller-fusion/source/completed-gates-review/PAIRING-AUDIT.json.gz differ diff --git a/research/two-site-caller-fusion/source/completed-gates-review/REVIEW.md b/research/two-site-caller-fusion/source/completed-gates-review/REVIEW.md new file mode 100644 index 0000000000..7019089399 --- /dev/null +++ b/research/two-site-caller-fusion/source/completed-gates-review/REVIEW.md @@ -0,0 +1,205 @@ +# Independent review of the completed kernel and trajectory gates + +No correctness defect was found in the covered mathematical statements. There +is one notation clarification: every product written `B_(2q)...B_4` in the +kernel proof means the **even-index product** + + B_(2q) B_(2q-2) ... B_4. + +Inserting the odd B factors would make the telescope false already at q=3. +The frozen producer implements the even-index product correctly. This review +does not modify the source package or any earlier independent audit. + +The two primary sources are +`../general-clifford-retiming/kernel-search/PROOF.md` and +`../pauli-caller-retiming/TRAJECTORY-PROOF.md`. The contiguous scalar-gadget +derivative and the separately requested cubic-response trace gate were also +reviewed. Exact source hashes are in `SOURCE-PINS.json`. + +## Fixed two-site skew-kernel implication + +Write `E_q=B_(2q) B_(2q-2)...B_4`. The source's recurrence has the exact +telescoping identity + + F_(2q)^-1 T_q = E_q F_3^-1. + +For its induction step use `P_(2r) N_(2r)=N_0 P_(2r)`, the commutation of +J with N_s for s>=2, and `Jbar=N_1 J N_1^-1`. The odd fresh inverse from +`F_(2r)^-1` cancels the explicit `N_(2r-1)` in the transport; it does not +produce an additional odd B factor. The base is `T_2=P_4 Jbar`. + +The deleted correction is `C=F_(2q) Du^-1 F_(2q)^-1`, where +`Du=E_q B_3 J`. Therefore + + L=C T_q P_3 + =F_(2q) J^-1 B_3^-1 F_3^-1 P_3 + =-N_(2q) N_(2q-1) ... N_3. + +The last equality retains the whole-field sign from `J^-2=-I` and +`N_3^2=-I`. Thus `ell=nu(L)=4q-4`. Also `R=T_q^-1 P_(2q)` has rank rho, +and the transport product gives `rho <= (q-1)b+2(q-2)`. For a physical +monomial first replacement U, the required second replacement +`V=L U^-1 R` has rank at least `ell-rho` (and in fact at least +`abs(ell-rho)`). This uses no right input gauge. + +The Q relation is phase sensitive: + + Q=J^-1 P_1 N_0^-1 J^2=J P_1 N_0^-1, + (N_1 Q^-1 N_1^-1)(N_1 J)=N_1 N_0 P_1. + +Consequently `w+v>=4`, while `v<=min(2+a,2+b,4)`. The baseline N bill is +`2[k(n-1)+1]+2(q-1)=8q^2+10q+2`. The other ranks are two uncompleted J, +three completed Jbar per repeated block, one Q inverse, and the later +replacement. Its complete rank bill satisfies + + M=8q^2+10q+2+2a+3qb+w+s, + D=n(4q+v)-M + <=(2q+3)v-(4q+6)-2a-(2q+1)b <= 0. + +For v>=2, substitute `a,b>=v-2`; the resulting expression is exactly zero. +For v<=2 it is at most `(2q+3)(v-2)`. There is no even-rank premise. The +saved odd rank-one skew kernel is a valid equality case. The rank-zero +address-swap example whose completed conjugate has rank four also confirms +why the `3qb` charge cannot be replaced by `3qa`. + +This is a written all-q implication of the specified scalar topology, +event inventory and isolated-transport recurrence. The repeating-block +source-to-event/controller binding remains a hypothesis beyond q=2,3; +the review does not turn it into an unconditionally serialized all-q caller. +The exact event fixtures at q=2,3 are independently bound to all original +columns, both literal inverse orders, the complete transported column and +inverse row, and the local replacement including Gaussian tensor phases. +The finite q=2..8 operator grid is corroboration of the written identities, +not the proof of their all-q domain. + +This rank bill is unweighted. Turning it into a supplier moment requires +the stated equal-volume full-bank child normalization and a compatible +recursive target. Rank alone does not price ADDRESS/scalar scans, source +access, rounding, owners or tape. New selected native recipes for the +failed kernel candidates are not admitted by this review. + +## Fixed-graph trajectory theorem + +For equal-dimensional subspaces let `d(U,V)=mf-dim(U intersection V)`. +The intersection dimension inequality proves its triangle inequality; +invertible linear maps act isometrically. Thus an edge operator G and +endpoint Lagrangians L_u,L_v have tariff + + d(L_v,G L_u)=native_rank(T_v^-1 G T_u) + +when `L_x=T_x Z`. Permitting arbitrary Lagrangians at ADD nodes is a +relaxation of the literal requirement that both operands have the same +actual frame representative. For a path, pulling each node frame back by +the chronological partial holonomy makes the sum telescope by triangle +inequality to `d(Z,G_path Z)`. Partitioning every edge once into +boundary-to-boundary paths then gives the sum of these holonomy ranks as +a lower bound, without counting an edge twice or interpreting a path as an +independent value/caller-matrix coefficient. + +The literal input/output boundaries are fixed at Z. The statement is valid +for general Clifford frame gauges on all mf coordinates, including gauges +that mix tensor coordinates. Tensor structure is used only to lift the +fixed source holonomy ranks by a factor f, not to restrict the allowed +retiming frames. Global Gaussian phases do not affect the subspace metric, +but the complete literal circuits and their tensor-phase corrections are +retained and independently checked. + +The eight original straight-pairing source words have independently checked edge-disjoint exhaustive +partitions and physical-label traversals. Pauli DEFAULT and ISOLATED have +sharp floors 60 (q=2) and 112 (q=3), equal to their source rank bills and +endpoint stocks. Repaired SIMPLIFIED and admitted two-site have only the +weaker floors 62 and 118; these are not optimality certificates for those +words. The separate crossed-pairing witnesses below strengthen precisely +these weaker floors. No all-q extrapolation is made from these finite fixtures. + +The scalar SWAP gadget `x+=y; y-=x; x+=y; y*=-1` is an exact all-input +transposition. Crossing strands at its first ADD and keeping the remaining +pairings straight preserves an inherited holonomy partition when expanding +a literal SWAP. Identity segments inserted by the gadget remain edges and +are counted. The final sign SCALE is a paid scalar scan. Reversing this +operation for an existing gadget is conditional on its internal routing +inducing the required crossing; no invariant for arbitrary scalar rewrites +is claimed. The source replay expands all 72 actual SWAPs separately and +checks one identity insertion per fixture. It is a same-engine replay, +distinct from this review's independent edge/operator traversal. + +This theorem fixes the source unary holonomies, common-frame ADD graph and +literal owner/input/output boundary. A changed response, nonlocal scalar +rewrite across native sites, new dirty helpers/interactions, changed right +input chart or owner contract needs a new certificate. The metric controls +rank mass, not the concave positive-exponent moment or native lowering. + +## Stronger finite crossed-pairing witnesses + +The subsequently frozen `../trajectory-pairing-search/` witnesses are also +independently admitted. The four unchanged source words now have floors: + +| Family | q | Paths | Rank of every holonomy per f | Floor | Source mass | +| --- | ---: | ---: | ---: | ---: | ---: | +| Repaired SIMPLIFIED | 2 | 6 | 12 | 72 | 80 | +| Repaired SIMPLIFIED | 3 | 8 | 16 | 128 | 136 | +| Admitted two-site | 2 | 6 | 12 | 72 | 76 | +| Admitted two-site | 3 | 8 | 16 | 128 | 132 | + +`pairing_audit.py` rebuilds every graph edge from literal source events and +checks it is identical to the predecessor straight graph. It decodes each +saved crossing mask against the actual chronological ADD ordinals, constructs +new exhaustive edge-disjoint paths, and compares their operators with a +separate direct crossed-strand traversal. It binds the author's final saved +certificate field by field: source/event hashes, paths, literal circuits, +signed tableaux, all-f phases, ordered source-unary ordinals and literal +inverse circuits with inverse phase vectors. Every path has full ambient +B-rank. Toggling one actual routing bit fails the saved holonomy witness; +the original edge-omission and f=2 phase mutants are separately rejected. + +Thus arbitrary Clifford-frame retiming of each listed fixed graph has rank +mass at least stock for every positive f, even if its frames mix tensor +coordinates. This supersedes 62/118 as the best retained lower bounds for +these graphs. It does **not** prove masses 76/132 or 80/136 optimal, nor does +it bound all equivalent scalar words, changed responses, helper couplings +or endpoint contracts. Since each path rank is at most the ambient rank, +these witnesses maximize the graph-pairing certificate objective; that is +distinct from minimizing the native invoice. No search is rerun in this +independent audit. The proposal counts are historical discovery records, +not proof coverage. No new native supplier recipe is needed for a lower +bound holonomy, which is not an executable child proposal. + +## Cubic quadratic-identity gate + +The separately requested cubic proof is valid over the stated Gaussian +rational domain. If a unitary Clifford U with entries in Q(i) satisfies +`U^2+U+I=0` on the entire bank, its primitive cubic-root multiplicities +must be equal because its trace lies in Q(i). Hence +`Tr(U)=-2^(M-1)` and `|Tr(U)|^2=2^(2M-2)`. + +On the fixed-label space `ker(S_U-I)`, the Pauli conjugation signs form a +character: the same Pauli multiplication phase appears on both sides and +cancels. Its sum is either zero or the size of that binary space. The +nonzero trace of Ad_U equals `|Tr(U)|^2`, so +`rank(S_U-I)=2`. Its B block is an off-diagonal submatrix, yielding +`native_rank(U)<=2`. This does not impose a support or tensor assumption. + +The proposed base J has exactly the source matrix, circuit phase, +`J^3=I`, and rank one. Independent exact entrywise tensor replay for f=1..4 +confirms that the quadratic relation fails from f=2 onward; at f=2 its +residual has trace six. Thus a response family with native rank proportional +to unbounded f cannot retain that two-power identity over Q(i). Three-power +callers, non-Clifford responses, restricted-input quotients or non-Gaussian +root-of-unity scalars are outside this conclusion. + +## Verification distinction + +`audit_gates.py` does not import the kernel proposal constructor or the +trajectory graph constructor. It independently compiles/traverses the saved +literal sources, uses a separate exact bank-column/inverse-row model, and +checks all four kernels at q=2,3 plus an algebraic rank grid q=2..8. +`replay_sources.py` separately re-executes the authors' read-only validator +functions (140 native-circuit inverse pairs, eight trajectory fixtures, +72 SWAP expansions, four cubic tensor fixtures, four crossed full-stock +pairing certificates). These are recorded as +same-engine replays, not independent algorithms. Normal and `-O` pass; +workspace modules execute exactly their hashed source bytes with historical +assertions active, ignoring bytecode caches. The controls reject an omitted +edge and an f=2-only wrong phase, preserve the odd-rank example, and detect +the completed/uncompleted rank distinction. All earlier audits and source +artifacts remain unchanged. No formal-kernel proof or new kappa is claimed. diff --git a/research/two-site-caller-fusion/source/completed-gates-review/audit_gates.py b/research/two-site-caller-fusion/source/completed-gates-review/audit_gates.py new file mode 100644 index 0000000000..273ac580b4 --- /dev/null +++ b/research/two-site-caller-fusion/source/completed-gates-review/audit_gates.py @@ -0,0 +1,236 @@ +#!/usr/bin/env python3 +"""Independent identity, invoice and strand audit of two completed gates. +Apache-2.0; substantial OpenAI Codex assistance. No new supplier claim. +""" +from pathlib import Path +from fractions import Fraction +from collections import Counter +import hashlib, importlib.machinery, json, sys, argparse, copy +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent; R=HERE.parent +EXECUTED={};original=importlib.machinery.SourceFileLoader.get_code +def source_only(self, name): + p=Path(self.path) + if str(p).startswith('/Users/ross/git/math/'): + raw=p.read_bytes();EXECUTED[str(p)]=hashlib.sha256(raw).hexdigest() + return compile(raw,str(p),'exec',dont_inherit=True,optimize=0) + return original(self,name) +importlib.machinery.SourceFileLoader.get_code=source_only +sys.path.insert(0,str(R/'two-site-independent-audit')) +import audit_two_sites as independent +sys.path.insert(0,str(R/'caller-joint')) +import joint_algebra as ja +ce,qc=independent.ce,ja.qc +K=R/'general-clifford-retiming/kernel-search'; T=R/'pauli-caller-retiming' +def need(c,s): + if not c:raise ValueError(s) +def sha(p):return hashlib.sha256(Path(p).read_bytes()).hexdigest() +def stable(x):return json.dumps(x,sort_keys=True,separators=(',',':')) +def rank(vs): + basis={} + for v in vs: + while v: + bit=v.bit_length()-1 + if bit in basis:v^=basis[bit] + else:basis[bit]=v;break + return len(basis) +def eq(a,b):return ja.mono(a)==ja.mono(b) +def native(g):return rank(g.polar()) +def scalar(m,p):return qc.Mono(qc.identity(m).rows,0,(0,)*m,(0,)*m,0,p) +def N(m,s): + a=[0]*m;a[2*s]=3;a[2*s+1]=1 + return qc.Mono(qc.identity(m).rows,3<<(2*s),tuple(a),(0,)*m,0,1) +def P(m,s): + rows=list(qc.identity(m).rows) + for d in (0,1):rows[d],rows[2*s+d]=rows[2*s+d],rows[d] + return qc.Mono(tuple(rows),0,(0,)*m,(0,)*m) +def F(m,s): + x=qc.identity(m) + for i in range(1,s+1):x=N(m,i)@x + return x +def embed(d,m):return qc.Mono(tuple(d['rows'])+tuple(1<=4 and v<=4 and a>=max(v-2,0) and b>=max(v-2,0),'coupled rank restrictions') + mass=8*q*q+10*q+2+2*a+3*q*b+w+abs(ell-rho);stock=(2*q+2)*(4*q+v) + upper=(2*q+3)*v-(4*q+6)-2*a-(2*q+1)*b + need(stock-mass<=upper<=0,'all-q inequality at exact finite witness') + rows.append(dict(kernel=name,q=q,a=a,b=b,v=v,w=w,rho=rho,ell=ell,mass=mass,stock=stock,deficit=stock-mass)) + if q<=3: + case=next(x for x in data['fixtures'] if x['kernel']==name and x['default']['q']==q) + df,cf=case['default'],case['isolated'];E=df['events'];n=df['banks'] + col,row=independent.transported(df['prefix_events'],*cf['sites'],n,m) + bank=df['prefix_events'][cf['sites'][1]]['bank'] + need(all(not x for i,x in enumerate(col) if i!=bank) and all(not x for i,x in enumerate(row) if i!=bank),'independent complete forward-column/inverse-row isolation') + need(col[bank]==oldexpr(transport),'independent all-f actual transported column') + need(row[bank]==oldexpr(transport.inv()),'independent all-f actual transported inverse row') + hist=Counter(e['rank_per_f'] for e in cf['events'] if e['kind']=='NATIVE') + need(sum(r*c for r,c in hist.items())==mass==cf['mass'],'independent retained histogram invoice') + for e in E: + if e['kind'] not in ('ADD','SCALE','BANK_SWAP'):independent.old.event_op(e,m) + M=independent.replay_old(E,n,m);Mi=independent.replay_old(E,n,m,inverse=True) + target=oldexpr(F(m,k)@J);need(M==[[target if i==j else{}for j in range(n)]for i in range(n)],'independent full default target every original column all-f') + need(independent.mm(M,Mi)==independent.identity(n,m)==independent.mm(Mi,M),'independent default literal inverse both orders') + need(oldexpr(L)==independent.old.serialized_family(cf['L']),'saved L full tensor phase') + need(oldexpr(RR)==independent.old.serialized_family(cf['R']),'saved R full tensor phase') + Lop,Lex=independent.to_op(oldexpr(L));Rop,Rex=independent.to_op(oldexpr(RR)) + U=independent.op_of(json.dumps(cf['first_monomial']['literal_circuit']),m);ue=cf['events'][cf['sites'][0]];ve=cf['events'][cf['sites'][1]] + need(independent.equal_op(U,independent.op_of(json.dumps(ue['one_coordinate_literal_circuit']),m)) and ue['extra_global_phase_exponent_by_f_mod4']==[0]*4,'first actual event equals declared physical monomial family') + V=independent.op_of(json.dumps(ve['one_coordinate_literal_circuit']),m) + need(rank(x for x,z,p in U.tab[m:])==0,'first replacement physical monomial') + need(independent.equal_op(V,independent.mul(Lop,U.adjoint(),Rop)),'independent local V=L U^-1 R Gaussian phase') + need(ve['extra_global_phase_exponent_by_f_mod4']==[(a+b)%4 for a,b in zip(Lex,Rex)],'local replacement all-f tensor phase') + need(len(cf['events'])==len(cf['inverse_events']),'complete changed inverse event coverage') + for ef,ei in zip(cf['events'],reversed(cf['inverse_events'])): + need(ef['kind']==ei['kind'],'changed inverse event kind/order') + if ef['kind']=='ADD':need((ef['dst'],ef['src'])==(ei['dst'],ei['src']) and Fraction(ef['coefficient'])==-Fraction(ei['coefficient']),'changed inverse ADD sign') + elif ef['kind']=='SCALE':need(ef['bank']==ei['bank'] and Fraction(ef['coefficient'])*Fraction(ei['coefficient'])==1,'changed inverse SCALE') + elif ef['kind']=='BANK_SWAP':need(ef['banks']==ei['banks'],'changed inverse bank swap') + else: + of=independent.op_of(json.dumps(ef['one_coordinate_literal_circuit']),m);oi=independent.op_of(json.dumps(ei['one_coordinate_literal_circuit']),m) + need(stable(of.adjoint().circuit)==stable(oi.circuit) and of.adjoint().tab==oi.tab,'changed literal inverse unary actual adjoint') + need(ei['extra_global_phase_exponent_by_f_mod4']==[(-p)%4 for p in ef['extra_global_phase_exponent_by_f_mod4']],'changed inverse tensor phase sign') + bindings.append(dict(kernel=name,q=q,actual_original_columns=n,default_full_target_all_f=True,literal_inverse_orders=2,isolated_bank=bank,L_rank=ell,R_rank=rho,mass=mass,stock=stock)) + # Formula controls are sensitive to all-f phase and completed-frame conjugacy. + need(not eq(L,scalar(m,1)@L),'wrong whole-field phase rejected') + addr=embed(cases['address_swap_rankzero_J'],12) + need(native(addr)==0 and native(N(12,1)@addr@N(12,1).inv())==4,'completed J bill cannot use uncompleted arity') + need(native(embed(cases['odd_rankone_involution'],12))==1,'odd native skew response retained') + return dict(finite_rank_identity_grid=rows,actual_q2_q3_transport_bindings=bindings,controls=['wrong whole-field phase differs','completed address kernel rank changes 0 to 4','odd native rank one retained'],all_q_scope='Written proof conditional on displayed repeating scalar/isolation transport and fixed two-site edits; no all-q serialized physical compiler or selected-new-native admission.') +def phase_family(op,extra): + out=independent.from_circuit(op,0) + units=independent.UNITS + return {k:tuple(c*units[extra[r]%4] for r,c in enumerate(v))for k,v in out.items()} +def trajectory_checks(cert=None): + if cert is None:cert=json.loads((T/'TRAJECTORY-CERTIFICATES.json').read_text()) + results=[] + for f in cert['fixtures']: + m,n=f['ambient_arity'],f['banks'];src=json.loads((T/f['source']['path']).read_text()) + need(sha(T/f['source']['path'])==f['source']['sha256'],'trajectory source pin') + sf=next(x for x in src['fixtures'] if x['q']==f['q']);events=sf.get('full_events',sf['events']) + labels=list(range(n));ops=[ce.ident(m) for _ in range(n)];phase=[(0,)*4 for _ in range(n)] + for e in events: + if e['kind']=='BANK_SWAP': + i,j=e['banks'];labels[i],labels[j]=labels[j],labels[i];ops[i],ops[j]=ops[j],ops[i];phase[i],phase[j]=phase[j],phase[i] + elif e['kind'] not in ('ADD','SCALE'): + op=independent.op_of(json.dumps(e['one_coordinate_literal_circuit']),m);b=e['bank'];ops[b]=ops[b].then(op) + extra=e.get('extra_global_phase_exponent_by_f_mod4',[(e.get('phase_exponent',0)*(1-r))%4 for r in range(4)]) + phase[b]=tuple((a+c)%4 for a,c in zip(phase[b],extra)) + edges=f['edges'];used=[];unaries=[];bound=0 + for path in f['trajectories']: + at=0;op=ce.ident(m);extra=(0,)*4 + for eid in path['edges']: + used.append(eid);ed=edges[eid];need(ed['id']==eid and ed['u']==at,'trajectory edge incidence');at=ed['v'] + seg=independent.op_of(json.dumps(ed['one_coordinate_literal_circuit']),m);op=op.then(seg) + need(seg.tab==tuple(tuple(t)for t in ed['one_coordinate_tableau']),'edge actual signed operator') + extra=tuple((a+b)%4 for a,b in zip(extra,ed['extra_global_phase_exponent_by_f_mod4'])) + unaries.extend(ed['source_event_ordinals']) + need(at==0,'path endpoint Z boundary') + bank=labels.index(path['initial_bank']);need(bank==path['final_bank'],'physical strand transport includes swaps') + need(op.tab==ops[bank].tab and stable(op.circuit)==stable(ops[bank].circuit) and extra==phase[bank], + 'independent exact all-f literal holonomy circuit and tensor phase traversal') + r=rank(x for x,z,p in op.tab[m:]);need(r==path['native_holonomy_arity_per_f'],'independent holonomy native rank') + Z=tuple(1<<(m+i) for i in range(m));GZ=tuple(x|(z<=0 and mask<(1<>bit&1} + a.need(sorted(crosses)==p['crossing_ADD_event_ordinals'],'mask and explicit crossing list agree') + at=[0]*n;owner=list(range(n));pending=[a.ce.ident(m)for _ in range(n)];extra=[(0,)*4 for _ in range(n)];ordinals=[[]for _ in range(n)] + paths=[[]for _ in range(n)];edges=[];node=1 + # Separate direct traversal has no graph nodes/edges. + direct_labels=list(range(n));direct_ops=[a.ce.ident(m)for _ in range(n)];direct_phase=[(0,)*4 for _ in range(n)] + def emit(b,dst): + i=len(edges);edges.append(dict(id=i,u=at[b],v=dst,bank=b,source_event_ordinals=ordinals[b],one_coordinate_literal_circuit=pending[b].circuit,one_coordinate_tableau=pending[b].tab,extra_global_phase_exponent_by_f_mod4=extra[b],rank_per_f=a.rank(x for x,z,p in pending[b].tab[m:]))) + paths[owner[b]].append(i);at[b]=dst;pending[b]=a.ce.ident(m);extra[b]=(0,)*4;ordinals[b]=[] + def swap_lists(i,j,lists): + for x in lists:x[i],x[j]=x[j],x[i] + for ordinal,e in enumerate(E): + if e['kind']=='ADD': + i,j=e['dst'],e['src'];emit(i,node);emit(j,node);node+=1 + if ordinal in crosses: + owner[i],owner[j]=owner[j],owner[i] + swap_lists(i,j,[direct_labels,direct_ops,direct_phase]) + elif e['kind']=='BANK_SWAP': + i,j=e['banks'];swap_lists(i,j,[at,owner,pending,extra,ordinals,direct_labels,direct_ops,direct_phase]) + elif e['kind']=='SCALE':pass + else: + b=e['bank'];op=a.independent.op_of(json.dumps(e['one_coordinate_literal_circuit']),m) + a.need(op.tab==tuple(tuple(x)for x in e['one_coordinate_tableau']),'pairing actual unary tableau') + a.need(a.rank(x for x,z,p in op.tab[m:])==e['rank_per_f'],'pairing actual unary B rank') + ex=e.get('extra_global_phase_exponent_by_f_mod4',[(e.get('phase_exponent',0)*(1-r))%4 for r in range(4)]) + pending[b]=pending[b].then(op);extra[b]=tuple((x+y)%4 for x,y in zip(extra[b],ex));ordinals[b]=ordinals[b]+[ordinal] + direct_ops[b]=direct_ops[b].then(op);direct_phase[b]=tuple((x+y)%4 for x,y in zip(direct_phase[b],ex)) + for b in range(n):emit(b,0) + old_family='REPAIRED-SIMPLIFIED'if name=='REPAIRED'else'ADMITTED-TWO-SITE' + old=next(x for x in json.loads((a.T/'TRAJECTORY-CERTIFICATES.json').read_text())['fixtures']if x['family']==old_family and x['q']==q) + a.need(a.stable(edges)==a.stable(old['edges']),'crossing leaves the exact source unary graph unchanged') + a.need(sorted(i for path in paths for i in path)==list(range(len(edges))),'crossed paths edge-disjoint and exhaustive') + holonomies=[] + for label,path in enumerate(paths): + vertex=0;op=a.ce.ident(m);ex=(0,)*4 + for i in path: + edge=edges[i];a.need(edge['u']==vertex,'crossed path consecutive vertices');vertex=edge['v'] + op=op.then(a.independent.op_of(json.dumps(edge['one_coordinate_literal_circuit']),m));ex=tuple((x+y)%4 for x,y in zip(ex,edge['extra_global_phase_exponent_by_f_mod4'])) + a.need(vertex==0,'crossed path fixed boundary') + bank=direct_labels.index(label) + a.need(a.stable(op.circuit)==a.stable(direct_ops[bank].circuit) and op.tab==direct_ops[bank].tab and ex==direct_phase[bank],'independent crossed strand operator and all-f phase traversal') + r=a.rank(x for x,z,p in op.tab[m:]);a.need(r==m,'each finite crossed holonomy has full ambient rank') + holonomies.append(dict(initial_label=label,final_bank=bank,path=path,rank_per_f=r,one_coordinate_tableau=op.tab,one_coordinate_literal_circuit=op.circuit,extra_global_phase_exponent_by_f_mod4=ex)) + floor=sum(h['rank_per_f']for h in holonomies);stock=n*fixture.get('parent_arity',m) + a.need(floor==stock==p['best_floor']==p['goal'],'new exact stock floor') + admitted_path=SOURCE/'FULL-STOCK-CERTIFICATES.json';admitted=json.loads(admitted_path.read_text()) + auth=next(x for x in admitted['fixtures']if x['family']==name and x['q']==q) + a.need(auth['pairing_mask_decimal']==str(mask) and a.stable(auth['edges'])==a.stable(edges),'author admitted witness equals independently rebuilt graph/mask') + a.need(auth['source_sha256']==a.sha(a.T/relative) and auth['source_events_sha256']==__import__('hashlib').sha256(a.stable(E).encode()).hexdigest(),'author admitted source/event pins') + for h,ah in zip(holonomies,auth['trajectories']): + for key,akey in [('initial_label','initial_bank'),('final_bank','final_bank'),('path','edges'),('rank_per_f','native_holonomy_arity_per_f'),('one_coordinate_tableau','one_coordinate_tableau'),('one_coordinate_literal_circuit','one_coordinate_literal_circuit'),('extra_global_phase_exponent_by_f_mod4','extra_global_phase_exponent_by_f_mod4')]: + a.need(a.stable(h[key])==a.stable(ah[akey]),'author admitted literal crossed holonomy field '+key) + op=a.independent.op_of(json.dumps(h['one_coordinate_literal_circuit']),m) + a.need(a.stable(op.adjoint().circuit)==a.stable(ah['literal_inverse_circuit']) and ah['inverse_extra_global_phase_exponent_by_f_mod4']==[(-x)%4 for x in h['extra_global_phase_exponent_by_f_mod4']],'author admitted literal inverse and all-f phase') + a.need(ah['source_unary_event_ordinals']==[ordinal for eid in h['path']for ordinal in edges[eid]['source_event_ordinals']],'ordered source unary chronology on each path') + # A changed pairing is a different proposed witness. It must not be accepted + # against the saved paths/circuits merely because a rank score might tie. + bad_crosses=crosses^{actual_adds[0]};bl=list(range(n));bo=[a.ce.ident(m)for _ in range(n)];bp=[(0,)*4 for _ in range(n)] + for ordinal,e in enumerate(E): + if e['kind']=='BANK_SWAP':swap_lists(*e['banks'],[bl,bo,bp]) + elif e['kind']=='ADD' and ordinal in bad_crosses:swap_lists(e['dst'],e['src'],[bl,bo,bp]) + elif e['kind'] not in ('ADD','SCALE'): + b=e['bank'];op=a.independent.op_of(json.dumps(e['one_coordinate_literal_circuit']),m);bo[b]=bo[b].then(op) + ex=e.get('extra_global_phase_exponent_by_f_mod4',[(e.get('phase_exponent',0)*(1-r))%4 for r in range(4)]) + bp[b]=tuple((x+y)%4 for x,y in zip(bp[b],ex)) + a.need(any(bl.index(h['initial_label'])!=h['final_bank'] or a.stable(bo[bl.index(h['initial_label'])].circuit)!=a.stable(h['one_coordinate_literal_circuit']) or list(bp[bl.index(h['initial_label'])])!=list(h['extra_global_phase_exponent_by_f_mod4'])for h in holonomies),'one-bit wrong routing rejected by actual saved holonomy witness') + return dict(family=name,q=q,banks=n,ambient_arity=m,stock=stock,floor=floor,source_mass=fixture.get('mass',fixture.get('native_mass')),mask=str(mask),crossing_ADD_event_ordinals=sorted(crosses),edges=edges,holonomies=holonomies,proposal_sha256=a.sha(proposal_path),admitted_certificate_sha256=a.sha(admitted_path),source_sha256=a.sha(a.T/relative),every_edge_once=True,exact_circuits_and_all_f_phases=True,wrong_routing_control=True,no_all_q_extrapolation=True) +def main(): + p=argparse.ArgumentParser();p.add_argument('--write',action='store_true');args=p.parse_args() + out=dict(status='PASS_INDEPENDENT_CROSSED_PAIRING_ADMISSION',fixtures=[check(name,q)for name in('REPAIRED','TWO-SITE')for q in(2,3)],no_new_kappa=True,model='Fixed source unary graph, every ADD common-frame node, fixed physical Z boundaries, all positive f and arbitrary Clifford frame gauges.',scope='Exact finite witnesses; source masses80/136 and76/132 not proved optimal. No search or same-function-word/global obstruction.') + out=json.loads(json.dumps(out));dest=HERE/'PAIRING-AUDIT.json' + if args.write:dest.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:a.need(json.loads(dest.read_text())==out,'saved independent pairing audit') + print(out['status']);print([(x['family'],x['q'],x['floor'])for x in out['fixtures']]) +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/fusion-audit/audit_fusions.py b/research/two-site-caller-fusion/source/fusion-audit/audit_fusions.py new file mode 100644 index 0000000000..660be04182 --- /dev/null +++ b/research/two-site-caller-fusion/source/fusion-audit/audit_fusions.py @@ -0,0 +1,291 @@ +#!/usr/bin/env python3 +"""Independent literal circuit and metadata audit of the folded fusions. +Apache-2.0; substantial OpenAI Codex assistance. No caller algebra import. +""" +from pathlib import Path +from fractions import Fraction +from functools import lru_cache +from collections import Counter +import argparse,hashlib,json,sys +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +FUSION=HERE.parent/'folded-fusion' +sys.path.insert(0,str(HERE.parent/'joint-native')) +from joint_coefficient_gate import Model,kernels,mul,phase,b,ce,need,PIN,left_gamma,f +from literal_inverse_binding import from_circuit,circuit_op,product,sumexpr,scale,serial,act,qval +from lifted_algebra import G + + +@lru_cache(None) +def definition(circuit,n): + return circuit_op(json.loads(circuit),n) + + +def event_op(e,n): + op=definition(json.dumps(e['one_coordinate_literal_circuit']),n) + need(op.tab==tuple(tuple(t)for t in e['one_coordinate_tableau']),'recompiled event signed tableau') + need(b.native_rank(op)==e['rank_per_f'],'event actual rank differs from metadata') + record={'x_monomial':e['x_monomial'],'coefficients_by_f_mod4':[['1','0']for _ in range(4)]} + need(serialized_family([record])==from_circuit(op,e['phase_exponent']), + 'event X-character metadata matches independent literal all-f phase') + return op + + +@lru_cache(None) +def family(circuit,n,exponent): + return from_circuit(definition(circuit,n),exponent) + + +def replay(E,n,m): + I=from_circuit(ce.ident(m),0) + M=[[dict(I)if i==j else{}for j in range(n)]for i in range(n)] + for e in E: + typ=e['kind'] + if typ=='ADD': + d,s=e['dst'],e['src'];M[d]=[sumexpr(x,scale(y,Fraction(e['coefficient'])))for x,y in zip(M[d],M[s])] + elif typ=='SCALE':M[e['bank']]=[scale(x,Fraction(e['coefficient']))for x in M[e['bank']]] + elif typ=='BANK_SWAP': + i,j=e['banks'];M[i],M[j]=M[j],M[i] + else: + event_op(e,m) + U=family(json.dumps(e['one_coordinate_literal_circuit']),m,e['phase_exponent']) + M[e['bank']]=[product(U,x)for x in M[e['bank']]] + return M + + +def compile_monomial(rec,n): + return circuit_op([('D',rec['quadratic_rows'],rec['linear_Z4']),('P',rec['matrix_rows']), + ('X',rec['offset']),('phase',rec['phase'])],n) + + +def compile_recipe(rec,n): + L=compile_monomial(rec['left'],n) + return L if not rec['rank'] else compile_monomial(rec['right'],n).then(ce.fourier(n,range(rec['rank']))).then(L) + + +def embedding(circuit,index,n): + d=len(index);need(len(set(index))==d and all(0<=x>i)&1)<=2,f>=1', + 'rank_checks': rank_checks, + 'actual_row_support_checks': row_checks, + 'all_f_phase_checks': phase_checks, + 'support_tariff': 'For the complete bank-by-address linear tail, let r_j be each native query actual arity and S the number of binary bank-ADD primitives. Then sum_j r_j+S >= (2q+4)f. Monomial ADDRESS/bank routing, nonzero Gaussian pointwise scales and phases have row branching1; each ADD has branching<=2; a rank-r native Fourier child with monomial adapters has branching2^r. Arbitrary cancellations and extra dirty/restored banks cannot increase the upper bound.', + 'bounded_word_corollary': 'If sum r_j=R*f and S=o(f), then R>=2q+4 asymptotically. In particular R<2q cannot provide positive native deficit in such a tail. This is an explicit model premise, not an assertion that bounded-in-f scans are a repository default.', + 'growing_scan_requirement': 'If R<2q, S >= (2q+4-R)f >4f. A paid O(f) full/partial scan construction is not excluded by this combinatorial gate. Its outer-transfer allowance belongs to the root source-bound scan audit.', + 'extra_dirty_banks': 'Any number of independent additional dirty banks may be used and restored exactly. The full required inverse is unique on all inputs, so its original-V/current-bank coefficient remains C_tV. Initial/final zero private cells do not improve the maximum-row-support induction either.', + 'limits': ['The full actual all-q physical prefix and source-bound H/L binding are owned by the caller lane and are not inferred from the homogeneous factory formulas alone.', + 'A changed initial core, right input chart/target operator, coupled owner endpoint, nonlinear computation or scan alphabet outside the stated row-branching model is not covered.', + 'Any operator-valued ADD with multiple monomial terms must expose those primitive ADDs or charge its actual row branching; it is not a free scalar ADD.', + 'No kappa, all-size supplier, owner allocation, precision or fixed-tape claim is made.'], + 'no_new_kappa': True, + } + + +if __name__ == '__main__': + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--write', action='store_true') + args = ap.parse_args() + out = json.loads(json.dumps(run())) + path = HERE / 'JOINT-COEFFICIENT-GATE.json' + if args.write: + path.write_text(json.dumps(out, indent=2, sort_keys=True) + '\n') + else: + need(json.loads(path.read_text()) == out, 'saved joint coefficient gate differs') + print(out['status']) + print('native arity (2q+4)f; exact support tariff sum(r_j)+S >= (2q+4)f') diff --git a/research/two-site-caller-fusion/source/joint-native/literal_inverse_binding.py b/research/two-site-caller-fusion/source/joint-native/literal_inverse_binding.py new file mode 100644 index 0000000000..f6af31acbc --- /dev/null +++ b/research/two-site-caller-fusion/source/joint-native/literal_inverse_binding.py @@ -0,0 +1,228 @@ +#!/usr/bin/env python3 +"""Independent literal-circuit audit of the original-t inverse coefficient. + +No caller X-character algebra is imported. Physical event circuits are +recompiled with the frozen Gaussian Clifford implementation, then their +X-character actions are derived directly gate by gate. Apache-2.0; +substantial OpenAI Codex assistance. No new kappa claim. +""" +from pathlib import Path +from fractions import Fraction +from functools import lru_cache +import argparse +import hashlib +import json +import sys +sys.dont_write_bytecode = True +from joint_coefficient_gate import NATIVE, PIN, operators +from native_model import ce, mul, need, phase, b +from lifted_algebra import G, ONE, ZERO, UNITS + +HERE = Path(__file__).resolve().parent +SOURCE = HERE.parent / 'caller-joint' +SOURCE_PINS = { + 'joint_algebra.py': '5782033e347c9b10ad47c01ed12a0a52ea07e901fa9e8f7aa9d3a2a928327232', + 'joint_prefix.py': 'a4dcaa1ad05ef8dbba60ddd47b3ad44a3095ebb5fd31f6adfb935a7b1c46a2c7', + 'JOINT-PREFIX.json': 'e6e574525a51299bae4fc876c02f0a767d7d927150b7a5fe0a814afd7ec93ebd', +} + + +def par(x): + return x.bit_count() & 1 + + +def mv(rows, x): + return sum(par(row & x) << j for j, row in enumerate(rows)) + + +def circuit_op(events, n): + out = ce.ident(n) + for event in events: + kind = event[0] + if kind == 'P': + gate = ce.perm(n, tuple(event[1])) + elif kind == 'D': + gate = ce.diag(n, tuple(event[1]), tuple(event[2])) + elif kind == 'C': + gate = ce.cgate(n, event[1], event[2]) + elif kind == 'X': + gate = ce.xgate(n, event[1]) + elif kind == 'phase': + gate = phase(n, event[1]) + else: + raise ValueError('uncovered physical primitive ' + kind) + out = out.then(gate) + return out + + +@lru_cache(None) +def pinv_transpose(rows): + return ce.transpose(ce.inv(rows, len(rows)), len(rows)) + + +def x_action(events, n, x): + """Literal action on physical X eigencharacters, including global units.""" + power = 0 + for event in events: + kind = event[0] + if kind == 'P': + x = mv(pinv_transpose(tuple(event[1])), x) + elif kind == 'C': + power += event[2] * par(event[1] & x) + elif kind == 'X': + power += 2 * par(event[1] & x) + elif kind == 'D': + need(not any(event[1]) and all(a % 2 == 0 for a in event[2]), + 'current source literal D is a Pauli; no Fourier-monomial assumption hidden') + x ^= sum(((a // 2) & 1) << j for j, a in enumerate(event[2])) + elif kind == 'phase': + power += event[1] + else: + raise ValueError(kind) + return x, power % 4 + + +def make_key(n, act, qfun): + offset, c = act(0), qfun(0) % 4 + columns = [act(1 << j) ^ offset for j in range(n)] + rows = tuple(sum(((columns[j] >> i) & 1) << j for j in range(n)) for i in range(n)) + alpha = tuple((qfun(1 << j) - c) % 4 for j in range(n)) + quad = [] + for i in range(n): + row = 0 + for j in range(i + 1, n): + v = (qfun((1 << i) | (1 << j)) - c - alpha[i] - alpha[j]) % 4 + need(v % 2 == 0, 'literal phase is a Gaussian quadratic') + row |= (v // 2) << j + quad.append(row) + return (rows, offset, alpha, tuple(quad)), c + + +def act(key, x): + return mv(key[0], x) ^ key[1] + + +def qval(key, x): + return (sum(a for i, a in enumerate(key[2]) if x >> i & 1) + + 2 * sum(par(row & x) for i, row in enumerate(key[3]) if x >> i & 1)) % 4 + + +def units(fn): + return tuple(UNITS[fn(r) % 4] for r in range(4)) + + +def sumexpr(a, c): + out = dict(a) + for k, v in c.items(): + w = tuple(x + y for x, y in zip(out.get(k, (ZERO,) * 4), v)) + if any(w): + out[k] = w + else: + out.pop(k, None) + return out + + +def scale(a, c): + return {k: tuple(x * G(Fraction(c)) for x in v) for k, v in a.items()} if c else {} + + +@lru_cache(None) +def key_product(a, c): + n = len(a[0]) + return make_key(n, lambda x: act(a, act(c, x)), lambda x: qval(c, x) + qval(a, act(c, x))) + + +def product(a, c): + out = {} + for ka, va in a.items(): + for kc, vc in c.items(): + k, constant = key_product(ka, kc) + value = tuple(x * y * u for x, y, u in zip(va, vc, units(lambda r: r * constant))) + out = sumexpr(out, {k: value}) + return out + + +def from_circuit(op, exponent): + key, c = make_key(op.n, lambda x: x_action(op.circuit, op.n, x)[0], + lambda x: x_action(op.circuit, op.n, x)[1]) + return {key: units(lambda r: exponent + (c - exponent) * r)} + + +def serial(a): + return [{'X_character_rows': list(k[0]), 'offset': k[1], 'alpha': list(k[2]), + 'quadratic_upper_rows': list(k[3]), + 'coefficients_by_f_mod4': [x.encode() for x in v]} + for k, v in sorted(a.items())] + + +def inverse_row(fixture, mutate=False): + q, n, m = fixture['q'], fixture['banks'], fixture['ambient_arity'] + identity = from_circuit(ce.ident(m), 0) + row = [{} for _ in range(n)] + row[1] = identity + hist = {} + for event in fixture['events']: + kind = event['kind'] + if kind == 'ADD': + d, s = event['dst'], event['src'] + row[s] = sumexpr(row[s], scale(row[d], -Fraction(event['coefficient']))) + elif kind == 'BANK_SWAP': + i, j = event['banks'] + row[i], row[j] = row[j], row[i] + else: + op = circuit_op(event['one_coordinate_literal_circuit'], m) + need(op.tab == tuple(tuple(x) for x in event['one_coordinate_tableau']), + 'independently recompiled physical event signed tableau') + rank = b.native_rank(op) + if kind == 'NATIVE': + need(rank == event['rank_per_f'], 'actual native event arity, not label') + hist[rank] = hist.get(rank, 0) + 1 + else: + need(rank == 0, 'free physical event is actually monomial') + exponent = -event['phase_exponent'] + value = from_circuit(op.adjoint(), exponent) + row[event['bank']] = product(row[event['bank']], value) + z, J, A, B1, B2, Q1, Dv, F, C, collapsed = operators(q, 1) + target = from_circuit(mul(F, J), 2 * q + 2 - int(mutate)) + actual = product(target, row[3]) + expected = from_circuit(C, 6 - 3 * q) + if mutate: + need(actual != expected, 'missing target-J f-dependent Gaussian unit rejected beyond f1') + else: + need(actual == expected and len(actual) == 1, + 'literal all-f inverse-row coefficient equals independent Clifford formula') + need(hist == {2: n * (2 * q + 1) + q + 2}, 'source/query/idle/continuation profile bound') + return {'q': q, 'independent_original_input_row': 1, 'current_carrier_column': 3, + 'physical_events': len(fixture['events']), 'native_histogram': hist, + 'original_column_binding_all_f': 'PASS' if not mutate else 'MUTANT_REJECTED', + 'actual_coefficient': serial(actual) if not mutate else None} + + +def run(): + for name, digest in SOURCE_PINS.items(): + need(hashlib.sha256((SOURCE / name).read_bytes()).hexdigest() == digest, 'caller source pin ' + name) + source = json.loads((SOURCE / 'JOINT-PREFIX.json').read_text()) + records = [inverse_row(x) for x in source['fixtures']] + inverse_row(source['fixtures'][0], True) + return {'status': 'PASS_INDEPENDENT_LITERAL_ORIGINAL_T_INVERSE_COEFFICIENT', + 'scientific_pin': PIN, 'producer_sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + 'source_pins': [{'path': str(SOURCE / n), 'sha256': h} for n, h in SOURCE_PINS.items()], + 'fixtures': records, + 'method': 'Derive X-character affine/quadratic action directly from each literal physical circuit; independently recompile every signed tableau; right-multiply the original-t inverse row by each forward primitive inverse. No caller joint_algebra/quadratic_charts module is imported.', + 'all_f_phase': 'Each physical one-coordinate circuit O with exponent e represents i^(e*(1-f))*O^tensor(f). Exact Gaussian coefficient vectors retain every f mod4 residue; native J units are not inferred from f1.', + 'negative_control': 'Omit only the target-J f-dependent tensor unit. This changes the actual desired output gauge and is rejected by the complete inverse coefficient although f1 alone cannot see it. Individual source-query2/query5 unit deletions were insensitive for this selected inverse entry and are not counted as rejected controls.', + 'scope': 'Independent source binding for the required inverse coefficient at q2/q3. Caller owns full physical all-column/inverse prefix; the separate written coefficient/support theorem covers every q satisfying its stated original-column interface.', + 'no_new_kappa': True} + + +if __name__ == '__main__': + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--write', action='store_true') + args = ap.parse_args() + out = json.loads(json.dumps(run())) + path = HERE / 'LITERAL-INVERSE-BINDING.json' + if args.write: + path.write_text(json.dumps(out, indent=2, sort_keys=True) + '\n') + else: + need(json.loads(path.read_text()) == out, 'saved independent physical coefficient binding differs') + print(out['status']) diff --git a/research/two-site-caller-fusion/source/native-frames/EVEN-PARITY-SOURCE.json b/research/two-site-caller-fusion/source/native-frames/EVEN-PARITY-SOURCE.json new file mode 100644 index 0000000000..2024887e51 --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/EVEN-PARITY-SOURCE.json @@ -0,0 +1,381 @@ +{ + "actual_checks": [ + { + "f": 1, + "full_endpoint_recipe_actual_phase_checked": true, + "kernel": "even_C", + "query_native_arity": 1, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 6 + }, + { + "f": 1, + "full_endpoint_recipe_actual_phase_checked": true, + "kernel": "quadratic_J", + "query_native_arity": 2, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 6 + }, + { + "f": 2, + "full_endpoint_recipe_actual_phase_checked": true, + "kernel": "even_C", + "query_native_arity": 2, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 12 + }, + { + "f": 2, + "full_endpoint_recipe_actual_phase_checked": true, + "kernel": "quadratic_J", + "query_native_arity": 4, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 12 + }, + { + "f": 3, + "full_endpoint_recipe_actual_phase_checked": false, + "kernel": "even_C", + "query_native_arity": 3, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 18 + }, + { + "f": 3, + "full_endpoint_recipe_actual_phase_checked": false, + "kernel": "quadratic_J", + "query_native_arity": 6, + "query_recipe_actual_phase": true, + "retained_source_native_arity": 18 + } + ], + "all_f_phase_and_recipe_proof": "C_even,f=C_even,1^tensor f. J_f=i^(1-f)J_1^tensor f. E_f=i^(L*(1-f))E_1^tensor f. Therefore each source endpoint K_f E_f=i^((L+exponentK)*(1-f)) (K_1 E_1)^tensor f. Tensor the saved actualonebitnativeandmonomialrecipes, with the displayedleftglobalunit. This proves full actual phases and endpoint adapters for everyf without f1 tableau extrapolation.", + "all_f_two_column_checks": [ + { + "all_f_input_columns": 2, + "kernel": "even_C", + "literal_inverse_orders": 2 + }, + { + "all_f_input_columns": 2, + "kernel": "quadratic_J", + "literal_inverse_orders": 2 + } + ], + "chronological_word": [ + "source=K source", + "target+=source" + ], + "complete_actual_matrix": "On entrance(E*x,E*y), output(K E*x,E*y+K E*x); bothoriginalfields arbitrary. Source remains an isolatedfullnativeoperatorK E on its ownx. No helperor cleanfield is used.", + "endpoint_gauge_obligation": "The fullendpointK E=L C_full R has explicitmonomialleft/rightgauges, bothpaidifused. It isnotexactE. A completecaller whoseindependentoutputsareK_i E may compose the appropriateinputrightgaugesandoutputleftgauges after proving allcolumns. The rightgaugecannotbe dropped at an intermediate mixedcut orassumedto preserve a desiredN response. A dirtyhelper owner mustpriceits actual entrance/terminalresidual; fullarityaloneisnotanownercontract.", + "even_only_limitation": "Every evenparityC_q commutes physicalZ_all andphysicalX_all. BinaryorthogonalA fixes1; itscorrectedtagz hasz.dot1=0 because itsphaseat1 equals1. Thus R_A=P_A Z_z also commutesbothglobalPaulis. Anybankword usingonlythoseevenqueriesandorthogonalcorrectedcontrollerscommutesdiag(Z_all), whereas afullnativeClifford with invertibleB cannotfix nonzeroZ_all. An odd/nativeanchor or a controlleroutside thatrestrictedcommutant is necessary. GeneralADDRESS adapters outside theorthogonalgroup are notcoveredbythisno-even-onlyclaim. IncomingE isexactlysuch analreadypaidanchor.", + "explicit_old_native_source_chart": "Let A be bitwise CNOT p0->p1 and q0->q1, and M_f=X_all_p0 Z_all_p0 P_A. Then J_f=M_f N0 M_f^-1 exactly. ADDRESSconjugation sends theoldnativeC directions to v,w; Z_p0 reverses the v parities with the mandatory i^f factor, and X_p0 supplies the remaining (-1)^f. Thus the phase is i^(f+1). M has oneaffineADDRESS plus onePauliZ scan; applying M^-1,N0,M exposes the sameJ nativequery with bothmonomialadapters paid. This is a source-frame change relative to the retainedincomingE, not a new abstract quadraticalgebra.", + "full_source_rank_proof": "The fullold E has binary symplecticA=D=I,B=I,C=0. A C_even query has B=Gamma=sum qk qkT. All selectedparities in each kernel are pairwiseorthogonal, so Gamma^2=0 and I+Gamma is invertible, inverseI+Gamma. A PauliZ leftfactor doesnotchangeB. Hence both C_even E andJ E have fullnativearity2Lf, for everyL>=2,f>=1. This is a rank/admission statement, not equality of the endpoint withE.", + "incoming_anchor": "The source already equals E*x for arbitrary x, E=product_i N_i fullnative on L>=2 oldplanes. This fullnative anchor is an incoming paid caller premise; no free preparation is claimed. The checked fixture has L=3.", + "limits": [ + "No currentpublicreaderN isreplacedbyJ orC_even withouta newall-columnidentity.", + "No stockor exponentgain isclaimed: thepaid incominganchor, sourceCOPY/readscans, endpointgauges, ownerbinding, precisionandphysicaltapecontract remainrequired.", + "The fullsourceendpointgauge fixturescoverL3; the writtenrankandphaseidentitiesholdallL>=2." + ], + "literal_inverse": [ + "target-=source", + "source=K^-1 source" + ], + "native_query_recipes": { + "even_C": { + "left": { + "linear_Z4": [ + 2, + 0, + 0, + 0, + 0, + 0 + ], + "matrix_rows": [ + 3, + 1, + 4, + 8, + 16, + 32 + ], + "offset": 0, + "phase": 0, + "quadratic_rows": [ + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "rank": 1, + "right": { + "linear_Z4": [ + 0, + 2, + 0, + 0, + 0, + 0 + ], + "matrix_rows": [ + 2, + 3, + 4, + 8, + 16, + 32 + ], + "offset": 1, + "phase": 1, + "quadratic_rows": [ + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + }, + "quadratic_J": { + "left": { + "linear_Z4": [ + 2, + 2, + 0, + 0, + 0, + 0 + ], + "matrix_rows": [ + 5, + 10, + 1, + 2, + 16, + 32 + ], + "offset": 0, + "phase": 0, + "quadratic_rows": [ + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + "rank": 2, + "right": { + "linear_Z4": [ + 2, + 2, + 2, + 2, + 0, + 0 + ], + "matrix_rows": [ + 4, + 8, + 5, + 10, + 16, + 32 + ], + "offset": 0, + "phase": 2, + "quadratic_rows": [ + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + } + }, + "no_new_kappa": true, + "producer_sha256": "961f136e4bc1b5da930bdd4ba9bbb594892b9e27f7ab44749d747d4fe16b4cb3", + "quadratic_kernel": "Let v_k=p0k+p1k,w_k=q0k+q1k, U=product_k C_v_k C_w_k, Z=Z_all_p0 Z_all_q0, and J_f=i^(f+1) Z U. For each anticommtingparity, Z C_v Z=i C_v^-1; hence ZUZ=i^(2f) U^-1 and J_f^2=i^(2f+2) i^(2f)=-I for everyf. The f-dependentGaussianunit is mandatory. This has exact nativearity2f and is a changed literalJ response, nottheold N0 response.", + "quadratic_query_invoice": { + "ADDRESS_scans_at_most": 2, + "Gaussian_quadratic_phase_scans_at_most": 2, + "H2": 1, + "delivery_ADD_scans": 1, + "native_monomial_adapters": 2, + "native_rank_mass": 2, + "ordinary_helpers": 0, + "private_fields": 0 + }, + "rankf_kernel": "C_even,f=product_k C_(p0k+q0k), with C_q=((1+i)I+(1-i)X_q)/2. Each parity vector has evenweight, and they are independent. Thus nativearityf. Its exact square is X_all_commonp+commonq, a paid ADDRESS translation, not a discarded residual.", + "rankf_query_invoice": { + "ADDRESS_scans_at_most": 2, + "Gaussian_quadratic_phase_scans_at_most": 2, + "H1": 1, + "delivery_ADD_scans": 1, + "native_monomial_adapters": 2, + "native_rank_mass": 1, + "ordinary_helpers": 0, + "private_fields": 0 + }, + "retained_full_endpoint_recipes_L3": { + "even_C": { + "left": { + "linear_Z4": [ + 3, + 3, + 2, + 2, + 2, + 2 + ], + "matrix_rows": [ + 2, + 1, + 4, + 8, + 16, + 32 + ], + "offset": 0, + "phase": 0, + "quadratic_rows": [ + 3, + 3, + 0, + 0, + 0, + 0 + ] + }, + "rank": 6, + "right": { + "linear_Z4": [ + 3, + 3, + 0, + 0, + 0, + 0 + ], + "matrix_rows": [ + 1, + 2, + 4, + 8, + 16, + 32 + ], + "offset": 22, + "phase": 3, + "quadratic_rows": [ + 3, + 3, + 0, + 0, + 0, + 0 + ] + } + }, + "quadratic_J": { + "left": { + "linear_Z4": [ + 3, + 3, + 3, + 3, + 2, + 2 + ], + "matrix_rows": [ + 4, + 8, + 1, + 2, + 16, + 32 + ], + "offset": 0, + "phase": 0, + "quadratic_rows": [ + 5, + 10, + 5, + 10, + 0, + 0 + ] + }, + "rank": 6, + "right": { + "linear_Z4": [ + 1, + 1, + 3, + 3, + 0, + 0 + ], + "matrix_rows": [ + 1, + 2, + 4, + 8, + 16, + 32 + ], + "offset": 22, + "phase": 3, + "quadratic_rows": [ + 5, + 10, + 5, + 10, + 0, + 0 + ] + } + } + }, + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "source_pins": [ + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/native_model.py", + "sha256": "6397a86bd3d1461be182fcfa8602b0c70c489964a8c14f12436ba2506e11d9e3" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/conjugated_reflection.py", + "sha256": "6b68a4a60b160fe28227c31909ed86bd7f80b1f3e07591032cd001dbeb242f6f" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-four-coordinate-20261019T0717Z/native-frames/lifted_algebra.py", + "sha256": "3b9a58a2048a762ab520ac7fdbb28cbfeb7b30345aaeb777d8dabdd9fb1034d9" + } + ], + "status": "PASS_ALL_F_EVEN_PARITY_AND_QUADRATIC_FULL_SOURCE_RESPONSES", + "wrong_constant_i_phase_controls": [ + { + "f": 1, + "wrong_constant_i_rejected": true, + "wrong_constant_i_square_i_exponent": 0 + }, + { + "f": 2, + "wrong_constant_i_rejected": false, + "wrong_constant_i_square_i_exponent": 2 + }, + { + "f": 3, + "wrong_constant_i_rejected": true, + "wrong_constant_i_square_i_exponent": 0 + } + ] +} diff --git a/research/two-site-caller-fusion/source/native-frames/conjugated_reflection.py b/research/two-site-caller-fusion/source/native-frames/conjugated_reflection.py new file mode 100644 index 0000000000..341df23adc --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/conjugated_reflection.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +"""One native child for the common conjugate of an unpaired ADDRESS reflection. +Apache-2.0; substantial OpenAI Codex assistance. This is a local resource. +""" +from pathlib import Path +import argparse +import hashlib +import json +from native_model import * +from orthogonal_source_normalizer import reflection +from lifted_algebra import Algebra + +HERE = Path(__file__).resolve().parent + + +def tensor_monomial(recipe, f): + """Lift every one-bit wire and phase bitwise, retaining its actual phase.""" + chunks = len(recipe['matrix_rows']) + n = chunks * f + def bitlift(mask, k): + return sum(1 << (chunk * f + k) for chunk in range(chunks) if (mask >> chunk) & 1) + rows = [bitlift(recipe['matrix_rows'][chunk], k) for chunk in range(chunks) for k in range(f)] + quadratic = [bitlift(recipe['quadratic_rows'][chunk], k) for chunk in range(chunks) for k in range(f)] + alpha = [recipe['linear_Z4'][chunk] for chunk in range(chunks) for k in range(f)] + offset = sum(bitlift(recipe['offset'], k) for k in range(f)) + return mul(phase(n, f * recipe['phase']), ce.xgate(n, offset), + ce.perm(n, rows), ce.diag(n, quadratic, alpha)) + + +def run(): + z1 = Model(1, 3) + R1, _ = reflection(z1, 3, (0, 1, 2, 4)) + base_native = [z1.N, z1.T[0], z1.T[1]] + onebit_conjugates = [mul(Ni, R1, Ni.adjoint()) for Ni in base_native] + recipes = [] + for A in onebit_conjugates: + rec, compiled = ce.lower_child(A) + need(rec['rank'] == 2, 'one-bit conjugate has native rank2') + same(compiled, A, 'actual selected-native one-bit lowering') + recipes.append(rec) + A1, recipe = onebit_conjugates[0], recipes[0] + checks = [] + for f in (1, 2, 3): + z = Model(f, 3) + R, _ = reflection(z, 3, (0, 1, 2, 4)) + for plane, (Ni, rec) in enumerate(zip([z.N, z.T[0], z.T[1]], recipes)): + A = mul(Ni, R, Ni.adjoint()) + left = tensor_monomial(rec['left'], f) + right = tensor_monomial(rec['right'], f) + literal = mul(left, ce.fourier(z.n, range(2 * f)), right) + same(literal, A, 'tensor-lifted native child actual phase') + same(mul(A, A), z.I, 'conjugated reflection literal involution') + need(b.native_rank(A) == 2 * f, 'conjugated reflection rank2f') + need(b.native_rank(left) == b.native_rank(right) == 0, 'literal adapters monomial') + checks.append({'f': f, 'conjugating_old_plane': plane, + 'native_arity': 2 * f, 'inverse': 'same A', + 'tensor_recipe_actual_Gaussian_phase': True}) + + # Independently retain both bank columns over the exact all-f tensor algebra. + a = Algebra(3) + R, A = a.lift(R1), a.lift(A1) + def shear(sign): + out = a.mat_identity(2) + out[0][1] = a.scale(a.one, sign) + return out + E, Ei = shear(1), shear(-1) + BR = a.mat_product(a.mat_product(E, a.diagonal(2, 1, R)), Ei) + conjugated = a.mat_product(a.mat_product(a.diagonal(2, 0, a.N), a.diagonal(2, 1, a.N)), BR) + conjugated = a.mat_product(conjugated, a.mat_product(a.diagonal(2, 0, a.adjoint(a.N)), a.diagonal(2, 1, a.adjoint(a.N)))) + expected = a.mat_product(a.mat_product(E, a.diagonal(2, 1, A)), Ei) + need(conjugated == expected, 'two independent bank-column conjugation identity') + need(a.mat_product(expected, expected) == a.mat_identity(2), 'literal bank word inverse') + return {'status': 'PASS_ALL_F_SINGLE_CHILD_CONJUGATED_UNPAIRED_REFLECTION', + 'scientific_pin': PIN, + 'producer_sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + 'reflection_source_sha256': hashlib.sha256((HERE/'orthogonal_source_normalizer.py').read_bytes()).hexdigest(), + 'native_model_sha256': hashlib.sha256((HERE/'native_model.py').read_bytes()).hexdigest(), + 'actual_operator': 'R=P_(I+vv^T), v=(1,1,1,0,1,0) on completed(p0,q0,p1,q1,p2,q2); A=N0 R N0^-1.', + 'all_f_tensor_identity': 'R_f is the bitwise tensor product of R_1. N_f=i^(1-f) N_1^tensor f after regrouping address coordinates. Its global unit cancels in conjugation, so A_f=A_1^tensor f literally, including phase. Tensoring the explicit one-bit monomial/native/monomial equality therefore gives A_f=L_f C_(2f) R_f_adapter. All three factors have fixed bitwise controllers; no f1 tableau-only inference is used.', + 'native_rank_proof': 'The binary B block of A_1 has rank2. Direct sums under bitwise tensor regrouping have rank2f, so A_f and its inverse have exact native arity2f for every f>=1. A_f^2=I by conjugation of R_f^2=I.', + 'one_bit_selected_native_recipe': recipe, + 'one_bit_selected_native_recipes_by_old_plane': recipes, + 'actual_tensor_recipe_checks': checks, + 'old_plane_extension': 'The same exact single-child admission holds for A_i=N_i R N_i^-1 on each i=0,1,2, with the three explicit recipes retained. Since N_i=i H_i and H_i=Hp_i Hq_i is involutive, this is also H_i R H_i without any external i. The tensor proof and all adapter phase powers apply separately to each saved recipe.', + 'single_unary_invoice': {'native_H2': 1, 'native_rank_mass': 2, + 'monomial_adapters': 2, 'ADDRESS_scans_at_most': 2, + 'Gaussian_quadratic_phase_scans_at_most': 2, + 'ordinary_helpers': 0, 'private_fields': 0}, + 'two_bank_identity': 'For E12=I+e1e2^T and B_R=E12 diag(I,R) E12^-1, Ad_(diag(N,N))(B_R)=E12 diag(I,A) E12^-1. Both independent inputs are retained. Its literal inverse reverses the shears and applies A^-1=A; the entire displayed conjugated word is itself involutive.', + 'two_bank_invoice': {'native_H2': 1, 'native_rank_mass': 2, + 'scalar_ADD_scans': 2, 'monomial_adapters': 2, + 'ordinary_helpers': 0, 'private_fields': 0}, + 'evidence_domain': 'Written all-f exact tensor proof and native B-rank proof; independent actual Gaussian compiled checks at f1/f2/f3; all-f two-bank polynomial coefficients checked in the phase-sensitive tensor algebra.', + 'limits': ['This is a changed legal local bridge, not a completed caller or shared-debt cancellation.', + 'The source-kernel N0R is not assumed quadratic, and no old scalar caller is imported by that assumption.', + 'All bank ADD, ADDRESS and phase scans are paid; no source access, owner, precision, all-size or tape gate is discharged.'], + 'no_new_kappa': True} + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('--write', action='store_true') + args = p.parse_args() + out = json.loads(json.dumps(run())) + path = HERE/'CONJUGATED-REFLECTION.json' + if args.write: + path.write_text(json.dumps(out, indent=2, sort_keys=True)+'\n') + else: + need(json.loads(path.read_text()) == out, 'saved conjugated reflection differs') + print(out['status']) + print(out['single_unary_invoice']) diff --git a/research/two-site-caller-fusion/source/native-frames/even_parity_source.py b/research/two-site-caller-fusion/source/native-frames/even_parity_source.py new file mode 100644 index 0000000000..602b02f549 --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/even_parity_source.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +"""Paid even-parity native responses preserve an already-full source endpoint. +Apache-2.0; substantial OpenAI Codex assistance. Changed kernel, no free anchor. +""" +from pathlib import Path +import argparse +import hashlib +import json +from native_model import * +from conjugated_reflection import tensor_monomial +from lifted_algebra import Algebra + +HERE=Path(__file__).resolve().parent + + +def parity_query(z,chunks): + out=z.I + for k in range(z.f): + q=sum(1<<(j*z.f+k)for j in chunks) + out=mul(ce.cgate(z.n,q),out) + return out + + +def kernels(z): + C=parity_query(z,(0,1)) + U=mul(parity_query(z,(0,2)),parity_query(z,(1,3))) + Z=pauli(z.n,z=(1<<(2*z.f))-1) + J=mul(phase(z.n,z.f+1),Z,U) + return C,J + + +def source_chart(z): + # A is bitwise CNOT p0->p1 and q0->q1. M=X_p0 Z_p0 P_A. + rows=[1<=2 oldplanes. This fullnative anchor is an incoming paid caller premise; no free preparation is claimed. The checked fixture has L=3.', + 'rankf_kernel':'C_even,f=product_k C_(p0k+q0k), with C_q=((1+i)I+(1-i)X_q)/2. Each parity vector has evenweight, and they are independent. Thus nativearityf. Its exact square is X_all_commonp+commonq, a paid ADDRESS translation, not a discarded residual.', + 'quadratic_kernel':'Let v_k=p0k+p1k,w_k=q0k+q1k, U=product_k C_v_k C_w_k, Z=Z_all_p0 Z_all_q0, and J_f=i^(f+1) Z U. For each anticommtingparity, Z C_v Z=i C_v^-1; hence ZUZ=i^(2f) U^-1 and J_f^2=i^(2f+2) i^(2f)=-I for everyf. The f-dependentGaussianunit is mandatory. This has exact nativearity2f and is a changed literalJ response, nottheold N0 response.', + 'explicit_old_native_source_chart':'Let A be bitwise CNOT p0->p1 and q0->q1, and M_f=X_all_p0 Z_all_p0 P_A. Then J_f=M_f N0 M_f^-1 exactly. ADDRESSconjugation sends theoldnativeC directions to v,w; Z_p0 reverses the v parities with the mandatory i^f factor, and X_p0 supplies the remaining (-1)^f. Thus the phase is i^(f+1). M has oneaffineADDRESS plus onePauliZ scan; applying M^-1,N0,M exposes the sameJ nativequery with bothmonomialadapters paid. This is a source-frame change relative to the retainedincomingE, not a new abstract quadraticalgebra.', + 'full_source_rank_proof':'The fullold E has binary symplecticA=D=I,B=I,C=0. A C_even query has B=Gamma=sum qk qkT. All selectedparities in each kernel are pairwiseorthogonal, so Gamma^2=0 and I+Gamma is invertible, inverseI+Gamma. A PauliZ leftfactor doesnotchangeB. Hence both C_even E andJ E have fullnativearity2Lf, for everyL>=2,f>=1. This is a rank/admission statement, not equality of the endpoint withE.', + 'all_f_phase_and_recipe_proof':'C_even,f=C_even,1^tensor f. J_f=i^(1-f)J_1^tensor f. E_f=i^(L*(1-f))E_1^tensor f. Therefore each source endpoint K_f E_f=i^((L+exponentK)*(1-f)) (K_1 E_1)^tensor f. Tensor the saved actualonebitnativeandmonomialrecipes, with the displayedleftglobalunit. This proves full actual phases and endpoint adapters for everyf without f1 tableau extrapolation.', + 'native_query_recipes':recipes,'retained_full_endpoint_recipes_L3':endpoint_recipes, + 'chronological_word':['source=K source','target+=source'], + 'complete_actual_matrix':'On entrance(E*x,E*y), output(K E*x,E*y+K E*x); bothoriginalfields arbitrary. Source remains an isolatedfullnativeoperatorK E on its ownx. No helperor cleanfield is used.', + 'literal_inverse':['target-=source','source=K^-1 source'], + 'rankf_query_invoice':{'H1':1,'native_rank_mass':1,'delivery_ADD_scans':1, + 'native_monomial_adapters':2,'ADDRESS_scans_at_most':2, + 'Gaussian_quadratic_phase_scans_at_most':2, + 'ordinary_helpers':0,'private_fields':0}, + 'quadratic_query_invoice':{'H2':1,'native_rank_mass':2,'delivery_ADD_scans':1, + 'native_monomial_adapters':2,'ADDRESS_scans_at_most':2, + 'Gaussian_quadratic_phase_scans_at_most':2, + 'ordinary_helpers':0,'private_fields':0}, + 'endpoint_gauge_obligation':'The fullendpointK E=L C_full R has explicitmonomialleft/rightgauges, bothpaidifused. It isnotexactE. A completecaller whoseindependentoutputsareK_i E may compose the appropriateinputrightgaugesandoutputleftgauges after proving allcolumns. The rightgaugecannotbe dropped at an intermediate mixedcut orassumedto preserve a desiredN response. A dirtyhelper owner mustpriceits actual entrance/terminalresidual; fullarityaloneisnotanownercontract.', + 'even_only_limitation':'Every evenparityC_q commutes physicalZ_all andphysicalX_all. BinaryorthogonalA fixes1; itscorrectedtagz hasz.dot1=0 because itsphaseat1 equals1. Thus R_A=P_A Z_z also commutesbothglobalPaulis. Anybankword usingonlythoseevenqueriesandorthogonalcorrectedcontrollerscommutesdiag(Z_all), whereas afullnativeClifford with invertibleB cannotfix nonzeroZ_all. An odd/nativeanchor or a controlleroutside thatrestrictedcommutant is necessary. GeneralADDRESS adapters outside theorthogonalgroup are notcoveredbythisno-even-onlyclaim. IncomingE isexactlysuch analreadypaidanchor.', + 'actual_checks':checks,'all_f_two_column_checks':source_records, + 'wrong_constant_i_phase_controls':phase_mutants, + 'limits':['No currentpublicreaderN isreplacedbyJ orC_even withouta newall-columnidentity.', + 'No stockor exponentgain isclaimed: thepaid incominganchor, sourceCOPY/readscans, endpointgauges, ownerbinding, precisionandphysicaltapecontract remainrequired.', + 'The fullsourceendpointgauge fixturescoverL3; the writtenrankandphaseidentitiesholdallL>=2.'], + 'no_new_kappa':True} + + +if __name__=='__main__': + p=argparse.ArgumentParser(description=__doc__);p.add_argument('--write',action='store_true');args=p.parse_args() + out=json.loads(json.dumps(run()));path=HERE/'EVEN-PARITY-SOURCE.json' + if args.write:path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:need(json.loads(path.read_text())==out,'saved even parity source differs') + print(out['status']) diff --git a/research/two-site-caller-fusion/source/native-frames/lifted_algebra.py b/research/two-site-caller-fusion/source/native-frames/lifted_algebra.py new file mode 100644 index 0000000000..a63509e504 --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/lifted_algebra.py @@ -0,0 +1,123 @@ +"""Exact all-f tensor algebra with one distinguished Pauli-controlled coordinate. +Apache-2.0; substantial OpenAI Codex assistance. No finite-f extrapolation. +""" +from dataclasses import dataclass +from fractions import Fraction as F +from native_model import * +@dataclass(frozen=True) +class G: + a:F=F(0);b:F=F(0) + def __add__(s,t): + if not isinstance(t,G):t=G(F(t)) + return G(s.a+t.a,s.b+t.b) + def __neg__(s):return G(-s.a,-s.b) + def __sub__(s,t):return s+-t + def __mul__(s,t): + if not isinstance(t,G):t=G(F(t)) + return G(s.a*t.a-s.b*t.b,s.a*t.b+s.b*t.a) + def conj(s):return G(s.a,-s.b) + def __truediv__(s,t): + if not isinstance(t,G):t=G(F(t)) + d=t.a*t.a+t.b*t.b;need(bool(d),'nonzero Gaussian divisor');return s*t.conj()*G(1/d) + def __bool__(s):return bool(s.a or s.b) + def encode(s):return[str(s.a),str(s.b)] +ZERO=G();ONE=G(F(1));I=G(F(0),F(1));UNITS=(ONE,I,-ONE,-I) +def phasevec(q):return tuple(UNITS[(q if isinstance(q,int)else q(r))%4]for r in range(4)) +def cadd(a,c):return tuple(x+y for x,y in zip(a,c)) +def cmul(a,c):return tuple(x*y for x,y in zip(a,c)) +def cconj(a):return tuple(x.conj()for x in a) +def czero(a):return not any(a) +class Algebra: + def __init__(self,stages=4): + self.stages=stages;self.m=2+2*stages;self.rep={};self.products={};self.inverses={};self.phase_cache={};self.model=Model(1,stages);self.idkey=self.canonical(ce.ident(self.m))[0] + self.one={(self.idkey,self.idkey):(ONE,)*4};self.N=self.lift(self.model.N,exponent=1);self.U=self.lift(self.model.U);self.V=self.product(self.N,self.adjoint(self.U));self.P=[self.lift(x)for x in self.model.P];self.T=[self.lift(x,exponent=1)for x in self.model.T];self.Q=[] + for s in range(stages+1):self.Q.append(self.lift(ce.xgate(self.m,1<<(2*s)),ce.ident(self.m))) + def canonical(self,op): + key=op.tab + # Same signed tableau means the representative differs by exactly a Gaussian unit. + state,depth=b.sparse_column(op);first=state[min(state)];q=None + for j in range(4): + a,c=b.gaussian_unit(first,-j) + if a>0 and c>=0:q=j;break + need(q is not None,'canonical Gaussian amplitude phase') + if key not in self.rep:self.rep[key]=op.then(phase(op.n,-q)) + return key,q + def multiply_keys(self,a,c): + if(a,c)not in self.products:self.products[(a,c)]=self.canonical(mul(self.rep[a],self.rep[c])) + return self.products[(a,c)] + def adjoint_key(self,a): + if a not in self.inverses:self.inverses[a]=self.canonical(self.rep[a].adjoint()) + return self.inverses[a] + def lift(self,dist,bulk=None,exponent=0): + if bulk is None:bulk=dist + kd,qd=self.canonical(dist);kb,qb=self.canonical(bulk) + need(b.binary_tableau(dist)==b.binary_tableau(bulk),'distinguished difference must be Pauli only') + return{(kd,kb):phasevec(lambda r:exponent*(1-r)+qd+qb*(r-1))} + def add(self,a,c): + out=dict(a) + for k,v in c.items(): + w=cadd(out.get(k,(ZERO,)*4),v) + if czero(w):out.pop(k,None) + else:out[k]=w + return out + def scale(self,a,c): + if not isinstance(c,G):c=G(F(c)) + return{k:tuple(c*x for x in v)for k,v in a.items()if c} + def product(self,a,c): + out={} + for(ad,ab),av in a.items(): + for(cd,cb),cv in c.items(): + kd,qd=self.multiply_keys(ad,cd);kb,qb=self.multiply_keys(ab,cb);phase=phasevec(lambda r:qd+qb*(r-1));value=cmul(cmul(av,cv),phase);key=(kd,kb);value=cadd(out.get(key,(ZERO,)*4),value) + if czero(value):out.pop(key,None) + else:out[key]=value + return out + def adjoint(self,a): + out={} + for(ad,ab),av in a.items(): + kd,qd=self.adjoint_key(ad);kb,qb=self.adjoint_key(ab);value=cmul(cconj(av),phasevec(lambda r:qd+qb*(r-1)));out=self.add(out,{(kd,kb):value}) + return out + def mat_identity(self,n):return[[dict(self.one)if i==j else{}for j in range(n)]for i in range(n)] + def mat_product(self,a,c): + n=len(a);out=[[{}for j in range(n)]for i in range(n)] + for i in range(n): + for k in range(n): + if not a[i][k]:continue + for j in range(n): + if c[k][j]:out[i][j]=self.add(out[i][j],self.product(a[i][k],c[k][j])) + return out + def router(self,n,a,c,selector=0,sign=1): + out=self.mat_identity(n);Q=self.scale(self.Q[selector],sign);ep=self.scale(self.add(self.one,Q),F(1,2));em=self.scale(self.add(self.one,self.scale(Q,-1)),F(1,2));out[a][a]=out[c][c]=ep;out[a][c]=out[c][a]=em;return out + def diagonal(self,n,bank,op):out=self.mat_identity(n);out[bank][bank]=op;return out + def continuation(self,choice): + if choice=='U':return self.U + if choice=='V':return self.V + # alpha_f=(-i)^(f+1), selected completed fresh1 p-bit. Conditional + # continuation is directly admitted by the R diag(U,I) R word. + need(choice in('C+','C-'),'known role') + Q=self.Q[1];ep=self.scale(self.add(self.one,Q),F(1,2));em=self.scale(self.add(self.one,self.scale(Q,-1)),F(1,2));alpha=phasevec(lambda r:-r-1);av={k:cmul(v,alpha)for k,v in self.V.items()} + return self.add(self.product(ep if choice=='C+'else em,self.U),self.product(em if choice=='C+'else ep,av)) + def box(self,n,stage,kind,target,source,role='U',c=1,target_P=False): + out=self.mat_identity(n);W=self.continuation(role);P=self.P[stage] + if kind=='F':out[source][source]=self.product(W,P);out[target][source]=self.scale(self.N,c) + elif kind=='G': + Wi=self.adjoint(W);out[source][source]=Wi;out[target][target]=P;out[target][source]=self.scale(self.product(self.product(P,self.N),Wi),c) + else:raise ValueError(kind) + if target_P: + need(kind=='F','only forward postdelivery/pre-T target P admitted') + out=self.mat_product(self.diagonal(n,target,P),out) + return out + def allf_target_residual(self,a): + # Right-normalize the desired full native common N. A positive result + # has entries in the fixed distinguished Pauli algebra, bulk identity. + Ni=self.adjoint(self.N);res=[] + for row in a: + rr=[] + for entry in row: + v=self.product(entry,Ni) + if any(kb!=self.idkey for kd,kb in v):return None + if any(b.binary_tableau(self.rep[kd])!=b.binary_tableau(ce.ident(self.m))for kd,kb in v):return None + rr.append(v) + res.append(rr) + return res + def fingerprint(self,a): + return tuple(tuple(tuple(sorted((str(k),tuple((v.a,v.b)for v in vec))for k,vec in entry.items()))for entry in row)for row in a) diff --git a/research/two-site-caller-fusion/source/native-frames/native_model.py b/research/two-site-caller-fusion/source/native-frames/native_model.py new file mode 100644 index 0000000000..0ab770f491 --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/native_model.py @@ -0,0 +1,67 @@ +"""Pinned Gaussian Clifford model for common2/fresh2 native bridges. +Apache-2.0; substantial OpenAI Codex assistance. Frozen imports are read only. +""" +from pathlib import Path +import hashlib,importlib.util,sys +sys.dont_write_bytecode=True +BASE=Path(__file__).resolve().parents[1] +PIN='20ecf2891d80b5acf18d980b2164fb44ea7faa90' +CE_PATH=BASE/'vendor/clifford_exact.py' +CE_SHA='2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962' +BOUND_PATH=BASE/'vendor/full_stabilizer_bound.py' +BOUND_SHA='f073a00ad4831616e873eb110fd33ad7226010a7c2f6cfa6a6b63167bf58ef75' +def need(ok,why): + if not ok:raise ValueError(why) +def load(name,path,sha): + need(hashlib.sha256(path.read_bytes()).hexdigest()==sha,'source pin '+str(path)) + spec=importlib.util.spec_from_file_location(name,path);mod=importlib.util.module_from_spec(spec);sys.modules[name]=mod;spec.loader.exec_module(mod);return mod +ce=load('native_frames_pinned_clifford',CE_PATH,CE_SHA) +b=load('native_frames_frozen_independent',BOUND_PATH,BOUND_SHA) +def mul(*ops):return b.standard_product(ce,*ops) +def same(a,c,why,phase=True): + need(a.tab==c.tab,why+' signed tableau') + if phase:need(b.sparse_column(a)==b.sparse_column(c),why+' actual Gaussian phase') +def phase(n,p):return ce.Op(n,ce.identity(n),[('phase',p%4)]) +def symplectic_defect_rank(op): + return b.binary_rank(x^y for x,y in zip(b.binary_tableau(op),b.binary_tableau(ce.ident(op.n)))) +def pauli(n,x=0,z=0,p=0): + out=ce.diag(n,[0]*n,[2*((z>>j)&1)for j in range(n)]) + return mul(phase(n,p),ce.xgate(n,x),out) +def conjugated_pauli(op,x=0,z=0,p=0): + triple=ce.apply(op.tab,(x,z,p));return pauli(op.n,*triple),triple +class Model: + def __init__(self,f=1,stages=4): + need(f>=1 and stages>=1,'positive chunk/stages');self.f=f;self.stages=stages;self.n=(2+2*stages)*f;self.I=ce.ident(self.n) + self.N=self.Npair(0,1);self.U=self.Hp(0);self.V=mul(self.N,self.U.adjoint()) + self.P=[self.swap_pair(s+1)for s in range(stages)];self.T=[self.Npair(2+2*s,3+2*s)for s in range(stages)] + self.Q=ce.xgate(self.n,1) + def Hp(self,chunk): + out=self.I + for j in range(self.f): + bit=chunk*self.f+j;alpha=[0]*self.n;alpha[bit]=2 + out=mul(ce.diag(self.n,[0]*self.n,alpha),ce.cgate(self.n,1<=4,'pqqp uses4 stages');gs=[self.I,self.I];controls=[];F=self.I + for s,(kind,W) in enumerate(zip('FGFG',[self.U,self.V,self.V,self.U])): + required=self.phi(gs[1])if kind=='F'else mul(W,self.N.adjoint(),gs[1],self.N,W.adjoint()) + L=mul(required,gs[0].adjoint());controls.append(L);gs[0]=required + if kind=='F':gs=[gs[0],mul(W,self.P[s],gs[1],W.adjoint())] + else:gs=[mul(W.adjoint(),gs[0],W),mul(self.P[s],gs[1])] + F=mul(self.T[s],F) + return gs,controls diff --git a/research/two-site-caller-fusion/source/native-frames/orthogonal_source_normalizer.py b/research/two-site-caller-fusion/source/native-frames/orthogonal_source_normalizer.py new file mode 100644 index 0000000000..9ffbd4da72 --- /dev/null +++ b/research/two-site-caller-fusion/source/native-frames/orthogonal_source_normalizer.py @@ -0,0 +1,182 @@ +#!/usr/bin/env python3 +"""Gaussian-typed binary orthogonal normalizers at a full source cut. + +This is a genuine bit-linear ADDRESS extension beyond plane permutations +and X translations. It is not itself a completed caller construction. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from pathlib import Path +from fractions import Fraction +import argparse +import hashlib +import json +from native_model import * + +HERE = Path(__file__).resolve().parent + + +def typed_D(model, oldplanes): + alpha, quadratic = [0] * model.n, [0] * model.n + for chunk in range(2 * oldplanes): + for bit in range(model.f): + k = chunk * model.f + bit + alpha[k] = 1 if chunk % 2 == 0 else 3 + quadratic[k] = 1 << k + return ce.diag(model.n, quadratic, alpha) + + +def reflection(model, oldplanes=2, support=(0, 1, 2, 3)): + need(len(support) % 2 == 0 and len(support) > 0, 'even nonempty reflection support') + need(max(support) < 2 * oldplanes, 'reflection uses only completed old chunks') + rows = [1 << j for j in range(model.n)] + for out in support: + for bit in range(model.f): + rows[out * model.f + bit] ^= sum(1 << (src * model.f + bit) + for src in support) + D = typed_D(model, oldplanes) + P = ce.perm(model.n, rows) + return mul(D.adjoint(), P, D), rows + + +def gaussian_add(a, c): + return a[0] + c[0], a[1] + c[1] + + +def unit(power): + return ((1, 0), (0, 1), (-1, 0), (0, -1))[power % 4] + + +def marked_character_checks(): + # Actual 64-point Fourier character sum, independent of Clifford tableaux. + def residual(w): + return tuple(((w >> (2 * k)) ^ (w >> (2 * k + 1))) & 1 for k in range(3)) + + def character_coefficient(w, wp, support): + v = sum(1 << k for k in support) + coefficient = (0, 0) + for x in range(64): + Ax = x ^ (v if (x & v).bit_count() % 2 else 0) + dx = sum((1 if k % 2 == 0 else -1) * ((x >> k) & 1) for k in range(6)) + dAx = sum((1 if k % 2 == 0 else -1) * ((Ax >> k) & 1) for k in range(6)) + sign = 2 * (((w & x).bit_count() + (wp & Ax).bit_count()) % 2) + coefficient = gaussian_add(coefficient, unit(dx - dAx + sign)) + return [Fraction(a, 64) for a in coefficient] + + # The initially proposed balanced reflection is NOT an escape. It maps + # w to w+(v.w+1)v and preserves both the unique mark and its virtual bit. + v = 15 + paired_checked = 0 + for w in range(64): + marks = residual(w) + if sum(marks) != 1: + continue + wp = w ^ (v if ((w & v).bit_count() + 1) % 2 else 0) + owner = marks.index(1) + need(character_coefficient(w, wp, (0, 1, 2, 3)) == [1, 0], 'paired exact character map') + need(residual(wp) == marks and ((w >> (2 * owner)) & 1) == ((wp >> (2 * owner)) & 1), 'paired reflection commutes marked C') + paired_checked += 1 + # Unpaired three-p/one-q reflection is bare ADDRESS, sending q0 to p0+p1+p2. + w, wp = 2, 21 + coefficient = character_coefficient(w, wp, (0, 1, 2, 4)) + need(coefficient == [1, 0], 'unpaired actual character coefficient') + need(residual(w) == (1, 0, 0) and residual(wp) == (1, 1, 1), 'genuine marked-subspace leakage') + return {'paired_negative_control': {'one_mark_characters_checked': paired_checked, + 'marked_C_commutes': True, + 'all_f_lift': 'The map is bitwise. With one residual mark r=(p0,q1^f), its owner inside the balanced support makes v.w=1 at every position and R fixes the character. An owner outside makes R complement only unmarked virtual bits. The marked owner bit is unchanged.'}, + 'unpaired_escape': {'input_X_character': w, 'input_residual_marks': residual(w), + 'output_X_character': wp, 'output_residual_marks': residual(wp), + 'actual_character_matrix_coefficient': [str(x) for x in coefficient], + 'all_f_lift': 'Put ones on all f q0 positions and zeros elsewhere. Bare bitwise ADDRESS sends this X character to ones on all p0,p1,p2 positions, changing exactly one residual mark into three for every f>=1. No diagonal pair gauge can remove this nonzero leakage.'}} + + +def run(): + checks = [] + onebit_recipe = None + for f in (1, 2, 3): + z = Model(f, 2) + R, rows = reflection(z) + oldG = mul(z.N, z.T[0]) + same(mul(R, R), z.I, 'actual orthogonal normalizer involution') + same(mul(R, oldG), mul(oldG, R), 'actual full-source normalizer phase') + need(b.native_rank(R) == 0, 'orthogonal typed reflection is monomial') + # Literal two-bank source insertion, with oldfresh=N1 and newfresh=N2. + actual_source = mul(z.P[1], R.adjoint(), R, z.N, z.T[0]) + actual_cross = mul(z.T[1], R, z.N, z.T[0]) + desired_source = mul(z.T[1], z.T[0], z.P[1]) + desired_cross = mul(z.T[1], z.T[0], z.N, R) + same(actual_source, desired_source, 'unchanged sourcecode and fresh coverage') + same(actual_cross, desired_cross, 'changed delivery N0R on arbitrary source column') + # The raw target coefficient is N2 N1 and is independent of source. + K = mul(z.N, R) + power = z.I + ranks = [] + for exponent in range(1, 5): + power = mul(K, power) + ranks.append(b.native_rank(power)) + same(power, z.I, 'exact quartic phase of this reflection kernel') + need(ranks == [2 * f, 2 * f, 2 * f, 0], 'kernel power is not an unproved full-native completion') + if f == 1: + compiled, onebit_recipe = ce.monomial(R) + same(R, compiled, 'actual literal Gaussian monomial recipe') + checks.append({'f': f, 'native_R': 0, 'source_old_native_planes': [0, 1], + 'new_fresh_plane': 2, 'source_frame_commutes_actual_phase': True, + 'kernel_power_native_arities': ranks, 'kernel_fourth_power': 'I'}) + unpaired_checks = [] + for f in (1, 2): + z = Model(f, 3) + R, rows = reflection(z, 3, (0, 1, 2, 4)) + bare = ce.perm(z.n, rows) + oldG = mul(z.N, z.T[0], z.T[1]) + same(R, bare, 'unpaired typed normalizer is literally bare ADDRESS') + same(mul(R, R), z.I, 'unpaired reflection literal involution') + same(mul(R, oldG), mul(oldG, R), 'unpaired full-source Gaussian phase') + need(b.native_rank(R) == 0, 'unpaired ADDRESS is nativezero') + actual_source = mul(z.P[2], R.adjoint(), R, z.N, z.T[0], z.T[1]) + actual_cross = mul(z.T[2], R, z.N, z.T[0], z.T[1]) + same(actual_source, mul(z.T[2], z.T[0], z.T[1], z.P[2]), 'unpaired unchanged source column') + same(actual_cross, mul(z.T[2], z.T[0], z.T[1], z.N, R), 'unpaired changed cross column phase') + need(b.native_rank(mul(z.N, R)) == 2 * f, 'changed cross native arity') + unpaired_checks.append({'f': f, 'old_native_planes': [0, 1, 2], 'new_fresh_plane': 3, + 'actual_typed_R_equals_bare_ADDRESS': True, 'native_R': 0, + 'source_and_cross_columns_actual_phase': True, + 'kernel_native_arity': 2 * f}) + characters = marked_character_checks() + return {'status': 'PASS_ALL_F_ORTHOGONAL_TYPED_SOURCE_NORMALIZER', + 'scientific_pin': PIN, + 'producer_sha256': hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + 'native_model_sha256': hashlib.sha256((HERE/'native_model.py').read_bytes()).hexdigest(), + 'all_parameter_schema': 'For j old native planes (2j chunks), put D=diag phasei on everyoldp bit and-i on everyoldq bit. Exact G_old=product(N_i)=i^j D^-1 H_all D. If binaryA is orthogonal,A^T A=I, then its literal ADDRESS permutation P_A commutes ordinary WalshH_all. Hence R_A=D^-1 P_A D is monomial and commutesG_old, including all global phases, for every f>=1.', + 'paired_reflection_negative_control': 'On two complete oldplanes v=1111 gives a legal typed R, but it COMMUTES with the marked-residual C. It is not an escape from that grammar floor. Its kernel K=N0R has exact K^4=I and nativearities2f,2f,2f,0 for its first four powers.', + 'explicit_unpaired_reflection': 'On three complete oldplanes ordered(p0,q0,p1,q1,p2,q2), take v=(1,1,1,0,1,0), A=I+vv^T. Its support has three p chunks and one q. v^Tv=0, so A^2=A^T A=I. Apply it bitwise at all f positions. Writing d(x)=sum pbits-sum qbits, if v.x is odd then d(x)-d(Ax)=2 d_v(x)-2=0 mod4; otherwise zero. Thus R_A=D^-1 P_A D=P_A literally, with no extra Gaussian phase.', + 'literal_gaussian_chart': 'Ononebit Hp=e^(-i pi/4) S^-1 H S and Hq=e^(+i pi/4) S H S^-1, S=diag(1,i). Their scalar factors cancel within each actual pairN=i Hp Hq, giving the exact i^j formula above. This is a conjugation identity in Gaussian operators; no irrational phase is introduced by the implementedR, which usesonly D/P_A/D^-1 with Gaussian-unit entries.', + 'source_cut_binding': 'At stagej with oldF=productfresh1..j-1, source N0oldF is full G_old. Insert R before the source delivery and R^-1 immediately after. Then sourcePj and targetNj give boundary Fnew[[Pj,0],[N0R,I]]. The sourceoriginal column, targetoriginal column, arbitrary source crosscolumn and literal inverse all retain their phases. This doesnot assert(N0R)^2=-I.', + 'per_pair_invoice': {'native_H2': 2, 'native_rank_mass': 4, + 'delivery_ADD_scans': 1, + 'existing_source_ADDRESS_scans': 1, + 'new_R_ADDRESS_scans': 2, + 'new_R_diagonal_phase_scans': 0, + 'ordinary_helpers': 0, 'private_fields': 0}, + 'native_zero_lowering': 'The useful unpaired R is the explicit bitwise binary ADDRESS map A=I+vv^T itself. Its inverse is the same literal scan. Both new scans use only completed old chunks. The fixed binary controller and all address/source work remain paid.', + 'paired_one_bit_monomial_recipe': onebit_recipe, + 'paired_actual_checks': checks, + 'unpaired_actual_checks': unpaired_checks, + 'marked_character_checks': characters, + 'evidence_domain': 'Written all-j/all-f orthogonal conjugation proof and explicit all-f bare-phase/leakage proof; actual Gaussian phase/source-column checks for pairedj2 f1/f2/f3 and unpairedj3 f1/f2; independent64-point actual Fourier-character sums. The paired candidate is correctly rejected as a marked-C escape. No f1-only native admission is extrapolated.', + 'limits': ['A complete caller must retain the changed noncommuting kernelsN0R and their independent-input sourcecodes, all public couplings and the literal inverse.', + 'The old scalar quadratic caller cannot be reused by pretendingK^2=-I.', + 'No full exponent, stock/owner, all-size, precision or tape claim is made.'], + 'no_new_kappa': True} + + +if __name__ == '__main__': + p = argparse.ArgumentParser(description=__doc__) + p.add_argument('--write', action='store_true') + args = p.parse_args() + out = json.loads(json.dumps(run())) + path = HERE/'ORTHOGONAL-SOURCE-NORMALIZER.json' + if args.write: + path.write_text(json.dumps(out, indent=2, sort_keys=True)+'\n') + else: + need(json.loads(path.read_text()) == out, 'saved orthogonal normalizer differs') + print(out['status']) + print(out['marked_character_checks']['unpaired_escape']) diff --git a/research/two-site-caller-fusion/source/pauli-caller-retiming/MANIFEST.json b/research/two-site-caller-fusion/source/pauli-caller-retiming/MANIFEST.json new file mode 100644 index 0000000000..621f41b3ce --- /dev/null +++ b/research/two-site-caller-fusion/source/pauli-caller-retiming/MANIFEST.json @@ -0,0 +1,158 @@ +{ + "file_count": 30, + "files": [ + { + "bytes": 4280, + "path": "HANDOFF.md", + "sha256": "14c587f50948b806626937356bd3a37661bb46517605e7748d32a61d283b1f09" + }, + { + "bytes": 7051, + "path": "INPUT-PINS.json", + "sha256": "6d89db7da7ef11c4147ecd88c98320fbbc8829910fb23a5a6d683c7cba04b12f" + }, + { + "bytes": 4173506, + "path": "TRAJECTORY-CERTIFICATES.json", + "sha256": "bac1b61d8f85a5bbe4a8c8d53e9ae54123c0513e51ac4051dbd87f7fbce68bdb" + }, + { + "bytes": 7435, + "path": "TRAJECTORY-PROOF.md", + "sha256": "172623b7e7aeb9f5bd4074722ce6a4827a55f031ec161ec78ad7d563b0b3a9f6" + }, + { + "bytes": 6033, + "path": "VALIDATION.json", + "sha256": "851a27157bf0c593922b955fe03e6669c3164223ea0a856fe2dce42a8962275d" + }, + { + "bytes": 5215, + "path": "coordinate_neighbors.py", + "sha256": "83655f44a884eecffacd11d432fbe441c2fda55deb85b1d44384e3297f92d769" + }, + { + "bytes": 12298, + "path": "general_search.py", + "sha256": "e0b24463c6eec8a45335d8085c52d777f65378853d2f5894bee2f14d4b01344d" + }, + { + "bytes": 2438797, + "path": "inputs/ADMITTED-TWO-SITE.json", + "sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f" + }, + { + "bytes": 3658155, + "path": "inputs/REPAIRED-SIMPLIFIED.json", + "sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3" + }, + { + "bytes": 1225048, + "path": "inputs/pauli/DEFAULT-OPTIMIZED.json", + "sha256": "3a22b8164cc330568c045e8e65cd51faf6a78b14ca15837fc2b79e0ab1aa8c1f" + }, + { + "bytes": 1225048, + "path": "inputs/pauli/DEFAULT.json", + "sha256": "3a22b8164cc330568c045e8e65cd51faf6a78b14ca15837fc2b79e0ab1aa8c1f" + }, + { + "bytes": 1129550, + "path": "inputs/pauli/ISOLATED-OPTIMIZED.json", + "sha256": "908e1be08ef71c170a0534935546c1f5e6df0d0d5ae2771de78cd469828605fd" + }, + { + "bytes": 1129550, + "path": "inputs/pauli/ISOLATED.json", + "sha256": "908e1be08ef71c170a0534935546c1f5e6df0d0d5ae2771de78cd469828605fd" + }, + { + "bytes": 3925, + "path": "inputs/pauli/PROOF.md", + "sha256": "5d2b3f6a1ef126935f55f977738cc273b9185cf26e2402f42e386ab152e93c1e" + }, + { + "bytes": 2828, + "path": "inputs/pauli/SOURCE-PINS.json", + "sha256": "0e4c3268b2c3e69391eabed5d03808c365442091e23fa34bc132ec9e5b48a61d" + }, + { + "bytes": 1085, + "path": "inputs/pauli/VALIDATION-OPTIMIZED.json", + "sha256": "c66a757f25f74c48bc3c86de652d543d18aa5976a3fa8cb74fe5495d81282cc0" + }, + { + "bytes": 1085, + "path": "inputs/pauli/VALIDATION.json", + "sha256": "c66a757f25f74c48bc3c86de652d543d18aa5976a3fa8cb74fe5495d81282cc0" + }, + { + "bytes": 3658155, + "path": "inputs/pauli/inputs/SOURCE-SIMPLIFIED.json", + "sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3" + }, + { + "bytes": 13458, + "path": "inputs/pauli/pauli_screen.py", + "sha256": "fd7f733be0a6f6f8fa07f1ef21e37acec73cb81734c9ed76b2959847953ee0ed" + }, + { + "bytes": 3474, + "path": "inputs/pauli/validate_pauli.py", + "sha256": "c81aac7a9ae3e8b6b594e3adf1ec227eaca396d1ae86bbd2cf6bf21c8fe2d169" + }, + { + "bytes": 5790, + "path": "inputs/retiming/lower_retimed_word.py", + "sha256": "b4dbc2db0d82262954fa1034fa06ae1c66b520f839c23cb6340bd11a126d546e" + }, + { + "bytes": 11772, + "path": "inputs/retiming/quadratic_charts.py", + "sha256": "de2a36f6a6b567360c90477b58da44e2f1b618fd006d058ab1ea04e983952c3f" + }, + { + "bytes": 4664, + "path": "inputs/retiming/quadratic_local_search.py", + "sha256": "ccc4042173b2e38a33c9823e63ef1a1654576aeef3e9eb319db4ed6420b62084" + }, + { + "bytes": 5215, + "path": "original-coordinate_neighbors.py", + "sha256": "83655f44a884eecffacd11d432fbe441c2fda55deb85b1d44384e3297f92d769" + }, + { + "bytes": 12228, + "path": "original-general_search.py", + "sha256": "ad860bb97f504e4c6041294d5f895d229f121949e46cf5481d2aa30619739628" + }, + { + "bytes": 3583, + "path": "scalar-gadgets/PROOF.md", + "sha256": "f8c69f9957549389c19a5a01545f9c7f3ba7eacbc304e90f0fa49bdd19a5c8b6" + }, + { + "bytes": 8353, + "path": "scalar-gadgets/SCALAR-SWAP-CERTIFICATE.json", + "sha256": "4c36b3e1adc75b1f7b0d2b49e4c911baa78801945e3ac68162b8be37f1dc0f44" + }, + { + "bytes": 8070, + "path": "scalar-gadgets/scalar_swap_certificate.py", + "sha256": "e4679ed44bd77df8c1665c39381ab1b5f1da0841f54e0e329cf1c80e8ffb7ffc" + }, + { + "bytes": 14306, + "path": "trajectory_certificate.py", + "sha256": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + { + "bytes": 3834, + "path": "validate.py", + "sha256": "4803aa76618846f0648ff008383bf19a5a67bf70af03c422dbb6a78bff202f40" + } + ], + "scientific_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "scope": "Fixed literal unary holonomies/common-frame ADD graph; exact boundary-to-boundary path lower bound and scoped scalar-SWAP gadget preservation. Inputs and predecessor words unchanged.", + "status": "FROZEN_LOCAL_SCOPE_NO_NEW_KAPPA" +} diff --git a/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json.gz b/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json.gz new file mode 100644 index 0000000000..1f61e21d7a Binary files /dev/null and b/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-CERTIFICATES.json.gz differ diff --git a/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-PROOF.md b/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-PROOF.md new file mode 100644 index 0000000000..caf9e56809 --- /dev/null +++ b/research/two-site-caller-fusion/source/pauli-caller-retiming/TRAJECTORY-PROOF.md @@ -0,0 +1,141 @@ +# Exact trajectory bounds for fixed common-frame words + +This package certifies a rank-mass lower bound for the eight pinned finite +words in `TRAJECTORY-CERTIFICATES.json`. It does not search for a new caller. +The Pauli-response DEFAULT and ISOLATED words at q=2 and q=3 are sharp in +the stated retiming model: the lower bounds are respectively 60 and 112, +equal to both their saved native bills and their endpoint stocks. The older +repaired and admitted two-site words receive valid but weaker bounds 62 and +118. Those bounds do not establish their optimality. + +## Model and boundary + +Fix a complete chronological word on n arbitrary fields. Its gates are +literal unary Clifford families, scalar field ADD/SCALE, and literal +BANK_SWAP. Every source unary family is specified as an actual coordinate +circuit, its signed Pauli tableau, and the scalar correction to its f-fold +tensor power. Fix those unaries and the scalar ADD topology. This is not a +model in which the unaries can be replaced by other operators having the +same final overall function. + +At every ADD, its two operands must have one identical Clifford frame +representative. The graph relaxation retains only that they have the same +Lagrangian frame; allowing all Lagrangians is a relaxation of the literal +frame constraint. Scalar coefficients commute with the address operators. +Every SCALE and BANK_SWAP remains a paid whole-field operation. The native +rank tariff alone assigns them no positive rank. + +The original physical inputs and final physical outputs are fixed. Their +frame gauges are therefore identity, or, harmlessly for this relaxation, +physical monomials preserving the coordinate Z Lagrangian. In particular the +Pauli target FJ already occurs in the fixed source word. Its rank is 10f in +ambient 12f for q=2 and 14f in ambient 16f for q=3. It is not replaced by a +full ambient Fourier transform, and its two spectator axes are not discarded +or charged as independent public progress. The corresponding endpoint stocks +are n times 10 and n times 14. A variable right input gauge or a changed +terminal owner contract is outside the present boundary. + +## The distance and edge tariff + +Let Z be the coordinate Z Lagrangian in the 2mf-dimensional binary symplectic +space. For two mf-dimensional subspaces set + + d(U,V) = mf - dim(U intersection V) = rank(span(U,V)) - mf. + +This is a metric on subspaces of the given dimension. Indeed + + dim(U intersection W) >= dim(U intersection V) + + dim(V intersection W) - mf + +gives its triangle inequality. Every invertible linear map acts by isometries. +For a Clifford G, + + native_rank(G) = rank(B_G) = d(Z,G Z). + +Contract each ADD to one common-frame node. Keep each maximal unary segment +as an edge e=(u,v,G_e), and keep all physical input/output boundaries at the +fixed node 0. BANK_SWAP transports the pending segments and physical strand +labels; it is not silently omitted. An edge can also be an identity segment. +At an arbitrary retiming assign a Lagrangian L_v to every node, with L_0=Z. +The edge native tariff is + + c_e = d(L_v, G_e L_u). + +For actual frame representatives T_v with L_v=T_v Z, this is exactly the +native B-rank of T_v^-1 G_e T_u. Splitting the segment into more native +queries can only increase total rank mass by rank subadditivity. Thus this +edge-tariff model also lower-bounds such splittings. It does not give the +concave positive-exponent moment: different splittings can change that bill. + +## Boundary-to-boundary strand bound + +Partition every edge into directed paths from node 0 to node 0. Internal ADD +nodes have two incoming and two outgoing strands. They may be paired either +straight or crossed, because all four ends carry the same L_v. For a path +with edge operators G_1,...,G_l in chronological order, the triangle inequality +and isometry give + + sum_path c_e >= d(Z, G_l ... G_1 Z). + +One way to see the telescoping explicitly is to pull the frame at the j-th +node back by (G_j ... G_1)^-1. Consecutive pulled-back distances equal c_e, +the initial pulled-back frame is Z, and the terminal one is +(G_l ... G_1)^-1 Z. Its distance from Z equals the displayed right side. + +The paths are edge-disjoint and exhaustive. Summing their bounds therefore +counts each edge tariff once, with no assumption that their value contents +are independent, copied, or zero. The path holonomy is a graph invariant; +it is not asserted to be an entry of the complete caller matrix. The proof +uses arbitrary original inputs only through the fixed physical endpoint and +common-frame gate contract. + +The producer uses straight pairing at all actual ADD nodes and transports +strand identities across each actual BANK_SWAP. It saves every edge, path, +signed holonomy tableau, full literal coordinate circuit, and tensor-phase +correction. An independent traversal of the physical labels checks circuit +order and all scalar phase corrections. Global Clifford phases and field +SCALE factors do not affect the subspace distance; they are retained or +counted separately, not used to declare scalar-equivalent operators equal. + +## Exact fixtures + +The ranks below are in *initial strand label* order. A list in final physical +bank order can be a permutation of the same multiset. + +| Family | q | Holonomy ranks per f | Floor | Source mass | Stock | +| --- | --- | --- | ---: | ---: | ---: | +| Pauli DEFAULT | 2 | 8,10,10,10,10,12 | 60 | 60 | 60 | +| Pauli DEFAULT | 3 | 12,14,14,14,14,16,14,14 | 112 | 112 | 112 | +| Pauli ISOLATED | 2 | 8,10,10,10,10,12 | 60 | 60 | 60 | +| Pauli ISOLATED | 3 | 12,14,14,14,14,16,14,14 | 112 | 112 | 112 | +| Repaired SIMPLIFIED | 2 | 8,10,10,10,12,12 | 62 | 80 | 72 | +| Repaired SIMPLIFIED | 3 | 12,14,14,14,16,16,16,16 | 118 | 136 | 128 | +| Admitted two-site | 2 | 8,10,10,10,12,12 | 62 | 76 | 72 | +| Admitted two-site | 3 | 12,14,14,14,16,16,16,16 | 118 | 132 | 128 | + +For the four Pauli fixtures the original gauge assignment reaches the floor, +so the lower bound is sharp over *all* Clifford Lagrangian gauges. This is +stronger than a finite generator search. It does not newly admit selected +native recipes for the ISOLATED changed unary: those events are used as +literal Clifford words and the source's explicit admission limit is retained. + +The proof is all-positive-f for each listed finite q fixture. Its holonomies +are tensor products up to the saved global phases, so the B-ranks scale by f. +Arbitrary retiming frames may mix tensor coordinates: the metric proof still +takes place in the full mf-dimensional space and does not impose a tensor +ansatz on those frames. No all-q formula is inferred from q=2 and q=3. + +## Controls and limits + +Every fixture rejects an omitted path edge and a specific actual BANK_SWAP +whose strand transport is omitted. All frozen input pins and the native-rank +invoice are checked without floating-point arithmetic. `python -B` and +`python -B -O` reproduce the same saved result; the checks use explicit +exceptions, not assertions that disappear under optimization. + +A new response, changed unary holonomies, a nonlocal scalar rewrite across +native sites, new helper interactions, or an altered owner/input/output +contract requires a new graph and certificate. In particular the weaker +62/118 bounds do not close the old original-kernel caller. This package +establishes no new kappa, joint BIT compatibility, rounding, source access, +physical machine controller, storage, or complete supplier admission. diff --git a/research/two-site-caller-fusion/source/pauli-caller-retiming/trajectory_certificate.py b/research/two-site-caller-fusion/source/pauli-caller-retiming/trajectory_certificate.py new file mode 100644 index 0000000000..aea4100df1 --- /dev/null +++ b/research/two-site-caller-fusion/source/pauli-caller-retiming/trajectory_certificate.py @@ -0,0 +1,327 @@ +#!/usr/bin/env python3 +"""Exact edge-partition lower bounds for a fixed common-frame ADD word. + +Apache-2.0. Substantial OpenAI Codex assistance. No search or kappa claim. +""" +from pathlib import Path +from collections import Counter +from functools import lru_cache +import argparse, copy, hashlib, json, sys +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE.parent / 'caller-joint')) +from joint_algebra import ce + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def digest(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def stable(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')) + + +def pin_inputs(): + data = json.loads((HERE / 'INPUT-PINS.json').read_text()) + for pin in data['files']: + p = Path(pin['source']) if pin.get('read_only_source') else HERE / pin['copy_relative'] + need(digest(p) == pin['sha256'], 'frozen input pin: ' + str(p)) + return data + + +@lru_cache(None) +def compile_literal(m, encoded): + op = ce.ident(m) + for gate in json.loads(encoded): + kind = gate[0] + if kind == 'P': + g = ce.perm(m, tuple(gate[1])) + elif kind == 'D': + g = ce.diag(m, tuple(gate[1]), tuple(gate[2])) + elif kind == 'C': + need(gate[2] in (-1, 1), 'literal chirp direction') + g = ce.cgate(m, gate[1], gate[2]) + elif kind == 'X': + g = ce.xgate(m, gate[1]) + elif kind == 'phase': + g = ce.Op(m, ce.identity(m), [tuple(gate)]) + else: + raise ValueError('unsupported actual unary gate: ' + kind) + op = op.then(g) + return op + + +def unary(event, m): + op = compile_literal(m, stable(event['one_coordinate_literal_circuit'])) + need(op.tab == tuple(tuple(t) for t in event['one_coordinate_tableau']), 'actual signed unary tableau') + rank = ce.rank(x for x, z, phase in op.tab[m:]) + need(rank == event['rank_per_f'], 'actual unary B-rank') + need((event['kind'] == 'NATIVE') == bool(rank), 'native versus rank-zero event kind') + extra = event.get('extra_global_phase_exponent_by_f_mod4') + if extra is None: + e = event['phase_exponent'] + extra = [e * (1 - r) % 4 for r in range(4)] + need(len(extra) == 4, 'explicit all-f scalar phase') + return op, tuple(x % 4 for x in extra) + + +def columns(op): + return tuple(x | (z << op.n) for x, z, phase in op.tab) + + +def rank(vectors): + basis = {} + for value in vectors: + while value: + p = value.bit_length() - 1 + if p in basis: + value ^= basis[p] + else: + basis[p] = value + break + return len(basis) + + +def linear(A, value): + out = 0 + while value: + bit = value & -value + out ^= A[bit.bit_length() - 1] + value -= bit + return out + + +def distance(U, V, m): + return rank(tuple(U) + tuple(V)) - m + + +def add_phase(a, b): + return tuple((x + y) % 4 for x, y in zip(a, b)) + + +def direct_paths(events, n, m): + """Independent physical-label traversal: ADDs do not move a strand.""" + labels = list(range(n)) + ops = [ce.ident(m) for _ in range(n)] + phases = [(0,) * 4 for _ in range(n)] + for event in events: + kind = event['kind'] + if kind == 'BANK_SWAP': + i, j = event['banks'] + labels[i], labels[j] = labels[j], labels[i] + ops[i], ops[j] = ops[j], ops[i] + phases[i], phases[j] = phases[j], phases[i] + elif kind not in ('ADD', 'SCALE'): + op, extra = unary(event, m) + b = event['bank'] + ops[b] = ops[b].then(op) + phases[b] = add_phase(phases[b], extra) + out = [None] * n + for bank, label in enumerate(labels): + out[label] = (bank, ops[bank], phases[bank]) + return out + + +def graph_paths(events, n, m, omit_swap=None, crossing_adds=()): + """Every ADD is a common-frame node; optionally cross its two strands.""" + at = [0] * n + owner = list(range(n)) + pending = [ce.ident(m) for _ in range(n)] + phases = [(0,) * 4 for _ in range(n)] + unaries = [[] for _ in range(n)] + paths = [[] for _ in range(n)] + edges = [] + nodes = 1 + crosses = set(crossing_adds) + + def emit(bank, node): + eid = len(edges) + op = pending[bank] + edges.append(dict(id=eid, u=at[bank], v=node, bank=bank, + one_coordinate_tableau=op.tab, + one_coordinate_literal_circuit=op.circuit, + extra_global_phase_exponent_by_f_mod4=phases[bank], + source_event_ordinals=unaries[bank], + rank_per_f=ce.rank(x for x, z, p in op.tab[m:]))) + paths[owner[bank]].append(eid) + at[bank] = node + pending[bank] = ce.ident(m) + phases[bank] = (0,) * 4 + unaries[bank] = [] + + for ordinal, event in enumerate(events): + kind = event['kind'] + if kind == 'ADD': + i, j = event['dst'], event['src'] + need(i != j, 'ADD operands distinct') + emit(i, nodes) + emit(j, nodes) + nodes += 1 + if ordinal in crosses: + owner[i], owner[j] = owner[j], owner[i] + elif kind == 'BANK_SWAP': + i, j = event['banks'] + at[i], at[j] = at[j], at[i] + pending[i], pending[j] = pending[j], pending[i] + phases[i], phases[j] = phases[j], phases[i] + unaries[i], unaries[j] = unaries[j], unaries[i] + if ordinal != omit_swap: + owner[i], owner[j] = owner[j], owner[i] + elif kind == 'SCALE': + # Scalar field multiplication commutes with every address operator. + # It is still counted as a paid whole-field scan, not a native child. + pass + else: + op, extra = unary(event, m) + b = event['bank'] + pending[b] = pending[b].then(op) + phases[b] = add_phase(phases[b], extra) + unaries[b] = unaries[b] + [ordinal] + for bank in range(n): + emit(bank, 0) + return edges, paths, owner, nodes + + +def check_partition(edges, paths, n, m): + need(len(paths) == n, 'one path per initial bank') + need(sorted(e for path in paths for e in path) == list(range(len(edges))), 'partition covers every graph edge once') + result = [] + for path in paths: + op = ce.ident(m) + extra = (0,) * 4 + previous = 0 + for eid in path: + e = edges[eid] + need(e['id'] == eid and e['u'] == previous, 'consecutive path endpoints') + previous = e['v'] + segment = compile_literal(m, stable(e['one_coordinate_literal_circuit'])) + need(segment.tab == tuple(tuple(t) for t in e['one_coordinate_tableau']), 'edge actual signed tableau') + op = op.then(segment) + extra = add_phase(extra, e['extra_global_phase_exponent_by_f_mod4']) + need(previous == 0, 'literal endpoint path returns to fixed boundary') + r = ce.rank(x for x, z, p in op.tab[m:]) + Z = tuple(1 << (m + i) for i in range(m)) + need(distance(Z, tuple(linear(columns(op), z) for z in Z), m) == r, 'Grassmann distance equals native rank') + result.append((op, extra, r)) + return result + + +def source_pin(relative): + return dict(path=relative, sha256=digest(HERE / relative)) + + +def fixture_certificate(name, relative, fixture): + events = fixture.get('full_events', fixture['events']) + n, m = fixture['banks'], fixture['ambient_arity'] + edges, paths, owner, nodes = graph_paths(events, n, m) + holonomies = check_partition(edges, paths, n, m) + direct = direct_paths(events, n, m) + need(sorted(owner) == list(range(n)), 'SWAP transports a permutation of physical strands') + for i, ((op, extra, r), (bank, expected, expected_extra)) in enumerate(zip(holonomies, direct)): + need(op.tab == expected.tab, 'independent physical unary holonomy tableau') + need(stable(op.circuit) == stable(expected.circuit), 'independent physical holonomy exact circuit order and phase') + need(extra == expected_extra and owner[bank] == i, 'physical strand endpoint and tensor phase') + hist = Counter(e['rank_per_f'] for e in events if e['kind'] == 'NATIVE') + mass = sum(r * count for r, count in hist.items()) + Z_score = sum(e['rank_per_f'] for e in edges) + lower = sum(item[2] for item in holonomies) + need(lower <= Z_score <= mass, 'rank lower bound versus original edge and gate invoices') + reported = fixture.get('mass', fixture.get('native_mass')) + need(mass == reported, 'source complete native mass') + parent = fixture.get('parent_arity', m) + stock = fixture.get('optimistic_stock', fixture.get('stock', n * parent)) + need(stock == n * parent, 'fixed endpoint stock') + + # Defect-sensitive controls use the actual finite source graph. + wrong = copy.deepcopy(paths) + wrong[0] = wrong[0][1:] + try: + check_partition(edges, wrong, n, m) + except ValueError as error: + omission = str(error) + else: + raise ValueError('edge-omission negative control accepted') + wrong_swap = None + for ordinal, event in enumerate(events): + if event['kind'] != 'BANK_SWAP': + continue + E, P, labels, _ = graph_paths(events, n, m, omit_swap=ordinal) + try: + H = check_partition(E, P, n, m) + for (op, extra, r), (_, expected, ep) in zip(H, direct): + need(op.tab == expected.tab and stable(op.circuit) == stable(expected.circuit) and extra == ep, + 'independent physical trajectory disagrees with omitted SWAP transport') + except ValueError as error: + wrong_swap = dict(source_event_ordinal=ordinal, rejected=str(error)) + break + need(wrong_swap is not None, 'a nontrivial literal-SWAP omission is detected') + + outpaths = [] + for i, ((op, extra, r), (bank, _, _)) in enumerate(zip(holonomies, direct)): + outpaths.append(dict(initial_bank=i, final_bank=bank, edges=paths[i], + native_holonomy_arity_per_f=r, one_coordinate_tableau=op.tab, + one_coordinate_literal_circuit=op.circuit, + extra_global_phase_exponent_by_f_mod4=extra)) + return dict(family=name, q=fixture['q'], banks=n, ambient_arity=m, + endpoint_arity_per_f=parent, stock=stock, source=source_pin(relative), + source_events_sha256=hashlib.sha256(stable(events).encode()).hexdigest(), + native_histogram=dict(sorted(hist.items())), original_native_mass=mass, + graph_nodes=nodes, graph_edges=len(edges), boundary_all_Z_invoice=Z_score, + trajectory_floor_per_f=lower, trajectory_ranks_per_f=[h[2] for h in holonomies], + bound_equals_source_invoice=(lower == mass), bound_equals_endpoint_stock=(lower == stock), + complete_edge_partition=True, exact_independent_holonomy_replay=True, + phases='Each holonomy is i^extra[f mod 4] times its literal coordinate circuit tensor power; field SCALE factors commute and are separately counted.', + scalar_scan_counts=dict(Counter(e['kind'] for e in events if e['kind'] in ('ADD', 'SCALE', 'BANK_SWAP'))), + edges=edges, trajectories=outpaths, + negative_controls=dict(omitted_edge_rejected=omission, wrong_SWAP_transport=wrong_swap)) + + +def produce(): + pins = pin_inputs() + sources = [('PAULI-DEFAULT', 'inputs/pauli/DEFAULT.json'), + ('PAULI-ISOLATED', 'inputs/pauli/ISOLATED.json'), + ('REPAIRED-SIMPLIFIED', 'inputs/REPAIRED-SIMPLIFIED.json'), + ('ADMITTED-TWO-SITE', 'inputs/ADMITTED-TWO-SITE.json')] + results = [] + for family, relative in sources: + for fixture in json.loads((HERE / relative).read_text())['fixtures']: + results.append(fixture_certificate(family, relative, fixture)) + pauli = [r for r in results if r['family'].startswith('PAULI-')] + need(all(r['bound_equals_source_invoice'] and r['bound_equals_endpoint_stock'] for r in pauli), + 'sharp Pauli fixed-trajectory floor') + return dict(status='PASS_EXACT_FIXED_WORD_TRAJECTORY_CERTIFICATES', no_new_kappa=True, + model='Fixed unary holonomies, fixed ADD common-frame graph, arbitrary Clifford Lagrangian frame gauges, literal physical input/output boundaries.', + proof_domain='The listed q2/q3 words; every positive f, including general frames mixing tensor coordinates. No all-q fixture extrapolation.', + fixtures=results, input_pin_manifest_sha256=digest(HERE / 'INPUT-PINS.json'), + producer_sha256=digest(__file__), + external_exact_clifford_source=dict(path=str(Path(ce.__file__).resolve()), sha256=digest(ce.__file__)), + limits=['This is an exact mathematical rank-mass lower bound, not a numerical-search lower bound.', + 'It does not fix a positive-exponent moment or admit a new supplier, owners, storage, rounding or BIT.', + 'Words with changed unary holonomies, nonlocal scalar rewrites across native sites, new helpers or changed endpoint contracts are outside this fixed-graph certificate.', + 'Pauli ISOLATED is used as a literal Clifford word; no selected-native lowering of its changed site is newly asserted here.']) + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + result = produce() + result = json.loads(json.dumps(result)) + output = HERE / 'TRAJECTORY-CERTIFICATES.json' + if args.write: + output.write_text(json.dumps(result, indent=2, sort_keys=True) + '\n') + else: + need(json.loads(output.read_text()) == result, 'saved exact trajectory certificate') + print(result['status']) + for r in result['fixtures']: + print(r['family'], 'q' + str(r['q']), r['trajectory_ranks_per_f'], 'floor', r['trajectory_floor_per_f'], + 'invoice', r['original_native_mass'], 'stock', r['stock']) + + +if __name__ == '__main__': + main() diff --git a/research/two-site-caller-fusion/source/root-chronology/quadratic_charts.py b/research/two-site-caller-fusion/source/root-chronology/quadratic_charts.py new file mode 100644 index 0000000000..80f2d4d055 --- /dev/null +++ b/research/two-site-caller-fusion/source/root-chronology/quadratic_charts.py @@ -0,0 +1,221 @@ +#!/usr/bin/env python3 +"""Exact X-character monomial algebra and bounded quadratic-chart retiming. + +Apache-2.0; substantial OpenAI Codex assistance. Rank screens do not admit a +physical supplier. A saved positive word must separately lower every child. +""" +from dataclasses import dataclass +from functools import lru_cache +from fractions import Fraction +from heapq import nsmallest +from math import isqrt +import argparse, hashlib, json +from pathlib import Path + +HERE=Path(__file__).resolve().parent +def need(c,m): + if not c: raise ValueError(m) +def parity(x): return x.bit_count()&1 +def linear(rows,x): return sum(parity(r&x)<>i&1),None) + need(j is not None,'invertible binary address');a[i],a[j]=a[j],a[i] + for j in range(n): + if j!=i and a[j]>>i&1:a[j]^=a[i] + return tuple(r>>n for r in a) +@lru_cache(None) +def rank(rows): + basis={} + for r in rows: + while r: + p=r.bit_length()-1 + if p in basis:r^=basis[p] + else:basis[p]=r;break + return len(basis) + +@dataclass(frozen=True) +class Mono: + rows:tuple + offset:int + alpha:tuple + quad:tuple + constant:int=0 + global_phase:int=0 + # Actual all-f family: i^global_phase times the f-fold tensor power. + def q(self,x): + return (self.constant+sum(a for i,a in enumerate(self.alpha) if x>>i&1) + +2*sum(parity(r&x) for i,r in enumerate(self.quad) if x>>i&1))%4 + def act(self,x):return linear(self.rows,x)^self.offset + def __matmul__(self,b):return compose(self,b) + def inv(self):return adjoint(self) + def data(self):return dict(rows=list(self.rows),offset=self.offset,alpha=list(self.alpha),quad=list(self.quad),constant=self.constant,global_phase=self.global_phase) + def polar(self): + r=[(self.alpha[i]&1)<>j&1:r[i]^=1<>j)&1)<>i)&1 for i,r in enumerate(rows)),tuple(r&~((1<<(i+1))-1) for i,r in enumerate(rows))) +def old_operator(e,n): + d=e['operator'];p=d['block_permutation'];rows=[0]*n + for i,j in enumerate(p):rows[2*j]=1<<(2*i);rows[2*j+1]=1<<(2*i+1) + out=Mono(tuple(rows),0,(0,)*n,(0,)*n) + alpha=[0]*n;offset=0 + for i in d['native_blocks']:alpha[2*i]=3;alpha[2*i+1]=1;offset^=3<<(2*i) + N=Mono(identity(n).rows,offset,tuple(alpha),(0,)*n,0,(len(d['native_blocks'])+(2 if d['sign']==-1 else 0))%4) + return N@out +def decode(e,n): + if 'x_monomial' in e: + d=e['x_monomial'];return Mono(tuple(d['rows']),d['offset'],tuple(d['alpha']),tuple(d['quad']),d.get('constant',0),d.get('global_phase',0)) + if e['kind']=='ADDRESS_LINEAR': + # Physical P_A acts on X characters by A^-T. + ri=inverse(tuple(e['operator']['address_rows'])) + rows=tuple(sum(((ri[j]>>i)&1)<>j)&1)<>i&1 else 0)for i in range(n)),0,(0,)*n,(0,)*n) + alpha=(3,1,0,0,0,0);N=Mono(I.rows,3,alpha,(0,)*n,0,1) + need(R@R==I and N@N==Mono(I.rows,0,(0,)*n,(0,)*n,0,2),'literal reflection and native square') + A=N@R@N.inv();need(rank(A.polar())==2,'independent conjugated reflection rank') + for a in (R,N,A,N@R): + need(a@a.inv()==I==a.inv()@a,'both literal inverses') + for b in (R,N,A): + c=a@b + for x in range(1<= d(Z,G Z) = native_B_rank(G). + +Every edge is in exactly one path. Summing therefore lower-bounds the entire +native rank bill. The proof requires the fixed ADD/common-frame graph and +unary holonomies. It is not a bound for arbitrary words realizing the same +overall matrix, nor for a changed helper or input/output contract. + +## The exact witness + +`FULL-STOCK-CERTIFICATES.json` specifies one straight/cross bit for every +ADD event in each source word. The chronological bitstring, actual source +event ordinals and source event hash are all retained. It also specifies +every graph edge, path edge list, signed holonomy tableau, complete literal +coordinate circuit, its literal inverse, and its all-f scalar phase vector. + +In the q2 witnesses all six holonomies have B-rank12. In q3 all eight have +B-rank16. Hence each path reaches its largest possible native rank m and +the sum equals n*m. This also proves that these witnesses maximize the +path-pairing objective, since no m-coordinate Clifford has B-rank above m. +Maximizing that certificate objective is distinct from minimizing the actual +retimed source bill; the latter may remain strictly above stock. + +The bounded proposer searched only these graph-pairing bits. It stopped as +soon as a full-stock bitstring was found: repaired q2/q3 after103/366 exact +rank proposals and admitted two-site q2/q3 after165/633. These counts describe +discovery, not exhaustive coverage or a probabilistic theorem. Admission +rebuilds every source unary circuit and edge, then independently traverses +the chronological physical strands with crossed pairing to check each full +operator product, signed tableau, tensor phase and source-unary order. + +An f-fold source holonomy is its saved coordinate circuit tensor power +times a scalar phase. Its B-rank is therefore f times the saved rank. +The metric proof is in the full mf-coordinate symplectic space, so the +candidate frame gauges themselves need not have a tensor-product form. +Exact inverse tableaux and inverse scalar phase vectors are retained. +No selected-native lowering of a newly synthesized operator is needed: +these holonomies certify a bound and are not proposed executable children. + +## Controls and reopening scope + +The all-straight pairing reproduces the old weaker floors62 and118 and is +rejected as a full-stock witness. Removing a stored edge rejects exact +partition coverage. Omitting an actual nontrivial BANK_SWAP transport +changes the independent literal crossed-strand replay and is rejected. +The admission producer passes in normal and optimized Python; no essential +checks disappear with assertions. + +New unary responses or holonomies, nonlocal scalar rewrites across native +operations, additional helper interactions, or changed physical boundary +contracts remain outside this fixed-word result. The earlier contiguous +scalar-SWAP identity splicing argument can preserve any of these improved +witnesses when its internal pairing is chosen consistently. No new kappa, +positive-exponent moment, compatible BIT supplier, owner allocation, +rounding, source-access, machine-controller or storage claim follows. diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json b/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json new file mode 100644 index 0000000000..6dc0a37a1d --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q2-PROPOSAL.json @@ -0,0 +1,152 @@ +{ + "ADD_event_ordinals": [ + 0, + 2, + 4, + 5, + 6, + 7, + 8, + 10, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 37, + 39, + 40, + 41, + 43, + 44, + 45, + 46, + 47, + 49, + 59, + 61, + 70, + 74, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 84, + 86, + 87, + 88, + 89 + ], + "banks": 6, + "best_floor": 72, + "crossing_ADD_event_ordinals": [ + 4, + 5, + 6, + 8, + 10, + 17, + 19, + 30, + 41, + 43, + 49, + 74, + 78, + 83, + 84, + 87, + 88 + ], + "goal": 72, + "history": [ + { + "floor": 62, + "mask": "0", + "ranks": [ + 8, + 12, + 10, + 10, + 12, + 10 + ], + "trial": 0 + }, + { + "floor": 64, + "mask": "8192", + "ranks": [ + 8, + 12, + 10, + 12, + 12, + 10 + ], + "trial": 1 + }, + { + "floor": 68, + "mask": "286784", + "ranks": [ + 8, + 12, + 12, + 12, + 12, + 12 + ], + "trial": 6 + }, + { + "floor": 70, + "mask": "2202450013316", + "ranks": [ + 12, + 12, + 12, + 12, + 12, + 10 + ], + "trial": 35 + }, + { + "floor": 72, + "mask": "1857859372508", + "ranks": [ + 12, + 12, + 12, + 12, + 12, + 12 + ], + "trial": 103 + } + ], + "limits": [ + "Search proposal only; not an exhaustive bound.", + "Exact edge/circuit/phase admission is separate." + ], + "m": 12, + "mask": "1857859372508", + "producer_sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023", + "q": 2, + "seed": 1019, + "source_family": "REPAIRED", + "source_pins": { + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + "status": "RANK_ONLY_PAIRING_PROPOSAL", + "trials": 103 +} diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json b/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json new file mode 100644 index 0000000000..36c294452c --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/REPAIRED-Q3-PROPOSAL.json @@ -0,0 +1,201 @@ +{ + "ADD_event_ordinals": [ + 0, + 1, + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 22, + 23, + 24, + 34, + 35, + 36, + 37, + 38, + 47, + 48, + 50, + 51, + 52, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 63, + 75, + 76, + 78, + 79, + 88, + 89, + 95, + 107, + 109, + 120, + 121, + 125, + 128, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 140, + 142, + 143, + 144, + 145, + 146 + ], + "banks": 8, + "best_floor": 128, + "crossing_ADD_event_ordinals": [ + 0, + 5, + 6, + 7, + 8, + 10, + 13, + 22, + 23, + 24, + 34, + 36, + 38, + 48, + 50, + 54, + 55, + 78, + 79, + 88, + 89, + 95, + 109, + 120, + 121, + 130, + 131, + 133, + 134, + 136, + 138, + 139, + 142, + 143, + 144, + 146 + ], + "goal": 128, + "history": [ + { + "floor": 118, + "mask": "0", + "ranks": [ + 12, + 16, + 14, + 14, + 16, + 14, + 16, + 16 + ], + "trial": 0 + }, + { + "floor": 122, + "mask": "8192", + "ranks": [ + 12, + 16, + 16, + 14, + 16, + 16, + 16, + 16 + ], + "trial": 1 + }, + { + "floor": 124, + "mask": "1835283862256398211", + "ranks": [ + 14, + 16, + 16, + 16, + 14, + 16, + 16, + 16 + ], + "trial": 114 + }, + { + "floor": 126, + "mask": "1331022403752439202", + "ranks": [ + 16, + 16, + 16, + 14, + 16, + 16, + 16, + 16 + ], + "trial": 134 + }, + { + "floor": 128, + "mask": "3375112535361813881", + "ranks": [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16 + ], + "trial": 366 + } + ], + "limits": [ + "Search proposal only; not an exhaustive bound.", + "Exact edge/circuit/phase admission is separate." + ], + "m": 16, + "mask": "3375112535361813881", + "producer_sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023", + "q": 3, + "seed": 1019, + "source_family": "REPAIRED", + "source_pins": { + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + "status": "RANK_ONLY_PAIRING_PROPOSAL", + "trials": 366 +} diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json b/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json new file mode 100644 index 0000000000..981e567ed1 --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q2-PROPOSAL.json @@ -0,0 +1,147 @@ +{ + "ADD_event_ordinals": [ + 0, + 2, + 4, + 5, + 6, + 7, + 8, + 10, + 17, + 18, + 19, + 27, + 28, + 29, + 30, + 37, + 39, + 40, + 41, + 43, + 44, + 45, + 46, + 47, + 49, + 59, + 61, + 70, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 82, + 83, + 85, + 86, + 87, + 88 + ], + "banks": 6, + "best_floor": 72, + "crossing_ADD_event_ordinals": [ + 2, + 4, + 6, + 7, + 28, + 29, + 41, + 43, + 75, + 79, + 82, + 88 + ], + "goal": 72, + "history": [ + { + "floor": 62, + "mask": "0", + "ranks": [ + 8, + 12, + 10, + 10, + 12, + 10 + ], + "trial": 0 + }, + { + "floor": 64, + "mask": "8192", + "ranks": [ + 8, + 12, + 10, + 12, + 12, + 10 + ], + "trial": 1 + }, + { + "floor": 68, + "mask": "286784", + "ranks": [ + 8, + 12, + 12, + 12, + 12, + 12 + ], + "trial": 6 + }, + { + "floor": 70, + "mask": "12079885312", + "ranks": [ + 12, + 12, + 12, + 10, + 12, + 12 + ], + "trial": 21 + }, + { + "floor": 72, + "mask": "2276870336566", + "ranks": [ + 12, + 12, + 12, + 12, + 12, + 12 + ], + "trial": 165 + } + ], + "limits": [ + "Search proposal only; not an exhaustive bound.", + "Exact edge/circuit/phase admission is separate." + ], + "m": 12, + "mask": "2276870336566", + "producer_sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023", + "q": 2, + "seed": 1019, + "source_family": "TWO-SITE", + "source_pins": { + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + "status": "RANK_ONLY_PAIRING_PROPOSAL", + "trials": 165 +} diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json b/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json new file mode 100644 index 0000000000..79f679a8ec --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/TWO-SITE-Q3-PROPOSAL.json @@ -0,0 +1,192 @@ +{ + "ADD_event_ordinals": [ + 0, + 1, + 3, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 22, + 23, + 24, + 34, + 35, + 36, + 37, + 38, + 47, + 48, + 50, + 51, + 52, + 54, + 55, + 56, + 57, + 58, + 59, + 60, + 61, + 63, + 75, + 76, + 78, + 79, + 88, + 89, + 95, + 107, + 109, + 120, + 121, + 125, + 128, + 129, + 130, + 131, + 132, + 133, + 134, + 135, + 136, + 137, + 138, + 139, + 141, + 142, + 143, + 144, + 145 + ], + "banks": 8, + "best_floor": 128, + "crossing_ADD_event_ordinals": [ + 1, + 3, + 9, + 10, + 11, + 13, + 22, + 24, + 35, + 38, + 51, + 52, + 56, + 75, + 76, + 79, + 88, + 107, + 109, + 120, + 121, + 130, + 131, + 132, + 135, + 141, + 144 + ], + "goal": 128, + "history": [ + { + "floor": 118, + "mask": "0", + "ranks": [ + 12, + 16, + 14, + 14, + 16, + 14, + 16, + 16 + ], + "trial": 0 + }, + { + "floor": 122, + "mask": "8192", + "ranks": [ + 12, + 16, + 16, + 14, + 16, + 16, + 16, + 16 + ], + "trial": 1 + }, + { + "floor": 124, + "mask": "18025393898758144", + "ranks": [ + 16, + 16, + 16, + 16, + 16, + 16, + 12, + 16 + ], + "trial": 17 + }, + { + "floor": 126, + "mask": "29284392967189632", + "ranks": [ + 16, + 16, + 16, + 14, + 16, + 16, + 16, + 16 + ], + "trial": 30 + }, + { + "floor": 128, + "mask": "1302542179411210118", + "ranks": [ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16 + ], + "trial": 633 + } + ], + "limits": [ + "Search proposal only; not an exhaustive bound.", + "Exact edge/circuit/phase admission is separate." + ], + "m": 16, + "mask": "1302542179411210118", + "producer_sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023", + "q": 3, + "seed": 1019, + "source_family": "TWO-SITE", + "source_pins": { + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/ADMITTED-TWO-SITE.json": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/inputs/REPAIRED-SIMPLIFIED.json": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3", + "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/pauli-caller-retiming/trajectory_certificate.py": "677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc" + }, + "status": "RANK_ONLY_PAIRING_PROPOSAL", + "trials": 633 +} diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/VALIDATION.json b/research/two-site-caller-fusion/source/trajectory-pairing-search/VALIDATION.json new file mode 100644 index 0000000000..357b415edf --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/VALIDATION.json @@ -0,0 +1,65 @@ +{ + "commands": [ + { + "argv": [ + "/opt/homebrew/opt/python@3.14/bin/python3.14", + "-B", + "admit_pairings.py" + ], + "returncode": 0, + "stderr": "", + "stdout": "PASS_FOUR_EXACT_FULL_STOCK_PATH_PAIRING_CERTIFICATES\nREPAIRED q2 floor 72 mass 80 paths [12, 12, 12, 12, 12, 12]\nREPAIRED q3 floor 128 mass 136 paths [16, 16, 16, 16, 16, 16, 16, 16]\nTWO-SITE q2 floor 72 mass 76 paths [12, 12, 12, 12, 12, 12]\nTWO-SITE q3 floor 128 mass 132 paths [16, 16, 16, 16, 16, 16, 16, 16]\n" + }, + { + "argv": [ + "/opt/homebrew/opt/python@3.14/bin/python3.14", + "-B", + "-O", + "admit_pairings.py" + ], + "returncode": 0, + "stderr": "", + "stdout": "PASS_FOUR_EXACT_FULL_STOCK_PATH_PAIRING_CERTIFICATES\nREPAIRED q2 floor 72 mass 80 paths [12, 12, 12, 12, 12, 12]\nREPAIRED q3 floor 128 mass 136 paths [16, 16, 16, 16, 16, 16, 16, 16]\nTWO-SITE q2 floor 72 mass 76 paths [12, 12, 12, 12, 12, 12]\nTWO-SITE q3 floor 128 mass 132 paths [16, 16, 16, 16, 16, 16, 16, 16]\n" + } + ], + "coverage": "All four exact circuit/phase path partitions, independent direct crossed replay, native-rank sums, two-sided signed holonomy inverses, all-straight/edge-omission/SWAP controls.", + "discovery": "Exact-rank annealed bit-flip proposals stopped at the theoretical n*m objective maximum. Their counts are discovery records, not exhaustive search evidence.", + "files": [ + { + "path": "admit_pairings.py", + "sha256": "f0ce5196bf3c75ed1ed22a8424e971293f56cf6939be34ccd3f082430440f91c" + }, + { + "path": "pairing_search.py", + "sha256": "4c1dc5986808c62a2caace8059f5c8a2a6a706b4ad46ed042542b5f63e27c023" + }, + { + "path": "FULL-STOCK-CERTIFICATES.json", + "sha256": "bf09718bbce18a3d7a0ab26074661d48a2f844a447064eba886bf6ce659b2cb5" + }, + { + "path": "PROOF.md", + "sha256": "5f9fc20d71ca16d455ab050ac9cb990102e7d10e44c4ab0e1cc23fce1d222673" + }, + { + "path": "REPAIRED-Q2-PROPOSAL.json", + "sha256": "77d344a5498ae87b4111f623e04e73798252a5ddb61c353e627bc9a3a2162636" + }, + { + "path": "REPAIRED-Q3-PROPOSAL.json", + "sha256": "c5bdfcf8bcb3cb5f82bf1ad5c3f02e6133b049f460154cf8159b97469510e46a" + }, + { + "path": "TWO-SITE-Q2-PROPOSAL.json", + "sha256": "53b72d0719e2211ae1f61cd29d3310e41728d66f3b8129616c402d65d6d4edf2" + }, + { + "path": "TWO-SITE-Q3-PROPOSAL.json", + "sha256": "6e76d41e89491cc2f1a91680eb3858af0484da3f5fddb515f4e71cbc40b6eca0" + } + ], + "no_new_kappa": true, + "producer_sha256": "fa1b0928b00678aa1d4e91c0a8572280c07d240be46994ff71c15ecd085b515c", + "source_semantics": "Unchanged complete source caller/all-input/inverse/selected recipe evidence is inherited through its frozen pins, not claimed as freshly executed.", + "status": "PASS_EXACT_FULL_STOCK_PAIRINGS_NORMAL_AND_OPTIMIZED" +} diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/admit_pairings.py b/research/two-site-caller-fusion/source/trajectory-pairing-search/admit_pairings.py new file mode 100644 index 0000000000..5601473ae7 --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/admit_pairings.py @@ -0,0 +1,165 @@ +#!/usr/bin/env python3 +"""Admit four full-stock ADD-pairing certificates from literal source events. +Apache-2.0. Substantial OpenAI Codex assistance. No supplier/kappa admission. +""" +from pathlib import Path +import argparse, copy, hashlib, json, sys +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +sys.path.insert(0, str(HERE)) +import pairing_search as search +t = search.t + + +def direct_crossed(events, n, m, crossings, omit_swap=None): + """Independent event replay without graph nodes or edge IDs.""" + order = list(range(n)) + op = [t.ce.ident(m) for _ in range(n)] + extra = [(0,)*4 for _ in range(n)] + source_ordinals = [[] for _ in range(n)] + for ordinal, e in enumerate(events): + kind = e['kind'] + do_swap = kind == 'BANK_SWAP' and ordinal != omit_swap + if kind == 'ADD' and ordinal in crossings: + i, j = e['dst'], e['src'] + do_swap = True + elif kind == 'BANK_SWAP': + i, j = e['banks'] + if do_swap: + order[i], order[j] = order[j], order[i] + op[i], op[j] = op[j], op[i] + extra[i], extra[j] = extra[j], extra[i] + source_ordinals[i], source_ordinals[j] = source_ordinals[j], source_ordinals[i] + elif kind not in ('ADD', 'BANK_SWAP', 'SCALE'): + g, p = t.unary(e, m) + b = e['bank'] + op[b] = op[b].then(g) + extra[b] = t.add_phase(extra[b], p) + source_ordinals[b] = source_ordinals[b] + [ordinal] + result = [None] * n + for bank, label in enumerate(order): + result[label] = dict(final_bank=bank, op=op[bank], extra=extra[bank], source_ordinals=source_ordinals[bank]) + return result + + +def fixture(family, q): + source = 'inputs/REPAIRED-SIMPLIFIED.json' if family == 'REPAIRED' else 'inputs/ADMITTED-TWO-SITE.json' + f = next(f for f in json.loads((search.OLD / source).read_text())['fixtures'] if f['q'] == q) + events = f.get('full_events', f['events']) + n, m = f['banks'], f['ambient_arity'] + proposal_file = HERE / (family + '-Q' + str(q) + '-PROPOSAL.json') + proposal = json.loads(proposal_file.read_text()) + t.need(proposal['producer_sha256'] == t.digest(HERE / 'pairing_search.py'), 'proposal source pin') + add_ordinals = [i for i, e in enumerate(events) if e['kind'] == 'ADD'] + t.need(add_ordinals == proposal['ADD_event_ordinals'], 'all ADD ordinals pinned in chronological order') + mask = int(proposal['mask']) + crossings = [ordinal for bit, ordinal in enumerate(add_ordinals) if mask >> bit & 1] + t.need(crossings == proposal['crossing_ADD_event_ordinals'], 'bitmask means exactly the saved ADD crossings') + t.need(mask < (1 << len(add_ordinals)), 'pairing mask has no unbound bits') + E, P, owner, nodes = t.graph_paths(events, n, m, crossing_adds=crossings) + H = t.check_partition(E, P, n, m) + direct = direct_crossed(events, n, m, set(crossings)) + phase_vectors = [] + paths = [] + for i, ((op, extra, rank), expected) in enumerate(zip(H, direct)): + g = expected['op'] + t.need(op.tab == g.tab, 'independent direct signed crossed-strand product') + t.need(t.stable(op.circuit) == t.stable(g.circuit), 'independent direct literal circuit and global phase order') + t.need(extra == expected['extra'], 'all-f global tensor phase polynomial agrees') + t.need(rank == m, 'every path holonomy is full native ambient arity') + t.need(owner[expected['final_bank']] == i, 'crossed trajectory endpoint identity') + source_list = [ordinal for eid in P[i] for ordinal in E[eid]['source_event_ordinals']] + t.need(source_list == expected['source_ordinals'], 'every actual source unary appears in the right ordered strand') + for product in (op.then(op.adjoint()), op.adjoint().then(op)): + t.need(product.tab == t.ce.identity(m), 'holonomy literal inverse every signed Pauli column, both orders') + phase_vectors.append(extra) + paths.append(dict(initial_bank=i, final_bank=expected['final_bank'], edges=P[i], + source_unary_event_ordinals=source_list, + native_holonomy_arity_per_f=rank, one_coordinate_tableau=op.tab, + one_coordinate_literal_circuit=op.circuit, + extra_global_phase_exponent_by_f_mod4=extra, + literal_inverse_circuit=op.adjoint().circuit, + inverse_extra_global_phase_exponent_by_f_mod4=[(-x) % 4 for x in extra])) + + # The proposal evaluator is not trusted as the admission engine. + mm, nn, prepared, expected_ordinals = search.prepare(f) + fast, fast_ranks = search.evaluate(mask, mm, nn, prepared) + t.need(fast == m*n and fast_ranks == [m]*n, 'independent fast score agrees after literal admission') + zeroE, zeroP, _, _ = t.graph_paths(events, n, m) + straight = sum(item[2] for item in t.check_partition(zeroE, zeroP, n, m)) + t.need(straight < m*n, 'all-straight mutant fails the full-stock witness target') + + bad = copy.deepcopy(P) + bad[0] = bad[0][1:] + try: + t.check_partition(E, bad, n, m) + except ValueError as error: + omitted = str(error) + else: + raise ValueError('omitted edge passed new certificate') + wrong_swap = None + for ordinal, e in enumerate(events): + if e['kind'] != 'BANK_SWAP': + continue + mutant = direct_crossed(events, n, m, set(crossings), omit_swap=ordinal) + if any(x['op'].tab != y['op'].tab or t.stable(x['op'].circuit) != t.stable(y['op'].circuit) + or x['extra'] != y['extra'] or x['final_bank'] != y['final_bank'] + for x, y in zip(direct, mutant)): + wrong_swap = ordinal + break + t.need(wrong_swap is not None, 'an actual omitted BANK_SWAP transport changes the direct witness') + + mass = sum(e['rank_per_f'] for e in events if e['kind'] == 'NATIVE') + stock = f.get('stock', n*m) + t.need(stock == n*m and proposal['best_floor'] == stock, 'unchanged full-native old endpoint stock') + return dict(family=family, q=q, banks=n, ambient_arity=m, stock=stock, original_native_mass=mass, + source_path=str(search.OLD / source), source_sha256=t.digest(search.OLD / source), + source_events_sha256=hashlib.sha256(t.stable(events).encode()).hexdigest(), + proposal=dict(path=proposal_file.name, sha256=t.digest(proposal_file), trials=proposal['trials']), + pairing_bitstring_chronological=''.join('1' if mask >> bit & 1 else '0' for bit in range(len(add_ordinals))), + pairing_mask_decimal=str(mask), ADD_event_ordinals=add_ordinals, + crossing_ADD_event_ordinals=crossings, graph_nodes=nodes, graph_edges=len(E), + complete_edge_partition=True, independently_replayed_literal_circuits_and_tensor_phases=True, + straight_floor_per_f=straight, admitted_floor_per_f=stock, + trajectory_ranks_per_f=[m]*n, edges=E, trajectories=paths, + negative_controls=dict(all_straight_target_rejected=dict(floor=straight, required=stock), + omitted_edge_rejected=omitted, + omitted_actual_BANK_SWAP_direct_transport_rejected_at_event=wrong_swap)) + + +def produce(): + t.pin_inputs() + fixtures = [fixture(family, q) for family in ['REPAIRED', 'TWO-SITE'] for q in [2, 3]] + return dict(status='PASS_FOUR_EXACT_FULL_STOCK_PATH_PAIRING_CERTIFICATES', no_new_kappa=True, + producer_sha256=t.digest(__file__), search_producer_sha256=t.digest(HERE / 'pairing_search.py'), + frozen_trajectory_proof_sha256=t.digest(search.OLD / 'TRAJECTORY-PROOF.md'), + frozen_trajectory_producer_sha256=t.digest(search.OLD / 'trajectory_certificate.py'), + frozen_trajectory_manifest_sha256=t.digest(search.OLD / 'MANIFEST.json'), + theorem='For each fixed listed unary/common-frame ADD graph, every Clifford-frame retiming has native rank mass at least stock (72f or128f).', + domain='The four finite q2/q3 words, all positive f; arbitrary general Clifford frames can mix tensor coordinates.', + fixtures=fixtures, + limits=['Exact witness, not an exhaustive pairing search or a global caller lower bound.', + 'The path certificate reaches the maximum possible sum n*m, but source native bills80/136 and76/132 are not certified minimal.', + 'Native query recipes and original all-input caller/inverse semantics remain those of the unchanged source artifacts; no new supplier or endpoint is introduced.', + 'Changed unary holonomies, nonlocal ADD/native chronology, new helper coupling or changed physical input/output contracts need a new certificate.', + 'No all-q, positive-exponent moment, BIT, owner, storage, precision or kappa admission.']) + + +def main(): + p = argparse.ArgumentParser() + p.add_argument('--write', action='store_true') + a = p.parse_args() + result = json.loads(json.dumps(produce())) + output = HERE / 'FULL-STOCK-CERTIFICATES.json' + if a.write: + output.write_text(json.dumps(result, indent=2, sort_keys=True) + '\n') + else: + t.need(json.loads(output.read_text()) == result, 'saved stronger pairing certificate') + print(result['status']) + for f in result['fixtures']: + print(f['family'], 'q'+str(f['q']), 'floor', f['admitted_floor_per_f'], 'mass', f['original_native_mass'], + 'paths', f['trajectory_ranks_per_f']) + + +if __name__ == '__main__': + main() diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/pairing_search.py b/research/two-site-caller-fusion/source/trajectory-pairing-search/pairing_search.py new file mode 100644 index 0000000000..57fd64d8ed --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/pairing_search.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python3 +"""Bounded rank-only proposal search over ADD-vertex path pairings. +Exact witnesses are admitted separately by circuit/phase edge replay. +Apache-2.0. Substantial OpenAI Codex assistance. +""" +from pathlib import Path +from functools import lru_cache +import argparse, hashlib, json, math, random, sys, time +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +OLD = HERE.parent / 'pauli-caller-retiming' +PINS = { + 'trajectory_certificate.py': '677a342334e49befbfe069441325f3ac6008705c6697cff5c348905a67d92cbc', + 'inputs/REPAIRED-SIMPLIFIED.json': '4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3', + 'inputs/ADMITTED-TWO-SITE.json': '30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f', +} +for relative, digest in PINS.items(): + if hashlib.sha256((OLD / relative).read_bytes()).hexdigest() != digest: + raise ValueError('frozen source pin: ' + relative) +sys.path.insert(0, str(OLD)) +import trajectory_certificate as t + + +def lookup(op): + columns = t.columns(op) + chunks = (2 * op.n + 7) // 8 + out = [] + for k in range(chunks): + A = columns[8*k:8*k+8] + table = [0] * 256 + for value in range(1, 256): + bit = value & -value + index = bit.bit_length() - 1 + table[value] = table[value ^ bit] ^ (A[index] if index < len(A) else 0) + out.append(table) + return tuple(out) + + +def prepare(fixture): + m, n = fixture['ambient_arity'], fixture['banks'] + prepared = [] + add_ordinals = [] + events = fixture.get('full_events', fixture['events']) + for ordinal, e in enumerate(events): + kind = e['kind'] + if kind == 'ADD': + add_ordinals.append(ordinal) + prepared.append(('A', e['dst'], e['src'], len(add_ordinals)-1)) + elif kind == 'BANK_SWAP': + prepared.append(('S', *e['banks'])) + elif kind == 'SCALE': + pass + else: + op, extra = t.unary(e, m) + if op.tab != t.ce.identity(m): + prepared.append(('G', e['bank'], lookup(op))) + return m, n, prepared, add_ordinals + + +def evaluate(mask, m, n, events): + states = [tuple(1 << (m+i) for i in range(m)) for _ in range(n)] + chunks = (2*m+7)//8 + for e in events: + if e[0] == 'A': + if mask >> e[3] & 1: + i, j = e[1:3] + states[i], states[j] = states[j], states[i] + elif e[0] == 'S': + i, j = e[1:] + states[i], states[j] = states[j], states[i] + else: + bank, tables = e[1:] + if chunks == 3: + a, b, c = tables + states[bank] = tuple(a[x & 255] ^ b[(x >> 8) & 255] ^ c[x >> 16] for x in states[bank]) + elif chunks == 4: + a, b, c, d = tables + states[bank] = tuple(a[x & 255] ^ b[(x >> 8) & 255] ^ c[(x >> 16) & 255] ^ d[x >> 24] for x in states[bank]) + else: + raise ValueError('proposal engine is bounded to the declared q2/q3 widths') + low = (1 << m)-1 + ranks = [t.rank(x & low for x in state) for state in states] + return sum(ranks), ranks + + +def search(fixture, seconds, seed, name): + m, n, events, ordinals = prepare(fixture) + width = len(ordinals) + rng = random.Random(seed) + trials = 0 + start = time.monotonic() + bestmask = 0 + best, ranks = evaluate(0, m, n, events) + history = [dict(trial=0, floor=best, ranks=ranks, mask=str(bestmask))] + output = HERE / (name + '-Q' + str(fixture['q']) + '-PROPOSAL.json') + + def save(): + result = dict(status='RANK_ONLY_PAIRING_PROPOSAL', source_family=name, q=fixture['q'], + m=m, banks=n, goal=m*n, best_floor=best, mask=str(bestmask), + crossing_ADD_event_ordinals=[ordinal for i, ordinal in enumerate(ordinals) if bestmask >> i & 1], + ADD_event_ordinals=ordinals, trials=trials, seed=seed, history=history, + source_pins={str(OLD/r):h for r,h in PINS.items()}, + producer_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + limits=['Search proposal only; not an exhaustive bound.', 'Exact edge/circuit/phase admission is separate.']) + output.write_text(json.dumps(result, indent=2, sort_keys=True) + '\n') + + mask = 0 + score = best + step = 0 + while time.monotonic()-start < seconds and best < m*n: + # Reheat/restart; exact bit-flip proposals never affect source events. + if step % (8*width) == 0: + mask = bestmask if rng.random() < .5 else rng.getrandbits(width) + score, _ = evaluate(mask, m, n, events) + bit = rng.randrange(width) + candidate = mask ^ (1 << bit) + value, cranks = evaluate(candidate, m, n, events) + trials += 1 + temperature = max(.2, 2.5 * (1 - (step % (8*width))/(8*width))) + if value >= score or rng.random() < math.exp((value-score)/temperature): + mask, score = candidate, value + if value > best: + best, bestmask = value, candidate + history.append(dict(trial=trials, floor=best, ranks=cranks, mask=str(bestmask))) + save() + print(name, 'q'+str(fixture['q']), 'NEW_FLOOR', best, cranks, 'trial', trials, flush=True) + step += 1 + save() + print(name, 'q'+str(fixture['q']), 'STOP', best, 'goal', m*n, 'trials', trials, flush=True) + return best + + +def main(): + p = argparse.ArgumentParser() + p.add_argument('--family', choices=['REPAIRED', 'TWO-SITE'], default='REPAIRED') + p.add_argument('--q', type=int, default=2) + p.add_argument('--seconds', type=float, default=180) + p.add_argument('--seed', type=int, default=1019) + a = p.parse_args() + source = 'inputs/REPAIRED-SIMPLIFIED.json' if a.family == 'REPAIRED' else 'inputs/ADMITTED-TWO-SITE.json' + data = json.loads((OLD / source).read_text()) + f = next(f for f in data['fixtures'] if f['q'] == a.q) + search(f, a.seconds, a.seed, a.family) + + +if __name__ == '__main__': + main() diff --git a/research/two-site-caller-fusion/source/trajectory-pairing-search/validate.py b/research/two-site-caller-fusion/source/trajectory-pairing-search/validate.py new file mode 100644 index 0000000000..6fd43712b2 --- /dev/null +++ b/research/two-site-caller-fusion/source/trajectory-pairing-search/validate.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +"""Normal/optimized exact admission; discovery trials are not theorem evidence. +Apache-2.0. Substantial OpenAI Codex assistance. +""" +from pathlib import Path +import argparse, hashlib, json, subprocess, sys +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent + + +def need(c, message): + if not c: + raise ValueError(message) + + +def sha(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def produce(): + commands = [] + for optimized in (False, True): + command = [sys.executable, '-B'] + (['-O'] if optimized else []) + ['admit_pairings.py'] + result = subprocess.run(command, cwd=HERE, text=True, capture_output=True, check=False) + need(result.returncode == 0, 'exact normal/optimized admission\n' + result.stderr) + commands.append(dict(argv=command, returncode=result.returncode, stdout=result.stdout, stderr=result.stderr)) + files = ['admit_pairings.py', 'pairing_search.py', 'FULL-STOCK-CERTIFICATES.json', 'PROOF.md'] + for family in ['REPAIRED', 'TWO-SITE']: + for q in [2, 3]: + files.append(family + '-Q' + str(q) + '-PROPOSAL.json') + need(not list(HERE.rglob('__pycache__')), 'no bytecode scratch from producer validation') + return dict(status='PASS_EXACT_FULL_STOCK_PAIRINGS_NORMAL_AND_OPTIMIZED', no_new_kappa=True, + commands=commands, producer_sha256=sha(__file__), + files=[dict(path=p, sha256=sha(HERE / p)) for p in files], + coverage='All four exact circuit/phase path partitions, independent direct crossed replay, native-rank sums, two-sided signed holonomy inverses, all-straight/edge-omission/SWAP controls.', + source_semantics='Unchanged complete source caller/all-input/inverse/selected recipe evidence is inherited through its frozen pins, not claimed as freshly executed.', + discovery='Exact-rank annealed bit-flip proposals stopped at the theoretical n*m objective maximum. Their counts are discovery records, not exhaustive search evidence.') + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + result = produce() + output = HERE / 'VALIDATION.json' + if args.write: + output.write_text(json.dumps(result, indent=2, sort_keys=True) + '\n') + else: + need(json.loads(output.read_text()) == result, 'saved exact pairing validation') + print(result['status']) + + +if __name__ == '__main__': + main() diff --git a/research/two-site-caller-fusion/source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz new file mode 100644 index 0000000000..413b85ecf2 Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/CONTINUED-ISOLATION-Q2.json b/research/two-site-caller-fusion/source/two-site-continuation/CONTINUED-ISOLATION-Q2.json new file mode 100644 index 0000000000..95e5f19db9 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/CONTINUED-ISOLATION-Q2.json @@ -0,0 +1,33 @@ +{ + "base_mass": 76, + "best_rank_only_complete_mass": 76, + "cases": [], + "completed_masks": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ], + "counts": { + "correction-not-one-bank": 4887, + "not-isolated-both-sides": 34 + }, + "elapsed_seconds": 0.29060400000889786, + "no_new_kappa": true, + "producer_sha256": "89551fe31fbf92cdc1167c7a0149b345733abac09da14aa7e482adc3842442a0", + "q": 2, + "scope": "After the independently complete mass76 word, delete a nonempty subset of its remaining tail native queries. Price every two-existing-prefix-unary pair whose transported whole-bank row AND column are isolated and whose required cut correction is a single unitary Clifford bank. Other pairs are not excluded. The exact minimum for that stratum is |rank(L)-rank(R)|, with unrestricted physical monomial adapters.", + "source_path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json", + "source_sha256": "5ee7878ccd08a1eff40b9bc68e2d0476e501819aea39fda75cbeeadfb9f81d2e", + "status": "PASS_BOUNDED_GENERAL_CLIFFORD_ISOLATED_PAIR_CONTINUATION", + "stock": 72, + "tail_native_sites": [ + 1, + 13, + 18 + ], + "timed_out": false +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/CONTROLS.json b/research/two-site-caller-fusion/source/two-site-continuation/CONTROLS.json new file mode 100644 index 0000000000..31c0a936b3 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/CONTROLS.json @@ -0,0 +1,11 @@ +{ + "correct_order": "C=Y_j V X_i V^-1", + "equation": [ + 0, + 0 + ], + "producer_sha256": "b1b7543c9d8347dadc242dcf4420e62009e0d410063a3553167b8c4d1d6895b2", + "solver_sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a", + "status": "PASS_EXACT_NONCOMMUTING_TWO_SITE_CONTROLS", + "wrong_order_rejection": "off-bank-defect" +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/HANDOFF.md b/research/two-site-caller-fusion/source/two-site-continuation/HANDOFF.md new file mode 100644 index 0000000000..81d2011415 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/HANDOFF.md @@ -0,0 +1,70 @@ +# Two-site continuation handoff + +Only this new directory was edited. `caller-joint/`, the predecessor round, +`folded-fusion/` and BIT artifacts remain unchanged. No publishing, pushes, +PRs, Actions or child agents were used. The original round cutoff remains +2026-10-19T15:13:25.338994Z. This bounded task began13:14:13Z. + +The constructive result is `ADMITTED-TWO-SITE-FUSIONS.json`: + +- q2: every original input ends at its literal F5 J output; H2=36,H4=1, + mass76,stock72. Replaces source-ADDRESS sites31/51 with a physical monomial + and one native2 query, removing the whole tail U recovery of arity6. +- q3: every original input ends at its literal F7 J output; H2=64,H4=1, + mass132,stock128. The changed sites are39/97, again with new ranks0/2 and + whole tail U recovery removed. + +Both improve the source by four mass units. Neither has positive deficit; +there is no new kappa. No all-q construction is inferred from q2/q3. + +`PROOF.md` gives the exact two-site equation, finite-cover scope, the isolated +whole-bank rank lemma and its phase-complete Bruhat construction. The key step +uses unrestricted physical Gaussian monomial adapters, including quadratic +Z phases. It is not restricted to the original X-character-monomial subgroup. +The first emitted monomial is literal; L/R factorizations are offline algebra, +not uncharged runtime native queries. Native child caps are checked, and all +monomial/ADD/scalar scans remain paid costs. + +`admit_fusions.py` independently binds the current words to a frozen repaired +source snapshot and used-only selected-native pool. Every native ID, embedding, +one-coordinate Gaussian phase and fmod4 global-unit vector is checked in both +directions. The serialized inverse itself is replayed, including every original +owner column, rather than relying only on an internal inverse accumulator. +All native-family/x_monomial/phase-exponent shadows are removed from this schema. +The pool has14 used forward/inverse definitions per fixture. Normal and +optimized admitted replay pass, with wrong-direction pointer, f2-only phase +and omitted-free-monomial controls rejected. + +The repaired source copy is `inputs/REPAIRED-SIMPLIFIED-FUSIONS.json` with SHA +4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3. +Its pinned manifest is dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c. +`INPUT-EVENTS.json` is the original exact event-only scientific snapshot. +`frozen-two-site-v1/` preserves the complete earlier scientific witnesses +before current-event metadata enrichment and selected-source admission. + +The initial single-ray equation census checks15 tail subsets times703 prefix +unary pairs at q2. It accepts183 Clifford factorizations, best mass80, and +explicitly leaves87 strata unresolved. The finite-ray cover handles72 of those +without an improvement;15 homogeneous strata are not a claimed exclusion. +The constructive isolated case comes from that homogeneous part. + +The allowed subsequent bounded test is `CONTINUED-ISOLATION-Q2.json`: after the +mass76 word, all7 remaining-tail-native subsets and703 prefix pairs were tested +in the isolated-whole-bank class using the GENERAL Clifford algebra. No eligible +pair exists:4,887 cut corrections are not one bank,34 transports are not isolated +in both row and column. This does not exclude a genuinely coupled two-bank +correction, further changed sites or a changed response/owner boundary. + +The remaining mathematical goal is a complete saving below stock, not merely +the four-unit improvement recorded here. Parent owns independent review, +whole-word retiming, outer pricing and any publication. No processes remain +active when the final validation/manifest checkpoint is written. + +The apparent general pattern "query3 postwarp plus the last even postwarp" +is unresolved beyond the two listed fixtures. The isolated-pair Bruhat lemma +is general, but its required literal all-q transport, rank pair and reader +chronology must still be derived; q2/q3 are not an induction proof. +The exact D/P/X/scalar event lists give fixed-in-f scan macros for these fixed +arities. A finite controller lowering, bank/address access costs, precision and +complete outer native moment remain separate conditions. This package does +not substitute native rank mass for those costs or claim joint BIT admission. diff --git a/research/two-site-caller-fusion/source/two-site-continuation/INPUT-EVENTS.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/INPUT-EVENTS.json.gz new file mode 100644 index 0000000000..519ca4a45d Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/INPUT-EVENTS.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q2.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q2.json.gz new file mode 100644 index 0000000000..77253597c1 Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q2.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q3.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q3.json.gz new file mode 100644 index 0000000000..9566310afd Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-FUSION-Q3.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json new file mode 100644 index 0000000000..dc9b523002 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/ISOLATED-Q3-RANK-INTAKE.json @@ -0,0 +1,208 @@ +{ + "best": 132, + "cases": [ + { + "labels": [ + "query3 source swap", + "query6 source swap" + ], + "mass": 132, + "new_ranks": [ + 0, + 2 + ], + "ranks_LR": [ + 8, + 6 + ], + "sites": [ + 39, + 97 + ], + "stock": 128 + }, + { + "labels": [ + "query3 source swap", + "query7 idle fresh" + ], + "mass": 132, + "new_ranks": [ + 0, + 4 + ], + "ranks_LR": [ + 10, + 6 + ], + "sites": [ + 39, + 112 + ], + "stock": 128 + }, + { + "labels": [ + "query3 source swap", + "query4 source swap" + ], + "mass": 136, + "new_ranks": [ + 0, + 6 + ], + "ranks_LR": [ + 8, + 2 + ], + "sites": [ + 39, + 65 + ], + "stock": 128 + }, + { + "labels": [ + "query3 source swap", + "query5 idle fresh" + ], + "mass": 136, + "new_ranks": [ + 0, + 8 + ], + "ranks_LR": [ + 10, + 2 + ], + "sites": [ + 39, + 82 + ], + "stock": 128 + }, + { + "labels": [ + "query4 source swap", + "query5 idle fresh" + ], + "mass": 136, + "new_ranks": [ + 0, + 8 + ], + "ranks_LR": [ + 8, + 0 + ], + "sites": [ + 65, + 82 + ], + "stock": 128 + }, + { + "labels": [ + "query4 source swap", + "query6 source swap" + ], + "mass": 136, + "new_ranks": [ + 0, + 6 + ], + "ranks_LR": [ + 10, + 4 + ], + "sites": [ + 65, + 97 + ], + "stock": 128 + }, + { + "labels": [ + "query5 idle fresh", + "query6 source swap" + ], + "mass": 136, + "new_ranks": [ + 0, + 8 + ], + "ranks_LR": [ + 10, + 2 + ], + "sites": [ + 82, + 97 + ], + "stock": 128 + }, + { + "labels": [ + "query4 source swap", + "query7 idle fresh" + ], + "mass": 136, + "new_ranks": [ + 0, + 8 + ], + "ranks_LR": [ + 12, + 4 + ], + "sites": [ + 65, + 112 + ], + "stock": 128 + }, + { + "labels": [ + "query5 idle fresh", + "query7 idle fresh" + ], + "mass": 136, + "new_ranks": [ + 0, + 10 + ], + "ranks_LR": [ + 12, + 2 + ], + "sites": [ + 82, + 112 + ], + "stock": 128 + }, + { + "labels": [ + "query6 source swap", + "query7 idle fresh" + ], + "mass": 136, + "new_ranks": [ + 0, + 8 + ], + "ranks_LR": [ + 8, + 0 + ], + "sites": [ + 97, + 112 + ], + "stock": 128 + } + ], + "input_sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa", + "q": 3, + "scope": "Tail U removal only; every pair whose intervening whole-bank direction is isolated in both row and column, and whose required correction is one bank Clifford. Rank-only exact minimum, no new selected lowering." +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/MANIFEST.json b/research/two-site-caller-fusion/source/two-site-continuation/MANIFEST.json new file mode 100644 index 0000000000..0a22cda80f --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/MANIFEST.json @@ -0,0 +1,128 @@ +{ + "active_processes": [], + "file_count": 24, + "files": [ + { + "bytes": 2438797, + "path": "ADMITTED-TWO-SITE-FUSIONS.json", + "sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f" + }, + { + "bytes": 1227, + "path": "CONTINUED-ISOLATION-Q2.json", + "sha256": "d944c5b3181442af3cfd855b6f7d059f6bdfaed35755eff549ee7e96c66c5da7" + }, + { + "bytes": 355, + "path": "CONTROLS.json", + "sha256": "3a140e16dcf32b6c630a9dc6cc0ba642dc5f9511d6501d57f1ec79f8e2d0b7f0" + }, + { + "bytes": 4308, + "path": "HANDOFF.md", + "sha256": "404e01603b99f3e865ce5f7f3fd0a6bd9ca79db4217c105816b7010cc371dbf0" + }, + { + "bytes": 155971, + "path": "INPUT-EVENTS.json", + "sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa" + }, + { + "bytes": 627015, + "path": "ISOLATED-FUSION-Q2.json", + "sha256": "5ee7878ccd08a1eff40b9bc68e2d0476e501819aea39fda75cbeeadfb9f81d2e" + }, + { + "bytes": 1295931, + "path": "ISOLATED-FUSION-Q3.json", + "sha256": "4997bab27dda2e20d39209f9002af71c1cee42caa1e69b7a8a2f9eb7f4393fd8" + }, + { + "bytes": 3228, + "path": "ISOLATED-Q3-RANK-INTAKE.json", + "sha256": "d89b23f528bd76b3fc3e4ccb14a33ae0ac53223224f07fe39b7f402fbc2b59a2" + }, + { + "bytes": 6769, + "path": "PROOF.md", + "sha256": "2506f7a89239d2375f14a1d7084aaaf11678818d6a20eb81e29de0a66a9f751a" + }, + { + "bytes": 40247, + "path": "TWO-SITE-COVER-Q2.json", + "sha256": "2ff79767203b7a06e72a148f49312ad2416540b85550ef10b802f503ff4505bd" + }, + { + "bytes": 621781, + "path": "TWO-SITE-Q2.json", + "sha256": "e826892b6bf5db4bfae631743a50ef6668f1c22fa4583499f4ae1ddbc937b845" + }, + { + "bytes": 6067, + "path": "VALIDATION.json", + "sha256": "acb87ee0dbacb286850346795c6961a56745e61b6d75dc5be112c4e5cb3576e8" + }, + { + "bytes": 11168, + "path": "admit_fusions.py", + "sha256": "15c921045d86fe581725d284b1f9557b4adcdff204951b2e12d0b237b2065b09" + }, + { + "bytes": 6511, + "path": "continue_isolated.py", + "sha256": "89551fe31fbf92cdc1167c7a0149b345733abac09da14aa7e482adc3842442a0" + }, + { + "bytes": 1875, + "path": "controls.py", + "sha256": "b1b7543c9d8347dadc242dcf4420e62009e0d410063a3553167b8c4d1d6895b2" + }, + { + "bytes": 155971, + "path": "frozen-two-site-v1/INPUT-EVENTS.json", + "sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa" + }, + { + "bytes": 71998, + "path": "frozen-two-site-v1/ISOLATED-FUSION-Q2.json", + "sha256": "ef41f9b005af1580c3f985bee5d3a4b3bdf842d388ddf409f2bbf2a41d72d3a2" + }, + { + "bytes": 123502, + "path": "frozen-two-site-v1/ISOLATED-FUSION-Q3.json", + "sha256": "868b41d5a1360c10bff236dbd4f6a803b2fef93dc9ad25df30617ceac137dab6" + }, + { + "bytes": 9723, + "path": "frozen-two-site-v1/isolated_fusion.py", + "sha256": "f0f3e46e9c581ce0bd9d9e5072c879a3dfdd56a9628a4ab43eff6b93b7f58711" + }, + { + "bytes": 3246, + "path": "inputs/REPAIRED-MANIFEST.json", + "sha256": "dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c" + }, + { + "bytes": 3658155, + "path": "inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3" + }, + { + "bytes": 11788, + "path": "isolated_fusion.py", + "sha256": "eafc4bd6e0cb0e2136dc9da8454d72ebe2da6f194c7bc62815601ba93d56094e" + }, + { + "bytes": 9665, + "path": "two_site.py", + "sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a" + }, + { + "bytes": 5946, + "path": "two_site_cover.py", + "sha256": "ebbef015b85a8d3ba04141cdb7291a7cb47ee8ebd808ca20659ad5b99fbbb5ed" + } + ], + "no_new_kappa": true, + "status": "FROZEN_BOUNDED_TWO_SITE_PACKAGE" +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/PROOF.md b/research/two-site-caller-fusion/source/two-site-continuation/PROOF.md new file mode 100644 index 0000000000..44e58a7526 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/PROOF.md @@ -0,0 +1,138 @@ +# Two-site physical continuation + +This is a changed complete caller at q2 and q3, with all original fields +arbitrary and independent. It improves the pinned mass from stock+8 to stock+4. +It does not give a positive stock deficit or a kappa improvement. + +The input is an event-only copy of the repaired simplified two-fusion caller. +The exact event input has SHA256 +`412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa`. +The current used-only recipe binding separately pins repaired +`SIMPLIFIED-FUSIONS.json` at +`4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3` +and its manifest at +`dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c`. +No inherited H/L, inverse-row or inventory metadata is assumed. + +## Exact two-site equation + +At first unary site i replace G_i by X G_i. At later unary site j replace G_j +by Y G_j. Let V=E_j...E_(i+1), and let C be the correction required immediately +after the old E_j when a specified native tail subset is deleted. Then + +``` +C = Y_j V X_i V^-1. +``` + +Writing A=V e_(bank_i), B=e_(bank_i)^T V^-1 gives +`V X_i V^-1=I+A(X-I)B`, with `BA=I`. Every row other than bank_j imposes a +linear operator equation on X. If one such equation has invertible single +Clifford-ray left/right factors, it determines X uniquely. Every coefficient +and the resulting Y bank factor is then checked. The finite q2 screen covers +15 nonempty tail-native subsets and703 prefix unary-site pairs,10,545 cases. +Its single-ray-equation branch accepts183 Clifford pairs, none below mass80. +This is not a general two-site lower bound: it records unresolved strata. + +For a nonzero off-bank right side H, one surviving Clifford ray h in +`A X B=H` must equal a X b up to phase for some rays a,b. Thus X lies in the +finite canonical-ray list `a^-1 h b^-1`. The auxiliary cover verifies all +Gaussian-unit phases and every remaining coefficient. Homogeneous equations +with zero right side are retained as separate strata, not discarded. Distinct +uniform Clifford tensor rays can be separated for sufficiently large tensor +power; no finite-f numerical independence is assumed for these all-f equations. + +## The constructive isolated stratum + +The successful pair has the transported whole-bank direction isolated in both +row and column. The required correction C is also only that bank. At this cut +the two replacement operators U,W need satisfy + +``` +W = L U^-1 R, +L = C_jj A_j G_i, +R = A_j^-1 G_j. +``` + +All these are actual unitary Clifford families; no nonunit inverse is an +implementation primitive. Let r(T) be the native B-block rank. Subadditivity +gives `r(L)<=r(W)+r(R)+r(U)` and the reverse inequality with L,R exchanged. +Consequently `r(U)+r(W)>=|r(L)-r(R)|`. + +The lower bound is constructively attained. Offline selected-native lowering +gives exact signed, phase-complete Bruhat factorizations + +``` +L = L_left F_a L_right, +R = R_left F_b R_right. +U = R_left L_right. +``` + +U is a physical monomial. Therefore +`W=L_left F_a F_b R_right`, whose native arity is `|a-b|`; the overlapping +canonical chirps square to a Pauli translation. Neither L nor R is executed. +Only the emitted physical monomial U and one selected-native implementation +of W are executed. General physical Gaussian quadratic-phase monomial adapters +are permitted here; restricting the first replacement to X-character monomials +would miss the construction. + +At q2 the changed sites are31(query3 source swap,bank2) and51(query4 source +swap,bank1), and the deleted tail is the whole U-coordinate recovery of arity6. +The actual ranks are a=4,b=2, giving new site ranks0,2. At q3 the changed sites +are39(query3 source swap,bank2) and97(query6 source swap,bank1), the same tail +recovery is deleted, and a=8,b=6, again giving new site ranks0,2. These are +literal event indices in the pinned event-only fixture, not inferred source +positions in a modified word. + +The complete histograms are respectively + +``` +q2: H2=36,H4=1; mass76; stock6*12=72. +q3: H2=64,H4=1; mass132; stock8*16=128. +``` + +The target remains exactly diag(F_k J) on every independent original input, +including the two original pivot owners and every public field. All right +gauges remain in the exact operator. The general Clifford tensor algebra checks +the full matrix, full inverse and both inverse orders for every positive f. +These q2/q3 facts are not promoted to an all-q formula. + +## Phases, native lowering and paid scans + +Each emitted unary is one fixed one-coordinate Clifford O, tensor-lifted f +times, with an explicit Gaussian-unit scalar for each f mod4. This keeps the +global i applied once per whole field, rather than once per tensor coordinate. +The native W child and its inverse are lowered independently with exact +Gaussian phase. The admitted current-event schema binds every unchanged native +to the repaired source recipe, including its embedding. Only used forward and +inverse recipe definitions remain in the pool. + +Every physical D/P/X/unit instruction is a paid full-field scan. The first new +monomial has its actual literal circuit recorded. The later native child uses +two four-instruction monomial adapters plus at most one extra global-unit +control, in addition to the one native child. Their scan counts are independent +of f; their address/phase arithmetic still requires the usual explicit local +controller cost. The selected children have arity2f or4f at ambient12f/16f, +strictly below the pinned proper child cap. No dirty helper or private zero +field is introduced. + +The serialized inverse is generated from the actual current circuits, phases +and recipe pointers, then replayed independently. A forward recipe pointer +substituted into an inverse native event is rejected. A Gaussian phase changed +only at f=2 mod4 is rejected while f1 is unchanged. Omitting the changed free +monomial alters original-input columns. These controls test operator/native +admission, rather than merely the internal inverse matrix. + +## Bounded continuation and remaining gap + +After the q2 mass76 word, the bounded continuation removes any nonempty subset +of the remaining3 tail native sites and tests every two-prefix-unary pair in +the isolated-whole-bank stratum. There are7 subsets and703 pairs. It finds no +eligible isolated correction;34 pairs fail two-sided isolation and4,887 have +a correction involving more than one bank. This does not exclude a coupled +two-bank correction, more changed sites, different source/response chronology, +or an outer boundary with different required outputs. + +Positive native saving still requires crossing the remaining four mass units +and satisfying the complete outer cost/owner/phase interface. Neither the +finite exact census nor the isolated-pair rank lemma is a lower bound for +arbitrary callers, and no formal-kernel theorem is claimed. diff --git a/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-COVER-Q2.json b/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-COVER-Q2.json new file mode 100644 index 0000000000..e2f680ccae --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-COVER-Q2.json @@ -0,0 +1,1951 @@ +{ + "accepted": [ + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 2, + "complete_mass": 80, + "cover_status": "finite-ray-cover", + "equation": [ + 1, + 0 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 1, + "rank_only": true, + "replacement_operators": [ + [ + { + "coefficients_by_f_mod4": [ + [ + "-1", + "0" + ], + [ + "-1", + "0" + ], + [ + "-1", + "0" + ], + [ + "-1", + "0" + ] + ], + "x_monomial": { + "alpha": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "constant": 0, + "global_phase": 0, + "offset": 0, + "quad": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "rows": [ + 1, + 2, + 4, + 8, + 16, + 32, + 64, + 128, + 256, + 512, + 1024, + 2048 + ] + } + } + ], + [ + { + "coefficients_by_f_mod4": [ + [ + "0", + "1" + ], + [ + "0", + "1" + ], + [ + "0", + "1" + ], + [ + "0", + "1" + ] + ], + "x_monomial": { + "alpha": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 3, + 1 + ], + "constant": 0, + "global_phase": 0, + "offset": 3, + "quad": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "rows": [ + 1024, + 2048, + 4, + 8, + 16, + 32, + 64, + 128, + 256, + 512, + 1, + 2 + ] + } + } + ] + ], + "replacement_ranks": [ + 0, + 2 + ], + "selected_native_lowering": false, + "sites": [ + 1, + 62 + ], + "solutions": 1, + "stock": 72 + } + ], + "base_mass": 80, + "best_rank_only_complete_mass": 80, + "cases": [ + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 1, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 1, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 1, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 2, + "cover_status": "finite-ray-cover", + "equation": [ + 1, + 0 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 1, + "sites": [ + 1, + 62 + ], + "solutions": 1 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 2, + "cover_status": "finite-ray-cover", + "equation": [ + 1, + 0 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 1, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 2, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 2, + "cover_status": "finite-ray-cover", + "equation": [ + 5, + 2 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 2, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query4 source swap" + ], + "mask": 2, + "sites": [ + 31, + 51 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 2, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 2, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query5 idle fresh" + ], + "mask": 2, + "sites": [ + 31, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query4 source swap", + "query5 idle fresh" + ], + "mask": 2, + "sites": [ + 51, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 2, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 3, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 3, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 3, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 3, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 3, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query1 source swap", + "query2 target fresh" + ], + "mask": 4, + "sites": [ + 11, + 22 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query1 source swap", + "query3 source J" + ], + "mask": 4, + "sites": [ + 11, + 26 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 2 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query2 target fresh", + "query3 source J" + ], + "mask": 4, + "sites": [ + 22, + 26 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 4, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 4, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 4, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 3, + "cover_status": "finite-ray-cover", + "equation": [ + 1, + 2 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 4, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 4, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 5, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 5, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 5, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 3, + "cover_status": "finite-ray-cover", + "equation": [ + 1, + 2 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 5, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 2, + "cover_status": "finite-ray-cover", + "equation": [ + 4, + 0 + ], + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 5, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 6, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 6, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 6, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 6, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 6, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 7, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 7, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 7, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 7, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 7, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 8, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 8, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query4 source swap" + ], + "mask": 8, + "sites": [ + 31, + 51 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 8, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 8, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query5 idle fresh" + ], + "mask": 8, + "sites": [ + 31, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query4 source swap", + "query5 idle fresh" + ], + "mask": 8, + "sites": [ + 51, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 8, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 9, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 9, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 9, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 9, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 9, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 10, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 10, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query4 source swap" + ], + "mask": 10, + "sites": [ + 31, + 51 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 10, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 10, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 2, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query3 source swap", + "query5 idle fresh" + ], + "mask": 10, + "sites": [ + 31, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 1 + ], + "canonical_candidates": 0, + "cover_status": "unresolved-homogeneous-off-bank-equations", + "equation": null, + "initial_status": "unresolved-row-confined-factorization", + "labels": [ + "query4 source swap", + "query5 idle fresh" + ], + "mask": 10, + "sites": [ + 51, + 64 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 10, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 11, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 11, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 11, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 11, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 11, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 12, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 12, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 12, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 12, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 12, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 13, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 13, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 13, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 13, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 13, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 14, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 14, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 14, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 14, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 14, + "sites": [ + 9, + 65 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 1 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query3 idle fresh" + ], + "mask": 15, + "sites": [ + 9, + 33 + ], + "solutions": 0 + }, + { + "banks": [ + 3, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 idle fresh", + "query3 retained source continuation" + ], + "mask": 15, + "sites": [ + 14, + 38 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query4 idle fresh" + ], + "mask": 15, + "sites": [ + 9, + 53 + ], + "solutions": 0 + }, + { + "banks": [ + 1, + 4 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "fusion replace shared initial J by minus identity", + "query5 source swap" + ], + "mask": 15, + "sites": [ + 1, + 62 + ], + "solutions": 0 + }, + { + "banks": [ + 0, + 2 + ], + "canonical_candidates": 0, + "cover_status": "zero-side-nonzero-rhs", + "equation": null, + "initial_status": "unresolved-no-invertible-ray-equation", + "labels": [ + "query1 source J", + "query5 idle fresh" + ], + "mask": 15, + "sites": [ + 9, + 65 + ], + "solutions": 0 + } + ], + "counts": { + "finite-ray-cover": 6, + "unresolved-homogeneous-off-bank-equations": 15, + "zero-side-nonzero-rhs": 66 + }, + "elapsed_seconds": 2.1811212909960886, + "no_new_kappa": true, + "parent_producer_sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a", + "producer_sha256": "ebbef015b85a8d3ba04141cdb7291a7cb47ee8ebd808ca20659ad5b99fbbb5ed", + "q": 2, + "scope": "Every previously unresolved pair with at least one nonzero off-bank RHS has a finite exhaustive canonical Clifford-ray cover. A surviving h in A X B forces X=a^-1 h b^-1 up to phase for some rays a,b. Every Gaussian-unit fmod4 phase is solved and verified in every coefficient. Homogeneous off-bank strata remain explicit and are not excluded.", + "source_sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa", + "status": "PASS_EXACT_TWO_SITE_FINITE_RAY_COVER", + "stock": 72 +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-Q2.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-Q2.json.gz new file mode 100644 index 0000000000..51309764ee Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/TWO-SITE-Q2.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/VALIDATION.json b/research/two-site-caller-fusion/source/two-site-continuation/VALIDATION.json new file mode 100644 index 0000000000..044ea72924 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/VALIDATION.json @@ -0,0 +1,111 @@ +{ + "active_processes": [], + "finite_exact_rank_stages": [ + { + "command": "python3 -B two_site.py --q 2 --seconds 1000", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site.py", + "sha256": "a3d902fd3ad674caf56c532a7a06926395f3b9fa78a74b77f439373603d9e38a" + }, + "receipt": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/TWO-SITE-Q2.json", + "sha256": "e826892b6bf5db4bfae631743a50ef6668f1c22fa4583499f4ae1ddbc937b845" + }, + "scope": "15 tail masks and703 unary pairs, explicit unresolved strata" + }, + { + "command": "python3 -B two_site_cover.py --q 2", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/two_site_cover.py", + "sha256": "ebbef015b85a8d3ba04141cdb7291a7cb47ee8ebd808ca20659ad5b99fbbb5ed" + }, + "receipt": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/TWO-SITE-COVER-Q2.json", + "sha256": "2ff79767203b7a06e72a148f49312ad2416540b85550ef10b802f503ff4505bd" + }, + "scope": "finite canonical Clifford-ray cover for nonzero off-bank RHS; homogeneous strata retained" + }, + { + "command": "python3 -B continue_isolated.py --seconds 180", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/continue_isolated.py", + "sha256": "89551fe31fbf92cdc1167c7a0149b345733abac09da14aa7e482adc3842442a0" + }, + "receipt": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "sha256": "d944c5b3181442af3cfd855b6f7d059f6bdfaed35755eff549ee7e96c66c5da7" + }, + "scope": "after admitted scientific mass76 word, all7 remaining-tail subsets and703 pairs in isolated whole-bank class, no eligible correction; no general two-site obstruction" + } + ], + "limits": [ + "Mass76/stock72 and132/stock128 are improvements of4, still no positive deficit.", + "No all-q site induction or field controller/moment theorem.", + "No BIT compatibility or publication is claimed.", + "Historical v1 scientific bytes remain preserved; current selected-native admission is ADMITTED-TWO-SITE-FUSIONS.json." + ], + "negative_controls": [ + "Current serialized inverse with forward-direction selected pointer rejects.", + "f2-only Gaussian-unit change rejects while f1 is unchanged.", + "Omitting changed free physical monomial changes original fields.", + "Reversing correction factor order rejects synthetic noncommuting example." + ], + "no_new_kappa": true, + "normal_and_optimized_complete_replays": [ + { + "commands": [ + "python3 -B isolated_fusion.py --q 2 --write", + "python3 -B -O isolated_fusion.py --q 2", + "python3 -B isolated_fusion.py --q 3 --i 39 --j 97 --write", + "python3 -B -O isolated_fusion.py --q 3 --i 39 --j 97" + ], + "coverage": "general physical Clifford tensor algebra, every original input, both inverse orders, exact Gaussian phases, selected new native child, unchanged source lowering still separate at this scientific stage", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/isolated_fusion.py", + "sha256": "eafc4bd6e0cb0e2136dc9da8454d72ebe2da6f194c7bc62815601ba93d56094e" + }, + "receipts": [ + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json", + "sha256": "5ee7878ccd08a1eff40b9bc68e2d0476e501819aea39fda75cbeeadfb9f81d2e" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q3.json", + "sha256": "4997bab27dda2e20d39209f9002af71c1cee42caa1e69b7a8a2f9eb7f4393fd8" + } + ] + }, + { + "commands": [ + "python3 -B admit_fusions.py --write", + "python3 -B -O admit_fusions.py" + ], + "coverage": "current used-only complete forward/inverse recipe pool from repaired selected source; independently reconstructed actual circuits/tableaux/phases; serialized inverse itself replayed all columns and both inverse orders; all-f scalar vectors and native embeddings/proper caps checked", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/admit_fusions.py", + "sha256": "15c921045d86fe581725d284b1f9557b4adcdff204951b2e12d0b237b2065b09" + }, + "receipt": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f" + } + }, + { + "commands": [ + "python3 -B controls.py --write", + "python3 -B -O controls.py" + ], + "coverage": "independent noncommuting two-site correction product; reversed factor order rejects", + "producer": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/controls.py", + "sha256": "b1b7543c9d8347dadc242dcf4420e62009e0d410063a3553167b8c4d1d6895b2" + }, + "receipt": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTROLS.json", + "sha256": "3a140e16dcf32b6c630a9dc6cc0ba642dc5f9511d6501d57f1ec79f8e2d0b7f0" + } + } + ], + "scientific_main": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "status": "PASS_BOUNDED_CONSTRUCTIVE_TWO_SITE_NATIVE_WORDS_NO_NEW_KAPPA" +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/admit_fusions.py b/research/two-site-caller-fusion/source/two-site-continuation/admit_fusions.py new file mode 100644 index 0000000000..390ee701df --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/admit_fusions.py @@ -0,0 +1,132 @@ +#!/usr/bin/env python3 +"""Current used-only native recipes and serialized literal inverse admission. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from pathlib import Path +from collections import Counter +import argparse,hashlib,json,copy +from isolated_fusion import * +from continue_isolated import apply_events +from validate_recipe_links import compile_literal,compile_recipe,embedding_circuit +HERE=Path(__file__).resolve().parent +SOURCE=HERE/'inputs/REPAIRED-SIMPLIFIED-FUSIONS.json' +SOURCE_SHA='4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3' +MANIFEST=HERE/'inputs/REPAIRED-MANIFEST.json' +MANIFEST_SHA='dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c' + +def toggle(key):return key[:-3]if key.endswith('inv')else key+'inv' +def native_record(p,extra): + return{'selected_native_recipe':p['selected_native_recipe'], + 'one_coordinate_definition_circuit':p.get('one_coordinate_definition_circuit',p.get('one_coordinate_literal_circuit')), + 'one_coordinate_tableau':p['one_coordinate_tableau'],'extra_global_phase_exponent_by_f_mod4':extra} +def inverse_current(events,m): + out=[] + for original in reversed(events): + e=copy.deepcopy(original);kind=e['kind'] + if kind=='ADD':e['coefficient']=str(-F(e['coefficient'])) + elif kind=='SCALE':e['coefficient']=str(1/F(e['coefficient'])) + elif kind!='BANK_SWAP': + op=compile_literal(e['one_coordinate_literal_circuit'],m).adjoint();e['one_coordinate_literal_circuit']=op.circuit;e['one_coordinate_tableau']=[list(t)for t in op.tab] + e['extra_global_phase_exponent_by_f_mod4']=[(-p)%4 for p in e['extra_global_phase_exponent_by_f_mod4']] + if kind=='NATIVE':e['native_recipe_id']=toggle(e['native_recipe_id']) + e['source_operator_is_adjoint']=not e.get('source_operator_is_adjoint',False) + out.append(e) + return out + +def check_native_event(e,pool,m,cache): + need('x_monomial'not in e and'native_family'not in e and'phase_exponent'not in e,'current literal event has no stale operator/family/phase shadows') + actual=compile_literal(e['one_coordinate_literal_circuit'],m) + need(actual.tab==tuple(tuple(t)for t in e['one_coordinate_tableau']),'literal event independently reconstructed signed tableau') + rank=ce.rank(x for x,y,p in actual.tab[m:]);need(rank==e['rank_per_f'],'actual current event native arity') + if e['kind']=='NATIVE': + key=e['native_recipe_id'];need(key in pool,'current native pointer exists '+key);p=pool[key] + need(e['extra_global_phase_exponent_by_f_mod4']==p['extra_global_phase_exponent_by_f_mod4'],'current native pointer has exact all-f phase vector '+key) + if key not in cache: + dim=len(p['one_coordinate_tableau'])//2;op=compile_literal(p['one_coordinate_definition_circuit'],dim) + need(op.tab==tuple(tuple(t)for t in p['one_coordinate_tableau']),'used pool definition independently reconstructed tableau '+key) + rec=compile_recipe(p['selected_native_recipe'],dim);same(rec,op,'used selected recipe actual Gaussian phase '+key);cache[key]=rec + selected=compile_literal(embedding_circuit(cache[key].circuit,e['recipe_embedding'],m),m) + same(selected,actual,'actual native event equals complete embedded selected recipe '+key) + need(p['selected_native_recipe']['rank']==rank,'selected child arity agrees '+key) + cap=int(((m*m-1)//2)**0.5) + need(rank<=cap and rank>r&1};newT=[e for at,e in enumerate(T)if at not in removed];_,Tinv=apply_events(newT,n,A);C=A.mat_product(Tinv,oldT);cuts={} + for at in range(len(P)-1,-1,-1): + if at in sites:cuts[at]=C + C=pullback_general(C,P[at],A) + for jj,j in enumerate(sites): + C=cuts[j];bank=P[j]['bank'] + if any(C[r][c]!=I[r][c]for r in range(n)for c in range(n)if(r,c)!=(bank,bank)):counts['correction-not-one-bank']+=jj;continue + if not isunit(C[bank][bank]):counts['correction-not-one-Clifford']+=jj;continue + for i in sites[:jj]: + if(i,j)not in pairs:pairs[i,j]=pair_cols(P,i,j,n,A) + col,row=pairs[i,j] + if any(col[r]for r in range(n)if r!=bank)or any(row[c]for c in range(n)if c!=bank):counts['not-isolated-both-sides']+=1;continue + if not isunit(col[bank]):counts['transport-not-one-Clifford']+=1;continue + L=A.product(C[bank][bank],A.product(col[bank],unary(A,P[i])));R=A.product(A.adjoint(col[bank]),unary(A,P[j]));a,b=rank_family(A,L),rank_family(A,R) + mass=f['complete_native_mass']-sum(T[r]['rank_per_f']for r in removed)-P[i].get('rank_per_f',0)-P[j].get('rank_per_f',0)+abs(a-b) + cases.append({'mask':mask,'removed_tail_labels':[T[r]['label']for r in removed],'sites':[i,j],'labels':[P[i]['label'],P[j]['label']],'L_R_ranks':[a,b], + 'minimum_new_native_mass':abs(a-b),'complete_mass':mass,'stock':f['stock'],'rank_only':True,'selected_new_lowering':False}) + counts['isolated-pairs-priced']+=1 + if time.monotonic()-start>seconds:timeout=True;break + if timeout:break + if timeout:break + done.append(mask);print('continued mask',mask,'cases',len(cases),'best',min([f['complete_native_mass']]+[x['complete_mass']for x in cases]),flush=True) + return{'status':'PASS_BOUNDED_GENERAL_CLIFFORD_ISOLATED_PAIR_CONTINUATION','source_path':str(source),'source_sha256':hashlib.sha256(source.read_bytes()).hexdigest(), + 'q':2,'base_mass':f['complete_native_mass'],'stock':f['stock'],'tail_native_sites':ts,'completed_masks':done,'timed_out':timeout,'counts':dict(counts),'cases':cases, + 'best_rank_only_complete_mass':min([f['complete_native_mass']]+[x['complete_mass']for x in cases]),'elapsed_seconds':time.monotonic()-start, + 'scope':'After the independently complete mass76 word, delete a nonempty subset of its remaining tail native queries. Price every two-existing-prefix-unary pair whose transported whole-bank row AND column are isolated and whose required cut correction is a single unitary Clifford bank. Other pairs are not excluded. The exact minimum for that stratum is |rank(L)-rank(R)|, with unrestricted physical monomial adapters.', + 'producer_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'no_new_kappa':True} +def main(): + p=argparse.ArgumentParser();p.add_argument('--seconds',type=int,default=180);a=p.parse_args();out=run(a.seconds);path=HERE/'CONTINUED-ISOLATION-Q2.json';path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n');print(out['status'],'best',out['best_rank_only_complete_mass'],out['counts'],flush=True) +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/two-site-continuation/controls.py b/research/two-site-caller-fusion/source/two-site-continuation/controls.py new file mode 100644 index 0000000000..03414c1654 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/controls.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 +"""Exact noncommuting control for the two-unary correction order. +Apache-2.0; substantial OpenAI Codex assistance. +""" +import hashlib,json,argparse +from two_site import * + +def produce(): + n,m=2,4;N=n_pair(m,0);P0=plane_swap(m,0,1) + events=[{'kind':'NATIVE','bank':0,'x_monomial':N.data(),'rank_per_f':2,'label':'old first'}, + {'kind':'ADD','dst':1,'src':0,'coefficient':'1','label':'couple1'}, + {'kind':'ADD','dst':0,'src':1,'coefficient':'1','label':'couple2'}, + {'kind':'ADDRESS_OR_UNIT','bank':1,'x_monomial':P0.data(),'rank_per_f':0,'label':'old second'}] + I=eye(n,m);A,B=pair_columns(events,0,3,n,m);V=qc.replay(events[1:],n,m);Vi=qc.replay(inverse(events[1:],m),n,m) + X,Y=mono(P0@N),mono(N.inv());DX=eye(n,m);DX[0][0]=X;DY=eye(n,m);DY[1][1]=Y + C=mm(DY,mm(V,mm(DX,Vi)));result,status,equation=solve(C,A,B,1,I) + need(status=='accepted'and result==(X,Y),'independently assembled noncommuting product recovers both exact factors') + need(mm(V,Vi)==mm(Vi,V)==I,'independent intervening word inverse') + wrong=mm(V,mm(DX,mm(Vi,DY)));bad,bstatus,_=solve(wrong,A,B,1,I) + need(bad!=(X,Y),'reversing correction order does not preserve the claimed factors') + return{'status':'PASS_EXACT_NONCOMMUTING_TWO_SITE_CONTROLS','correct_order':'C=Y_j V X_i V^-1','wrong_order_rejection':bstatus, + 'equation':list(equation),'producer_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(), + 'solver_sha256':hashlib.sha256((HERE/'two_site.py').read_bytes()).hexdigest()} +def main(): + p=argparse.ArgumentParser();p.add_argument('--write',action='store_true');a=p.parse_args();out=produce();path=HERE/'CONTROLS.json' + if a.write:path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:need(json.loads(path.read_text())==out,'saved two-site controls differ') + print(out['status']) +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json.gz new file mode 100644 index 0000000000..519ca4a45d Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/INPUT-EVENTS.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json.gz new file mode 100644 index 0000000000..5dba06ac65 Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q2.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json.gz new file mode 100644 index 0000000000..19282271ae Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/ISOLATED-FUSION-Q3.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/isolated_fusion.py b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/isolated_fusion.py new file mode 100644 index 0000000000..65f93400fc --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/frozen-two-site-v1/isolated_fusion.py @@ -0,0 +1,128 @@ +#!/usr/bin/env python3 +"""Exact two-site physical monomial/Bruhat fusion, all-f full columns. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from pathlib import Path +from functools import lru_cache +from collections import Counter +import argparse,hashlib,json,sys +from two_site import * +from lifted_algebra import Algebra,G,ONE as GONE,ZERO as GZERO +from validate_recipe_links import compile_monomial,compile_recipe +HERE=Path(__file__).resolve().parent + +def bphase(m,p):return ce.Op(m,ce.identity(m),[('phase',p%4)]) + +@lru_cache(None) +def xop(g): + """Compile an arbitrary X-character Gaussian monomial to a physical circuit.""" + m=len(g.rows);out=ce.ident(m) + for i,a in enumerate(g.alpha): + if a%4==1:out=out.then(ce.cgate(m,1<>j&1: + out=out.then(ce.cgate(m,1<>i)&1)<>i)&1)for i in range(m)])) + if(g.constant+g.global_phase)%4:out=out.then(bphase(m,g.constant+g.global_phase)) + return out + +def family(A,E): + need(unitary_clifford(E),'convert one actual unitary Clifford family') + g,v=next(iter(E.items()));base=A.lift(xop(g));weights=tuple(G(v[2*r],v[2*r+1])for r in range(4)) + return{k:tuple(a*b for a,b in zip(value,weights))for k,value in base.items()} + +def one_coordinate(E): + g,v=next(iter(E.items()));c=(v[2],v[3]);units=((1,0),(0,1),(-1,0),(0,-1));need(c in units,'one-coordinate Gaussian unit') + return xop(g).then(bphase(len(g.rows),units.index(c))) + +def ring_replay(events,n,m,A,replace=None): + M=A.mat_identity(n);Mi=A.mat_identity(n) + for at,e in enumerate(events): + kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);M[d]=[A.add(x,A.scale(y,c))for x,y in zip(M[d],M[s])] + for row in Mi:row[s]=A.add(row[s],A.scale(row[d],-c)) + elif kind=='SCALE': + b,c=e['bank'],F(e['coefficient']);M[b]=[A.scale(x,c)for x in M[b]] + for row in Mi:row[b]=A.scale(row[b],1/c) + elif kind=='BANK_SWAP': + i,j=e['banks'];M[i],M[j]=M[j],M[i] + for row in Mi:row[i],row[j]=row[j],row[i] + else: + b=e['bank'];U=replace[at]if replace and at in replace else A.lift(xop(qc.decode(e,m)),exponent=qc.decode(e,m).global_phase);Ui=A.adjoint(U) + M[b]=[A.product(U,x)for x in M[b]] + for row in Mi:row[b]=A.product(row[b],Ui) + return M,Mi + +def family_phase(A,value,op): + base=A.lift(op);need(len(value)==len(base)==1 and set(value)==set(base),'new unary is one fixed Clifford ray for every f') + v,b=next(iter(value.values())),next(iter(base.values()));units=((1,0),(0,1),(-1,0),(0,-1));out=[] + for a,c in zip(v,b): + ratio=a/c;pair=(ratio.a,ratio.b);need(pair in units,'all-f correction is a Gaussian unit');out.append(units.index(pair)) + return out + +def serial_general(A,E): + return[{'distinguished_tableau':[list(t)for t in kd],'bulk_tableau':[list(t)for t in kb], + 'coefficients_by_f_mod4':[x.encode()for x in v]}for(kd,kb),v in E.items()] + +def run(q=2,i=31,j=51): + source=HERE/'INPUT-EVENTS.json';f=next(x for x in json.loads(source.read_text())['fixtures']if x['q']==q);n,m=f['banks'],f['ambient_arity'];P,T=f['prefix_events'],f['tail_events'] + # The removable native is the whole original U-coordinate recovery. + removed={at for at,e in enumerate(T)if e['label']=='joint U coordinate recovery'};need(len(removed)==1,'one selected whole tail native') + newT=[e for at,e in enumerate(T)if at not in removed];C=mm(qc.replay(inverse(newT,m),n,m),qc.replay(T,n,m)) + for at in range(len(P)-1,j,-1):C=pullback(C,P[at],m) + Acol,Brow=pair_columns(P,i,j,n,m);b=P[j]['bank'];I=eye(n,m) + need(not any(Acol[r]for r in range(n)if r!=b)and not any(Brow[c]for c in range(n)if c!=b),'transported bank direction is isolated in BOTH row and column') + need(all(C[r][c]==I[r][c]for r in range(n)for c in range(n)if(r,c)!=(b,b)),'required correction is only the isolated current bank') + need(unitary_clifford(Acol[b])and unitary_clifford(C[b][b]),'isolated transport and correction are actual unitary Clifford families') + L=product(C[b][b],product(Acol[b],mono(qc.decode(P[i],m))));R=product(adjoint(Acol[b]),mono(qc.decode(P[j],m))) + Lop,Rop=one_coordinate(L),one_coordinate(R);lrec,lout=ce.lower_child(Lop);rrec,rout=ce.lower_child(Rop);same(lout,Lop,'L Bruhat exact Gaussian phase');same(rout,Rop,'R Bruhat exact Gaussian phase') + # L=LL F_a LR, R=RL F_b RR. Choose NEW FIRST unary U=RL LR. + Uop=mul(compile_monomial(rrec['left'],m),compile_monomial(lrec['right'],m));need(ce.rank(x for x,y,p in Uop.tab[m:])==0,'first replacement is a physical monomial, not a hidden native query') + Vop=mul(Lop,Uop.adjoint(),Rop);rank=ce.rank(x for x,y,p in Vop.tab[m:]);need(rank==abs(lrec['rank']-rrec['rank']),'two-site exact native-distance invoice') + A=Algebra(2*q+1);Lf,Rf=family(A,L),family(A,R);Uf=A.lift(Uop);Vf=A.product(Lf,A.product(A.adjoint(Uf),Rf));vphase=family_phase(A,Vf,Vop) + oldE=P+T;newE=P+newT;M,Mi=ring_replay(newE,n,m,A,{i:Uf,j:Vf});target,targeti=ring_replay(oldE,n,m,A) + need(M==target,'every original independent bank coefficient, exact all-f Gaussian tensor algebra') + need(Mi==targeti,'complete literal inverse every original field') + need(A.mat_product(M,Mi)==A.mat_product(Mi,M)==A.mat_identity(n),'both complete arbitrary-input inverse orders') + expected=A.mat_identity(n);Gout=A.lift(xop(prefix(m,2*q+1)@j_operator(m)),exponent=(prefix(m,2*q+1)@j_operator(m)).global_phase) + for r in range(n):expected[r][r]=Gout + need(M==expected,'actual final F_k J on every original owner, without dropped right gauges') + # Complete selected recipe for the only new native unary and its inverse. + recipes={} + for inv in(False,True): + op=Vop.adjoint()if inv else Vop;rec,out=ce.lower_child(op);same(out,op,'new unary selected-native actual Gaussian phase');need(rec['rank']==rank,'new unary selected child rank') + recipes['two-site-later'+('inv'if inv else'')]={'selected_native_recipe':rec,'one_coordinate_literal_circuit':op.circuit,'one_coordinate_tableau':[list(t)for t in op.tab], + 'extra_global_phase_exponent_by_f_mod4':[(-x)%4 if inv else x for x in vphase]} + modified=[] + for at,e in enumerate(newE): + if at in(i,j): + op=Uop if at==i else Vop;fr=Uf if at==i else Vf;r=0 if at==i else rank + modified.append({'kind':'NATIVE'if r else'ADDRESS_OR_UNIT','bank':e['bank'],'label':'two-site physical replacement of '+e['label'],'rank_per_f':r, + 'one_coordinate_literal_circuit':op.circuit,'one_coordinate_tableau':[list(t)for t in op.tab], + 'extra_global_phase_exponent_by_f_mod4':family_phase(A,fr,op),'native_recipe_id':'two-site-later'if r else None}) + else:modified.append(dict(e,unchanged_event_input=True)) + hist=Counter(e['rank_per_f']for e in modified if e['kind']=='NATIVE');mass=sum(r*c for r,c in hist.items());need(mass==f['source_complete_mass']-sum(T[r]['rank_per_f']for r in removed)-P[i].get('rank_per_f',0)-P[j].get('rank_per_f',0)+rank,'all changed native costs included') + wrong,_=ring_replay(newE,n,m,A,{j:Vf});need(wrong!=target,'omitting changed first physical monomial rejects original columns') + return{'status':'PASS_COMPLETE_TWO_SITE_PHYSICAL_BRUHAT_FUSION_ALL_COLUMNS_ALL_F','q':q,'banks':n,'ambient_arity':m,'sites':[i,j],'old_site_labels':[P[i]['label'],P[j]['label']], + 'removed_tail_sites':sorted(removed),'removed_tail_labels':[T[r]['label']for r in removed],'L':serial(L),'R':serial(R),'L_rank_per_f':lrec['rank'],'R_rank_per_f':rrec['rank'], + 'new_site_ranks_per_f':[0,rank],'histogram':dict(hist),'complete_native_mass':mass,'stock':f['stock'],'D':f['stock']-mass,'old_complete_mass':f['source_complete_mass'], + 'events':modified,'new_native_recipe_pool':recipes,'first_monomial_recipe':{'literal_circuit':Uop.circuit,'tableau':[list(t)for t in Uop.tab]}, + 'all_original_columns_verified':n,'literal_inverse_orders':2,'selected_new_native_lowering':True,'unchanged_native_lowering':'inherits only the actual event operators; final source recipe manifest must be pinned independently after repair', + 'target':'diag(F_k J) on every original input, exact all-f phases and original owner labels retained', + 'negative_controls':['Omitting the first changed physical monomial rejects original columns.'], + 'phase_scope':'Every new operation is one fixed one-coordinate Clifford tensor power, multiplied by its explicit fmod4 Gaussian-unit vector; these scalar controls are paid scans, not native-rank mass.', + 'limits':['Complete fixed q as listed, not an all-q construction.','No outer exponent improvement claimed; positive stock deficit is not established unless D>0.','Unchanged source selected-native recipes are not re-certified from stale inherited metadata.'], + 'input_sha256':hashlib.sha256(source.read_bytes()).hexdigest(),'engine_sha256':need_engine,'producer_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'no_new_kappa':True} + +def main(): + p=argparse.ArgumentParser();p.add_argument('--q',type=int,default=2);p.add_argument('--i',type=int,default=31);p.add_argument('--j',type=int,default=51);p.add_argument('--write',action='store_true');a=p.parse_args();out=json.loads(json.dumps(run(a.q,a.i,a.j)));path=HERE/('ISOLATED-FUSION-Q'+str(a.q)+'.json') + if a.write:path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:need(json.loads(path.read_text())==out,'saved complete isolated fusion differs') + print(out['status'],'mass',out['complete_native_mass'],'stock',out['stock'],'ranks',out['new_site_ranks_per_f'],flush=True) +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-MANIFEST.json b/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-MANIFEST.json new file mode 100644 index 0000000000..a1042c9dea --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-MANIFEST.json @@ -0,0 +1,102 @@ +{ + "files": [ + { + "bytes": 54845, + "path": "AFTER-TWO-SCREEN.json", + "sha256": "ee6cc82e26408d67c2e89418459077d6c40daf6ee7053616313fe07d4505bac1" + }, + { + "bytes": 228173, + "path": "ALL-UNARY-AFTER-TWO-SCREEN.json", + "sha256": "0b6f456aed71177c77157f1aca1f8b9a671d8fabad90eff19df7834552c4c29d" + }, + { + "bytes": 3689552, + "path": "COMBINED-FUSIONS.json", + "sha256": "38001b3965fb2474b6b44b744e3d69018dd24c14a969795b3e1c4bfbd742bfa1" + }, + { + "bytes": 4658, + "path": "INPUT-PINS.json", + "sha256": "00c916740eab144b2fd76ade43e512168d1a30d0a10410eee5de1c8fd226f1ff" + }, + { + "bytes": 14734, + "path": "PROOF.md", + "sha256": "ba0cb213c97f323b37baedc153be79c44f201b471f65efb474fac6dbebe52f11" + }, + { + "bytes": 1971, + "path": "REPAIR-BYTE-VALIDATION.json", + "sha256": "9f434d4210e4709109d9211253a6bbc7cf10de5df6f44b8394b8c80981235ea4" + }, + { + "bytes": 464, + "path": "REPAIR-NORMAL-PINS.json", + "sha256": "d9136dd038a5ed72efd74a7769c699f6c36cf9ad0f458c51d3b1af1b0d2c7290" + }, + { + "bytes": 2972, + "path": "REPAIR.md", + "sha256": "3dfcfd79c4b6b897efeeb197085d87daac4c1c0c9a9631ac4204b573be7e24b2" + }, + { + "bytes": 3658155, + "path": "SIMPLIFIED-FUSIONS.json", + "sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3" + }, + { + "bytes": 121461, + "path": "SINGLE-SITE-ABSORPTION.json", + "sha256": "134f5223385ce09b63290a9cd7676d9aca1c49db3f58dc138f6ce5be6b9f6533" + }, + { + "bytes": 3634613, + "path": "THREE-FUSIONS.json", + "sha256": "08b9d071da2f6030aa1b84c76cbd372fb2b5dbad1fd09df61b5e9187eb2a12a4" + }, + { + "bytes": 10263, + "path": "VERIFICATION-OPTIMIZED.json", + "sha256": "e9bfe01911533af144582e02fa01b284408bceb46cb3ff3dcd57f4ce4d9b421a" + }, + { + "bytes": 10260, + "path": "VERIFICATION.json", + "sha256": "e8afcb0f9d481d73d94a9bb8613085de23016f2670ac05113126da6ed500165b" + }, + { + "bytes": 10021, + "path": "combine_fusions.py", + "sha256": "26e0e51f72fb3448209a63a65d7cc39284eff96e91d7030d59ad487d167fa15a" + }, + { + "bytes": 8319, + "path": "fixture_schema.py", + "sha256": "5659b0875a2f5cd1a7a0b3f0da16b287961c88217e18c5918acdd463f95767b4" + }, + { + "bytes": 6447, + "path": "one_site_absorption.py", + "sha256": "75c945643394ea5caaa4fa09654441ec1d81fe72133331bf0017e27b5b1ff2c9" + }, + { + "bytes": 8501, + "path": "verify_fusions.py", + "sha256": "456a5acff54c934ce28842a1a09a9801fd81f5376d757d665fa05173fdbf531c" + }, + { + "bytes": 1115, + "path": "write_manifest.py", + "sha256": "32ad48ed3057da6838a7fb7c8d4bad732072e0760a392b75336af3c69a75f95d" + }, + { + "bytes": 2200, + "path": "before-metadata-repair-20261019T130921Z/PRESERVED-BYTES.json", + "sha256": "6055a03694ac8a414cd469e60c29b4093db03f4fb8875e6682e3ce9cd6c96bdb" + } + ], + "schema": "folded-fusion-current-word-v2", + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "scope": "repaired explicit current-word metadata; local exact finite all-input/all-f verification; no new kappa" +} diff --git a/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz b/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz new file mode 100644 index 0000000000..c97f00381c Binary files /dev/null and b/research/two-site-caller-fusion/source/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json.gz differ diff --git a/research/two-site-caller-fusion/source/two-site-continuation/isolated_fusion.py b/research/two-site-caller-fusion/source/two-site-continuation/isolated_fusion.py new file mode 100644 index 0000000000..62c277ee57 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/isolated_fusion.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +"""Exact two-site physical monomial/Bruhat fusion, all-f full columns. +Apache-2.0; substantial OpenAI Codex assistance. +""" +from pathlib import Path +from functools import lru_cache +from collections import Counter +import argparse,hashlib,json,sys +from two_site import * +from lifted_algebra import Algebra,G,ONE as GONE,ZERO as GZERO +from validate_recipe_links import compile_monomial,compile_recipe +HERE=Path(__file__).resolve().parent +LIFTED=OLD/'native-frames/lifted_algebra.py' +need(hashlib.sha256(LIFTED.read_bytes()).hexdigest()=='3b9a58a2048a762ab520ac7fdbb28cbfeb7b30345aaeb777d8dabdd9fb1034d9','frozen general Clifford tensor engine pin') + +def bphase(m,p):return ce.Op(m,ce.identity(m),[('phase',p%4)]) + +@lru_cache(None) +def xop(g): + """Compile an arbitrary X-character Gaussian monomial to a physical circuit.""" + m=len(g.rows);out=ce.ident(m) + for i,a in enumerate(g.alpha): + if a%4==1:out=out.then(ce.cgate(m,1<>j&1: + out=out.then(ce.cgate(m,1<>i)&1)<>i)&1)for i in range(m)])) + if(g.constant+g.global_phase)%4:out=out.then(bphase(m,g.constant+g.global_phase)) + return out + +def family(A,E): + need(unitary_clifford(E),'convert one actual unitary Clifford family') + g,v=next(iter(E.items()));base=A.lift(xop(g));weights=tuple(G(v[2*r],v[2*r+1])for r in range(4)) + return{k:tuple(a*b for a,b in zip(value,weights))for k,value in base.items()} + +def one_coordinate(E): + g,v=next(iter(E.items()));c=(v[2],v[3]);units=((1,0),(0,1),(-1,0),(0,-1));need(c in units,'one-coordinate Gaussian unit') + return xop(g).then(bphase(len(g.rows),units.index(c))) + +def ring_replay(events,n,m,A,replace=None): + M=A.mat_identity(n);Mi=A.mat_identity(n) + for at,e in enumerate(events): + kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);M[d]=[A.add(x,A.scale(y,c))for x,y in zip(M[d],M[s])] + for row in Mi:row[s]=A.add(row[s],A.scale(row[d],-c)) + elif kind=='SCALE': + b,c=e['bank'],F(e['coefficient']);M[b]=[A.scale(x,c)for x in M[b]] + for row in Mi:row[b]=A.scale(row[b],1/c) + elif kind=='BANK_SWAP': + i,j=e['banks'];M[i],M[j]=M[j],M[i] + for row in Mi:row[i],row[j]=row[j],row[i] + else: + b=e['bank'];U=replace[at]if replace and at in replace else A.lift(xop(qc.decode(e,m)),exponent=qc.decode(e,m).global_phase);Ui=A.adjoint(U) + M[b]=[A.product(U,x)for x in M[b]] + for row in Mi:row[b]=A.product(row[b],Ui) + return M,Mi + +def family_phase(A,value,op): + base=A.lift(op);need(len(value)==len(base)==1 and set(value)==set(base),'new unary is one fixed Clifford ray for every f') + v,b=next(iter(value.values())),next(iter(base.values()));units=((1,0),(0,1),(-1,0),(0,-1));out=[] + for a,c in zip(v,b): + ratio=a/c;pair=(ratio.a,ratio.b);need(pair in units,'all-f correction is a Gaussian unit');out.append(units.index(pair)) + return out + +def serial_general(A,E): + return[{'distinguished_tableau':[list(t)for t in kd],'bulk_tableau':[list(t)for t in kb], + 'coefficients_by_f_mod4':[x.encode()for x in v]}for(kd,kb),v in E.items()] + +def run(q=2,i=31,j=51): + source=HERE/'INPUT-EVENTS.json';f=next(x for x in json.loads(source.read_text())['fixtures']if x['q']==q);n,m=f['banks'],f['ambient_arity'];P,T=f['prefix_events'],f['tail_events'] + # The removable native is the whole original U-coordinate recovery. + removed={at for at,e in enumerate(T)if e['label']=='joint U coordinate recovery'};need(len(removed)==1,'one selected whole tail native') + newT=[e for at,e in enumerate(T)if at not in removed];C=mm(qc.replay(inverse(newT,m),n,m),qc.replay(T,n,m)) + for at in range(len(P)-1,j,-1):C=pullback(C,P[at],m) + Acol,Brow=pair_columns(P,i,j,n,m);b=P[j]['bank'];I=eye(n,m) + need(not any(Acol[r]for r in range(n)if r!=b)and not any(Brow[c]for c in range(n)if c!=b),'transported bank direction is isolated in BOTH row and column') + need(all(C[r][c]==I[r][c]for r in range(n)for c in range(n)if(r,c)!=(b,b)),'required correction is only the isolated current bank') + need(unitary_clifford(Acol[b])and unitary_clifford(C[b][b]),'isolated transport and correction are actual unitary Clifford families') + L=product(C[b][b],product(Acol[b],mono(qc.decode(P[i],m))));R=product(adjoint(Acol[b]),mono(qc.decode(P[j],m))) + Lop,Rop=one_coordinate(L),one_coordinate(R);lrec,lout=ce.lower_child(Lop);rrec,rout=ce.lower_child(Rop);same(lout,Lop,'L Bruhat exact Gaussian phase');same(rout,Rop,'R Bruhat exact Gaussian phase') + # L=LL F_a LR, R=RL F_b RR. Choose NEW FIRST unary U=RL LR. + Uop=mul(compile_monomial(rrec['left'],m),compile_monomial(lrec['right'],m));need(ce.rank(x for x,y,p in Uop.tab[m:])==0,'first replacement is a physical monomial, not a hidden native query') + Vop=mul(Lop,Uop.adjoint(),Rop);rank=ce.rank(x for x,y,p in Vop.tab[m:]);need(rank==abs(lrec['rank']-rrec['rank']),'two-site exact native-distance invoice') + A=Algebra(2*q+1);Lf,Rf=family(A,L),family(A,R);Uf=A.lift(Uop);Vf=A.product(Lf,A.product(A.adjoint(Uf),Rf));vphase=family_phase(A,Vf,Vop) + oldE=P+T;newE=P+newT;M,Mi=ring_replay(newE,n,m,A,{i:Uf,j:Vf});target,targeti=ring_replay(oldE,n,m,A) + need(M==target,'every original independent bank coefficient, exact all-f Gaussian tensor algebra') + need(Mi==targeti,'complete literal inverse every original field') + need(A.mat_product(M,Mi)==A.mat_product(Mi,M)==A.mat_identity(n),'both complete arbitrary-input inverse orders') + expected=A.mat_identity(n);Gout=A.lift(xop(prefix(m,2*q+1)@j_operator(m)),exponent=(prefix(m,2*q+1)@j_operator(m)).global_phase) + for r in range(n):expected[r][r]=Gout + need(M==expected,'actual final F_k J on every original owner, without dropped right gauges') + # Complete selected recipe for the only new native unary and its inverse. + recipes={} + for inv in(False,True): + op=Vop.adjoint()if inv else Vop;rec,out=ce.lower_child(op);same(out,op,'new unary selected-native actual Gaussian phase');need(rec['rank']==rank,'new unary selected child rank') + recipes['two-site-later'+('inv'if inv else'')]={'selected_native_recipe':rec,'one_coordinate_literal_circuit':op.circuit,'one_coordinate_tableau':[list(t)for t in op.tab], + 'extra_global_phase_exponent_by_f_mod4':[(-x)%4 if inv else x for x in vphase]} + modified=[] + for at,e in enumerate(newE): + if at in(i,j): + op=Uop if at==i else Vop;fr=Uf if at==i else Vf;r=0 if at==i else rank + modified.append({'kind':'NATIVE'if r else'ADDRESS_OR_UNIT','bank':e['bank'],'label':'two-site physical replacement of '+e['label'],'rank_per_f':r, + 'one_coordinate_literal_circuit':op.circuit,'one_coordinate_tableau':[list(t)for t in op.tab], + 'extra_global_phase_exponent_by_f_mod4':family_phase(A,fr,op),'native_recipe_id':'two-site-later'if r else None}) + else: + event=dict(e,unchanged_event_input=True,input_section='prefix'if at0.','Unchanged source selected-native recipes are not re-certified from stale inherited metadata.'], + 'input_sha256':hashlib.sha256(source.read_bytes()).hexdigest(),'engine_sha256':need_engine,'general_clifford_tensor_engine_sha256':hashlib.sha256(LIFTED.read_bytes()).hexdigest(),'producer_sha256':hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),'no_new_kappa':True} + +def main(): + p=argparse.ArgumentParser();p.add_argument('--q',type=int,default=2);p.add_argument('--i',type=int,default=31);p.add_argument('--j',type=int,default=51);p.add_argument('--write',action='store_true');a=p.parse_args();out=json.loads(json.dumps(run(a.q,a.i,a.j)));path=HERE/('ISOLATED-FUSION-Q'+str(a.q)+'.json') + if a.write:path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:need(json.loads(path.read_text())==out,'saved complete isolated fusion differs') + print(out['status'],'mass',out['complete_native_mass'],'stock',out['stock'],'ranks',out['new_site_ranks_per_f'],flush=True) +if __name__=='__main__':main() diff --git a/research/two-site-caller-fusion/source/two-site-continuation/two_site.py b/research/two-site-caller-fusion/source/two-site-continuation/two_site.py new file mode 100644 index 0000000000..2ba110f5c6 --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-continuation/two_site.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python3 +"""Two-site exact Clifford equation screen on immutable event-only input. +Apache-2.0; substantial OpenAI Codex assistance. No heuristic lower bound. +""" +from pathlib import Path +from collections import Counter +import argparse,hashlib,json,sys,time +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +ENGINE=HERE.parent/'caller-joint/joint_algebra.py' +need_engine='6fe4de627845a36e2e08723e705daa86959846fe4ea577e94fca233829d7d5c9' +if hashlib.sha256(ENGINE.read_bytes()).hexdigest()!=need_engine:raise ValueError('frozen exact engine pin') +sys.path.insert(0,str(ENGINE.parent)) +from joint_algebra import * + +def inverse(E,m): + out=[] + for event in reversed(E): + e=dict(event) + if e['kind']=='ADD':e['coefficient']=str(-F(e['coefficient'])) + elif e['kind']=='SCALE':e['coefficient']=str(1/F(e['coefficient'])) + elif e['kind']!='BANK_SWAP':e['x_monomial']=qc.decode(e,m).inv().data() + out.append(e) + return out + +def pullback(C,e,m): + C=[[dict(x)for x in row]for row in C];kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);C[d]=[add(x,scale(y,-c))for x,y in zip(C[d],C[s])] + for row in C:row[s]=add(row[s],scale(row[d],c)) + elif kind=='BANK_SWAP': + i,j=e['banks'];C[i],C[j]=C[j],C[i] + for row in C:row[i],row[j]=row[j],row[i] + elif kind=='SCALE': + b,c=e['bank'],F(e['coefficient']);C[b]=[scale(x,1/c)for x in C[b]] + for row in C:row[b]=scale(row[b],c) + else: + b=e['bank'];G,Gi=mono(qc.decode(e,m)),mono(qc.decode(e,m).inv());C[b]=[product(Gi,x)for x in C[b]] + for row in C:row[b]=product(row[b],G) + return C + +def invertible_ray(E):return len(E)==1 and all(v[2*r]or v[2*r+1]for v in E.values()for r in range(4)) +def ray_inverse(E): + need(invertible_ray(E),'invert only a nonzero single Clifford ray') + v=next(iter(E.values()));norm=[v[2*r]**2+v[2*r+1]**2 for r in range(4)] + return{g:tuple(x/norm[i//2]for i,x in enumerate(w))for g,w in adjoint(E).items()} +def unitary_clifford(E): + if len(E)!=1:return False + v=next(iter(E.values())) + return all((v[2*r],v[2*r+1])in((F(1),F(0)),(F(-1),F(0)),(F(0),F(1)),(F(0),F(-1)))for r in range(4)) + +def pair_columns(P,i,j,n,m): + """A=V e_b, B=e_b^T V^-1, V=E_j...E_(i+1).""" + I=mono(qc.identity(m));b=P[i]['bank'];A=[dict(I)if r==b else{}for r in range(n)];B=[dict(x)for x in A] + for e in P[i+1:j+1]: + kind=e['kind'] + if kind=='ADD': + d,s,c=e['dst'],e['src'],F(e['coefficient']);A[d]=add(A[d],scale(A[s],c));B[s]=add(B[s],scale(B[d],-c)) + elif kind=='BANK_SWAP': + d,s=e['banks'];A[d],A[s]=A[s],A[d];B[d],B[s]=B[s],B[d] + elif kind=='SCALE': + d,c=e['bank'],F(e['coefficient']);A[d]=scale(A[d],c);B[d]=scale(B[d],1/c) + else: + d=e['bank'];g=qc.decode(e,m);A[d]=product(mono(g),A[d]);B[d]=product(B[d],mono(g.inv())) + need(summ(product(B[r],A[r])for r in range(n))==I,'paired transported row/column BA=I') + return A,B + +def solve(C,A,B,bank,I): + equation=None + for r in range(len(C)): + if r==bank:continue + for c in range(len(C)): + if invertible_ray(A[r])and invertible_ray(B[c]): + rhs=add(add(C[r][c],scale(I[r][c],-1)),product(A[r],B[c])) + X=product(ray_inverse(A[r]),product(rhs,ray_inverse(B[c]))) + equation=(r,c) + if not unitary_clifford(X):return None,'unique-nonunit-or-nonclifford',equation + # Every off-later-bank coefficient is checked, not only the source equation. + XmI=add(X,scale(I[0][0],-1)) + for rr in range(len(C)): + if rr==bank:continue + for cc in range(len(C)): + if add(I[rr][cc],product(A[rr],product(XmI,B[cc])))!=C[rr][cc]:return None,'off-bank-defect',equation + # C Z^-1 must be one literal unitary diagonal bank factor. + CA=[summ(product(C[rr][cc],A[cc])for cc in range(len(C)))for rr in range(len(C))] + XimI=add(adjoint(X),scale(I[0][0],-1));D=[[add(C[rr][cc],product(CA[rr],product(XimI,B[cc])))for cc in range(len(C))]for rr in range(len(C))] + if any(D[rr][cc]!=I[rr][cc]for rr in range(len(C))for cc in range(len(C))if(rr,cc)!=(bank,bank)):return None,'second-bank-defect',equation + if not unitary_clifford(D[bank][bank]):return None,'second-nonunit-or-nonclifford',equation + return(X,D[bank][bank]),'accepted',equation + if any(A[r]for r in range(len(A))if r!=bank):return None,'unresolved-no-invertible-ray-equation',None + if any(C[r][c]!=I[r][c]for r in range(len(C))if r!=bank for c in range(len(C))):return None,'row-confined-effect-cannot-fit',None + return None,'unresolved-row-confined-factorization',None + +def event_replacement(e,R): + g,v=next(iter(R.items()));rank=qc.rank(g.polar());d={k:x for k,x in e.items()if k in('bank','label')} + d.update(kind='NATIVE'if rank else'ADDRESS_OR_UNIT',x_monomial=g.data(),rank_per_f=rank, + scalar_phase_by_f_mod4=[[str(v[2*r]),str(v[2*r+1])]for r in range(4)],label='two-site replacement of '+e['label']) + # The decoder can only carry a global/tensor affine phase. Non-affine fmod4 + # phases are retained explicitly and replayed by the matrix verifier below. + return d + +def replay_replaced(P,T,i,j,Ri,Rj,n,m): + W=eye(n,m) + for at,e in enumerate(P+T): + if at in(i,j): + R=Ri if at==i else Rj;b=e['bank'];W[b]=[product(R,x)for x in W[b]] + else: + k=e['kind'] + if k=='ADD':W[e['dst']]=[add(x,scale(y,F(e['coefficient'])))for x,y in zip(W[e['dst']],W[e['src']])] + elif k=='BANK_SWAP':a,b=e['banks'];W[a],W[b]=W[b],W[a] + elif k=='SCALE':W[e['bank']]=[scale(x,F(e['coefficient']))for x in W[e['bank']]] + else:b=e['bank'];G=mono(qc.decode(e,m));W[b]=[product(G,x)for x in W[b]] + return W + +def screen(f,max_seconds=1200): + start=time.monotonic();q,n,m=f['q'],f['banks'],f['ambient_arity'];P,T=f['prefix_events'],f['tail_events'];I=eye(n,m) + target=qc.replay(P+T,n,m);oldT=qc.replay(T,n,m) + need(sum(e.get('rank_per_f',0)for e in P+T if e['kind']=='NATIVE')==f['source_complete_mass'],'frozen actual event native bill') + sites=[i for i,e in enumerate(P)if e['kind']not in('ADD','SCALE','BANK_SWAP')];tailsites=[i for i,e in enumerate(T)if e['kind']=='NATIVE'];pairs={} + for jj,j in enumerate(sites): + for i in sites[:jj]:pairs[i,j]=pair_columns(P,i,j,n,m) + counts=Counter();accepted=[];improving=[];done=[];timed_out=False;best=f['source_complete_mass'] + for mask in range(1,1<>r&1};newT=[e for at,e in enumerate(T)if at not in removed] + C=mm(qc.replay(inverse(newT,m),n,m),oldT);cuts={} + for at in range(len(P)-1,-1,-1): + if at in sites:cuts[at]=C + C=pullback(C,P[at],m) + removed_mass=sum(T[r]['rank_per_f']for r in removed) + for (i,j),(A,B)in pairs.items(): + result,status,equation=solve(cuts[j],A,B,P[j]['bank'],I);counts[status]+=1 + if result: + X,Y=result;Ri=product(X,mono(qc.decode(P[i],m)));Rj=product(Y,mono(qc.decode(P[j],m))) + need(unitary_clifford(Ri)and unitary_clifford(Rj),'both replacements actual unitary Clifford families') + ri,rj=qc.rank(next(iter(Ri)).polar()),qc.rank(next(iter(Rj)).polar());mass=f['source_complete_mass']-removed_mass-P[i].get('rank_per_f',0)-P[j].get('rank_per_f',0)+ri+rj + witness={'tail_mask':mask,'removed_tail_sites':sorted(removed),'removed_tail_labels':[T[r]['label']for r in sorted(removed)],'sites':[i,j],'banks':[P[i]['bank'],P[j]['bank']], + 'labels':[P[i]['label'],P[j]['label']],'equation':list(equation),'old_ranks':[P[i].get('rank_per_f',0),P[j].get('rank_per_f',0)],'new_ranks':[ri,rj], + 'complete_mass':mass,'stock':f['stock'],'replacement_operators':[serial(Ri),serial(Rj)],'rank_only':True,'selected_native_lowering':False} + if mass<=best: + need(replay_replaced(P,newT,i,j,Ri,Rj,n,m)==target,'candidate complete arbitrary-input physical word every coefficient') + witness['all_original_columns_verified']=n + accepted.append(witness) + if massmax_seconds:timed_out=True;break + if timed_out:break + done.append(mask);print('q',q,'finished mask',mask,'/',(1<>r&1};newT=[e for at,e in enumerate(T)if at not in removed];C=mm(qc.replay(inverse(newT,m),n,m),oldT);cuts={} + for at in range(len(P)-1,-1,-1): + if at in sites:cuts[at]=C + C=pullback(C,P[at],m) + for(i,j),(A,B)in pairs.items(): + _,status,_=solve(cuts[j],A,B,P[j]['bank'],I) + if not status.startswith('unresolved'):continue + solutions,kind,total,equation=cover(cuts[j],A,B,P[j]['bank'],I);counts[kind]+=1 + entry={'mask':mask,'sites':[i,j],'banks':[P[i]['bank'],P[j]['bank']],'labels':[P[i]['label'],P[j]['label']],'initial_status':status,'cover_status':kind,'canonical_candidates':total,'solutions':len(solutions),'equation':equation} + cases.append(entry) + for X,Y in solutions: + Ri=product(X,mono(qc.decode(P[i],m)));Rj=product(Y,mono(qc.decode(P[j],m)));ri,rj=qc.rank(next(iter(Ri)).polar()),qc.rank(next(iter(Rj)).polar()) + mass=f['source_complete_mass']-sum(T[r]['rank_per_f']for r in removed)-P[i].get('rank_per_f',0)-P[j].get('rank_per_f',0)+ri+rj + need(replay_replaced(P,newT,i,j,Ri,Rj,n,m)==target,'finite-cover exact candidate every original coefficient') + witness=dict(entry,complete_mass=mass,stock=f['stock'],replacement_ranks=[ri,rj],replacement_operators=[serial(Ri),serial(Rj)],rank_only=True,selected_native_lowering=False) + accepted.append(witness) + if mass=|r(L)-r(R)|`. + +Exact Gaussian Bruhat decompositions + + L=LL F_a LR, R=RL F_b RR + +give the attaining choice `U=RL LR`. It is a physical monomial, and + + L U^-1 R=LL F_a F_b RR. + +Canonical native C chirps overlap on the first min(a,b) axes; each +overlap squares *exactly* to Pauli X. The remaining arity is |a-b|. +The Gaussian phases belong in the literal monomial adapters and the +recorded whole-field unit, as checked for the two actual witnesses. +This is an all-parameter Clifford lemma at a fixed isolated two-site +interface. Attainment uses the stated phase-complete Gaussian native +Bruhat factorization; it does not extend the admitted scalar/phase +alphabet beyond that model. It does not make the actual q2/q3 transport +an all-q caller. + +## Controls and source authentication + +Independent rejecting controls cover an opposite-direction inverse +native pointer, a scalar mutation only at f=2 mod4 with f1 unchanged, +and omission of the first emitted free monomial. They fail the intended +phase/operator/local correction checks. An equivalent positive control +adds opposite whole-field i/-i gauges to U/W and retains the identity. + +Workspace mathematical source is executed from the exact bytes hashed +in memory, bypassing bytecode caches. Legacy workspace assertions are +explicitly compiled active even under an optimized parent. A poisoned +unchecked-hash bytecode control is bypassed, and deliberate legacy +assertion failures remain active. The executed-source hashes are +recorded in the receipt. This is an executable exact oracle, not a +formal-kernel proof. + +## Bounded continuation scope + +The saved q2 continuation was reproduced read-only using authenticated +source bytes and the author's exact general-Clifford engine. Its +proof-relevant payload matches the frozen certificate exactly: all +seven nonempty subsets of the three remaining native tail sites and +all703 pairs of existing prefix unaries are accounted for. Of4,921 +cases,4,887 have a required correction involving more than one bank; +34 fail two-sided transport isolation. There is no eligible isolated +pair. No timeout or omitted mask is credited. + +This census reproduction is **not a second independent general-Clifford +census implementation**. The independent positive-word proof above is +separate. The continuation's necessity tests and scope were reviewed: +column-only isolation is insufficient, as is row-only isolation; +independent triangular controls expose both cases, while a bank-swap +transport is accepted as a legal two-sided isolated direction. + +The continuation does not exclude a coupled two-bank correction, +nonisolated annihilation, more changed sites, another source/response +chronology or changed owner/output boundaries. The initial finite-ray +screen also retains its stated unresolved homogeneous strata; it is +not a global two-site optimum or lower bound. + +## Remaining obligations + +Both constructive profiles remain stock+4. Positive native deficit, +complete scan/address/controller work, precision, COPY/storage/tape, +recursive owner/width windows, outer moment and compatible BIT admission +are not established by this review. Every D/P/X/unit scan remains paid; +offline Bruhat factoring is not an uncharged runtime native call. +No all-q caller, global obstruction, improved kappa or publication action +is claimed. diff --git a/research/two-site-caller-fusion/source/two-site-independent-audit/SOURCE-PINS.json b/research/two-site-caller-fusion/source/two-site-independent-audit/SOURCE-PINS.json new file mode 100644 index 0000000000..bfb715a30b --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-independent-audit/SOURCE-PINS.json @@ -0,0 +1,64 @@ +{ + "source_pins": [ + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/MANIFEST.json", + "sha256": "44f1e264b3087ab8fdb08b4cd6e27befefbba380852b0119321724b7bc41b5da" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/HANDOFF.md", + "sha256": "404e01603b99f3e865ce5f7f3fd0a6bd9ca79db4217c105816b7010cc371dbf0" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/PROOF.md", + "sha256": "2506f7a89239d2375f14a1d7084aaaf11678818d6a20eb81e29de0a66a9f751a" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ADMITTED-TWO-SITE-FUSIONS.json", + "sha256": "30d3f569d91304856118796f0c586176d0ad961eff70b09c78fce7532392101f" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/admit_fusions.py", + "sha256": "15c921045d86fe581725d284b1f9557b4adcdff204951b2e12d0b237b2065b09" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/isolated_fusion.py", + "sha256": "eafc4bd6e0cb0e2136dc9da8454d72ebe2da6f194c7bc62815601ba93d56094e" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/continue_isolated.py", + "sha256": "89551fe31fbf92cdc1167c7a0149b345733abac09da14aa7e482adc3842442a0" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q2.json", + "sha256": "5ee7878ccd08a1eff40b9bc68e2d0476e501819aea39fda75cbeeadfb9f81d2e" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/ISOLATED-FUSION-Q3.json", + "sha256": "4997bab27dda2e20d39209f9002af71c1cee42caa1e69b7a8a2f9eb7f4393fd8" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/CONTINUED-ISOLATION-Q2.json", + "sha256": "d944c5b3181442af3cfd855b6f7d059f6bdfaed35755eff549ee7e96c66c5da7" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/INPUT-EVENTS.json", + "sha256": "412e126144828455ebfa9d7baafb392e6f8cc5ff956876884451c59545765cfa" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-SIMPLIFIED-FUSIONS.json", + "sha256": "4491cfe2a1f3e48510b33403b9b50c704865c3b1dc6d659ef5157840654e8fc3" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/two-site-continuation/inputs/REPAIRED-MANIFEST.json", + "sha256": "dde942457256b0f037a65eebeb5df822fe4d8911c0441657816c77a4c20c6f1c" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/fusion-audit/audit_fusions.py", + "sha256": "26c35f6d61ad6568da1c650a343b82caea174330ff8054c4cdab1fe183ad2173" + }, + { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-joint-cleanup-20261019T1133Z/fusion-audit/MANIFEST.json", + "sha256": "75f0679178d18d29891b7de962823ca54b67c15184bfcbf9739896e72fcaa12f" + } + ] +} diff --git a/research/two-site-caller-fusion/source/two-site-independent-audit/VALIDATION.json b/research/two-site-caller-fusion/source/two-site-independent-audit/VALIDATION.json new file mode 100644 index 0000000000..1e13f2436b --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-independent-audit/VALIDATION.json @@ -0,0 +1,27 @@ +{ + "checks": [ + { + "normal_saved_receipt_comparison": "PASS", + "optimized_saved_receipt_comparison": "PASS", + "producer": "audit_two_sites.py", + "receipt": "AUDIT.json", + "receipt_sha256": "e3333eb9c0166a2b66bec2599e8c837a5fd6459e560abcb190c792653bca2ed7", + "status": "PASS_INDEPENDENT_TWO_SITE_TRANSPORT_LITERAL_PHASE_AND_NATIVE_ADMISSION" + }, + { + "normal_saved_receipt_comparison": "PASS", + "optimized_saved_receipt_comparison": "PASS", + "producer": "replay_continuation.py", + "receipt": "CONTINUATION-REPLAY.json", + "receipt_sha256": "9894e740599d348a6a9aed4ef8e45cf5b214caa8f77ca9b40388bb252048dd05", + "status": "PASS_AUTHENTICATED_BOUNDED_ISOLATION_REPLAY_AND_TWO_SIDED_CONTROLS" + } + ], + "completed_at_utc": "2026-10-19T14:03:23.591210+00:00", + "constructive_independence": "Independent old-word transport plus physical Clifford local identity/recipe and inverse proof.", + "continuation_independence": "Authenticated same-engine census reproduction; not a second census engine.", + "no_new_kappa": true, + "python": "3.14.6 (main, Jun 10 2026, 10:03:53) [Clang 21.0.0 (clang-2100.0.123.102)]", + "source_execution": "Every workspace module read/hash/compile shares the exact same byte string; unchecked bytecode cache ignored, legacy assertions active under -O.", + "status": "PASS_INDEPENDENT_TWO_SITE_REVIEW" +} diff --git a/research/two-site-caller-fusion/source/two-site-independent-audit/audit_two_sites.py b/research/two-site-caller-fusion/source/two-site-independent-audit/audit_two_sites.py new file mode 100644 index 0000000000..8a3dcd7bff --- /dev/null +++ b/research/two-site-caller-fusion/source/two-site-independent-audit/audit_two_sites.py @@ -0,0 +1,263 @@ +#!/usr/bin/env python3 +"""Independent transport/gluing and literal recipe audit, q2/q3, all f. +Apache-2.0; substantial OpenAI Codex assistance. No source generator import. +""" +from pathlib import Path +from fractions import Fraction +from collections import Counter +from functools import lru_cache +import argparse,hashlib,json,sys,importlib.machinery,py_compile,types +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent;ROOT=HERE.parent;SOURCE=ROOT/'two-site-continuation' + +# Execute the exact source bytes read and hashed, including explicit legacy +# SourceFileLoader imports. Ignore bytecode caches and keep legacy assertions +# active even when this independent parent is run with -O. +EXECUTED={};original_get_code=importlib.machinery.SourceFileLoader.get_code +def source_only(self,fullname): + path=Path(self.path) + if str(path).startswith('/Users/ross/git/math/'): + raw=path.read_bytes();EXECUTED[str(path)]=hashlib.sha256(raw).hexdigest() + return compile(raw,str(path),'exec',dont_inherit=True,optimize=0) + return original_get_code(self,fullname) +importlib.machinery.SourceFileLoader.get_code=source_only +sys.path.insert(0,str(ROOT/'fusion-audit')) +import audit_fusions as old +ce,b,mul,need=old.ce,old.b,old.mul,old.need +product,add,scale,from_circuit=old.product,old.sumexpr,old.scale,old.from_circuit +from literal_inverse_binding import serial +from lifted_algebra import G +UNITS=(G(Fraction(1)),G(Fraction(0),Fraction(1)),G(Fraction(-1)),G(Fraction(0),Fraction(-1))) + + +def loader_controls(): + probe=HERE/'_bytecode_probe.py';cache=Path(importlib.util.cache_from_source(str(probe))) + need(not probe.exists()and not cache.exists(),'loader control owns fresh scratch paths') + try: + probe.write_text('raise RuntimeError("poisoned cached source")\n') + py_compile.compile(str(probe),cfile=str(cache),doraise=True, + invalidation_mode=py_compile.PycInvalidationMode.UNCHECKED_HASH) + probe.write_text('VALUE="exact source bytes"\ndef check():\n assert False, "legacy checker remains active"\n') + loader=importlib.machinery.SourceFileLoader('audit_bytecode_probe',str(probe)) + module=types.ModuleType('audit_bytecode_probe');module.__file__=str(probe);loader.exec_module(module) + need(module.VALUE=='exact source bytes','poisoned unchecked-hash bytecode ignored') + try:module.check() + except AssertionError:pass + else:raise ValueError('workspace legacy assertions disabled under parent optimization') + try:ce.diag(2,(2,0),(0,0)) + except AssertionError:pass + else:raise ValueError('retained exact Clifford source assertion disabled') + finally: + probe.unlink(missing_ok=True);cache.unlink(missing_ok=True);EXECUTED.pop(str(probe),None) + try:cache.parent.rmdir() + except OSError:pass + return ['unchecked-hash poisoned bytecode bypassed','workspace source assertions active','retained Clifford assertion active'] + + +@lru_cache(None) +def op_of(circuit,n):return old.circuit_op(json.loads(circuit),n) +def event_op(e,m): + op=op_of(json.dumps(e['one_coordinate_literal_circuit']),m) + need(op.tab==tuple(tuple(x)for x in e['one_coordinate_tableau']),'literal event tableau') + need(b.native_rank(op)==e['rank_per_f'],'literal event native rank') + need(len(e['extra_global_phase_exponent_by_f_mod4'])==4,'four exact tensor phase residues') + need(not any(k in e for k in('x_monomial','native_family','phase_exponent')),'no stale operator shadows') + return op +def xsafe(op):return all(e[0]!='D'or(not any(e[1])and all(x%2==0 for x in e[2]))for e in op.circuit) +@lru_cache(None) +def sparse(circuit,n):return b.sparse_column(op_of(circuit,n)) +def equal_op(a,c): + if a.tab!=c.tab:return False + if xsafe(a)and xsafe(c):return from_circuit(a,0)==from_circuit(c,0) + return sparse(json.dumps(a.circuit),a.n)==sparse(json.dumps(c.circuit),c.n) +def old_unary(e,m,inverse=False): + op=old.event_op(e,m);return from_circuit(op.adjoint()if inverse else op,-e['phase_exponent']if inverse else e['phase_exponent']) +def identity(n,m): + I=from_circuit(ce.ident(m),0);return[[dict(I)if i==j else{}for j in range(n)]for i in range(n)] +def mm(A,B):return[[sumexpr(product(A[i][k],B[k][j])for k in range(len(A))if A[i][k]and B[k][j])for j in range(len(A))]for i in range(len(A))] +def sumexpr(items): + out={} + for x in items:out=add(out,x) + return out +def replay_old(E,n,m,inverse=False): + M=identity(n,m) + for e in reversed(E)if inverse else E: + typ=e['kind'] + if typ=='ADD': + d,s=e['dst'],e['src'];c=Fraction(e['coefficient'])*(-1 if inverse else 1) + M[d]=[add(x,scale(y,c))for x,y in zip(M[d],M[s])] + elif typ=='SCALE': + c=Fraction(e['coefficient']);c=1/c if inverse else c + M[e['bank']]=[scale(x,c)for x in M[e['bank']]] + elif typ=='BANK_SWAP':i,j=e['banks'];M[i],M[j]=M[j],M[i] + else: + U=old_unary(e,m,inverse);M[e['bank']]=[product(U,x)for x in M[e['bank']]] + return M +def pullback(C,e,m): + C=[[dict(x)for x in row]for row in C];typ=e['kind'] + if typ=='ADD': + d,s=e['dst'],e['src'];c=Fraction(e['coefficient']) + C[d]=[add(x,scale(y,-c))for x,y in zip(C[d],C[s])] + for row in C:row[s]=add(row[s],scale(row[d],c)) + elif typ=='BANK_SWAP': + i,j=e['banks'];C[i],C[j]=C[j],C[i] + for row in C:row[i],row[j]=row[j],row[i] + elif typ=='SCALE': + j=e['bank'];c=Fraction(e['coefficient']);C[j]=[scale(x,1/c)for x in C[j]] + for row in C:row[j]=scale(row[j],c) + else: + j=e['bank'];U,Ui=old_unary(e,m),old_unary(e,m,True) + C[j]=[product(Ui,x)for x in C[j]] + for row in C:row[j]=product(row[j],U) + return C +def transported(P,i,j,n,m): + I=from_circuit(ce.ident(m),0);bank=P[i]['bank'] + col=[dict(I)if x==bank else{}for x in range(n)];row=[dict(x)for x in col] + for e in P[i+1:j+1]: + typ=e['kind'] + if typ=='ADD': + d,s=e['dst'],e['src'];c=Fraction(e['coefficient']) + col[d]=add(col[d],scale(col[s],c));row[s]=add(row[s],scale(row[d],-c)) + elif typ=='BANK_SWAP':a,c=e['banks'];col[a],col[c]=col[c],col[a];row[a],row[c]=row[c],row[a] + elif typ=='SCALE': + x=e['bank'];c=Fraction(e['coefficient']);col[x]=scale(col[x],c);row[x]=scale(row[x],1/c) + else: + x=e['bank'];col[x]=product(old_unary(e,m),col[x]);row[x]=product(row[x],old_unary(e,m,True)) + need(sumexpr(product(x,y)for x,y in zip(row,col))==I,'transported row times column equals I') + return col,row +def to_op(E): + need(len(E)==1,'one exact old Clifford ray');(key,v),=E.items();n=len(key[0]);out=ce.ident(n) + for i,a in enumerate(key[2]): + if a in(1,3):out=out.then(ce.cgate(n,1<>j&1:out=out.then(ce.cgate(n,1<>i)&1)for i in range(n)])) + units=[UNITS.index(x)for x in v];out=out.then(old.phase(n,units[1])) + need(from_circuit(out,0)=={key:tuple(UNITS[(units[1]*r)%4]for r in range(4))},'independent X-character-to-physical circuit direction/phase') + return out,[(units[r]-r*units[1])%4 for r in range(4)] + + +def native_check(e,pool,m,cache): + op=event_op(e,m) + if e['kind']!='NATIVE':need(b.native_rank(op)==0,'first emitted free operator is physical monomial');return + key=e['native_recipe_id'];need(key in pool,'native pointer exists');p=pool[key] + need(e['extra_global_phase_exponent_by_f_mod4']==p['extra_global_phase_exponent_by_f_mod4'],'native pool phase-vector direction') + if key not in cache: + n=len(p['one_coordinate_tableau'])//2;actual=op_of(json.dumps(p['one_coordinate_definition_circuit']),n) + need(actual.tab==tuple(tuple(x)for x in p['one_coordinate_tableau']),'pool definition tableau') + compiled=old.compile_recipe(p['selected_native_recipe'],n) + need(equal_op(compiled,actual),'selected recipe actual Gaussian ray') + need(b.native_rank(actual)==p['selected_native_recipe']['rank'],'selected recipe rank') + cache[key]=actual + need(len(e['recipe_embedding'])==cache[key].n,'recipe embedding dimension') + embedded=old.circuit_op(old.embedding(cache[key].circuit,e['recipe_embedding'],m),m) + need(equal_op(embedded,op),'actual event equals selected recipe embedding including phase') + cap=int(((m*m-1)//2)**0.5) + need(e['rank_per_f']<=cap and e['rank_per_f']