diff --git a/research/bit-fixed-controller-repairs/ADAPTATIONS.md b/research/bit-fixed-controller-repairs/ADAPTATIONS.md new file mode 100644 index 0000000000..1cf08cc76b --- /dev/null +++ b/research/bit-fixed-controller-repairs/ADAPTATIONS.md @@ -0,0 +1,42 @@ +# Replay adaptations + +The frozen historical code and data are unchanged. Original imports, absolute +path constants and command-line entrypoints are not imported wholesale. +`verify.py` authenticates each selected file against `FROZEN-SHA256.json`, +selects unique named top-level definitions and compiles those definitions +with `dont_inherit=True, optimize=0`. + +The inherited nested recipe loaders still select the original `recipe` +definition. Their supplied AST parser requires that definition to be unique, +and their supplied compiler also forces assertions on under optimized Python. +Only the recipe executes from the original `global_k.py`; its imports and +other top-level code do not execute. + +Every retained historical source read uses an explicit `SourcePath` mapping. +Its only I/O authenticates the declared frozen bytes anew. This covers the +recipe, matrix input, R438 word, full E8 root word and route-generator hash. +The original unique literal `RAW_SHA` is parsed from the retained +`bit_cap_copy_local.py` and must agree with the frozen R438 input. No function +from that cap-copy file runs. + +The original closed-hybrid `receipt()` is evaluated directly. The original +nilpotent and early-promotion generators run their selected `main()` with +`--write` and a temporary output directory outside the package. Those complete +fresh JSON values are compared against the three frozen receipts with a typed +canonical serialization, preserving every field and list position. +The old Python dictionary-equality acceptance paths are therefore not the +publication acceptance check. + +Only `need`, `mul`, `plus`, `scale` and `ident` are selected from the seeded-star +file. Its main program and unused `inverse_event` stub do not execute. That +stub's broad involution comment does not describe the new-F primitive and is +not used as a premise. + +The independent checkers receive only explicit input paths and external output +paths. Their complete modules are compiled from authenticated bytes with +assertions enabled. Every full generated receipt is compared, and the frozen +inventory is checked again after each stage. + +These are loading and acceptance adaptations. They do not alter the old +mathematical functions, discard receipt fields or turn an imported native +premise into a proof. diff --git a/research/bit-fixed-controller-repairs/CONTROLS.json b/research/bit-fixed-controller-repairs/CONTROLS.json new file mode 100644 index 0000000000..8bfab44796 --- /dev/null +++ b/research/bit-fixed-controller-repairs/CONTROLS.json @@ -0,0 +1,605 @@ +{ + "no_new_kappa": true, + "route_census_or_general_B_replayed": false, + "runs": [ + { + "complete_real_receipts": [ + { + "mutated_nested_path": [ + "controls", + 0, + "defect", + 0, + 2, + 0, + 0 + ], + "receipt": "frozen/hybrid/CLOSED-HYBRID.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/hybrid/CLOSED-HYBRID.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/hybrid/CLOSED-HYBRID.json" + } + ], + "sha256": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7" + }, + { + "mutated_nested_path": [ + "code_offdiagonal", + "coefficient" + ], + "receipt": "frozen/hybrid/EARLY-PROMOTION.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/hybrid/EARLY-PROMOTION.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/hybrid/EARLY-PROMOTION.json" + } + ], + "sha256": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "epsilon_matrix_A", + 0, + 0 + ], + "receipt": "frozen/recipe/BIT-NILPOTENT-RECIPE.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/recipe/BIT-NILPOTENT-RECIPE.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/recipe/BIT-NILPOTENT-RECIPE.json" + } + ], + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "instantiations", + 0, + "N_rows", + 0 + ], + "receipt": "frozen/reviews/recipe/CHECKS.json.gz", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/reviews/recipe/CHECKS.json.gz" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/reviews/recipe/CHECKS.json.gz" + } + ], + "sha256": "cff40bd8d82e7919b9a1a76c03389bc0a82c9156d162198faf6132eac4691359" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "preterminal", + 0, + 0, + 1, + 0 + ], + "receipt": "frozen/reviews/hybrid/CHECKS.json.gz", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/reviews/hybrid/CHECKS.json.gz" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/reviews/hybrid/CHECKS.json.gz" + } + ], + "sha256": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f" + } + ], + "compressed_original_binding": { + "equivalent_storage_with_same_original_accepted": true, + "rejections": [ + { + "name": "changed_compressed_bytes", + "reason": "frozen input changed: frozen/original.json.gz" + }, + { + "name": "origin_container_hash_mismatch", + "reason": "origin container binding differs" + }, + { + "name": "changed_decompressed_original", + "reason": "compressed original bytes changed: frozen/original.json.gz" + }, + { + "name": "origin_inventory_omission", + "reason": "origin and frozen inventories differ" + } + ] + }, + "literal_source_pin": { + "actual_original_pin_matches": true, + "rejections": [ + { + "name": "missing_literal_pin", + "reason": "original RAW_SHA binding must be unique" + }, + { + "name": "duplicate_literal_pin", + "reason": "original RAW_SHA binding must be unique" + }, + { + "name": "wrong_literal_pin_type", + "reason": "original RAW_SHA is not a digest" + }, + { + "name": "executable_pin_expression", + "reason": "malformed node or string on line 1: " + } + ] + }, + "mathematical_controls": { + "actual_authenticated_function": "closed_hybrid.receipt", + "coefficient_ring": "Z[free group(a0,...,a8)]", + "deleted_named_check_detected": true, + "formal_input_rows": 8, + "one_literal_inverse_code_direction_changed_after_authentication": true, + "rejections": [ + { + "name": "one_actual_inverse_code_runs_forward", + "reason": "literal reverse-inverse cleanup" + }, + { + "name": "independent_control_rejects_unrelated_error", + "reason": "wrong rejection for unrelated_fixture" + } + ] + }, + "nested_sources": { + "only_authenticated_mapped_reads": true, + "original_imports_and_top_level_excluded": true, + "rejections": [ + { + "name": "undeclared_logical_read", + "reason": "undeclared historical source read: missing" + }, + { + "name": "absolute_path_escape", + "reason": "undeclared historical source read: /etc/passwd" + }, + { + "name": "relative_path_escape", + "reason": "undeclared historical source read: ../outside" + }, + { + "name": "mapped_unregistered_input", + "reason": "unregistered frozen input: frozen/unregistered.py" + }, + { + "name": "nested_recipe_assert_under_parent_flags", + "reason": "NESTED_RECIPE_ASSERT" + }, + { + "name": "duplicate_nested_recipe", + "reason": "recipe definition must be unique" + }, + { + "name": "missing_nested_recipe", + "reason": "recipe definition must be unique" + }, + { + "name": "mapped_changed_bytes", + "reason": "frozen input changed: frozen/recipe.py" + }, + { + "name": "mapped_missing_file", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-07cy0gl3/nested/frozen/recipe.py'" + } + ] + }, + "parent_optimization": 0, + "receipt_contract": { + "deleted_named_check_detected": true, + "rejections": [ + { + "name": "boolean_for_integer", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "float_for_integer", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "integer_for_boolean", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "nested_omission", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "list_reordering", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "list_truncation", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "missing_fixed_receipt", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-07cy0gl3/receipt/frozen/receipt.json'" + } + ] + }, + "source_selection": { + "imports_top_level_and_main_excluded": true, + "rejections": [ + { + "name": "direct_runtime_gate_under_parent_flags", + "reason": "DIRECT_RUNTIME_GATE" + }, + { + "name": "extracted_assert_under_parent_flags", + "reason": "EXTRACTED_ASSERT" + }, + { + "name": "nested_assert_under_parent_flags", + "reason": "NESTED_ASSERT" + }, + { + "name": "authenticated_module_assert_under_parent_flags", + "reason": "MODULE_ASSERT" + }, + { + "name": "changed_authenticated_module", + "reason": "frozen input changed: frozen/module.py" + }, + { + "name": "missing_named_definition", + "reason": "function selection changed" + }, + { + "name": "duplicate_source_definition", + "reason": "function selection changed" + }, + { + "name": "duplicate_requested_name", + "reason": "function selection changed" + }, + { + "name": "unregistered_source", + "reason": "unregistered frozen input: frozen/unknown.py" + }, + { + "name": "changed_authenticated_source", + "reason": "frozen input changed: frozen/source.py" + }, + { + "name": "missing_registered_source", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-07cy0gl3/source/frozen/source.py'" + } + ] + }, + "verifier_sha256": "f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b" + }, + { + "complete_real_receipts": [ + { + "mutated_nested_path": [ + "controls", + 0, + "defect", + 0, + 2, + 0, + 0 + ], + "receipt": "frozen/hybrid/CLOSED-HYBRID.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/hybrid/CLOSED-HYBRID.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/hybrid/CLOSED-HYBRID.json" + } + ], + "sha256": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7" + }, + { + "mutated_nested_path": [ + "code_offdiagonal", + "coefficient" + ], + "receipt": "frozen/hybrid/EARLY-PROMOTION.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/hybrid/EARLY-PROMOTION.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/hybrid/EARLY-PROMOTION.json" + } + ], + "sha256": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "epsilon_matrix_A", + 0, + 0 + ], + "receipt": "frozen/recipe/BIT-NILPOTENT-RECIPE.json", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/recipe/BIT-NILPOTENT-RECIPE.json" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/recipe/BIT-NILPOTENT-RECIPE.json" + } + ], + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "instantiations", + 0, + "N_rows", + 0 + ], + "receipt": "frozen/reviews/recipe/CHECKS.json.gz", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/reviews/recipe/CHECKS.json.gz" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/reviews/recipe/CHECKS.json.gz" + } + ], + "sha256": "cff40bd8d82e7919b9a1a76c03389bc0a82c9156d162198faf6132eac4691359" + }, + { + "mutated_nested_path": [ + "cases", + 0, + "preterminal", + 0, + 0, + 1, + 0 + ], + "receipt": "frozen/reviews/hybrid/CHECKS.json.gz", + "rejections": [ + { + "name": "real_nested_field_mutation", + "reason": "complete receipt mismatch: frozen/reviews/hybrid/CHECKS.json.gz" + }, + { + "name": "real_nested_field_omission", + "reason": "complete receipt mismatch: frozen/reviews/hybrid/CHECKS.json.gz" + } + ], + "sha256": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f" + } + ], + "compressed_original_binding": { + "equivalent_storage_with_same_original_accepted": true, + "rejections": [ + { + "name": "changed_compressed_bytes", + "reason": "frozen input changed: frozen/original.json.gz" + }, + { + "name": "origin_container_hash_mismatch", + "reason": "origin container binding differs" + }, + { + "name": "changed_decompressed_original", + "reason": "compressed original bytes changed: frozen/original.json.gz" + }, + { + "name": "origin_inventory_omission", + "reason": "origin and frozen inventories differ" + } + ] + }, + "literal_source_pin": { + "actual_original_pin_matches": true, + "rejections": [ + { + "name": "missing_literal_pin", + "reason": "original RAW_SHA binding must be unique" + }, + { + "name": "duplicate_literal_pin", + "reason": "original RAW_SHA binding must be unique" + }, + { + "name": "wrong_literal_pin_type", + "reason": "original RAW_SHA is not a digest" + }, + { + "name": "executable_pin_expression", + "reason": "malformed node or string on line 1: " + } + ] + }, + "mathematical_controls": { + "actual_authenticated_function": "closed_hybrid.receipt", + "coefficient_ring": "Z[free group(a0,...,a8)]", + "deleted_named_check_detected": true, + "formal_input_rows": 8, + "one_literal_inverse_code_direction_changed_after_authentication": true, + "rejections": [ + { + "name": "one_actual_inverse_code_runs_forward", + "reason": "literal reverse-inverse cleanup" + }, + { + "name": "independent_control_rejects_unrelated_error", + "reason": "wrong rejection for unrelated_fixture" + } + ] + }, + "nested_sources": { + "only_authenticated_mapped_reads": true, + "original_imports_and_top_level_excluded": true, + "rejections": [ + { + "name": "undeclared_logical_read", + "reason": "undeclared historical source read: missing" + }, + { + "name": "absolute_path_escape", + "reason": "undeclared historical source read: /etc/passwd" + }, + { + "name": "relative_path_escape", + "reason": "undeclared historical source read: ../outside" + }, + { + "name": "mapped_unregistered_input", + "reason": "unregistered frozen input: frozen/unregistered.py" + }, + { + "name": "nested_recipe_assert_under_parent_flags", + "reason": "NESTED_RECIPE_ASSERT" + }, + { + "name": "duplicate_nested_recipe", + "reason": "recipe definition must be unique" + }, + { + "name": "missing_nested_recipe", + "reason": "recipe definition must be unique" + }, + { + "name": "mapped_changed_bytes", + "reason": "frozen input changed: frozen/recipe.py" + }, + { + "name": "mapped_missing_file", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-dpr7hs5w/nested/frozen/recipe.py'" + } + ] + }, + "parent_optimization": 1, + "receipt_contract": { + "deleted_named_check_detected": true, + "rejections": [ + { + "name": "boolean_for_integer", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "float_for_integer", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "integer_for_boolean", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "nested_omission", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "list_reordering", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "list_truncation", + "reason": "complete receipt mismatch: frozen/receipt.json" + }, + { + "name": "missing_fixed_receipt", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-dpr7hs5w/receipt/frozen/receipt.json'" + } + ] + }, + "source_selection": { + "imports_top_level_and_main_excluded": true, + "rejections": [ + { + "name": "direct_runtime_gate_under_parent_flags", + "reason": "DIRECT_RUNTIME_GATE" + }, + { + "name": "extracted_assert_under_parent_flags", + "reason": "EXTRACTED_ASSERT" + }, + { + "name": "nested_assert_under_parent_flags", + "reason": "NESTED_ASSERT" + }, + { + "name": "authenticated_module_assert_under_parent_flags", + "reason": "MODULE_ASSERT" + }, + { + "name": "changed_authenticated_module", + "reason": "frozen input changed: frozen/module.py" + }, + { + "name": "missing_named_definition", + "reason": "function selection changed" + }, + { + "name": "duplicate_source_definition", + "reason": "function selection changed" + }, + { + "name": "duplicate_requested_name", + "reason": "function selection changed" + }, + { + "name": "unregistered_source", + "reason": "unregistered frozen input: frozen/unknown.py" + }, + { + "name": "changed_authenticated_source", + "reason": "frozen input changed: frozen/source.py" + }, + { + "name": "missing_registered_source", + "reason": "[Errno 2] No such file or directory: '/private/var/folders/3v/9244hdf12cj1k9jjspv9wh2h0000gn/T/b07-controls-dpr7hs5w/source/frozen/source.py'" + } + ] + }, + "verifier_sha256": "f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b" + } + ], + "small_fixed_hybrid_word_replayed": true, + "source_hashes": { + "FROZEN-SHA256.json": "fcd33e728f973cca005a80d385952fc823340d2144a3dfc1e565d2af299937ce", + "ORIGINS.json": "f8097548bee9a85d78344cfabc495f0e3e1d0b4f5093ae3e54bc34dafe560d10", + "verify.py": "f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b" + }, + "status": "PASS_B07_COMPACT_SOURCE_AND_MATHEMATICAL_GATES" +} diff --git a/research/bit-fixed-controller-repairs/CORE-SNAPSHOT.json b/research/bit-fixed-controller-repairs/CORE-SNAPSHOT.json new file mode 100644 index 0000000000..54f190ad51 --- /dev/null +++ b/research/bit-fixed-controller-repairs/CORE-SNAPSHOT.json @@ -0,0 +1,313 @@ +{ + "controls": { + "complete_scientific_receipts": [ + "frozen/hybrid/CLOSED-HYBRID.json", + "frozen/hybrid/EARLY-PROMOTION.json", + "frozen/recipe/BIT-NILPOTENT-RECIPE.json", + "frozen/reviews/recipe/CHECKS.json.gz", + "frozen/reviews/hybrid/CHECKS.json.gz" + ], + "mode_results": [ + { + "complete_real_receipts": 5, + "deliberate_named_check_deletions_detected": 2, + "intended_rejections": 47, + "optimization": 0 + }, + { + "complete_real_receipts": 5, + "deliberate_named_check_deletions_detected": 2, + "intended_rejections": 47, + "optimization": 1 + } + ], + "path": "CONTROLS.json", + "sha256": "536efef62a0e72a3872923aa50b63bafe694b9dd5f76b0f259458c1e71a6491a", + "source_hashes": { + "FROZEN-SHA256.json": "fcd33e728f973cca005a80d385952fc823340d2144a3dfc1e565d2af299937ce", + "ORIGINS.json": "f8097548bee9a85d78344cfabc495f0e3e1d0b4f5093ae3e54bc34dafe560d10", + "verify.py": "f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b" + } + }, + "core_digest_definition": "SHA256 of UTF-8 JSON for files, sorted keys, compact separators, ensure_ascii=False.", + "core_file_count": 43, + "core_sha256": "24737c4b7c55fcf5449784673c86df0a0797798de895ecfd4cab1c87c1922ae3", + "excluded_from_core_inventory": [ + "CONTROLS.json", + "CORE-SNAPSHOT.json" + ], + "execution_scope": { + "compact_normal_and_optimized_controls_replayed": true, + "full_registered_mathematical_stages_replayed_by_this_reviewer": false, + "full_route_census_or_general_B_checker_replayed_by_this_reviewer": false, + "parent_owns_registered_committed_and_git_free_replays": true, + "small_authenticated_historical_hybrid_word_replayed": true + }, + "files": { + "ADAPTATIONS.md": { + "bytes": 2283, + "sha256": "0837fc5e0eea52bfde77010d3ea10ad9ceba9ed282b423be5a2071f6ddf43c69" + }, + "CROSS-REVIEW-HYBRID.md": { + "bytes": 4903, + "sha256": "5453581d5da37b6cee6795c09b97e249975efce0e01adc8cbb8e4c52b0a16ce3" + }, + "CROSS-REVIEW-RECIPE.md": { + "bytes": 3164, + "sha256": "a94059f471e7f429aeb44f490145213a84ee9e2538f9784fbb3900578e5355c5" + }, + "EVIDENCE-INDEX.md": { + "bytes": 2834, + "sha256": "4e44ec544aa1e63f4a6425ed4a1f6f7c85e8a8f57046882065a6c3de7639dc5c" + }, + "FROZEN-SHA256.json": { + "bytes": 2371, + "sha256": "fcd33e728f973cca005a80d385952fc823340d2144a3dfc1e565d2af299937ce" + }, + "LICENSE": { + "bytes": 11357, + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + "ORIGINS.json": { + "bytes": 6190, + "sha256": "f8097548bee9a85d78344cfabc495f0e3e1d0b4f5093ae3e54bc34dafe560d10" + }, + "PROOF-HYBRID.md": { + "bytes": 12773, + "sha256": "3f90c6c169d48b567ba1d406db058662cf18d1ca823acb5bdc18e16d180db732" + }, + "PROOF-RECIPE.md": { + "bytes": 9626, + "sha256": "6cd7ce069671ee2f15f6a39aca7b12dc537d1c726e9c3a2ff807ff0fa7a24abb" + }, + "README.md": { + "bytes": 8331, + "sha256": "5b97d9f6261ec3c6a6bc4b5da69bc8fba503a36fb71b31f54b3e227480aac623" + }, + "RELATED-WORK.json": { + "bytes": 2601, + "sha256": "449734127e0500bed692c3f74386d0af83812dcb257d5e09641eb3af25e154a8" + }, + "REVIEW-HYBRID.md": { + "bytes": 4366, + "sha256": "367f780480a09cfe25f34fa28b44132cfa91d61d51d1fdb43b496110ffd318d1" + }, + "REVIEW-RECIPE.md": { + "bytes": 6383, + "sha256": "276d9bd94e6cab720ba268766c33d07564c4c26ed6d1480787d1dbb8fe635065" + }, + "REVIEW-VERIFICATION.md": { + "bytes": 8058, + "sha256": "f552f52177951e444c69aa986cf3831459ff6e2b023d238f82b20a7e08b1d0b4" + }, + "SOURCE-AUDIT.md": { + "bytes": 6359, + "sha256": "34edf54a73c1dec50192d1e45fe293a653b3d42c57678fe8303178c7a1ded77b" + }, + "SOURCE-CLOSURE.json": { + "bytes": 6690, + "sha256": "616a5fe1eed5865f344cc710b73fd2c5f04538d8f7c150d42bae37b323e6ecb3" + }, + "SOURCES.json": { + "bytes": 2420, + "sha256": "d41f2f4b5cae44707841b2e7f8b543ba0dd67fbc7a397e26111a10ece8134eb0" + }, + "TASK.json": { + "bytes": 6910, + "sha256": "46b4409bc2c11b2c461b25909fd15c375d4a68468d55342e542ca1ce3d4bbbec" + }, + "VERIFY.json": { + "bytes": 1572, + "sha256": "4085de4462380724d2667e4c4ff1fab8edbdabe0ff34503a1035df30e9807e38" + }, + "controls.py": { + "bytes": 21199, + "sha256": "006ee774848108ffea2c71898e792e109f0ce242e0a1979ab7e6684d6560e83d" + }, + "frozen/geometry/E8.json.gz": { + "bytes": 33865, + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55" + }, + "frozen/geometry/MATRICES.json": { + "bytes": 28228, + "sha256": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979" + }, + "frozen/geometry/R438.json.gz": { + "bytes": 42305, + "sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022" + }, + "frozen/hybrid/CLOSED-HYBRID.json": { + "bytes": 10950, + "sha256": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7" + }, + "frozen/hybrid/EARLY-PROMOTION.json": { + "bytes": 2226, + "sha256": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6" + }, + "frozen/hybrid/README.md": { + "bytes": 8657, + "sha256": "0206fc9c9950e04baf4b9395af0a1e0b9a99907900b328eb06eb48477703ea24" + }, + "frozen/hybrid/closed_hybrid.py": { + "bytes": 13193, + "sha256": "78f92b8b8fdb6528bd87f974f3022e73c9b60877f0022200fe0b4422da2b7738" + }, + "frozen/hybrid/early_promotion.py": { + "bytes": 4771, + "sha256": "d59e5487251929416fa657f45e617d78a3392310203f1df08389d3746acd6732" + }, + "frozen/provenance/bit_cap_copy_local.py": { + "bytes": 7588, + "sha256": "6e9ca1eb905d769716c009904f45d6849b225e48cd119f18b50c0379f35313cb" + }, + "frozen/recipe/BIT-NILPOTENT-RECIPE.json": { + "bytes": 30914, + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" + }, + "frozen/recipe/bit_nilpotent_recipe.py": { + "bytes": 3727, + "sha256": "d2649a223c4fd221e64dc059422bcf796fbe1becc524911c7e84c0cf475b2b7e" + }, + "frozen/recipe/bit_seeded_star.py": { + "bytes": 6317, + "sha256": "91d3bbebfad36836b48949a2d231afd3eb8dd46f0443d45f7e19ff9779468347" + }, + "frozen/reviews/hybrid/CHECKS.json.gz": { + "bytes": 13719, + "sha256": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f" + }, + "frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json": { + "bytes": 1889, + "sha256": "a2c1fd731281a3f1360e95a70d426f59332e6482155c6190dc3ac49d37b42ec2" + }, + "frozen/reviews/hybrid/VALIDATION.json": { + "bytes": 5160, + "sha256": "ebd5d303781781850cac8e4b76d31f24b63fcd90cf0f2132128b222ba093c221" + }, + "frozen/reviews/hybrid/check.py": { + "bytes": 27225, + "sha256": "148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138" + }, + "frozen/reviews/recipe/CHECKS.json.gz": { + "bytes": 10228, + "sha256": "cff40bd8d82e7919b9a1a76c03389bc0a82c9156d162198faf6132eac4691359" + }, + "frozen/reviews/recipe/SOURCE-DEPENDENCIES.json": { + "bytes": 1720, + "sha256": "4eb24d806c09d957c7dca375393634100f6cfacf999bff49845314e131acad20" + }, + "frozen/reviews/recipe/VALIDATION.json": { + "bytes": 1973, + "sha256": "db3d1cba36f98efc8330b19e0df8e5ad086145aeaa487703cac539a10d9f6062" + }, + "frozen/reviews/recipe/check.py": { + "bytes": 17005, + "sha256": "50ef2041dc27c11189e0f4293cd30aed2ee372b1a6e928dbe6197e21ceab75de" + }, + "frozen/routes/expanded_sections.py": { + "bytes": 8284, + "sha256": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b" + }, + "frozen/upstream/global_k.py": { + "bytes": 16791, + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8" + }, + "verify.py": { + "bytes": 10294, + "sha256": "f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b" + } + }, + "frozen_file_count": 22, + "limits": [ + "Written all-B proofs are distinct from finite exact checker domains.", + "Fixed common-involution repair and signed independent-label hybrid use separate alphabets.", + "Deleted normalization controls check a declared invoice; they do not prove native cleanup.", + "Native admission, arbitrary-helper/COPY lifetime implementation, precision, a general caller bound and new kappa remain unclaimed." + ], + "review_kind": "Independent AI source, acceptance-control and scope review; not a formal-kernel or human review.", + "schema_version": 1, + "status": "PASS_B07_REVIEWED_CORE", + "validation": { + "all_storage_and_declared_original_hashes_match": true, + "compressed_original_bindings": [ + "frozen/reviews/hybrid/CHECKS.json.gz", + "frozen/reviews/recipe/CHECKS.json.gz" + ], + "exact_frozen_origin_and_tree_inventory": true, + "independent_imports": { + "frozen/reviews/hybrid/check.py": [ + "argparse", + "ast", + "copy", + "fractions", + "gzip", + "hashlib", + "json", + "pathlib" + ], + "frozen/reviews/recipe/check.py": [ + "argparse", + "ast", + "hashlib", + "json", + "pathlib" + ] + }, + "mandatory_readme_heading_present": true, + "no_symlinks_or_bytecode_artifacts": true, + "owned_review_controls_and_source_audit_copies_match": true, + "registered_commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "historical" + ], + "checks": "All three complete original receipts, unchanged mathematical functions and explicit authenticated source-read closure.", + "timeout_seconds": 90 + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "recipe" + ], + "checks": "Independent dual-number recipe, all-B rank/trace and attaining-projector formula fixtures, arbitrary-input N/spectator instantiations and intended controls.", + "timeout_seconds": 120 + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "hybrid" + ], + "checks": "Independent ordered free-group-ring all-input words, two-code correction, both inverses/dual, restricted determinant count, selected actual ADDRESS witness and invoice controls.", + "timeout_seconds": 120 + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/controls.py", + "--package", + "{package}" + ], + "checks": "Normal and optimized source/AST/path bindings, complete typed receipt comparisons, actual semantic defects and deliberate check deletion.", + "timeout_seconds": 60 + } + ] + } +} diff --git a/research/bit-fixed-controller-repairs/CROSS-REVIEW-HYBRID.md b/research/bit-fixed-controller-repairs/CROSS-REVIEW-HYBRID.md new file mode 100644 index 0000000000..59956dafe0 --- /dev/null +++ b/research/bit-fixed-controller-repairs/CROSS-REVIEW-HYBRID.md @@ -0,0 +1,91 @@ +# Read-only mathematical cross-review of the hybrid controller + +**Verdict: PASS within the stated abstract and conditional scope.** +No actionable mathematical error was found in the all-B tail proof, the +two-code construction, the restricted determinant lower bound, the direct +forward VALUE witness, or their presentation in the staging README. +This is a separate AI mathematical reading, not human acceptance or a +formal-kernel proof. No full replay was run during this cross-review. + +The reviewed source hashes are: + +| File | SHA-256 | +| --- | --- | +| `b07-hybrid-review/PROOF.md` | `3f90c6c169d48b567ba1d406db058662cf18d1ca823acb5bdc18e16d180db732` | +| `b07-hybrid-review/check_hybrid.py` | `148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138` | +| `b07-hybrid-review/REVIEW.md` | `367f780480a09cfe25f34fa28b44132cfa91d61d51d1fdb43b496110ffd318d1` | +| `b07-staging/README.md` | `5b97d9f6261ec3c6a6bc4b5da69bc8fba503a36fb71b31f54b3e227480aac623` | + +## Clean-tail induction + +I independently expanded the ladder operations with their signed dual +bridges. On pair zero, the positive bridge, clean forward local and negative +bridge leave `(U,U+V+x1)` and present pair one as +`(x1,y1+U+x1)`. For later pairs the incoming second bank is +`yj+s(j-1)+xj`; the reverse local sets its first bank to +`sj=-yj-s(j-1)`. The next forward local and opposite bridge pair leave +`(sj,xj+x(j+1))` and propagate the same incoming formula to the next pair. + +In the descending return ladder the source `sj` has not yet been changed, +while the next pair's second bank already equals `x(j+1)`. Consequently the +new first bank is `s(j+1)+sj=-y(j+1)` and the second-bank telescoping removes +exactly `x(j+1)`. Pair zero ends `(U,U+V)` and all other pairs end `(-yj,xj)`. +The B=1 case is a single clean forward local. The induction therefore covers +every B>=1 without using a finite list as an extrapolation. + +## Two-code correction and lower bound + +The fixed coded prefix gives `U=-y0` and +`V=a1^-1(y0+a0*x0)`. The tail gives `X0=U, Y0=U+V`. +The four displayed terminal steps send Y0 through V, `y0+a0*x0`, +`a0*x0`, and x0, while X0 remains `-y0`. No code labels were commuted in +this calculation. The unchanged exchange closes every input bank. + +The determinant argument is taken only after the valid commutative +specialization to Q(t,u); no determinant over the noncommutative group +algebra is presumed. The fixed prefix has factor t/u and the fixed target +requires added factor u/t. Under the declared single-bank primitive alphabet, +each extra occurrence changes at most one independent exponent by one. +Thus at least two occurrences are required, and the construction attains it. + +The argument is an optimum for universal words in that independent-generator +alphabet. It is not an optimum for one specialized pair of physical codes +that could satisfy additional relations, and not a scalar-ADD or physical +frame-normalization lower bound. The proof and README keep those boundaries. + +## Direct VALUE orientation + +The relevant convention is ADDRESS push T and VALUE push +`g(w)=f(T^-1*w)`. The source function `f(w)=1[w10=0]` on F101 addresses +is constant under translation by every source P0 root-line vector, since +those vectors have zero fresh-coordinate component. The recorded inverse +route sends the target P3 vector `2e3` to `2e10`; hence +`g(0)=1` and `g(2e3)=0`. This directly violates target P3-line invariance +in the required source-to-target direction. + +The separate forward route and pullback separator are useful dual checks; +they are not substituted for the direct VALUE push argument. A point delta +is not assumed to be an admitted source quotient function. Reading the +selected route code confirms that it constructs both route orders and +checks the inverse relation and the exact inverse image. The reported +native obstruction remains one selected ordered off-diagonal pair. + +## Conditional cost and native boundary + +The scalar arithmetic `9216-3220=5996` is correct at the same declared +1499-ADD code tariff and 111-ADD bank-shear tariff. The two words have the +same two declared normalization sweeps. The comparison +`2*60-222=-102` remains negative and independent of B under the stated +equal-price owner-return premises. + +The proof does not infer native legality from abstract endpoint equality. +Its normalization controls explicitly distinguish the unchanged algebraic +endpoint after deleting a logical identity from the failed native inventory. +The common terminal FULL cut, legal current frames, mixed owners, helpers, +physical source access, actual integer target leakage and precision remain +separate premises. The README also preserves the B=1 algebraic versus native +driver distinction and does not turn the scalar saving into a supplier or +kappa claim. + +Only this cross-review file was written. No frozen contribution files, +staging content or other worker-owned material was changed. diff --git a/research/bit-fixed-controller-repairs/CROSS-REVIEW-RECIPE.md b/research/bit-fixed-controller-repairs/CROSS-REVIEW-RECIPE.md new file mode 100644 index 0000000000..4018ead479 --- /dev/null +++ b/research/bit-fixed-controller-repairs/CROSS-REVIEW-RECIPE.md @@ -0,0 +1,56 @@ +# Cross-review of the fixed-involution repair proof + +Read-only mathematical review of `b07-recipe-review/PROOF.md`, SHA-256 +`9601bf1cfdd196e30c885f2d880f6322c3e1d11c898a1689ad8087259b573988`. +This is an independent proof reading, not another execution of its checker. +Prepared with substantial OpenAI Codex assistance. + +The all-B endpoint derivation is correct. Starting with +`t0=X0+NY0`, direct substitution through the positive bridge, local forward +call and negative bridge gives +`t_(j+1)=X_(j+1)+Y_(j+1)+N(Xj+tj)`. +Writing `tj=Xj+Sj+epsilon*bj` yields the stated recurrence +`b_(j+1)=bj+Sj`. The descending X bridges add neighboring `p` rows while +the Y bridges telescope through suffix sums of `q` rows. This gives the +displayed endpoint on every arbitrary bank input, including B=1. + +The block formula `C=L^T L` is exact: its `(j,k)` entry counts indices +`ell>=max(j,k)`. Both C and D are invertible. For the repair coefficient +`M=A+I`, row j of `DC` for j>=1 is the row with ones exactly at `k=1 and first row +`C[0,*]`; its first pivot is `B mod2`. This proves rank `2B` for odd B +and `2B-1` for even B. Trace M is one, since the dimension is even and +the only diagonal coefficient of A is its y0 entry. + +Both attaining projector decompositions are valid. In the odd case, +the y0 column splits into two rank-one projectors whose added coordinate +projectors cancel. All other diagonal pairings are one. In the even +case, the kernel relation +`m_y0=sum_(j odd) m_xj` reconstructs the omitted y0 column. The x-column +readout `e_xj^T+[j odd]e_y0^T` still pairs to one: the y0 row of D is +supported only at x0, and j=0 is even. All retained y-column diagonal +pairings are one. A basis beginning with u and completing with `ker(v^T)` +implements each claimed scalar conjugation exactly. + +The restored-spectator quantifier is justified. The required coefficient +is `M direct-sum 0`, with every spectator row and column included, so +rank and trace give the same lower bounds in any larger finite ambient +bank space. No spectator is specialized to zero. The attaining words +extend by identity and therefore restore every spectator literally. + +The insertion extension is also sound for complete repair gates with +constant term I. Moving a repair to the terminal cut conjugates its +epsilon coefficient by the constant part of an invertible fixed suffix +(equivalently the corresponding fixed prefix in the opposite product +convention). The result remains a rank-one projector with trace one; +epsilon terms in the conjugating product do not contribute because +`epsilon^2=0`. Multiple repairs commute at that coefficient level. +This does not license extra unpaired scalar mixing or changes to the +original recipe, as the proof correctly states. + +No mathematical defect was found in the stated theorem or construction. +The proof does not extend to changing the local alphabet, altering the +original scalar topology, or treating the formal free mixing as native +physical work. Its conversion of seven B4 calls into 777 rank-one +children remains explicitly conditional on a separately admitted +111-child implementation. diff --git a/research/bit-fixed-controller-repairs/EVIDENCE-INDEX.md b/research/bit-fixed-controller-repairs/EVIDENCE-INDEX.md new file mode 100644 index 0000000000..1510bea2ce --- /dev/null +++ b/research/bit-fixed-controller-repairs/EVIDENCE-INDEX.md @@ -0,0 +1,32 @@ +# Evidence boundaries + +| Evidence | Coverage | Limit | +| --- | --- | --- | +| Original `CLOSED-HYBRID.json` | Fixed B4 six-code word, eight independent rows, inverse/dual and four controls | Historical conditional invoice; not native supplier admission | +| Original `BIT-NILPOTENT-RECIPE.json` | Fixed recipe for B1 through B6 | Finite evidence, superseded in scope by the written all-B proof | +| Original `EARLY-PROMOTION.json` | Actual code entry, exact ADDRESS witness and original route checks | Rejects one proposed free code admission | +| [PROOF-RECIPE.md](PROOF-RECIPE.md) and independent recipe checker | Closed all-B defect formula, rank/trace floor and attaining repairs | Fixed original recipe and rank-one idempotent repair alphabet | +| [PROOF-HYBRID.md](PROOF-HYBRID.md) and independent hybrid checker | All-B tail identity, two-code correction, restricted determinant floor and exact selected route witness | Abstract coded boundary; declared native normalization remains conditional | +| [REVIEW-RECIPE.md](REVIEW-RECIPE.md), [REVIEW-HYBRID.md](REVIEW-HYBRID.md) | Separate mathematical checking contexts and resolved findings | AI review, not human acceptance | +| [CROSS-REVIEW-RECIPE.md](CROSS-REVIEW-RECIPE.md), [CROSS-REVIEW-HYBRID.md](CROSS-REVIEW-HYBRID.md) | Reciprocal written-proof review, including quantifiers and native limits | Read-only mathematical review; no additional replay claimed | +| [REVIEW-VERIFICATION.md](REVIEW-VERIFICATION.md), controls and core snapshot | Exact source selection, complete typed receipts, intended defects and check-deletion sensitivity | Acceptance integrity, not a formal proof kernel | + +The all-parameter results are written algebraic proofs. Finite checker fixtures +independently verify the formulas and constructions on their recorded domains; +they do not establish the universal quantifier by enumeration. +The recipe proof incorporates the cross-review's product-order clarification: +moving an inserted repair to the final cut conjugates it by the fixed suffix. +The cross-review preserves the original pre-clarification source hash. + +The three historical receipts are regenerated by their unchanged mathematical +functions and compared in full. The new checkers use separate implementations. +The originals are retained for provenance and discrepancy detection, not as +independent evidence for the new all-B theorems. + +Source and container hashes are in [FROZEN-SHA256.json](FROZEN-SHA256.json). +Original locations and any storage encoding are in [ORIGINS.json](ORIGINS.json). +Repository pins are in [SOURCES.json](SOURCES.json). Attribution and comparison +scope are recorded in [RELATED-WORK.json](RELATED-WORK.json). + +The registered checks make no selected-frontier change, native precision claim, +unrestricted caller lower bound, physical-tape claim or new kappa claim. diff --git a/research/bit-fixed-controller-repairs/FROZEN-SHA256.json b/research/bit-fixed-controller-repairs/FROZEN-SHA256.json new file mode 100644 index 0000000000..1da0709c8b --- /dev/null +++ b/research/bit-fixed-controller-repairs/FROZEN-SHA256.json @@ -0,0 +1,24 @@ +{ + "frozen/hybrid/closed_hybrid.py": "78f92b8b8fdb6528bd87f974f3022e73c9b60877f0022200fe0b4422da2b7738", + "frozen/hybrid/early_promotion.py": "d59e5487251929416fa657f45e617d78a3392310203f1df08389d3746acd6732", + "frozen/hybrid/CLOSED-HYBRID.json": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7", + "frozen/hybrid/EARLY-PROMOTION.json": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6", + "frozen/hybrid/README.md": "0206fc9c9950e04baf4b9395af0a1e0b9a99907900b328eb06eb48477703ea24", + "frozen/recipe/bit_nilpotent_recipe.py": "d2649a223c4fd221e64dc059422bcf796fbe1becc524911c7e84c0cf475b2b7e", + "frozen/recipe/bit_seeded_star.py": "91d3bbebfad36836b48949a2d231afd3eb8dd46f0443d45f7e19ff9779468347", + "frozen/recipe/BIT-NILPOTENT-RECIPE.json": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a", + "frozen/routes/expanded_sections.py": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b", + "frozen/geometry/MATRICES.json": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979", + "frozen/geometry/R438.json.gz": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022", + "frozen/geometry/E8.json.gz": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "frozen/upstream/global_k.py": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "frozen/provenance/bit_cap_copy_local.py": "6e9ca1eb905d769716c009904f45d6849b225e48cd119f18b50c0379f35313cb", + "frozen/reviews/recipe/check.py": "50ef2041dc27c11189e0f4293cd30aed2ee372b1a6e928dbe6197e21ceab75de", + "frozen/reviews/recipe/SOURCE-DEPENDENCIES.json": "4eb24d806c09d957c7dca375393634100f6cfacf999bff49845314e131acad20", + "frozen/reviews/recipe/VALIDATION.json": "db3d1cba36f98efc8330b19e0df8e5ad086145aeaa487703cac539a10d9f6062", + "frozen/reviews/recipe/CHECKS.json.gz": "cff40bd8d82e7919b9a1a76c03389bc0a82c9156d162198faf6132eac4691359", + "frozen/reviews/hybrid/check.py": "148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138", + "frozen/reviews/hybrid/CHECKS.json.gz": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f", + "frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json": "a2c1fd731281a3f1360e95a70d426f59332e6482155c6190dc3ac49d37b42ec2", + "frozen/reviews/hybrid/VALIDATION.json": "ebd5d303781781850cac8e4b76d31f24b63fcd90cf0f2132128b222ba093c221" +} diff --git a/research/bit-fixed-controller-repairs/LICENSE b/research/bit-fixed-controller-repairs/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/bit-fixed-controller-repairs/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/bit-fixed-controller-repairs/ORIGINS.json b/research/bit-fixed-controller-repairs/ORIGINS.json new file mode 100644 index 0000000000..5950318292 --- /dev/null +++ b/research/bit-fixed-controller-repairs/ORIGINS.json @@ -0,0 +1,94 @@ +{ + "frozen/hybrid/closed_hybrid.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/closed_hybrid.py", + "sha256": "78f92b8b8fdb6528bd87f974f3022e73c9b60877f0022200fe0b4422da2b7738" + }, + "frozen/hybrid/early_promotion.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/early_promotion.py", + "sha256": "d59e5487251929416fa657f45e617d78a3392310203f1df08389d3746acd6732" + }, + "frozen/hybrid/CLOSED-HYBRID.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/CLOSED-HYBRID.json", + "sha256": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7" + }, + "frozen/hybrid/EARLY-PROMOTION.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/EARLY-PROMOTION.json", + "sha256": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6" + }, + "frozen/hybrid/README.md": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/README.md", + "sha256": "0206fc9c9950e04baf4b9395af0a1e0b9a99907900b328eb06eb48477703ea24" + }, + "frozen/recipe/bit_nilpotent_recipe.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_nilpotent_recipe.py", + "sha256": "d2649a223c4fd221e64dc059422bcf796fbe1becc524911c7e84c0cf475b2b7e" + }, + "frozen/recipe/bit_seeded_star.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_seeded_star.py", + "sha256": "91d3bbebfad36836b48949a2d231afd3eb8dd46f0443d45f7e19ff9779468347" + }, + "frozen/recipe/BIT-NILPOTENT-RECIPE.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/BIT-NILPOTENT-RECIPE.json", + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" + }, + "frozen/routes/expanded_sections.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/bit-endpoint/expanded_sections.py", + "sha256": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b" + }, + "frozen/geometry/MATRICES.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/BIT-THREE-ROW-INPUT.json", + "sha256": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979" + }, + "frozen/geometry/R438.json.gz": { + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022" + }, + "frozen/geometry/E8.json.gz": { + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55" + }, + "frozen/upstream/global_k.py": { + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8" + }, + "frozen/provenance/bit_cap_copy_local.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/bit_cap_copy_local.py", + "sha256": "6e9ca1eb905d769716c009904f45d6849b225e48cd119f18b50c0379f35313cb" + }, + "frozen/reviews/recipe/check.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-recipe-review/check.py", + "sha256": "50ef2041dc27c11189e0f4293cd30aed2ee372b1a6e928dbe6197e21ceab75de" + }, + "frozen/reviews/recipe/SOURCE-DEPENDENCIES.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-recipe-review/SOURCE-DEPENDENCIES.json", + "sha256": "4eb24d806c09d957c7dca375393634100f6cfacf999bff49845314e131acad20" + }, + "frozen/reviews/recipe/VALIDATION.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-recipe-review/VALIDATION.json", + "sha256": "db3d1cba36f98efc8330b19e0df8e5ad086145aeaa487703cac539a10d9f6062" + }, + "frozen/reviews/recipe/CHECKS.json.gz": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-recipe-review/CHECKS.json", + "sha256": "cff40bd8d82e7919b9a1a76c03389bc0a82c9156d162198faf6132eac4691359", + "encoding": "gzip of unchanged complete JSON bytes", + "original_sha256": "e829f99da71b9a6b1a533d7743cc249e15ab7f65a936c7b89800c24e4b9dc687" + }, + "frozen/reviews/hybrid/check.py": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/check_hybrid.py", + "sha256": "148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138" + }, + "frozen/reviews/hybrid/CHECKS.json.gz": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/CHECKS.json", + "sha256": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f", + "encoding": "gzip of unchanged complete JSON bytes", + "original_sha256": "c1c1444d09bda057e6fa12c97fe8e7c4674ad0076d83e1d7ad7f5975ca946442" + }, + "frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/SOURCE-DEPENDENCIES.json", + "sha256": "a2c1fd731281a3f1360e95a70d426f59332e6482155c6190dc3ac49d37b42ec2" + }, + "frozen/reviews/hybrid/VALIDATION.json": { + "original_path": "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/VALIDATION.json", + "sha256": "ebd5d303781781850cac8e4b76d31f24b63fcd90cf0f2132128b222ba093c221" + } +} diff --git a/research/bit-fixed-controller-repairs/PROOF-HYBRID.md b/research/bit-fixed-controller-repairs/PROOF-HYBRID.md new file mode 100644 index 0000000000..564172a718 --- /dev/null +++ b/research/bit-fixed-controller-repairs/PROOF-HYBRID.md @@ -0,0 +1,286 @@ +# An all-bank hybrid controller with two terminal code applications + +This is an exact abstract controller construction and a conditional scalar +cost improvement. It does not admit a physical BIT supplier or improve its +rank mass. The historical scientific source is +`20ecf2891d80b5acf18d980b2164fb44ea7faa90`. + +## Contract and coefficient ring + +There are \(B\ge1\) pairs \((X_j,Y_j)\), with all \(2B\) entering banks +\((x_j,y_j)\) arbitrary and independent. Work over the integral free group +algebra on independent invertible operators \(a_0,a_1,\ldots,a_{2B}\). +Only adjacent inverse cancellation is permitted; operators do not commute. +The result specializes to arbitrary invertible linear operators on a module. +Transpose symbols are separate operators, with multiplication order reversed +under transpose; no equation \(a_s^T=a_s^{-1}\) is used. + +The abstract coded local maps are + +\[ + F_s(X,Y)=(a_sX,\;Y+a_sX),\qquad + B_s(X,Y)=(X-Y,\;a_s^{-1}Y). +\] + +Clean locals replace \(a_s\) by \(I\). A bridge of coefficient \(c\) from pair +\(s\) to pair \(d\) is + +\[ + X_d\mathrel{+}=cX_s,\qquad Y_s\mathrel{-}=cY_d. +\] + +The `recipe(B)` function in the pinned `global_k.py` has \(2B+1\) locals, +\(3B-3\) bridges, and one final exchange, hence \(5B-1\) events. It begins +with \(F_0,B_1\) on pair 0, advances through the adjacent pairs using the +two opposite bridge signs, then returns through the descending bridges. + +Each local's dirty helpers must restore for **every** entering helper value, +and its copied field must obey its own zero-entry/cleanup lifetimes. +Those are imported local contracts. No public bank is assumed clean or used +as zero scratch. The added controller operations act only on the public +banks; the formal boundary is direct summed with the identity on the +arbitrary restored helpers. + +The actual R429 local identity supplies this map on binary VALUE functions. +Its signed integer lift can have even target helper leakage. Consequently, +the signed free-group theorem is an abstract result and cannot be applied to +that actual integer lift merely because its reduction modulo 2 agrees. +Native ADDRESS frames, global phase, mixed helper owners, source access, +COPY legality and rounded precision remain separate obligations. + +## Clean-tail identity for every \(B\) + +Cut immediately after the first reverse local \(B_1\). Let its current pair +be \((U,V)\); all other pairs still enter as \((x_j,y_j)\). Use only clean +locals after that cut and keep every original bridge and its sign. +The tail before the final exchange sends + +\[ + (U,V),(x_1,y_1),\ldots,(x_{B-1},y_{B-1}) + \longmapsto + (U,U+V),(-y_1,x_1),\ldots,(-y_{B-1},x_{B-1}). + \tag{1} +\] + +Here is an induction on the literal ladder, not an extrapolation from a +finite list of bank counts. Put \(s_0=U\) and +\(s_j=-y_j-s_{j-1}\) for \(j\ge1\), and put +\(z_0=U+V,\ z_j=x_j\) for \(j\ge1\). + +For \(B>1\), the first positive bridge, clean forward local, and negative +bridge leave \(X_0=s_0,\ Y_0=z_0+x_1\) and present the next pair as +\((x_1,y_1+s_0+x_1)\). In general, pair \(j\ge1\) enters its clean reverse +local as \((x_j,y_j+s_{j-1}+x_j)\); the reverse local sets +\(X_j=s_j\). If \(j 64 -> 3`. Each selected route is the symmetric involution +\[ + \rho_p=\begin{pmatrix}P_p&A_p\\A_p^T&0\end{pmatrix},\qquad + A_p^TA_p=I_7,\quad A_pA_p^T=I_8-P_p. +\] +Here \(P_p=q_pq_p^T/4\) and the vectors are exactly those in the pinned word. + +For the source root-line vector \(v=2e_0\in P_0\), +\[ + \rho_0v=v,\qquad + T v=(\rho_3^{-1}\rho_0)v=2e_{10}, +\] +where coordinate 10 is the third fresh coordinate. This vector lies +outside the target \(P_3\), over the rationals and over \(\mathbb F_{101}\). +Thus the relative route does not carry the source promoted-frame fiber +into the target promoted-frame fiber. + +The ADDRESS convention is a forward point push \(v\mapsto Tv\), so the +corresponding VALUE push is \(g(w)=f(T^{-1}w)\). Directly, the target +root-line vector is \(v_3=2e_3\in P_3\), and the independently computed +inverse route gives \(T^{-1}v_3=2e_{10}\). +Take the binary source VALUE function \(f(w)=1\) exactly when +\(w_{10}=0\) over \(\mathbb F_{101}\). It is constant along source +\(P_0\), which has no fresh component. But its forward VALUE image has +\(g(0)=1\) and \(g(v_3)=0\), so it is not constant along the target +\(P_3\). This is the actual source-to-target admission failure, without +switching the push/pull orientation. + +As a dual check, the same coordinate indicator is constant along target +\(P_3\), but \(f(T0)=1\) and \(f(Tv)=0\), so its pullback is not constant +along source \(P_0\). These separators avoid presuming that a point delta +is admissible on an entire quotient fiber. + +This is one selected off-diagonal native admission failure. The checker +reconstructs only two routes and one ordered off-diagonal pair; it does +not claim to replay the predecessor's 12,210-pair theorem. It excludes the +free future-code admission used in that early-promotion proposal. It does +not exclude a changed promoted-input factory, a proved current-word +normalization cancellation, or a different controller. The historical +undo/code/redo workaround still has its stated 111+111 child bill, before +source access and precision. + +## Evidence and remaining boundary + +The standalone checker uses its own elementary matrix algebra over the +free group ring. It authenticates and extracts only `recipe` from its +source, independently reconstructs the event list, and replays both +controllers for \(B=1,\ldots,12,16,32\), on all \(2B\) symbolic inputs. +It checks both inverse products and chronological gatewise +inverse-transpose propagation, with independent transpose symbols. +These finite fixtures verify the implementation; the ladder induction +above is the all-\(B\) proof. Neither is a formal-kernel proof. + +Controls remove actual terminal operations, alter a code direction or +bank, change a compensation sign, restore a stale coded \(F_2\), and change +one actual inverse-code direction. The signed endpoint is involutive, so +repeating the complete forward word would be a vacuous inverse control. +Deleting a normalization deliberately leaves the abstract logical endpoint +unchanged and is rejected only by the declared native inventory check. +That distinction is recorded, not hidden. + +No actual integer R429 map without target helper leakage, native global +phase, mixed-owner hosting, full supplier histogram, physical source-access +cost, whole-word rounding/COPY certificate, or outer multiplication theorem +is established here. No new conditional kappa is claimed. + +The controller and geometry lineage is retained from the old +DreamingOfClouds/eumemic/PR555,543,545,510 work, Ali Romman's R438 deletion +and source builder, Sagar Thakrar's transported R438 hosting, and the prior +source-code preparation interface in Ali Romman's PR1862. The six-code +hybrid and original selected route witness are preserved predecessor work. +This contribution adds the all-bank clean-tail proof, the two-code +construction, its restricted occurrence lower bound, and an independent +exact audit. Substantial OpenAI Codex assistance was used; new material is +Apache-2.0. diff --git a/research/bit-fixed-controller-repairs/PROOF-RECIPE.md b/research/bit-fixed-controller-repairs/PROOF-RECIPE.md new file mode 100644 index 0000000000..ad5593ca91 --- /dev/null +++ b/research/bit-fixed-controller-repairs/PROOF-RECIPE.md @@ -0,0 +1,231 @@ +# Exact repair count for the fixed routed involution recipe + +This is a written all-parameter proof, with finite executable certificates. +It is not a formal-kernel proof or an admission theorem for a physical supplier. +Prepared with substantial OpenAI Codex assistance. Apache-2.0. + +## Model and theorem + +Let \(B\geq1\), \(n=2B\), and work over \(\mathbb F_2\). Every bank contains an +arbitrary, independently chosen vector in a common vector space. Fix a +nonidentity linear involution \(N\), and put \(\epsilon=N+I\). Thus +\(\epsilon^2=0\), and \(I,\epsilon\) are linearly independent over +\(\mathbb F_2\): a nonzero scalar multiple of \(I\) cannot be nonzero and square +to zero. Consequently the dual-number algebra embeds in this representation. +The argument therefore covers every nonidentity involution, not just a +particular small matrix representation. + +Use exactly the event word returned by the pinned `global_k.py:recipe(B)`, +with its bridge order, bank pairing and terminal pair exchange unchanged. +Replace its two local interfaces by + +\[ + F(x,y)=(x,x+Ny),\qquad H(x,y)=(Nx+y,y). +\] + +A bridge from pair \(s\) into pair \(d\) sends +\(x_d\leftarrow x_d+x_s\) and \(y_s\leftarrow y_s+y_d\). +Its source coefficient \(+1\) or \(-1\) has the same value in this field. + +An allowed additional paid repair is a scalar-GL-conjugated application of +\(N\) to one bank: +\[ + Q_P=I+\epsilon P,\qquad + P=uv^T,\quad v^Tu=1. +\] +Scalar mixing means matrices over \(\mathbb F_2\) on the bank index, tensored +with the identity on the bank contents. These scalar changes of basis and +their inverses are free only in the formal call-count model. + +The target is \(N I_n\) on the original banks. For any finite number \(d\) +of extra independently dirty banks, their target is literal identity. +The fixed recipe acts as identity on these spectators. + +**Theorem.** The minimum number of such additional repair calls is +\[ + k(B)= + \begin{cases} + 2B+1,&B\text{ odd},\\ + 2B-1,&B\text{ even}. + \end{cases} +\] +The same minimum holds with any finite number of restored dirty spectators, +even if each additional repair mixes original and spectator banks. +Repairs can be placed after the fixed word. The lower bound also permits +inserting these complete constant-identity repair gates between its events. + +This theorem does not allow changing the existing scalar topology, pairing, +local alphabet, or observation boundary. In particular it does not obstruct +the changed seeded-star topology or the separate closed hybrid controller. + +## Endpoint derivation for every B + +Write the original bank inputs as \(X_j,Y_j\), \(0\leq j0,\ k=j-1],\qquad + E_{00}=1,\quad E_{jk}=[k=1`. The unchanged native +bank tiling is not asserted at those parameters. + +The useful new construction omits both historical immediate code +pullbacks. At the final common FULL cut, after the old idle returns, apply + +``` +Y0 -= X0; Y0 := a1 Y0; Y0 += X0; Y0 := a0^-1 Y0. +``` + +This restores the all-clean endpoint using two additional code occurrences, +two scalar bank shears, the same two conditional normalization sweeps, and +no new helper. Its added scalar invoice is 3220 instead of 9216 ADDs at the +same 1499/111 tariffs, an exact saving of 5996. Its net rank-mass comparison +against the all-clean word remains `-102`, independent of B. + +The two-code occurrence lower bound is valid only for the stated alphabet: +same coded F0/B1, no additional coded local, remaining locals clean, +single-bank generator applications, determinant-neutral scalar mixing, +logical normalization, and fixed target. Scalar specialization gives the +required determinant factor `a1/a0`; both independent exponents require an +occurrence. This is not physical-code optimality. + +The native counterexample is independently reproduced for actual +`A[3,0]=1`: the pinned port-relative route sends source root-line vector +`2e0` to `2e10`, outside target P3, over Q and F101. The review replays only +the two selected routes, not the predecessor's all-ordered-pairs result. +An explicit binary VALUE fiber separator replaces any implicit assumption +that a point delta is legal on an entire quotient fiber. With ADDRESS push +`T`, VALUE pushes by `f(T^-1 w)`. The inverse route sends target root +`2e3` to `2e10`; the source-P0-invariant function `1[w_10=0]` therefore +pushes to a function that is not target-P3-invariant. The forward +admission failure is checked directly, with its orientation stated. + +The implementation is independent of the historical hybrid evaluator: +it composes elementary sparse matrices over the free group ring, with a +different coefficient representation, and separately composes each +gate's inverse transpose. Only the pinned `recipe` definition is extracted +from predecessor Python; no original imports, main function, or source-path +globals execute. The independently generated event list is compared in full. +All 2B rows are retained, including dirty public inputs. + +The final replay includes actual omissions, coefficient changes, wrong-bank +and inverse-direction controls with exact intended exceptions. The +normalization controls make the important distinction explicit: deleting a +logical identity leaves the algebraic endpoint unchanged, but fails the +222-child declared inventory. Neither outcome is a native phase proof. + +The main limitations are actual R429 integer target helper leakage, unproved +mixed-owner hosting and native phase admission, the absence of a full +rank/width recurrence, and unpriced physical source access and precision. +There is no new kappa or formal-kernel proof. The published claim should be +the all-B two-code abstract construction and exact conditional scalar +saving, accompanied by the native admission counterexample and these +limits. + +Final validation used CPython 3.12.14 with `-I -B -W error`, then with +`-O`, and then optimized Python with compressed recipe/matrix inputs in +a directory containing spaces. All three complete JSON receipts were +byte-identical. They cover 28 full word fixtures, 12 word/inventory +mutation controls and three selected-route controls. Recorded durations +were 0.295, 0.358 and 0.362 seconds. The final source and receipt hashes +are in `VALIDATION.json`; `CHECKS.json.gz` is the deterministic compressed +full receipt. `SOURCE-DEPENDENCIES.json` distinguishes actual authenticated +inputs from read-only predecessor provenance. diff --git a/research/bit-fixed-controller-repairs/REVIEW-RECIPE.md b/research/bit-fixed-controller-repairs/REVIEW-RECIPE.md new file mode 100644 index 0000000000..c52ff9ae97 --- /dev/null +++ b/research/bit-fixed-controller-repairs/REVIEW-RECIPE.md @@ -0,0 +1,116 @@ +# Independent mathematical review of the fixed recipe + +Verdict: the fixed-recipe repair theorem and its stated finite certificates +pass this review. No mathematical acceptance by a maintainer or independent +human reviewer is claimed. This review and its extension were prepared by a +separate OpenAI Codex mathematical worker. + +## What was inherited, and what is new + +The historical `bit_nilpotent_recipe.py` evaluated B=1,...,6 in +\(\mathbb F_2[N]/(N^2-1)\). Its rank sequence 2,3,6,7,10,11, trace-one +observation and B4 lower bound of seven were conditional claims about that +fixed word. This review does not use their recorded PASS status as proof. +It independently replays all six complete case records and derives the +endpoint from the actual source recipe. + +The new mathematical content is a closed form valid for every B, a rank and +trace proof, explicit attaining decompositions for both parities, and the +extension to every finite number of independently dirty restored spectator +banks. Thus the historical lower screen becomes an exact formal minimum: +\(2B+1\) added calls for odd B and \(2B-1\) for even B. + +The unchanged source `recipe` function is extracted from an authenticated +full source file. Its imports, module state and main routine are not executed. +The independent checker uses separate constant and epsilon bit matrices; +it does not import the historical coefficient-ring arithmetic. + +## Assumptions checked + +- The coefficient field is F2. The theorem is not an integer-lift result. +- The same nonidentity involution N acts on every original bank. +- N+I is nonzero and squares to zero, so the dual-number model is injective. + An identity N is explicitly excluded from the obstruction. +- The original local interfaces, bridge order, bank pairing and final + exchange are fixed. Changing scalar topology can change the endpoint. +- A paid additional event is a rank-one idempotent coupling + \(I+(N+I)uv^T\), with \(v^Tu=1\), equivalently a scalar-conjugated + single-bank application of N. +- All input banks and all added spectator banks are independently dirty. + The spectator endpoint is literal identity. +- Scalar GL changes of basis are free only in this formal event-count model. + Their physical access and implementation costs remain unpaid here. + +## Derivation audit + +The t-recurrence is obtained by expanding the four literal operations on a +nonterminal pair. The x input of the next pair is still its original input; +only its y input is changed. Descending terminal bridges update each x bank +from its as-yet unchanged preceding p bank, while they telescope the q banks. +This confirms the event order used in the written endpoint derivation. + +The block formula gives C=L^T L and invertible lower bidiagonal D, so A is +invertible. For M=A+I the Schur reduction is an invertible block row operation. +Every row after its first becomes a coordinate row; the first row has leading +entry B mod2. This proves the rank formula without extrapolating a finite table. +Only A's y0 diagonal is one, yielding trace(M)=1. + +For even B, the displayed kernel relation removes exactly the y0 column. +Its contribution is folded into the duals of odd x columns. The resulting +dual/image pairings remain one because the y0 row of D only touches x0, +whose index is even. For odd B, the only trace-zero column is split into two +rank-one idempotents. Every asserted projector is nonzero and their sum is +exactly M. The corresponding scalar basis and inverse make the word explicit. + +Rank and trace bounds apply to M direct-sum zero on any number of spectators. +They therefore permit repair projectors that mix data and dirty spectators; +the attainment uses no spectator. Conjugating an inserted repair through an +unchanged fixed-word suffix uses only the scalar part of that suffix, because +epsilon squared is zero. This preserves the same projector rank and trace. +This argument covers complete constant-identity repair gates, not arbitrary +new scalar wiring around existing query calls. + +## Executed finite coverage + +`CHECKS.json` is a full deterministic receipt. Normal and optimized CPython +3.12 executions produce identical bytes. + +- B=1,...,12: literal recipe endpoint, closed-form coefficient, Schur rows, + rank, trace, kernel for even B, exact attaining count, all projectors and + explicit scalar conjugators. +- B=1,...,6: every field of each historical case, including its event list + and full endpoint matrices, is regenerated and compared. +- B=1,...,8: 72 full arbitrary-input binary matrix instantiations from three + nonidentity involutions and spectator counts zero, one and three. +- Twelve intended controls: changed local orientation, omitted bridge, + omitted exchange, omitted repair, a trace-zero coupling, wrong even kernel, + a non-involution, identity N, duplicate or missing source function, changed + coefficient formula, and an incorrect nonidentity spectator endpoint. + Every control requires a specific ValueError message. + The spectator control runs the actual B4 complete repair word on a passing + two-port involution and one dirty spectator, changes that spectator's target + block from identity to N, and fails the same exact spectator-restoration + gate used by all positive instantiations. + +These are finite checks of the identities used in the proof. They are not +an exhaustive search over all B, all N, all scalar words, or all spectators. +The all-parameter statement is the written proof. No formal-kernel check +was run. + +## Cost and publication limits + +For B4, exactly seven formal repairs are necessary and sufficient in this +alphabet. Seven separately admitted 111-port N implementations would have +777 rank-one child calls if each costs 111 such children. The proof does not +admit that implementation or compare the result with a distinct controller's +planning allowance. It does not certify a full supplier, owner schedule, +fresh-frame controller, recursive moment improvement, or new kappa. + +The seeded-star contribution changes the topology and is outside this +fixed-recipe theorem. Published three-bit idempotent counts and trace-zero +commutator floors have different target contracts; they were read for +context only and are not imported as proof dependencies. + +The reviewer owns only this review directory. No staging files, Git branches, +PRs, external comments, shared configuration or other workers' files were +modified. diff --git a/research/bit-fixed-controller-repairs/REVIEW-VERIFICATION.md b/research/bit-fixed-controller-repairs/REVIEW-VERIFICATION.md new file mode 100644 index 0000000000..f068d34503 --- /dev/null +++ b/research/bit-fixed-controller-repairs/REVIEW-VERIFICATION.md @@ -0,0 +1,142 @@ +# Source and exact-control review + +**Verdict: PASS within the declared fixed-controller scope.** +This is an independent AI review of source binding, complete receipts, +mathematical acceptance controls and scope. It is not a formal-kernel proof, +human acceptance, hosted CI result or a new supplier-admission result. +Prepared with substantial OpenAI Codex assistance. + +The reviewed verifier has SHA-256 +`f8954d6b6c8b5ad0a9b228adac60cbd6f798a1f8958a669877e149f8a48dff9b`. +The complete final package inventory is delimited separately by +`CORE-SNAPSHOT.json`; the compact run is recorded in `CONTROLS.json`. +The parent owns the full registered-stage and Git-free replays. + +## Authenticated execution and historical closure + +The minimal historical closure contains fourteen files: six mathematical +source files, three data inputs, three fixed receipts and two provenance +files. The new independent checkers and their fixed receipts add separate +evidence; they are not substituted for the historical sources. + +`Frozen.raw` reads once, checks the registered SHA-256 and returns those +same bytes for parsing or execution. Selected historical definitions are +matched by a full name multiset, so missing and duplicate definitions or +requested names fail. Only declared definitions are compiled. Historical +imports, module initialization and unselected entry points do not run. +The two explicitly selected historical `main` functions generate their +bounded records into a fresh external temporary directory. + +Every literal historical read passes through `SourcePath` and its explicit +logical map. Unmapped, missing or changed inputs fail; there is no fallback +to the original absolute checkout or sibling imports. The nested +`global_k.recipe` read requires one top-level definition and is recorded as +executed. The original cap-copy `RAW_SHA` is read as an authenticated literal +and compared to the frozen R438 input. The route generator is executed +through its declared functions; its old driver and unused functions are +excluded. + +Compilation at both AST layers and for each complete independent checker +sets `dont_inherit=True, optimize=0`. The independent checker module receives +an explicit non-main name. Frozen code is compiled from authenticated bytes, +with no importlib or frozen-module bytecode-cache loading path. The compact +fixtures confirm that direct gates, extracted assertions, nested assertions +and complete-module assertions survive an outer `-O` process. + +Both container and original-byte bindings are checked for compressed +receipts. The origin and frozen inventories must agree exactly. A control +that updates both disposable container digests still fails on a changed +decompressed original. Recompressing the same original with a different gzip +timestamp passes when the disposable storage bindings are updated. + +The historical `bit_seeded_star.inverse_event` is intentionally excluded: +its generic involutivity statement is not valid for its `new_F` primitive. +The five ring primitives used by this package do not call it. No assertion +about that unused function is needed for the replay. + +## Complete receipts and controls + +The acceptance gate compares canonical JSON for every field of all five +fixed scientific receipts: + +| Record | Stage | +| --- | --- | +| `frozen/hybrid/CLOSED-HYBRID.json` | historical | +| `frozen/hybrid/EARLY-PROMOTION.json` | historical | +| `frozen/recipe/BIT-NILPOTENT-RECIPE.json` | historical | +| `frozen/reviews/recipe/CHECKS.json.gz` | recipe | +| `frozen/reviews/hybrid/CHECKS.json.gz` | hybrid | + +Each stage also requires its exact set of compared receipts. There is no +selected-field acceptance or regeneration of a missing expected receipt. +The canonical comparison distinguishes integer, float and boolean scalars, +preserves list order, and detects nested omission. Every actual receipt was +positively compared in full, then rejected after a deep field mutation and +after omission of that same field. + +The compact suite passed under Python 3.12 in both normal and optimized +children. Each mode reached **47 intended rejecting controls**, plus two +deliberate check-deletion tests. Fixtures use external temporary directories. +The verifier, frozen manifest and origins remained unchanged during the run. + +The mathematical inverse control authenticates and executes the actual old +eight-bank hybrid word. It changes exactly one backward code application to +a forward application in memory, after authentication. The resulting word +fails the `literal reverse-inverse cleanup` gate. Disabling only that gate +makes this rejection test detect unexpected acceptance. Thus the control +depends on the mathematical check, rather than on a changed input hash or +an unrelated exception. Repeating the entire forward endpoint would have +been vacuous here because the signed target endpoint is itself involutive. + +The receipt-gate deletion test likewise confirms that the scalar-type +mutation requires the complete-comparison gate. The independent recipe +control helper also rejects a fixture that raises the wrong semantic error; +unexpected acceptance is outside its exception handler. + +## Mathematical coverage and boundaries + +The recipe checker independently implements the constant/epsilon arithmetic, +checks the literal fixed recipe for B=1 through 12, recovers all historical +B=1 through 6 case fields, and exercises arbitrary-input involutions with +dirty spectators. Its written all-B rank/trace proof is separate from those +finite checks. The attaining projector decompositions and the spectator +extension use every input column. The fixed-suffix conjugation clarification +is consistent with the chronological product convention. This establishes +the stated optimum only for complete scalar-conjugated single-bank +involution repairs of the fixed recipe, including arbitrary restored dirty +spectators. It does not permit changing the scalar topology or introducing +unpaired scalar mixing. + +The hybrid checker independently implements ordered free-group words, +literal inverses and distinct transpose labels. Its finite audits cover both +controller variants at B=1 through 12, 16 and 32, with all bank columns, +both inverse products, the dual and complete event inventories. The written +ladder proof establishes the all-B extension. The determinant specialization +proves the two-added-code minimum only in the declared universal independent +generator alphabet. It does not prove an optimum for a specialized physical +code pair, scalar ADD count or normalization cost. + +The selected native witness uses actual authenticated code coefficient +`A[3,0]=1` and exact rational relative routes. For ADDRESS push T, the VALUE +push is `g(w)=f(T^-1 w)`. The admitted source function `f(w)=1[w10=0]` is +constant on the source P0 line; the computed inverse route sends the target +P3 vector `2e3` to `2e10`, so `g(0)=1` and `g(2e3)=0`. This is the required +forward VALUE failure. The separate forward-route/pullback witness is a +dual check. The independent checker covers this selected ordered pair; the +historical route generator retains its own full ordered-pair census. + +The independent semantic controls alter authenticated mathematical events +and require their intended errors. In particular, deleting a declared +normalization does not change the abstract endpoint: its control checks the +normalization inventory explicitly. It is not represented as a proof of +native normalization or arbitrary-helper cleanup. + +The two alphabets remain distinct: the fixed involution recipe is over +characteristic two with a nilpotent coefficient, whereas the hybrid proof +uses signed noncommuting invertible labels. No conclusion is transferred +between them without its stated premises. The conditional 111-child tariff, +the 1499/111 scalar invoice and the historical 60/492/309 owner terms remain +declared source premises. Native frame legality, physical source access, +private helper restoration, COPY lifetimes, integer helper leakage, +precision, a general caller recurrence and any new kappa bound remain +outside this package's conclusion. diff --git a/research/bit-fixed-controller-repairs/SOURCE-AUDIT.md b/research/bit-fixed-controller-repairs/SOURCE-AUDIT.md new file mode 100644 index 0000000000..f755df132c --- /dev/null +++ b/research/bit-fixed-controller-repairs/SOURCE-AUDIT.md @@ -0,0 +1,112 @@ +# B07 source audit before integration + +Scope: the fixed routed recipe, the explicit closed hybrid and the explicit +early-promotion witness. This audit does not admit a general caller, native +precision, helper ownership, or a new exponent. Substantial OpenAI Codex +assistance was used. + +## Minimal historical replay closure + +The unchanged historical execution needs six Python sources, three data +artifacts and three fixed scientific receipts: + +| Source | Selected definitions or purpose | +| --- | --- | +| `closed_hybrid.py` | All mathematical functions through `receipt`; exclude its filesystem `main`. Its nested `recipe` loader must use authenticated source bytes. | +| `bit_nilpotent_recipe.py` | `rank`, `main`; execute its bounded B=1,...,6 computation with fresh external output. | +| `bit_seeded_star.py` | Only `need`, `mul`, `plus`, `scale`, `ident`, supplying the four-element ring arithmetic. | +| `early_promotion.py` | `need`, `main`; execute against authenticated explicit inputs and fresh external output. | +| `expanded_sections.py` | `need`, `bits`, `xor`, `eye`, `product`, `mm`, `tr`, `eyeq`, `roots_and_routes`. | +| `global_k.py` | Only the unique top-level `recipe` definition. No configuration, placement or bank-route imports are needed. | + +The data are the exact `BIT-THREE-ROW-INPUT.json`, R438 +`r438-t154.json.gz`, and full-root `bitE8-r865.json.gz`. The fixed receipts are +`BIT-NILPOTENT-RECIPE.json`, `CLOSED-HYBRID.json`, and +`EARLY-PROMOTION.json`. `bit_cap_copy_local.py` additionally preserves the +source of the literal `RAW_SHA` binding; no cap-copy function is required. +The original hybrid README supplies contract and attribution context. +These two provenance documents bring the current frozen inventory to 14 files. + +The seeded-star receipt and its `main`, the expanded-sections receipt and its +`main`, and the `geometry.py` hash read used only by that excluded main are +outside this replay. The new independent mathematical reviewers own their +separate construction and theorem obligations. + +## Required adapters + +The original programs use absolute paths and ordinary sibling imports. These +are replaced by explicit authenticated namespaces and a read-only logical-path +map. Every historical `read_bytes` must delegate to `Frozen.raw`, including: + +- `RECIPE` or `SOURCE` for `global_k.py`; +- `OLD/recursive/BIT-THREE-ROW-INPUT.json`; +- `ENDPOINT/expanded_sections.py`, whose original byte hash enters the receipt; +- `source.cap.RAW`; +- `REPO/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz`. + +No fallback to an ambient checkout or normal source importer is needed. +The full-root file is a real dependency of `roots_and_routes`; freezing only +the punctured R438 word is insufficient. + +Two original loaders compile nested recipe ASTs without an explicit +optimization setting and select the first definition with `next`. Supply a +compiler that forces `dont_inherit=True, optimize=0`, and require exactly one +top-level recipe definition before either old loader runs. All selected +definitions were inspected for imports, decorators and default-expression +side effects. The current mathematical definitions contain no `assert`; +synthetic direct, nested and nested-recipe assertion controls still establish +the loader's behavior under optimized Python. + +The literal `RAW_SHA` must be extracted from the authenticated cap-copy source +and checked against the retained R438 digest. Merely assigning that field from +the current manifest would authenticate the R438 bytes without binding the +retained cap source's named constant. + +Report `global_k.py::recipe` as executed through the nested loader, as well +as the selected route generator. A list of compiled historical function +definitions should not imply that unrelated original entrypoints ran. + +The two selected `main` functions may retain their original `--write` branches +only with `HERE` set to a fresh external temporary directory. Compare the +entire resulting JSON with each separately frozen receipt. Do not regenerate +a missing fixed receipt. Python structural equality accepts `True == 1`; +canonical JSON comparison must preserve scalar types, list order and every +nested field. + +## Mathematical control boundaries + +The historical closed target is `diag(1,-1,1,-1,...)` over the integral free +group algebra. It becomes identity only in characteristic two. It is +involutive, so repeating the entire forward endpoint is a vacuous inverse +control. Change the direction of one actual inverse code operation instead. +The original compensation, B1-pullback and stale-coded-stage mutations alter +actual words and compare their complete eight-input endpoint coefficients. + +`normalize` is the identity on the logical rows in the historical interpreter. +Its omission cannot be detected by endpoint algebra. The two native +normalization sweeps and their tariffs remain separate explicit premises or +invoice checks. Ordinary dirty-helper restoration is likewise a premise of +these abstract local interfaces, not an extra bank silently initialized to zero. + +The unused `bit_seeded_star.inverse_event` returns every event unchanged and +comments that all primitives are involutive. That statement does not hold +for `new_F`: its square has target `(1+N)x+y`. Its actual `main` correctly +switches `new_F` to `new_F_inverse`. The misleading unused helper is excluded +from this package's required extraction and must not be reported as verified. + +The small ring primitives assume equal row lengths and entries in `0..3`; +`plus` uses `zip` and does not itself validate dimensions. The fixed generated +recipes meet those premises. The new general-B proof and checker must state +and enforce their own dimension and ring-domain contracts. + +The early-promotion witness is an actual off-diagonal code entry and a +15-coordinate rational route, also nonzero over the specified odd field. +It does not obstruct every new promoted-input factory or changed controller. +The route function's all-pairs census is a finite geometric calculation; +the fresh independent reviewer must distinguish it from the general written +claim. + +Numerical comparison constants such as the old 60-unit local tariff and the +492-unit allowance are literal source premises in the historical receipt. +Reproducing those literals does not independently derive their owner, budget +or native implementation hypotheses. diff --git a/research/bit-fixed-controller-repairs/SOURCE-CLOSURE.json b/research/bit-fixed-controller-repairs/SOURCE-CLOSURE.json new file mode 100644 index 0000000000..2ca33a69df --- /dev/null +++ b/research/bit-fixed-controller-repairs/SOURCE-CLOSURE.json @@ -0,0 +1,159 @@ +{ + "additional_provenance_files": 2, + "ambient_imports_required": false, + "core_audit_note": "SOURCE-AUDIT.md", + "fixed_receipts": 3, + "frozen_files": { + "frozen/geometry/E8.json.gz": { + "bytes": 33865, + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "role": "complete fixed data artifact", + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55" + }, + "frozen/geometry/MATRICES.json": { + "bytes": 28228, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/BIT-THREE-ROW-INPUT.json", + "role": "complete fixed data artifact", + "sha256": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979" + }, + "frozen/geometry/R438.json.gz": { + "bytes": 42305, + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "role": "complete fixed data artifact", + "sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022" + }, + "frozen/hybrid/CLOSED-HYBRID.json": { + "bytes": 10950, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/CLOSED-HYBRID.json", + "role": "complete fixed scientific receipt", + "sha256": "f12bf6aabe9ea0cb058eab5d68f10886cddff6200f7e00b40c048f4cf01689b7" + }, + "frozen/hybrid/EARLY-PROMOTION.json": { + "bytes": 2226, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/EARLY-PROMOTION.json", + "role": "complete fixed scientific receipt", + "sha256": "c278d5bd9cca084cbeae5212b73afa5f03461ecb4af9e18608bda0c54c89a2d6" + }, + "frozen/hybrid/README.md": { + "bytes": 8657, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/README.md", + "role": "contract and attribution provenance only", + "sha256": "0206fc9c9950e04baf4b9395af0a1e0b9a99907900b328eb06eb48477703ea24" + }, + "frozen/hybrid/closed_hybrid.py": { + "bytes": 13193, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/closed_hybrid.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "need", + "reduce_word", + "inverse_word", + "add", + "left", + "identity", + "serial", + "recipe", + "old_word", + "hybrid_word", + "apply", + "evaluate", + "transpose_operator_word", + "transpose_operators", + "product", + "receipt" + ], + "sha256": "78f92b8b8fdb6528bd87f974f3022e73c9b60877f0022200fe0b4422da2b7738" + }, + "frozen/hybrid/early_promotion.py": { + "bytes": 4771, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/early_promotion.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "need", + "main" + ], + "sha256": "d59e5487251929416fa657f45e617d78a3392310203f1df08389d3746acd6732" + }, + "frozen/provenance/bit_cap_copy_local.py": { + "bytes": 7588, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/bit_cap_copy_local.py", + "role": "literal RAW_SHA provenance only; no function execution", + "sha256": "6e9ca1eb905d769716c009904f45d6849b225e48cd119f18b50c0379f35313cb" + }, + "frozen/recipe/BIT-NILPOTENT-RECIPE.json": { + "bytes": 30914, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/BIT-NILPOTENT-RECIPE.json", + "role": "complete fixed scientific receipt", + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" + }, + "frozen/recipe/bit_nilpotent_recipe.py": { + "bytes": 3727, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_nilpotent_recipe.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "rank", + "main" + ], + "sha256": "d2649a223c4fd221e64dc059422bcf796fbe1becc524911c7e84c0cf475b2b7e" + }, + "frozen/recipe/bit_seeded_star.py": { + "bytes": 6317, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_seeded_star.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "need", + "mul", + "plus", + "scale", + "ident" + ], + "sha256": "91d3bbebfad36836b48949a2d231afd3eb8dd46f0443d45f7e19ff9779468347" + }, + "frozen/routes/expanded_sections.py": { + "bytes": 8284, + "original_path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/bit-endpoint/expanded_sections.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "need", + "bits", + "xor", + "eye", + "product", + "mm", + "tr", + "eyeq", + "roots_and_routes" + ], + "sha256": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b" + }, + "frozen/upstream/global_k.py": { + "bytes": 16791, + "original_path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "role": "selected unchanged source definitions", + "selected_assert_count": 0, + "selected_decorators": 0, + "selected_definitions": [ + "recipe" + ], + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8" + } + }, + "no_route_census_or_general_B_replay": true, + "original_expanded_sections_main_required": false, + "original_global_generator_main_required": false, + "original_seeded_star_main_required": false, + "runtime_data_files": 3, + "runtime_source_files": 6, + "schema": "b07-historical-source-closure-v1", + "status": "PASS_STATIC_EXACT_SOURCE_CLOSURE" +} diff --git a/research/bit-fixed-controller-repairs/SOURCES.json b/research/bit-fixed-controller-repairs/SOURCES.json new file mode 100644 index 0000000000..9b44773308 --- /dev/null +++ b/research/bit-fixed-controller-repairs/SOURCES.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "base_commit": "12fa8c5c844be21bfefb38a19503fbd867a11244", + "files": [ + { + "path": "certificates/selected-result.json", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129", + "usage": "provenance" + }, + { + "path": "docs/research/agent-task-catalog.json", + "git_blob": "64bfc5af6709ed9811171e0a2108f05e1219cb65", + "sha256": "352a6184713b8843d96fd2c2071eb7aeaa655906b7c51d45ad444912666c8a96", + "usage": "provenance" + }, + { + "path": "docs/research/research-family-status.md", + "git_blob": "abdd2792e6a5596b3fa6be3dc9db882bd8e3ef89", + "sha256": "0e61c47dfbc6f16e5f64594fcc7d907d4187568e38dddf10d473f0992419c44f", + "usage": "provenance" + }, + { + "path": "research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "git_blob": "3df12bd632f1fdba825ced57110a1fee82eb2857", + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "usage": "provenance" + }, + { + "path": "research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "git_blob": "e12a566658a4b2c8b6ae0ecc34fd41290f68f5e8", + "sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022", + "usage": "provenance" + }, + { + "path": "research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "git_blob": "8bec1751f7e33c3a1e4673ef5dbc34d6f205321e", + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "usage": "provenance" + }, + { + "path": "research/bit-r438-source-code/README.md", + "git_blob": "e501165027be66b75c60b13ed93377c4a58c1d0c", + "sha256": "f1033297e1156f9fb154a4319bee394a82476195cd2a53d01d93ef7332536d27", + "usage": "provenance" + }, + { + "path": "research/r429-full-target-interface/README.md", + "git_blob": "d54eea80e4aefce50b28ae48b3e5e15162cb636d", + "sha256": "79d3cec7177676aeb501488cc2415ffbcda6515ef75f005731a91d48c62a67f9", + "usage": "provenance" + }, + { + "path": "research/r429-full-target-interface/PROOF-CALLER.md", + "git_blob": "f23f8772371cd1196fc7fe1578c36e47acaa3634", + "sha256": "a8c05af3bf3a973d7f2c44e356fa635bcf1146ca22286be2454b3b91581eae60", + "usage": "provenance" + } + ] +} diff --git a/research/bit-fixed-controller-repairs/TASK.json b/research/bit-fixed-controller-repairs/TASK.json new file mode 100644 index 0000000000..27d2e3a35f --- /dev/null +++ b/research/bit-fixed-controller-repairs/TASK.json @@ -0,0 +1,96 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 7, + "base_commit": "12fa8c5c844be21bfefb38a19503fbd867a11244", + "original_card": { + "id": "joint-query-controller", + "question": "Can the installed QQ16 caller win a complete matched protocol bill, or can a changed demand eliminate actual paid work?", + "starting_points": [ + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "research/qq16-caller-install/README.md" + ], + "methods": [ + "Derive the matched whole-caller physical bill for installed and baseline protocols.", + "Change the actual demanded observations and prove a cheaper legal producer/consumer contract." + ], + "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 #4166 COST.md and ADMISSION.json. An actual caller connection is now proposed. Its native-component profile loses; parent park/restore versus external-call costs remain unresolved. Retain the producer and recovery lineage rather than rebuild it.", + "scope": "Source-binding orientation only; no scientific replay, theorem acceptance or supplier admission. Budget any heavy replay separately." + }, + "first_experiment": "At the actual installed cut, compare matched complete parent park/restore and external input/return protocols at the same bank/packet geometry, including every later root call and service cost. Alternatively pin both bridge observations and derive a genuinely smaller source-compatible demand. Stop if the complete necessary inequality fails or an essential cost is unknown; no larger decoder scan from a local tape-action saving.", + "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.", + "Recreating completed-output recovery or caller wiring already supplied by #4166 without new independent coverage.", + "Dropping retained later root calls or claiming native-profile dominance from the isolated publication saving." + ], + "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", + "4166", + "qq16-caller-install" + ], + "existing_checks": [ + { + "scope": "PR #4166: author-checked installed producer/service/return/bridge connection; native-component comparison loses.", + "evidence": "research/qq16-caller-install/README.md", + "remaining": "Complete matched physical protocol bill, or changed source-compatible demand/circuit; no affordable supplier yet.", + "status": "author-checked", + "source_commit": "0b082d22a0e9a442d264ab0633e35ef26c790630", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "changed", + "actual_scope": "Prove the sharp all-bank-count repair tariff for the fixed inherited BIT recipe and a two-code closed hybrid in its separate local alphabet, with exact inverse/dual, actual early-promotion witness and explicit conditional costs.", + "scope_change_reason": "Explicit donor assignment to finish unpublished B06 remainder/B07 and extend promising results. These are two scoped comparisons of the same inherited bank recipe, not a new QQ16 supplier target.", + "bottleneck_link": "Local endpoint identities need paid terminal correction and legal native admission; a formal repair optimum cannot be charged as a complete physical supplier.", + "budget_minutes": 240, + "stop_rule": "Keep the inherited recipe and the two declared local alphabets. Prove the closed all-B identities and attaining repairs; stop before broader controller search or new supplier admission.", + "outcome": "partial", + "evidence": "Three fully regenerated original receipts, two independent exact checkers, written all-B proofs, explicit attaining repairs and typed source/control checks.", + "author": "Ross Richardson", + "ai_assistance": "Substantial OpenAI Codex assistance in original construction, independent mathematical checking contexts and publication. AI review is not human or formal-kernel acceptance.", + "open_questions": [ + { + "question": "Can a changed native hybrid reduce or amortize the two normalization sweeps while preserving arbitrary inputs?", + "why_it_matters": "The scalar code count improves but the stated native comparison still loses 102 rank units.", + "first_step": "Specify the exact current frames, all mixed helper owners and a complete terminal/source-access invoice.", + "blocked_by": "No native mixed-owner or rounded implementation is supplied." + }, + { + "question": "Can changing the original paid recipe improve on the fixed-repair tariff?", + "why_it_matters": "The sharp theorem fixes all original operations and allows only complete conjugated single-bank N repairs.", + "first_step": "State which original local or scalar-control operation changes and derive its full arbitrary-input endpoint.", + "blocked_by": "Any new topology requires its own native and full-cost admission." + } + ] +} diff --git a/research/bit-fixed-controller-repairs/VERIFY.json b/research/bit-fixed-controller-repairs/VERIFY.json new file mode 100644 index 0000000000..bfa9cf437a --- /dev/null +++ b/research/bit-fixed-controller-repairs/VERIFY.json @@ -0,0 +1,60 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "historical" + ], + "timeout_seconds": 90, + "checks": "All three complete original receipts, unchanged mathematical functions and explicit authenticated source-read closure." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "recipe" + ], + "timeout_seconds": 120, + "checks": "Independent dual-number recipe, all-B rank/trace and attaining-projector formula fixtures, arbitrary-input N/spectator instantiations and intended controls." + }, + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py", + "--stage", + "hybrid" + ], + "timeout_seconds": 120, + "checks": "Independent ordered free-group-ring all-input words, two-code correction, both inverses/dual, restricted determinant count, selected actual ADDRESS witness and invoice controls." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/controls.py", + "--package", + "{package}" + ], + "timeout_seconds": 60, + "checks": "Normal and optimized source/AST/path bindings, complete typed receipt comparisons, actual semantic defects and deliberate check deletion." + } + ] +} diff --git a/research/bit-fixed-controller-repairs/controls.py b/research/bit-fixed-controller-repairs/controls.py new file mode 100644 index 0000000000..989bab31e4 --- /dev/null +++ b/research/bit-fixed-controller-repairs/controls.py @@ -0,0 +1,458 @@ +#!/usr/bin/env python3 +"""Compact B07 source-selection and acceptance controls. + +No route census or independent general-B replay is run here. +The fixed small hybrid word supplies one semantic inverse control. +Prepared for Ross with substantial OpenAI Codex assistance. Apache-2.0. +""" +import argparse +import copy +import gzip +import hashlib +import json +from pathlib import Path +import subprocess +import sys +import tempfile +import types + + +HERE = Path(__file__).resolve().parent + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(",", ":")) + + +def sha(raw): + return hashlib.sha256(raw).hexdigest() + + +def load_verifier(package): + path = package / "verify.py" + raw = path.read_bytes() + module = types.ModuleType("b07_control_verifier") + module.__file__ = str(path) + exec(compile(raw, str(path), "exec", dont_inherit=True, optimize=0), module.__dict__) + return module, sha(raw) + + +def reject(name, action, expected, records): + try: + action() + except (ValueError, AssertionError, FileNotFoundError) as error: + need(expected in str(error), f"wrong rejection for {name}: {error}") + records.append({"name": name, "reason": str(error)}) + else: + raise ValueError("control accepted: " + name) + + +def fixture(directory, entries, original=None): + root = Path(directory).resolve() + root.mkdir(parents=True) + hashes, origins = {}, {} + for name, raw in entries.items(): + target = root / name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(raw) + hashes[name] = sha(raw) + origins[name] = {"sha256": sha(raw)} + if original and name in original: + origins[name]["original_sha256"] = sha(original[name]) + (root / "FROZEN-SHA256.json").write_text(json.dumps(hashes)) + (root / "ORIGINS.json").write_text(json.dumps(origins)) + return root + + +def source_checks(v, temporary): + source = ( + b'import a_module_that_does_not_exist\n' + b'raise RuntimeError("ORIGINAL_TOP_LEVEL_RAN")\n' + b'def chosen(x=3):\n return x + 4\n' + b'def assertion():\n assert False, "EXTRACTED_ASSERT"\n' + b'def nested():\n def inner():\n assert False, "NESTED_ASSERT"\n' + b' return inner()\n' + b'def main():\n raise RuntimeError("ORIGINAL_MAIN_RAN")\n' + b'if __name__ == "__main__":\n main()\n' + ) + root = fixture(temporary / "source", { + "frozen/source.py": source, + "frozen/duplicate.py": b"def duplicate():\n return 1\n" + b"def duplicate():\n return 2\n", + "frozen/module.py": b'assert False, "MODULE_ASSERT"\n', + "frozen/module_main.py": b'VALUE = 7\n' + b'if __name__ == "__main__":\n' + b' raise RuntimeError("ORIGINAL_MAIN_RAN")\n', + }) + f = v.Frozen(root) + f.check_all() + chosen = f.functions("frozen/source.py", ["chosen"], {}) + need(chosen.chosen() == 7 and set(vars(chosen)) == {"chosen"}, + "only declared functions should be exported") + need(f.executed == {"frozen/source.py": ["chosen"]}, "selected-source receipt") + rejected = [] + reject("direct_runtime_gate_under_parent_flags", + lambda: v.need(False, "DIRECT_RUNTIME_GATE"), "DIRECT_RUNTIME_GATE", rejected) + reject("extracted_assert_under_parent_flags", + lambda: f.functions("frozen/source.py", ["assertion"], {}).assertion(), + "EXTRACTED_ASSERT", rejected) + reject("nested_assert_under_parent_flags", + lambda: f.functions("frozen/source.py", ["nested"], {}).nested(), + "NESTED_ASSERT", rejected) + reject("authenticated_module_assert_under_parent_flags", + lambda: f.module("frozen/module.py"), "MODULE_ASSERT", rejected) + module = f.module("frozen/module_main.py") + need(module["VALUE"] == 7 and module["__name__"] == "authenticated_review", + "independent module main exclusion") + (root / "frozen/module.py").write_bytes(b"VALUE = 99\n") + reject("changed_authenticated_module", + lambda: f.module("frozen/module.py"), "frozen input changed", rejected) + reject("missing_named_definition", + lambda: f.functions("frozen/source.py", ["absent"], {}), + "function selection changed", rejected) + reject("duplicate_source_definition", + lambda: f.functions("frozen/duplicate.py", ["duplicate"], {}), + "function selection changed", rejected) + reject("duplicate_requested_name", + lambda: f.functions("frozen/source.py", ["chosen", "chosen"], {}), + "function selection changed", rejected) + reject("unregistered_source", + lambda: f.functions("frozen/unknown.py", ["chosen"], {}), + "unregistered frozen input", rejected) + (root / "frozen/source.py").write_bytes(b"def chosen():\n return 99\n") + reject("changed_authenticated_source", + lambda: f.functions("frozen/source.py", ["chosen"], {}), + "frozen input changed", rejected) + (root / "frozen/source.py").unlink() + reject("missing_registered_source", + lambda: f.functions("frozen/source.py", ["chosen"], {}), + "source.py", rejected) + return {"imports_top_level_and_main_excluded": True, "rejections": rejected} + + +def nested_source_checks(v, temporary): + import ast + entries = { + "frozen/recipe.py": b'import unavailable_original_dependency\n' + b'raise RuntimeError("ORIGINAL_TOP_LEVEL_RAN")\n' + b'def recipe(K):\n return K + 19\n', + "frozen/assert_recipe.py": b'def recipe(K):\n' + b' def inner():\n' + b' assert False, "NESTED_RECIPE_ASSERT"\n' + b' return inner()\n', + "frozen/duplicate.py": b'def recipe(K):\n return 1\n' + b'def recipe(K):\n return 2\n', + "frozen/absent.py": b'def other(K):\n return 0\n', + } + root = fixture(temporary / "nested", entries) + f = v.Frozen(root) + mapping = {"source/" + name.split("/")[-1]: name for name in entries} + mapping["source/unregistered.py"] = "frozen/unregistered.py" + source = v.SourcePath(f, mapping) + path = source / "source" / "recipe.py" + need(path.read_bytes() == entries["frozen/recipe.py"], "exact mapped source bytes") + need(not hasattr(path, "write_bytes") and not hasattr(path, "write_text"), + "source path should expose no write interface") + def nested(name): + raw = (source / "source" / name).read_bytes() + tree = v.recipe_tree(raw) + definition = next(n for n in tree.body + if isinstance(n, ast.FunctionDef) and n.name == "recipe") + namespace = {} + exec(v.compile_checked(ast.Module(body=[definition], type_ignores=[]), + str(source / "source" / name), "exec"), namespace) + return namespace["recipe"](4) + need(nested("recipe.py") == 23, "nested recipe positive control") + rejected = [] + reject("undeclared_logical_read", lambda: (source / "missing").read_bytes(), + "undeclared historical source read", rejected) + reject("absolute_path_escape", lambda: (source / "/etc/passwd").read_bytes(), + "undeclared historical source read", rejected) + reject("relative_path_escape", lambda: (source / "../outside").read_bytes(), + "undeclared historical source read", rejected) + reject("mapped_unregistered_input", lambda: (source / "source/unregistered.py").read_bytes(), + "unregistered frozen input", rejected) + reject("nested_recipe_assert_under_parent_flags", lambda: nested("assert_recipe.py"), + "NESTED_RECIPE_ASSERT", rejected) + reject("duplicate_nested_recipe", lambda: nested("duplicate.py"), + "recipe definition must be unique", rejected) + reject("missing_nested_recipe", lambda: nested("absent.py"), + "recipe definition must be unique", rejected) + (root / "frozen/recipe.py").write_bytes(b'def recipe(K):\n return 99\n') + reject("mapped_changed_bytes", path.read_bytes, "frozen input changed", rejected) + (root / "frozen/recipe.py").unlink() + reject("mapped_missing_file", path.read_bytes, "recipe.py", rejected) + return {"only_authenticated_mapped_reads": True, + "original_imports_and_top_level_excluded": True, "rejections": rejected} + + +def literal_pin_checks(v, package): + frozen = v.Frozen(package) + value = v.literal_raw_sha(frozen.raw("frozen/provenance/bit_cap_copy_local.py")) + need(value == frozen.hashes["frozen/geometry/R438.json.gz"], + "actual cap-copy constant and R438 digest") + valid = b"RAW_SHA = '" + b"a" * 64 + b"'\n" + need(v.literal_raw_sha(valid) == "a" * 64, "literal pin positive fixture") + rejected = [] + reject("missing_literal_pin", lambda: v.literal_raw_sha(b"OTHER = 1\n"), + "original RAW_SHA binding must be unique", rejected) + reject("duplicate_literal_pin", lambda: v.literal_raw_sha(valid + valid), + "original RAW_SHA binding must be unique", rejected) + reject("wrong_literal_pin_type", lambda: v.literal_raw_sha(b"RAW_SHA = 123\n"), + "original RAW_SHA is not a digest", rejected) + reject("executable_pin_expression", lambda: v.literal_raw_sha(b"RAW_SHA = side_effect()\n"), + "malformed node or string", rejected) + return {"actual_original_pin_matches": True, "rejections": rejected} + + +def receipt_checks(v, temporary): + value = {"integer": 1, "boolean": True, "nested": {"ordered": [1, 2, 3]}} + root = fixture(temporary / "receipt", { + "frozen/receipt.json": json.dumps(value).encode(), + }) + f = v.Frozen(root) + f.check_all() + f.compare("frozen/receipt.json", copy.deepcopy(value)) + rejected = [] + mutations = { + "boolean_for_integer": dict(value, integer=True), + "float_for_integer": dict(value, integer=1.0), + "integer_for_boolean": dict(value, boolean=1), + "nested_omission": dict(value, nested={}), + "list_reordering": dict(value, nested={"ordered": [1, 3, 2]}), + "list_truncation": dict(value, nested={"ordered": [1, 2]}), + } + for name, altered in mutations.items(): + reject(name, lambda altered=altered: f.compare("frozen/receipt.json", altered), + "complete receipt mismatch", rejected) + (root / "frozen/receipt.json").unlink() + reject("missing_fixed_receipt", lambda: f.compare("frozen/receipt.json", value), + "receipt.json", rejected) + need(not (root / "frozen/receipt.json").exists(), "missing receipt was regenerated") + (root / "frozen/receipt.json").write_bytes(json.dumps(value).encode()) + saved = v.need + try: + v.need = lambda ok, message: ( + None if message.startswith("complete receipt mismatch") else saved(ok, message)) + try: + reject("disabled_receipt_gate", + lambda: f.compare("frozen/receipt.json", mutations["boolean_for_integer"]), + "complete receipt mismatch", []) + except ValueError as error: + need(str(error) == "control accepted: disabled_receipt_gate", + "receipt check deletion sensitivity") + else: + raise ValueError("receipt mutation survived deletion of its target check") + finally: + v.need = saved + return {"rejections": rejected, "deleted_named_check_detected": True} + + +def compression_checks(v, temporary): + plain = b'{"all":"original bytes","ordered":[1,2,3]}\n' + name = "frozen/original.json.gz" + root = fixture(temporary / "compression", + {name: gzip.compress(plain, mtime=0)}, {name: plain}) + f = v.Frozen(root) + f.check_all() + need(f.decoded(name) == plain, "complete decompression") + rejected = [] + changed = gzip.compress(b'{"all":"different bytes","ordered":[1,2,3]}\n', mtime=0) + (root / name).write_bytes(changed) + reject("changed_compressed_bytes", f.check_all, "frozen input changed", rejected) + # Both manifests must agree about storage bytes before the separate + # original-byte binding can be reached. + f.hashes[name] = sha(changed) + reject("origin_container_hash_mismatch", f.check_all, + "origin container binding differs", rejected) + origins = json.loads((root / "ORIGINS.json").read_bytes()) + origins[name]["sha256"] = sha(changed) + (root / "ORIGINS.json").write_text(json.dumps(origins)) + reject("changed_decompressed_original", f.check_all, + "compressed original bytes changed", rejected) + equivalent = gzip.compress(plain, mtime=17) + (root / name).write_bytes(equivalent) + f.hashes[name] = sha(equivalent) + origins[name]["sha256"] = sha(equivalent) + (root / "ORIGINS.json").write_text(json.dumps(origins)) + f.check_all() + need(f.decoded(name) == plain, "equivalent compression rejected") + (root / "ORIGINS.json").write_text("{}") + reject("origin_inventory_omission", f.check_all, + "origin and frozen inventories differ", rejected) + (root / "ORIGINS.json").write_text(json.dumps(origins)) + f.check_all() + return {"rejections": rejected, "equivalent_storage_with_same_original_accepted": True} + + +def mathematical_checks(v, package): + import ast + import hashlib + from types import SimpleNamespace + frozen = v.Frozen(package) + frozen.check_all() + source = v.SourcePath(frozen, {"recipe.py": "frozen/upstream/global_k.py"}) + api = SimpleNamespace(parse=v.recipe_tree, FunctionDef=ast.FunctionDef, Module=ast.Module) + names = ["need", "reduce_word", "inverse_word", "add", "left", "identity", "serial", + "recipe", "old_word", "hybrid_word", "apply", "evaluate", "transpose_operator_word", + "transpose_operators", "product", "receipt"] + hybrid = frozen.functions("frozen/hybrid/closed_hybrid.py", names, + {"ast": api, "compile": v.compile_checked, + "sha256": hashlib.sha256, "RECIPE": source / "recipe.py", + "PIN": "20ecf2891d80b5acf18d980b2164fb44ea7faa90"}) + good = hybrid.receipt() + frozen.compare("frozen/hybrid/CLOSED-HYBRID.json", good) + namespace = hybrid.receipt.__globals__ + original_apply, original_need = namespace["apply"], namespace["need"] + fault = {"used": False} + def changed_inverse(rows, event, backwards=False): + if backwards and event["kind"] == "code" and not fault["used"]: + fault["used"] = True + return original_apply(rows, event, backwards=False) + return original_apply(rows, event, backwards) + rejected = [] + try: + namespace["apply"] = changed_inverse + reject("one_actual_inverse_code_runs_forward", hybrid.receipt, + "literal reverse-inverse cleanup", rejected) + need(fault["used"], "actual inverse-code fault was not reached") + namespace["need"] = lambda ok, message: ( + None if message == "literal reverse-inverse cleanup" else original_need(ok, message)) + fault["used"] = False + try: + reject("disabled_literal_inverse_gate", hybrid.receipt, + "literal reverse-inverse cleanup", []) + except ValueError as error: + need(str(error) == "control accepted: disabled_literal_inverse_gate", + "mathematical check deletion sensitivity") + else: + raise ValueError("inverse mutation survived deletion of its target check") + need(fault["used"], "deleted-gate fault was not reached") + finally: + namespace["apply"], namespace["need"] = original_apply, original_need + independent = frozen.module("frozen/reviews/recipe/check.py") + def fail(message): + raise ValueError(message) + accepted = independent["reject"]("intended_fixture", lambda: fail("INTENDED"), "INTENDED") + need(accepted["rejection"] == "INTENDED", "independent intended-gate fixture") + reject("independent_control_rejects_unrelated_error", + lambda: independent["reject"]( + "unrelated_fixture", lambda: fail("UNRELATED"), "INTENDED"), + "wrong rejection for unrelated_fixture", rejected) + return {"actual_authenticated_function": "closed_hybrid.receipt", + "formal_input_rows": 8, "coefficient_ring": good["coefficient_ring"], + "one_literal_inverse_code_direction_changed_after_authentication": True, + "rejections": rejected, "deleted_named_check_detected": True} + + +def real_receipts(v, package): + frozen = v.Frozen(package) + names = [ + "frozen/hybrid/CLOSED-HYBRID.json", + "frozen/hybrid/EARLY-PROMOTION.json", + "frozen/recipe/BIT-NILPOTENT-RECIPE.json", + "frozen/reviews/recipe/CHECKS.json.gz", + "frozen/reviews/hybrid/CHECKS.json.gz", + ] + result = [] + + def leaves(value, path=()): + if isinstance(value, dict): + for key in sorted(value): + yield from leaves(value[key], path + (key,)) + elif isinstance(value, list): + for key, item in enumerate(value): + yield from leaves(item, path + (key,)) + else: + yield path, value + + for name in names: + value = frozen.data(name) + frozen.compare(name, copy.deepcopy(value)) + need(type(value) is dict and len(value) > 1, "real receipt structure") + changed = copy.deepcopy(value) + path, old = max(leaves(value), key=lambda item: len(item[0])) + need(len(path) > 1, "real receipt nested coverage") + parent = changed + for key in path[:-1]: + parent = parent[key] + if type(old) is bool: + parent[path[-1]] = not old + elif type(old) is int: + parent[path[-1]] = old + 1 + elif type(old) is str: + parent[path[-1]] = old + "-MUTATED" + else: + parent[path[-1]] = {"mutated": True} + rejected = [] + reject("real_nested_field_mutation", + lambda: frozen.compare(name, changed), "complete receipt mismatch", rejected) + omitted = copy.deepcopy(value) + parent = omitted + for key in path[:-1]: + parent = parent[key] + del parent[path[-1]] + reject("real_nested_field_omission", + lambda: frozen.compare(name, omitted), "complete receipt mismatch", rejected) + result.append({"receipt": name, "sha256": sha(frozen.raw(name)), + "mutated_nested_path": list(path), "rejections": rejected}) + return result + + +def child(package): + v, verifier_hash = load_verifier(package) + with tempfile.TemporaryDirectory(prefix="b07-controls-") as temp: + temporary = Path(temp).resolve() + result = { + "source_selection": source_checks(v, temporary), + "nested_sources": nested_source_checks(v, temporary), + "literal_source_pin": literal_pin_checks(v, package), + "receipt_contract": receipt_checks(v, temporary), + "compressed_original_binding": compression_checks(v, temporary), + "mathematical_controls": mathematical_checks(v, package), + "complete_real_receipts": real_receipts(v, package), + } + return {"parent_optimization": sys.flags.optimize, "verifier_sha256": verifier_hash, **result} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--package", type=Path, required=True) + parser.add_argument("--output", type=Path) + parser.add_argument("--child", action="store_true") + args = parser.parse_args() + package = args.package.resolve() + if args.child: + print(canonical(child(package))) + return + before = {name: sha((package / name).read_bytes()) + for name in ("verify.py", "FROZEN-SHA256.json", "ORIGINS.json")} + results = [] + for optimized in (False, True): + command = [sys.executable, "-I", "-B"] + if optimized: + command.append("-O") + command += [str(Path(__file__).resolve()), "--package", str(package), "--child"] + proc = subprocess.run(command, capture_output=True, text=True) + need(proc.returncode == 0, proc.stderr + proc.stdout) + results.append(json.loads(proc.stdout)) + need(all(sha((package / name).read_bytes()) == expected for name, expected in before.items()), + "verification core changed during compact controls") + need(all(x["verifier_sha256"] == before["verify.py"] for x in results), + "mixed verifier versions") + report = {"status": "PASS_B07_COMPACT_SOURCE_AND_MATHEMATICAL_GATES", + "source_hashes": before, "runs": results, + "route_census_or_general_B_replayed": False, + "small_fixed_hybrid_word_replayed": True, "no_new_kappa": True} + if args.output: + args.output.write_text(json.dumps(report, sort_keys=True, indent=2) + "\n") + print(canonical(report)) + + +if __name__ == "__main__": + main() diff --git a/research/bit-fixed-controller-repairs/frozen/geometry/E8.json.gz b/research/bit-fixed-controller-repairs/frozen/geometry/E8.json.gz new file mode 100644 index 0000000000..8bec1751f7 Binary files /dev/null and b/research/bit-fixed-controller-repairs/frozen/geometry/E8.json.gz differ diff --git a/research/bit-fixed-controller-repairs/frozen/geometry/MATRICES.json b/research/bit-fixed-controller-repairs/frozen/geometry/MATRICES.json new file mode 100644 index 0000000000..b73bf60626 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/geometry/MATRICES.json @@ -0,0 +1,1118 @@ +{ + "matrices": { + "B0": [ + 39, + 272, + 193 + ], + "C": [ + 1525985549154159990308229050892137, + 868815842344965628299048346020156, + 921600628995998434986948263566170 + ], + "C0": [ + 39, + 193, + 272 + ], + "F9": [ + 38, + 37, + 35, + 47, + 486, + 32, + 401, + 439, + 486 + ], + "H": [ + 2435152141571036339947241132521486, + 1676235005588950225218933581500878, + 1985881855729225176177634927700398, + 576460752303423479, + 2596069508172130947062333349822703, + 309485009244884317495099359, + 10140895326260170442259558318015, + 2586086145551572543258365643440255, + 2589398147263233519358262897489001, + 2592804859121274158248396097259625, + 2592757506467882867942327749505385, + 2589350696924854570449116603662953, + 2592757607046729626097202769225065, + 2589398046688157573239251990943081, + 1734130175483521454113919338159274, + 872127581635430275692856302967978, + 1734082824753018225619070127219626, + 872080229941564978246942081967018, + 1734082638102400486742802049377194, + 872080416603461748079412450059178, + 1734129989784902589838982619225258, + 872127767322601782224528012057770, + 1727411440318023397244010205189692, + 1730818316584958295536456233036092, + 865409096642019473566534911481404, + 868815842344965628299048312465724, + 1730818250503269321255597434906940, + 1727411504793977486514998242612796, + 868815908432870002457488389400892, + 865409032159589424156957136475708, + 2074858996396035948243032183350476, + 521289741389326929135848345773260, + 2074874778680810587002010371677132, + 521273956203100808511232534174668, + 2072878290888070053094984619596748, + 523270444007074256637602259213260, + 2072894076062932979370040723563724, + 523254661710936423529209318401228, + 2076939870114869318455535043620442, + 2070839202466181082725842274750810, + 519208660696083532087046669348442, + 525309130074591671054823598068058, + 2076913464757075216842810317853018, + 2070812995372221397883440020581978, + 519234867789959053610134593065306, + 525335535432301609385342510820954, + 1040477090824847938641120621672601, + 1557678348740587315422543376644249, + 1555671525429274415289046754834585, + 1040450598424477833956020544161689, + 1555697645480573934758181972035481, + 1038496385959229956686199488153497, + 1036415348463713915987060390989071, + 1559717362350266569457138779189775, + 1553616728556518518103859291114767, + 1553632511808493436610737168036367, + 1559733145605930584577179433667855, + 1036431132679051268236573095129615, + 1042531635912499996902255866825999, + 2442837275459972787867604775352560, + 153311153807439872482697688135920, + 153381061151871645922135271262192, + 2435152141571032296831911913588720, + 160996287696368250945970177312752, + 2435082234226561323937622632167664, + 161066195040797725438535476181232, + 2436839364805697551520070573952358, + 2441080144874030676477440684772710, + 2436881146555144115750106525659750, + 155110066145707204895318291460710, + 159309064460461694903411553799526, + 155068284390874191395430580669798, + 159267282707252382191578237432422, + 921600628986554049220172345615525, + 1682191151535119421842017996924069, + 921642409864502096000228197292965, + 1682232931534707996362662452239269, + 1674547800120299651826471254205605, + 913957277411173124529028742931621, + 1674506018760669530239658887633829, + 913915496448222481057609187695525, + 919913369774626757624573998837299, + 1680503778976952268902256777719347, + 1676304630755838562290390870348083, + 1676235037732122190192959896858163, + 1680434060224950656924623320813875, + 915644568083505924911912553377331, + 919843634097663672590244470411571, + 613258455012551051935980706536643, + 1982889317737070288973385274694851, + 613271454662945717308722385052611, + 1982873535281552587068141812638659, + 1982884713009696305588313795796163, + 613248589040009093434313723026627, + 1982855929623799733803660893807555, + 613232804024526035955953525908419, + 616739979317472700226294587053653, + 610084907965218710579626836486485, + 1979012216963470485452010633025109, + 1985271336101041249538680574437717, + 1978061571187198456537696014685781, + 1983369763776710285739684119177557, + 611748697252973517619043237877333, + 1059466916186105936643779914809238, + 1505680090170857789839556165861270, + 1485975326376127769826014943428502, + 989056453791076342151881663283094, + 1364281031450268375981883671625622, + 745667375834477930338916844797846, + 420571176367129553061060905975702, + 227888122428023580164624009756566 + ], + "Hinv": [ + 1036431066917147235800910130679281, + 155110066146297500705676997112420, + 159267282711974748674447882646114, + 2596069508172130947062333349822711, + 2592804859121274348434640409261446, + 915644696935251980586125816851987, + 872080229941564630634031984516117, + 2435152141571036908517930340976496, + 1036431066917147340706634380243727, + 1734082638102400139253257160253013, + 1070186092205683326968000072549481, + 10062283715840703413139600820479, + 2070839299192822143208225543290533, + 1982889664769853447109413392301251, + 10140895326260170442259558334463, + 1073192063923781737161094643124736, + 1982876011161631157828691610952643, + 1730739332625394452960466601203260, + 1036415348463713920490660018621711, + 153311153807441025404202294458608, + 1676304640427245119207424269046067, + 2072894076062932979370109445137612, + 2592757607046729823220815696431766, + 521289741389326929135850501645516, + 1526516934907711552607934707580777, + 915714280287592924605916055507251, + 1529546280007629316466569637415424, + 913915659233118696859702544196698, + 2596148119782403992920180245135359, + 519208559152544495809438779953573, + 1724020661944812032040721224196949, + 2074858687878086373295512064566476, + 1069631494359702562103442484674409, + 161066195040834618926674305349872, + 1982335066357199084675559718855619, + 1682232770034295463901145688597594, + 309485009244884386214576127, + 1040450783786839878381303724685414, + 921642409902281374218549567530074, + 1522956365343631975573826916682240, + 613272418105783168125849809511363, + 2441038363121116313561770190753177, + 610243364290247069726968685532842, + 2442837275459973364319560985753840, + 919843788840168583280371018846515, + 1525985710433553159048016831020905, + 1559717362350266578393969289753103, + 2442767368115540430806845405513712, + 2589350794613531380503080241935766, + 2586086145551572542695415690019071, + 1557678348740587010692700823783270, + 2441080237893630186555866680079001, + 3343570146139651513252439979414, + 1680503732332161711328218476801587, + 1069608120987932092906184992178281, + 1724068199325848799989509063547989, + 1042515917458920518617178903785999, + 1979329129613527234925030038055338, + 160996287696377186087630880376816, + 2441038458694039975247170088258969, + 523254661710935270607842150507724, + 865409032159587118313948459652668, + 1559733145605926044948755044207887, + 921642571468395098107766871008346, + 2586007224475014265204571375681535, + 610243267866221556537671819466410, + 1066602199611267145957523985156608, + 1040450598424330560229834852055142, + 1727411440317728249338830856558140, + 1042531700711485471725527578856719, + 1724020847630802946951674450305877, + 1680434098908215701351322088804659, + 1069631333068407784622856786853737, + 1042515851702917970256945386992143, + 160996558778007789427806529390576, + 1680503783774876615497816314834483, + 2074874472988755648007628401728460, + 1682190989289015706944831957343066, + 2076913561779686215541178679176869, + 1040477091429311152337862183700326, + 159309063252716656154253577745049, + 1522970289324512316543001337427200, + 2586086445383918843719784033403135, + 525309217129826174621822736395941, + 862065585171582474812111242026069, + 1559717257902736069339629582971407, + 610266650909441257157848505248170, + 2442767484456855233445308305491952, + 1982890246192099753008591449038019, + 1674547181301395389389199079005018, + 10063216987831545060963121086719, + 1038472369438856867742494982834022, + 6802684102716385337231157441942, + 1036441036199365695393960363979279, + 1985862048688596610093236541712810, + 1676274619670207470772119047417395, + 616739979317472863988461902768554, + 2434993414145487461660084877920240, + 915327732804701322897805558771251, + 1527173970883544922338623569084521, + 2594801552922449744736548978426111, + 521770168990415348554375416786597, + 1560741940843478793159745611581286, + 924056702458973789388645014594650, + 498926251092431692274353096085925, + 573248269215565368432219967660995, + 949866627363996986502486023640636, + 1391357451727305172726679790308623, + 2110563955902126796107423785679088, + 1943720399151029217252402151754390, + 228442881570021188546502354190185 + ], + "J": [ + 10141204792381678636617894477822, + 2586086450219622122178300732227837, + 2596069203522677974138045681631483, + 576460752303423479, + 2596069508172130947062333349822703, + 309485009244884317495099359, + 10140895326260170442259558318015, + 2586086145551572543258365643440255, + 2589398147263233519358262897489001, + 2592804859121274158248396097259625, + 2592757506467882867942327749505385, + 2589350696924854570449116603662953, + 2592757607046729626097202769225065, + 2589398046688157573239251990943081, + 1734130175483521454113919338159274, + 872127581635430275692856302967978, + 1734082824753018225619070127219626, + 872080229941564978246942081967018, + 1734082638102400486742802049377194, + 872080416603461748079412450059178, + 1734129989784902589838982619225258, + 872127767322601782224528012057770, + 1727411440318023397244010205189692, + 1730818316584958295536456233036092, + 865409096642019473566534911481404, + 868815842344965628299048312465724, + 1730818250503269321255597434906940, + 1727411504793977486514998242612796, + 868815908432870002457488389400892, + 865409032159589424156957136475708, + 2074858996396035948243032183350476, + 521289741389326929135848345773260, + 2074874778680810587002010371677132, + 521273956203100808511232534174668, + 2072878290888070053094984619596748, + 523270444007074256637602259213260, + 2072894076062932979370040723563724, + 523254661710936423529209318401228, + 2076939870114869318455535043620442, + 2070839202466181082725842274750810, + 519208660696083532087046669348442, + 525309130074591671054823598068058, + 2076913464757075216842810317853018, + 2070812995372221397883440020581978, + 519234867789959053610134593065306, + 525335535432301609385342510820954, + 1040477090824847938641120621672601, + 1557678348740587315422543376644249, + 1555671525429274415289046754834585, + 1040450598424477833956020544161689, + 1555697645480573934758181972035481, + 1038496385959229956686199488153497, + 1036415348463713915987060390989071, + 1559717362350266569457138779189775, + 1553616728556518518103859291114767, + 1553632511808493436610737168036367, + 1559733145605930584577179433667855, + 1036431132679051268236573095129615, + 1042531635912499996902255866825999, + 2442837275459972787867604775352560, + 153311153807439872482697688135920, + 153381061151871645922135271262192, + 2435152141571032296831911913588720, + 160996287696368250945970177312752, + 2435082234226561323937622632167664, + 161066195040797725438535476181232, + 2436839364805697551520070573952358, + 2441080144874030676477440684772710, + 2436881146555144115750106525659750, + 155110066145707204895318291460710, + 159309064460461694903411553799526, + 155068284390874191395430580669798, + 159267282707252382191578237432422, + 921600628986554049220172345615525, + 1682191151535119421842017996924069, + 921642409864502096000228197292965, + 1682232931534707996362662452239269, + 1674547800120299651826471254205605, + 913957277411173124529028742931621, + 1674506018760669530239658887633829, + 913915496448222481057609187695525, + 919913369774626757624573998837299, + 1680503778976952268902256777719347, + 1676304630755838562290390870348083, + 1676235037732122190192959896858163, + 1680434060224950656924623320813875, + 915644568083505924911912553377331, + 919843634097663672590244470411571, + 613258455012551051935980706536643, + 1982889317737070288973385274694851, + 613271454662945717308722385052611, + 1982873535281552587068141812638659, + 1982884713009696305588313795796163, + 613248589040009093434313723026627, + 1982855929623799733803660893807555, + 613232804024526035955953525908419, + 616739979317472700226294587053653, + 610084907965218710579626836486485, + 1979012216963470485452010633025109, + 1985271336101041249538680574437717, + 1978061571187198456537696014685781, + 1983369763776710285739684119177557, + 611748697252973517619043237877333, + 1059466916186105936643779914809238, + 1505680090170857789839556165861270, + 1485975326376127769826014943428502, + 989056453791076342151881663283094, + 1364281031450268375981883671625622, + 745667375834477930338916844797846, + 420571176367129553061060905975702, + 227888122428023580164624009756566 + ], + "K": [ + 496, + 22, + 511, + 25, + 21, + 499, + 26, + 508, + 118, + 488, + 415, + 491, + 117, + 412, + 217, + 161, + 174, + 214, + 324, + 316, + 307, + 331, + 295, + 185, + 351, + 193, + 339, + 205, + 299, + 181, + 179, + 290, + 196, + 341, + 199, + 342, + 176, + 289, + 164, + 314, + 309, + 171, + 313, + 167, + 168, + 310, + 493, + 405, + 124, + 112, + 481, + 409, + 398, + 104, + 502, + 385, + 31, + 505, + 103, + 445, + 454, + 91, + 457, + 434, + 84, + 47, + 478, + 55, + 425, + 59, + 421, + 76, + 466, + 265, + 369, + 382, + 262, + 370, + 266, + 261, + 381, + 286, + 358, + 248, + 357, + 251, + 285, + 131, + 138, + 283, + 253, + 364, + 241, + 352, + 134, + 279, + 372, + 234, + 229, + 379, + 271, + 145, + 158, + 475, + 419, + 74, + 50, + 416, + 472, + 49, + 73 + ], + "M": [ + 507, + 135, + 238, + 349, + 185, + 437, + 205, + 503, + 425 + ], + "N": [ + 506, + 133, + 234, + 341, + 169, + 405, + 141, + 375, + 169 + ], + "Q": [ + 1525985549154159990308229050892137, + 921600628995998434986948263566170, + 868815842344965628299048346020156, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "R": [ + 2589350794613531190557368506174057, + 2592804956806343667382164200032873, + 1038469893558777993237266185156761, + 1557652228689369648595160641472409, + 1042515851693473237291206096564751, + 2442767368115540430947582893869040, + 2441038363121116511671115291243110, + 915714330356837041509315611365683, + 610243267866258280493576590715221 + ], + "S": [ + 1, + 1, + 1, + 1, + 7, + 0, + 6, + 3, + 5 + ], + "T": [ + 3, + 1, + 1, + 0, + 4, + 1, + 2, + 2, + 4 + ], + "W": [ + 10, + 59, + 466, + 21, + 497, + 247, + 207, + 457, + 19, + 349, + 43, + 391, + 201, + 241, + 26, + 82, + 364, + 292, + 398, + 454, + 248, + 176, + 108, + 290, + 36, + 362, + 448, + 142, + 392, + 198, + 297, + 345, + 95, + 47, + 133, + 245, + 499, + 387, + 359, + 41, + 279, + 89, + 243, + 445, + 131, + 461, + 104, + 32, + 24, + 508, + 396, + 452, + 394, + 140, + 450, + 180, + 506, + 252, + 434, + 435, + 289, + 181, + 31, + 141, + 395, + 281, + 81, + 105, + 295, + 397, + 195, + 251, + 437, + 16, + 88, + 358, + 302, + 130, + 202, + 500, + 444, + 94, + 22, + 344, + 204, + 386, + 132, + 458, + 283, + 363, + 109, + 29, + 393, + 505, + 255, + 143, + 365, + 35, + 285, + 83, + 511, + 177, + 399, + 356, + 300, + 276, + 348, + 502, + 446, + 390, + 462 + ], + "X": [ + 357, + 447, + 80, + 436, + 196, + 39, + 287, + 272, + 193 + ], + "X0": [ + 82, + 408, + 119, + 436, + 5, + 0, + 15, + 0, + 0 + ], + "selected": [ + 0, + 1, + 2 + ] + }, + "producer": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/helper-boundary/BIT-THREE-ROW.json", + "producer_contract": { + "copied_snapshots": "Two unchanged arbitrary-helper snapshots per each of three target rows", + "final_frames": "source FULL; target Pp-perp; helper FULL", + "forward": "(x,y,h)->(Ax,y+Ax,h)", + "initial_frames": "source Pp; target0; helper0", + "literal_inverse": "(x,y,h)->(A^-1 x,y+x,h)", + "matrix_names": "H=A, Hinv=A^-1; J Hinv=I+Q" + }, + "producer_forward": { + "copies": 6, + "dirty_helpers_restored": 438, + "endpoint_sha256": "687b53099896320c0351e6ae9fae326b19c092904845bbd1d68a05871d497b16", + "max_live_copies": 1, + "nonzero_output_rows": 660, + "paths_sha256": "ffaf7043f1b2b615dc2b11ca0adf7925b3c6b662f745243018b7bddfeb39ae80", + "profile": { + "1": 1328, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 9 + }, + "public_columns": 660, + "rank_mass": 5064 + }, + "producer_positive": { + "applicability": "Numerical screen only; changed source-code interface not admitted", + "forward": 3320097058, + "historical_local_guard_pass": false, + "historical_nine_guard_pass": false, + "local_bits": 173, + "nine_bits": 320, + "reverse": 60206953888 + }, + "producer_receipt_sha256_at_snapshot": "3e7af7fb5809844c97dd2f637f51463c2387d8a5da5a0ce98a371ae58f668b80", + "producer_reverse": { + "copies": 6, + "dirty_helpers_restored": 438, + "endpoint_sha256": "5bfc936d72331eecef8967246fbb242dc06fa6b7945c70ed0d24553496018783", + "max_live_copies": 1, + "nonzero_output_rows": 660, + "paths_sha256": "06c4cac22b8ef3107c1068db48bc18d58247d95c75c88ecc9695c0d3d0cbc996", + "profile": { + "1": 1328, + "2": 1342, + "3": 79, + "4": 44, + "5": 102, + "6": 11, + "7": 9 + }, + "public_columns": 660, + "rank_mass": 5064 + }, + "schema": "bit-three-row-audit-input-v1", + "source_code": { + "B": [ + 1070186092205683326968000072548457, + 872127581635430275692856303000746, + 521289741389326929135850493256908, + 8, + 153311153807441025404202294982896, + 32, + 64, + 128, + 1529532302407315035771526049019136, + 1522956415691818522681327695006208, + 1024, + 2048, + 4096, + 8192, + 2586007533941153643822988606291968, + 32768, + 65536, + 131072, + 262144, + 524288, + 1048576, + 2097152, + 4194304, + 8388608, + 16777216, + 33554432, + 67108864, + 134217728, + 268435456, + 536870912, + 2596148119782404569380930669510656, + 2147483648, + 4294967296, + 8589934592, + 17179869184, + 34359738368, + 68719476736, + 137438953472, + 274877906944, + 549755813888, + 1099511627776, + 2199023255552, + 4398046511104, + 8796093022208, + 17592186044416, + 35184372088832, + 70368744177664, + 140737488355328, + 281474976710656, + 562949953421312, + 1125899906842624, + 2251799813685248, + 4503599627370496, + 9007199254740992, + 18014398509481984, + 36028797018963968, + 72057594037927936, + 144115188075855872, + 288230376151711744, + 2596148429267413237804495861186560, + 1152921504606846976, + 2305843009213693952, + 4611686018427387904, + 9223372036854775808, + 18446744073709551616, + 36893488147419103232, + 73786976294838206464, + 147573952589676412928, + 295147905179352825856, + 590295810358705651712, + 1180591620717411303424, + 2361183241434822606848, + 4722366482869645213696, + 9444732965739290427392, + 18889465931478580854784, + 37778931862957161709568, + 75557863725914323419136, + 151115727451828646838272, + 302231454903657293676544, + 604462909807314587353088, + 1208925819614629174706176, + 2417851639229258349412352, + 4835703278458516698824704, + 9671406556917033397649408, + 19342813113834066795298816, + 38685626227668133590597632, + 77371252455336267181195264, + 154742504910672534362390528, + 309485009821345068724781056, + 618970019642690137449562112, + 1237940039285380274899124224, + 2475880078570760549798248448, + 4951760157141521099596496896, + 9903520314283042199192993792, + 19807040628566084398385987584, + 39614081257132168796771975168, + 79228162514264337593543950336, + 158456325028528675187087900672, + 316912650057057350374175801344, + 633825300114114700748351602688, + 1267650600228229401496703205376, + 2535301200456458802993406410752, + 5070602400912917605986812821504, + 10141204801825835211973625643008, + 20282409603651670423947251286016, + 40564819207303340847894502572032, + 81129638414606681695789005144064, + 162259276829213363391578010288128, + 324518553658426726783156020576256, + 649037107316853453566312041152512, + 1298074214633706907132624082305024 + ], + "D": [ + 209, + 344, + 28, + 370, + 191, + 392, + 12, + 394, + 24 + ], + "fanout_adds": 504, + "middle": [ + 1073758465, + 576460752303440144, + 276, + 1073759007, + 576460752303440642, + 576460752303440695, + 576460753377166167, + 576460753377181847, + 1073742615, + 576460753377165328, + 1073759489, + 576460752303442433, + 576460752303444225, + 576460753377173761, + 20, + 32770, + 1073808130, + 1073890050, + 576460752303686402, + 576460752303964930, + 576460753378230274, + 576460753379262466, + 4194836, + 8388884, + 16794132, + 33571092, + 576460753444274452, + 576460753511383572, + 576460753645617428, + 576460753914053140, + 576460753377165330, + 2147483652, + 4294984452, + 9663693572, + 576460769483293444, + 576460787736904452, + 576460822096658436, + 576460889742393348, + 274877907474, + 549755814162, + 1100585370130, + 2200096997650, + 576465150349951250, + 576469548396462610, + 576478345563226386, + 576495937749271058, + 70368744177681, + 140737488371729, + 281476050452497, + 577023702256861969, + 577586653284025105, + 578712553190851345, + 580964351930794247, + 585467951558181383, + 594475150812922119, + 612489550396129799, + 648518347415093511, + 720575941453038087, + 864691129528893703, + 272, + 1152921504606846992, + 2882303761517134608, + 4611686019501130512, + 9799832790231941904, + 19023204827086733328, + 36893488148492861456, + 73786976294838206726, + 147573952590750171398, + 295147905180426584582, + 590872271111009075718, + 1181168081469714727174, + 2361759702188199788806, + 4722942943623022395910, + 9444732965739290427397, + 18889465931478580871173, + 37778931862958235468549, + 75557863725915397161733, + 151116303912580950261765, + 302232031364409597116421, + 604463486268067964535557, + 1208926396075382551872261, + 2417851639229259423154707, + 4835703278458517772583443, + 9671406556917034471407891, + 19342813690294820172464659, + 38685626804128886967763219, + 77371253031797020558377491, + 154742505487133287739572499, + 309485009821345068724781059, + 618970019642690138523303939, + 1237940039285380275972883203, + 2475880078570760549798265603, + 4951760157717981851899920387, + 9903520314859502952570159107, + 19807040629142545151763170051, + 39614081257708629549075415811, + 79228162514264337593543967253, + 158456325028528675187087917333, + 316912650057057350375249560085, + 633825300114114700749425361173, + 1267650600228805862249006645781, + 2535301200457035263745709850901, + 5070602400913494066740190003733, + 10141204801825835211973625643798, + 20282409603651670423947251303190, + 40564819207303340847895576314646, + 81129638414606681695790078903062, + 162259276829213939852330313712406, + 324518553658427303243908324016918, + 649037107316854030027065418318614, + 1298074214633707483593377459487510 + ], + "pivots": [ + 0, + 1, + 2, + 4, + 8, + 9, + 14, + 30, + 59 + ], + "prepare_adds": 474, + "query": [ + 1070186092205683326968000072548457, + 872127581635430275692856303000746, + 521289741389326929135850493256908, + 153311153807441025404202294982896, + 1529532302407315035771526049019136, + 1522956415691818522681327695006208, + 2586007533941153643822988606291968, + 2596148119782404569380930669510656, + 2596148429267413237804495861186560 + ], + "quotient_adds": 35, + "unprepare_adds": 474 + }, + "source_gzip_sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022", + "source_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "source_word": "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "word_canonical_sha256": "b756b837a9bcfc3808fe85c5729f6c36269e65e68dacc95bb18ac91b50aa56fd", + "word_gzip_sha256": "b00f9492743418b40eb32d543ef0dcbe120ea121796b006dc9f88d2eacdd965e" +} diff --git a/research/bit-fixed-controller-repairs/frozen/geometry/R438.json.gz b/research/bit-fixed-controller-repairs/frozen/geometry/R438.json.gz new file mode 100644 index 0000000000..e12a566658 Binary files /dev/null and b/research/bit-fixed-controller-repairs/frozen/geometry/R438.json.gz differ diff --git a/research/bit-fixed-controller-repairs/frozen/hybrid/CLOSED-HYBRID.json b/research/bit-fixed-controller-repairs/frozen/hybrid/CLOSED-HYBRID.json new file mode 100644 index 0000000000..747541fb64 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/hybrid/CLOSED-HYBRID.json @@ -0,0 +1,670 @@ +{ + "coefficient_ring": "Z[free group(a0,...,a8)]", + "controls": [ + { + "defect": [ + [ + [ + [], + 0, + -1 + ], + [ + [], + 1, + 1 + ], + [ + [ + 1 + ], + 0, + 1 + ], + [ + [ + 2 + ], + 0, + 1 + ], + [ + [ + 2 + ], + 1, + -1 + ], + [ + [ + 2, + 1 + ], + 0, + -1 + ] + ], + [ + [ + [ + 1 + ], + 0, + -1 + ], + [ + [ + 1 + ], + 1, + 1 + ], + [ + [ + 1, + 1 + ], + 0, + 1 + ], + [ + [ + 1, + 2 + ], + 0, + 1 + ], + [ + [ + 1, + 2 + ], + 1, + -1 + ], + [ + [ + 1, + 2, + 1 + ], + 0, + -1 + ] + ], + [], + [], + [], + [], + [], + [] + ], + "first_bad_output": 0, + "mutation": "omit_current_B_pullback", + "rejected": true + }, + { + "defect": [ + [], + [ + [ + [ + 1 + ], + 0, + -2 + ] + ], + [], + [], + [], + [], + [], + [] + ], + "first_bad_output": 1, + "mutation": "wrong_compensation_sign", + "rejected": true + }, + { + "defect": [ + [ + [ + [], + 0, + -1 + ], + [ + [], + 1, + 1 + ], + [ + [ + 1 + ], + 0, + 1 + ], + [ + [ + 2 + ], + 2, + -1 + ], + [ + [ + 2, + 3 + ], + 2, + 1 + ], + [ + [ + 2, + 3, + -2 + ], + 0, + 1 + ], + [ + [ + 2, + 3, + -2 + ], + 1, + -1 + ], + [ + [ + 2, + 3, + -2, + 1 + ], + 0, + -1 + ] + ], + [ + [ + [ + 1 + ], + 0, + -1 + ], + [ + [ + 1 + ], + 1, + 1 + ], + [ + [ + 1, + 1 + ], + 0, + 1 + ], + [ + [ + 1, + 2 + ], + 2, + -1 + ], + [ + [ + 1, + 2, + 3 + ], + 2, + 1 + ], + [ + [ + 1, + 2, + 3, + -2 + ], + 0, + 1 + ], + [ + [ + 1, + 2, + 3, + -2 + ], + 1, + -1 + ], + [ + [ + 1, + 2, + 3, + -2, + 1 + ], + 0, + -1 + ] + ], + [], + [], + [], + [], + [], + [] + ], + "first_bad_output": 0, + "mutation": "stale_coded_F2", + "rejected": true + }, + { + "control_note": "Repeating the whole forward endpoint is a vacuous control here because the signed target is involutive; one actual inverse gate is changed instead.", + "mutation": "one_code_uses_forward_instead_of_inverse", + "rejected": true + } + ], + "dual_relations": "a_s^T are independent transpose symbols, not inverse symbols; chronological gatewise inverse-transpose matches transpose of full inverse", + "endpoint": [ + [ + [ + [], + 0, + 1 + ] + ], + [ + [ + [], + 1, + -1 + ] + ], + [ + [ + [], + 2, + 1 + ] + ], + [ + [ + [], + 3, + -1 + ] + ], + [ + [ + [], + 4, + 1 + ] + ], + [ + [ + [], + 5, + -1 + ] + ], + [ + [ + [], + 6, + 1 + ] + ], + [ + [ + [], + 7, + -1 + ] + ] + ], + "formal_input_rows": 8, + "invoice_per_replica": { + "R429_1499_ADD_code_scalar_invoice": 9216, + "additional_private_rank_one_equivalent": 420, + "clean_replacements_from_fullycoded": 7, + "excess_over_beta_002_allowance": 150, + "necessary_allowance_at_beta_002": 492, + "necessary_allowance_at_beta_003": 309, + "net_rank_mass_saved_vs_all_old_clean": -102, + "new_private_or_arbitrary_helper_fields_for_controller": 0, + "original_terminal_idle_split": false, + "source_code_applications": 6, + "terminal_normalization_rank_one_children": 222, + "total_extra_rank_one_equivalent": 642 + }, + "local_clean_stages": [ + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "local_coded_stages": [ + 0, + 1 + ], + "operator_relations": "only a_s^-1 a_s=a_s a_s^-1=1; no commutation", + "recipe_source_sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "scope": [ + "all eight independent public logical input banks, arbitrary values", + "old local ordinary dirty helper restoration used as explicit premise", + "actual complete 19-event B4 order including both bridge signs", + "exact group-ring coefficient and reverse-inverse proof; characteristic2 specialization valid", + "terminal two-N physical realization and local old/code tariffs are conditional source mechanisms" + ], + "status": "PASS_CLOSED_NONCOMMUTATIVE_HYBRID_NO_GAIN", + "terminal_before_decoder": [ + [ + [ + [ + -2 + ], + 0, + 1 + ], + [ + [ + -2 + ], + 1, + -1 + ], + [ + [ + -2, + 1 + ], + 0, + -1 + ] + ], + [ + [ + [ + -2 + ], + 0, + 1 + ] + ], + [ + [ + [], + 3, + -1 + ] + ], + [ + [ + [], + 2, + 1 + ] + ], + [ + [ + [], + 5, + -1 + ] + ], + [ + [ + [], + 4, + 1 + ] + ], + [ + [ + [], + 7, + -1 + ] + ], + [ + [ + [], + 6, + 1 + ] + ] + ], + "unresolved": [ + "no native global phase admission", + "no mixed 438/429 helper owner allocation or full width/stock moment", + "no source-access, precision, tape or outer all-size theorem", + "fails the necessary beta002 budget, so not a positive kappa candidate" + ], + "word": [ + { + "coded": true, + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "cut": "immediately after local0", + "kind": "code", + "native_level": 0, + "register": 0, + "side": "X", + "word": [ + -1 + ] + }, + { + "coded": true, + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "cut": "immediately after local1", + "kind": "code", + "native_level": 1, + "register": 0, + "side": "X", + "word": [ + -2 + ] + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "coded": false, + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "coded": false, + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "coded": false, + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "coded": false, + "kind": "local", + "pair": 2, + "reverse": true, + "stage": 5 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "coded": false, + "kind": "local", + "pair": 2, + "reverse": false, + "stage": 6 + }, + { + "coefficient": -1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "coded": false, + "kind": "local", + "pair": 3, + "reverse": true, + "stage": 7 + }, + { + "coded": false, + "kind": "local", + "pair": 3, + "reverse": false, + "stage": 8 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 2 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "direction": "cap_to_FULL", + "kind": "normalize", + "rank_one_children": 111, + "register": 1 + }, + { + "cut": "terminal after all idle owners return", + "kind": "code", + "native_level": 8, + "register": 1, + "side": "FULL", + "word": [ + 2 + ] + }, + { + "cut": "terminal after all idle owners return", + "kind": "code", + "native_level": 8, + "register": 0, + "side": "FULL", + "word": [ + 2 + ] + }, + { + "coefficient": -1, + "dst": 0, + "kind": "shear", + "src": 1 + }, + { + "cut": "terminal source preparation", + "kind": "code", + "native_level": 8, + "register": 1, + "side": "FULL", + "word": [ + 1 + ] + }, + { + "coefficient": 1, + "dst": 0, + "kind": "shear", + "src": 1 + }, + { + "cut": "terminal exact source unprepare", + "kind": "code", + "native_level": 8, + "register": 1, + "side": "FULL", + "word": [ + -1 + ] + }, + { + "direction": "FULL_to_cap", + "kind": "normalize", + "rank_one_children": 111, + "register": 1 + }, + { + "kind": "exchange" + } + ] +} diff --git a/research/bit-fixed-controller-repairs/frozen/hybrid/EARLY-PROMOTION.json b/research/bit-fixed-controller-repairs/frozen/hybrid/EARLY-PROMOTION.json new file mode 100644 index 0000000000..4da6f72e64 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/hybrid/EARLY-PROMOTION.json @@ -0,0 +1,93 @@ +{ + "R438_word_sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022", + "code_offdiagonal": { + "coefficient": 1, + "input_port": 0, + "output_port": 3 + }, + "controls": [ + "diagonal relative route fixes its physical root line", + "unpromoted zero flag is preserved by every relative route" + ], + "covered_domain": "exact rational address geometry and odd ADDRESS field F101; arbitrary binary VALUE delta at the listed input port/address", + "defect_outside_target_Pp": [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "2", + "0", + "0", + "0", + "0" + ], + "extra_undo_code_redo_charge": { + "rank_one_children_per_bank": 222, + "scalar_access_and_precision": "additional; not waived" + }, + "geometry_receipt": { + "address_prime": 101, + "full_root_word_sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", + "ordered_distinct_pairs_checked": 12210 + }, + "limits": [ + "does not exclude a new native factory accepting promoted Y", + "does not exclude a changed current-word N cancellation", + "no general lower bound or positive kappa claim" + ], + "logical_boundary": "initial Y ZERO -> P_p costs one111-port rank-one sweep; after promotion same-port X/Y scalar ADD is admitted but generic cross-port future A code is not", + "matrix_input_sha256": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979", + "native_address_input": [ + "2", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ], + "native_address_output": [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "2", + "0", + "0", + "0", + "0" + ], + "output_fresh_coordinates_mod101": [ + 0, + 0, + 2, + 0, + 0, + 0, + 0 + ], + "reason": "rho_s,q fixes P_q, but rho_s,p^-1 rho_s,q sends P_q into fresh E_s outside target P_p for p!=q", + "route_reconstruction_sha256": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b", + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "status": "PASS_ACTUAL_EARLY_PROMOTION_LOSES_FUTURE_CODE_ADMISSION" +} diff --git a/research/bit-fixed-controller-repairs/frozen/hybrid/README.md b/research/bit-fixed-controller-repairs/frozen/hybrid/README.md new file mode 100644 index 0000000000..2dc0f74022 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/hybrid/README.md @@ -0,0 +1,180 @@ +# Closed hybrid comparison and early-promotion witness + +Local-only mathematical work, scientific source pin +`20ecf2891d80b5acf18d980b2164fb44ea7faa90`. No primary checkout edit, +commit, push, Discussion post or PR was made. This lane does not establish +the requested positive beta .002/.003 construction. + +`closed_hybrid.py` reconstructs the actual 19-event B4 recipe from its pinned +primary source. It retains one exact changed word, all eight independent +input rows, its literal inverse, a separately composed inverse transpose, +and four defect-sensitive controls in `CLOSED-HYBRID.json`. + +## Assumptions and exact combined word + +The abstract coefficient ring is the integral free-group algebra on +independent invertible operators a0,...,a8. No two operators commute. +Transpose operators are independent symbols; they are not identified with +inverse operators. A coded forward/reverse pair is, respectively, + +``` +F_s(x,y) = (a_s x, y+a_s x), +B_s(x,y) = (x-y, a_s^-1 y). +``` + +Each local circuit's ordinary dirty helpers must restore for every entering +helper value; the private copied field must be zero outside its own +immutable lifetimes. Those are imported local-source premises. For actual +BIT suppliers, the target/source shear formula above is only asserted over +binary VALUE functions. The old signed integer lift can have even target +helper leakage, although its ordinary integer helpers restore. This abstract +group-ring proof is not an assertion that the signed native integer block +has an exact target coefficient a_s. + +Use the exact original 19-event order and both original bridge signs. The +bridge with coefficient c is + +``` +X_dst += c X_src; +Y_src -= c Y_dst. +``` + +Change only the following sections: + +1. Keep F0 and B1 coded. After F0 apply a0^-1 to X0. After B1 apply a1^-1 + to X0. These are legal past-code preparations immediately after the + respective local helper restoration cuts. +2. Use the original clean local suppliers at stages2,...,8. +3. After every old terminal idle and bridge, promote Y0 from its hole frame + to the common FULL frame by its 111 portwise rank-one D_P calls. All + owners have returned at this cut. +4. Apply Y0 := a1 Y0 and X0 := a1 X0. Then X0 -= Y0; prepare Y0 by a0; + X0 += Y0; unprepare Y0 by a0^-1. These operations are at the terminal + FULL cut and accept every past stage code. +5. Demote Y0 by the second 111-call D_P sweep and perform the original + final bank exchange. + +Every public source/target input is arbitrary. In particular Y0 is never +treated as clean workspace. At the cut before the new terminal normalization, +the actual current-word pullbacks are + +``` +X0 = a1^-1 ((I-a0)x0-y0), Y0 = a1^-1 x0, +Xi = -yi, Yi = xi, i=1,2,3. +``` + +Thus after the two a1 operations, X0=(I-a0)x0-y0 and Y0=x0. The paid +target compensation is exactly `X0 -= Y0; X0 += a0 Y0`, yielding -y0. +Preparing/unpreparing the source gives that second summand while restoring +the entire arbitrary source word. The final exchange matches the original +clean controller: `(Xout,Yout)=(x,-y)` over the abstract signed ring and +the corresponding identity over characteristic2. All eight rows, including +the six unchanged endpoint rows, are checked. + +The literal inverse reverses the entire changed invertible word and inverts +every code, ADD, local block and exchange. Inverse-transpose propagation is +also composed chronologically from each actual gate inverse and compared to +the transpose of the complete inverse. No orthogonality of a_s is assumed. + +## Paid comparison and stop result + +The assigned fully coded R429 comparator saves 60 complete rank-mass units +per local call relative to the old R438 clean supplier, including returned +idle owner work. Using that common comparator, this closed word adds + +``` +7 clean replacements *60 =420 rank-one-equivalent units/replica; +2 complete D_P sweeps =222 rank-one native children/replica; +total =642. +``` + +The parent supplied necessary extra-rank allowances 492 at beta .002 and +309 at beta .003. This word exceeds the former by150. Relative to the +entirely old clean word it saves only `2*60-222=-102` rank units. It fails +before new source-access, precision or physical-storage charges. + +The six added source-code applications cost `6*1499=8994` scalar ADDs for +the assigned R429 literal code/inverse. The two full-bank compensation ADDs +cost another222 scalar ADDs, for9216 added scalar ADDs per replica. The +normalizations add222 native rank-one children. No new private or ordinary +dirty helper field is introduced. No old terminal idle is split. These are +the complete added controller operations; the mixed seven-clean/two-coded +helper allocation and full rank histogram remain a separate source-bound +obligation. No speculative allocation improvement is credited against this +screening invoice. + +Controls remove the actual B1 pullback, flip an actual compensation sign, +restore a stale coded F2, or use the wrong direction for one actual inverse +code. Each changes the literal word and is rejected. Repeating the whole +forward word would be a vacuous inverse control because the signed clean +endpoint is involutive; that control was caught and replaced before retaining +the receipt. + +## Early promotion is a changed native premise + +`early_promotion.py` checks the root's alternative entrance cut. Promoting +Y0 from ZERO to P_p before F0 permits same-port scalar X/Y ADDs, but removes +the old future-code admission. The actual P012 code has offdiagonal +`A[3,0]=1`. On this entry the actual routed relative operator is +rho_(s,3)^-1 rho_(s,0). The source root-line vector at port0 is fixed by +rho_(s,0), but the other route sends it outside the target P_3 line into +the fresh E_s block. The exact rational witness has fresh coordinates + +``` +(0,0,2,0,0,0,0), also modulo101. +``` + +`EARLY-PROMOTION.json` records the full input/output ADDRESS vectors, +source hashes and the diagonal/zero-frame controls. The witness is for a +binary VALUE delta on the stated rational/odd-field ADDRESS domain. A +future code applied before promotion acts only on original Y dirt; an X +term added afterwards has not received that code. The unchanged F0 local +word also expects original Y entrance ZERO, so it cannot simply be reused +after promotion. Undo/code/redo at the old ZERO cut adds222 rank-one calls +per111-port bank, besides scalar access and precision. + +This excludes the particular free future-code admission after promotion. It +does not exclude a new promoted-input local factory, a proved current-word +N cancellation, or another changed controller. + +## Attribution and remaining implications + +The old B4 topology and native BIT factory belong to the retained +DreamingOfClouds/eumemic/PR555,543,545,510 lineage. Credit Ali Romman for the +R438 deletion/source builder and Sagar Thakrar for the transported R438 word +and hosting. The source-code preparation interface also has prior work in +Ali Romman's PR1862. The prior local run supplies the three-row P012 code, +its R429 support deletion, local arbitrary-helper checks and the 60-unit +complete owner-return comparison. The parent/native lane supplies the +conservative two-normalization completion and its111+111 tariff. The actual +E8 route reconstruction and fresh-fiber argument are retained predecessor +mechanisms in `../bit-endpoint/expanded_sections.py` and `FRESH-FIBER.md`. + +This lane adds the explicit two-coded/seven-clean closed controller, its +current-word terminal compensation, its independent formal inverse/dual +checks and its concrete failed budget; it also binds the early-promotion +failure to actual code entry[3,0]. Substantial OpenAI Codex assistance was +used. New material is Apache-2.0. + +The all-eight-input algebraic theorem is proved by finite symbolic exact +coefficient propagation, which gives an all-value identity for this fixed +word. The native global phase, mixed helper owners/stock, whole-word +rounding/COPY precision, source access, physical tape realization and outer +all-size multiplication theorem are not established. No formal-kernel proof +or new conditional kappa is claimed. + +## Reproduction and open next question + +From this directory, standard Python3 only: + +``` +python3 -B closed_hybrid.py +python3 -B early_promotion.py +``` + +The remaining positive obligation is a completely explicit changed word +with at most492 extra rank-one-equivalent units against the same comparator, +including its actual terminal correction and mixed owner/precision bills. +A dirty FULL reservoir must be tracked on all eight independent inputs; +neither a clean redundant snapshot nor a generic future code on a promoted +P_p bank is currently admitted. diff --git a/research/bit-fixed-controller-repairs/frozen/hybrid/closed_hybrid.py b/research/bit-fixed-controller-repairs/frozen/hybrid/closed_hybrid.py new file mode 100644 index 0000000000..35883919cf --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/hybrid/closed_hybrid.py @@ -0,0 +1,325 @@ +#!/usr/bin/env python3 +"""A closed, non-winning hybrid BIT B4 controller over a free group ring. + +No stored source or primary checkout is edited. This is a mathematical +comparison word, not a physical supplier admission or new kappa result. +Apache-2.0; prepared with substantial OpenAI Codex assistance. +""" +import argparse +import ast +from hashlib import sha256 +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +REPO = Path('/Users/ross/git/math/integer-mult-bounds') +PIN = '20ecf2891d80b5acf18d980b2164fb44ea7faa90' +RECIPE = REPO / ('research/e8-bit-p111-tuned/vendor/pr510/' + 'e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py') + + +def need(p, message): + if not p: + raise ValueError(message) + + +def reduce_word(word): + out = [] + for generator in word: + if out and out[-1] == -generator: + out.pop() + else: + out.append(generator) + return tuple(out) + + +def inverse_word(word): + return tuple(-x for x in reversed(word)) + + +def add(a, b, coefficient=1): + out = dict(a) + for key, value in b.items(): + out[key] = out.get(key, 0) + coefficient * value + if not out[key]: + del out[key] + return out + + +def left(row, word): + out = {} + for (suffix, column), value in row.items(): + key = (reduce_word(tuple(word) + suffix), column) + out[key] = out.get(key, 0) + value + if not out[key]: + del out[key] + return out + + +def identity(n=8): + return [{((), i): 1} for i in range(n)] + + +def serial(rows): + return [[[list(word), column, value] + for (word, column), value in sorted(row.items())] for row in rows] + + +def recipe(): + raw = RECIPE.read_bytes() + tree = ast.parse(raw) + function = next(x for x in tree.body + if isinstance(x, ast.FunctionDef) and x.name == 'recipe') + env = {} + exec(compile(ast.Module(body=[function], type_ignores=[]), + str(RECIPE), 'exec'), env) + events = env['recipe'](4) + need(len(events) == 19, 'actual B4 event count') + return events, sha256(raw).hexdigest() + + +def old_word(events): + return [dict(e, coded=False) if e['kind'] == 'local' else dict(e) + for e in events] + + +def hybrid_word(events, mutation=None): + out = [] + for event in events: + if event['kind'] == 'local': + stage = event['stage'] + coded = stage in (0, 1) + if mutation == 'stale_coded_F2' and stage == 2: + coded = True + out.append(dict(event, coded=coded)) + if stage in (0, 1): + if mutation == 'omit_current_B_pullback' and stage == 1: + continue + out.append({'kind': 'code', 'register': 0, + 'word': [-(stage + 1)], + 'cut': 'immediately after local' + str(stage), + 'side': 'X', 'native_level': stage}) + elif event['kind'] == 'exchange': + out.append({'kind': 'normalize', 'register': 1, + 'direction': 'cap_to_FULL', 'rank_one_children': 111}) + out.append({'kind': 'code', 'register': 1, 'word': [2], + 'cut': 'terminal after all idle owners return', + 'side': 'FULL', 'native_level': 8}) + out.append({'kind': 'code', 'register': 0, 'word': [2], + 'cut': 'terminal after all idle owners return', + 'side': 'FULL', 'native_level': 8}) + out.append({'kind': 'shear', 'dst': 0, 'src': 1, + 'coefficient': -1}) + out.append({'kind': 'code', 'register': 1, 'word': [1], + 'cut': 'terminal source preparation', + 'side': 'FULL', 'native_level': 8}) + out.append({'kind': 'shear', 'dst': 0, 'src': 1, + 'coefficient': -1 if mutation == 'wrong_compensation_sign' else 1}) + out.append({'kind': 'code', 'register': 1, 'word': [-1], + 'cut': 'terminal exact source unprepare', + 'side': 'FULL', 'native_level': 8}) + out.append({'kind': 'normalize', 'register': 1, + 'direction': 'FULL_to_cap', 'rank_one_children': 111}) + out.append(dict(event)) + else: + out.append(dict(event)) + return out + + +def apply(rows, event, backwards=False): + rows = [dict(row) for row in rows] + k = event['kind'] + if k == 'local': + p, s, rev = event['pair'], event['stage'], event['reverse'] + i, j = 2 * p, 2 * p + 1 + x, y = rows[i], rows[j] + a = (s + 1,) if event.get('coded') else () + if not rev: + if not backwards: + rows[i] = left(x, a) + rows[j] = add(y, rows[i]) + else: + rows[j] = add(y, x, -1) + rows[i] = left(x, inverse_word(a)) + elif not backwards: + rows[i] = add(x, y, -1) + rows[j] = left(y, inverse_word(a)) + else: + rows[j] = left(y, a) + rows[i] = add(x, rows[j]) + elif k == 'bridge': + d, s = event['dst'], event['src'] + coefficient = event['coefficient'] * (-1 if backwards else 1) + rows[2*d] = add(rows[2*d], rows[2*s], coefficient) + rows[2*s+1] = add(rows[2*s+1], rows[2*d+1], -coefficient) + elif k == 'code': + word = tuple(event['word']) + if backwards: + word = inverse_word(word) + rows[event['register']] = left(rows[event['register']], word) + elif k == 'shear': + coefficient = event['coefficient'] * (-1 if backwards else 1) + rows[event['dst']] = add(rows[event['dst']], + rows[event['src']], coefficient) + elif k == 'exchange': + rows = [row for p in range(4) for row in + (rows[2*p+1], rows[2*p])] + elif k == 'normalize': + # Logical-value coordinate is unchanged; native D_P changes frame. + # Native physical validity and its rank-one tariff are conditional. + pass + else: + raise ValueError(k) + return rows + + +def evaluate(word, start=None, backwards=False): + rows = identity() if start is None else start + for event in reversed(word) if backwards else word: + rows = apply(rows, event, backwards) + return rows + + +def transpose_operator_word(word): + # a_s^T is an independent noncommuting generator, not a_s^-1. + # The operation reverses multiplication order and preserves exponents. + return tuple((1 if x > 0 else -1) * (abs(x)+9) + for x in reversed(word)) + + +def transpose_operators(rows): + out = [{} for _ in range(len(rows))] + for i, row in enumerate(rows): + for (word, j), value in row.items(): + out[j][(transpose_operator_word(word), i)] = value + return out + + +def product(a, b): + out = [] + for row in a: + value = {} + for (word, j), coefficient in row.items(): + value = add(value, left(b[j], word), coefficient) + out.append(value) + return out + + +def receipt(): + events, recipe_pin = recipe() + old = old_word(events) + word = hybrid_word(events) + target = evaluate(old) + out = evaluate(word) + need(out == target, 'exact all-input old-clean endpoint equality') + need(evaluate(word, out, backwards=True) == identity(), + 'literal reverse-inverse cleanup') + need(evaluate(word, identity(), backwards=True) == target, + 'inverse target endpoint') + # The old clean signed word ends (Xout,Yout)=(x,-y), not literal Z identity. + expected = identity() + for i in range(1, 8, 2): + expected[i] = {key: -value for key, value in expected[i].items()} + need(target == expected, 'all clean signed controller target') + need(product(out, evaluate(word, identity(), True)) == identity(), + 'independent matrix multiplication inverse') + # Compare chronological gatewise inverse-transpose propagation to the + # transpose of the complete inverse. Transpose generators are independent. + inverse = evaluate(word, identity(), True) + inverse_transpose = transpose_operators(inverse) + need(product(transpose_operators(out), inverse_transpose) == identity(), + 'free-ring independent transpose inverse') + gatewise_dual = identity() + for event in word: + gatewise_dual = product(transpose_operators(apply(identity(), event, True)), + gatewise_dual) + need(gatewise_dual == inverse_transpose, + 'chronological gatewise inverse-transpose propagation') + controls = [] + for mutation in ('omit_current_B_pullback', 'wrong_compensation_sign', + 'stale_coded_F2'): + bad_word = hybrid_word(events, mutation) + need(bad_word != word, 'mutation changed actual word') + bad = evaluate(bad_word) + need(bad != target, 'affected endpoint mutant rejected') + delta = [add(a, b, -1) for a, b in zip(bad, target)] + controls.append({'mutation': mutation, 'rejected': True, + 'first_bad_output': next(i for i, row in enumerate(delta) if row), + 'defect': serial(delta)}) + wrong_inverse, changed = out, False + for event in reversed(word): + if event['kind'] == 'code' and not changed: + wrong_inverse = apply(wrong_inverse, event, backwards=False) + changed = True + else: + wrong_inverse = apply(wrong_inverse, event, backwards=True) + need(changed and wrong_inverse != identity(), 'wrong inverse code direction') + controls.append({'mutation': 'one_code_uses_forward_instead_of_inverse', + 'rejected': True, + 'control_note': 'Repeating the whole forward endpoint is a vacuous control here because the signed target is involutive; one actual inverse gate is changed instead.'}) + # State just before the terminal normalization is an informative witness. + before = [] + for event in word: + if event['kind'] == 'normalize': + break + before.append(event) + partial = evaluate(before) + x0 = add(left(identity()[0], (-2,)), + left(identity()[0], (-2, 1)), -1) + x0 = add(x0, left(identity()[1], (-2,)), -1) + need(partial[0] == x0 and partial[1] == left(identity()[0], (-2,)), + 'current-word terminal pullbacks') + for p in range(1, 4): + need(partial[2*p] == {key: -value for key, value in identity()[2*p+1].items()} + and partial[2*p+1] == identity()[2*p], 'other identity slots') + source_applications = sum(len(e['word']) for e in word if e['kind'] == 'code') + n = 111 + return { + 'status': 'PASS_CLOSED_NONCOMMUTATIVE_HYBRID_NO_GAIN', + 'scientific_pin': PIN, 'recipe_source_sha256': recipe_pin, + 'formal_input_rows': 8, 'coefficient_ring': 'Z[free group(a0,...,a8)]', + 'operator_relations': 'only a_s^-1 a_s=a_s a_s^-1=1; no commutation', + 'dual_relations': 'a_s^T are independent transpose symbols, not inverse symbols; chronological gatewise inverse-transpose matches transpose of full inverse', + 'local_coded_stages': [0, 1], 'local_clean_stages': list(range(2, 9)), + 'terminal_before_decoder': serial(partial), 'endpoint': serial(out), + 'word': word, 'controls': controls, + 'invoice_per_replica': { + 'clean_replacements_from_fullycoded': 7, + 'additional_private_rank_one_equivalent': 7*60, + 'terminal_normalization_rank_one_children': 2*n, + 'total_extra_rank_one_equivalent': 7*60+2*n, + 'necessary_allowance_at_beta_002': 492, + 'necessary_allowance_at_beta_003': 309, + 'excess_over_beta_002_allowance': 7*60+2*n-492, + 'net_rank_mass_saved_vs_all_old_clean': 2*60-2*n, + 'source_code_applications': source_applications, + 'R429_1499_ADD_code_scalar_invoice': source_applications*1499+2*n, + 'new_private_or_arbitrary_helper_fields_for_controller': 0, + 'original_terminal_idle_split': False}, + 'scope': ['all eight independent public logical input banks, arbitrary values', + 'old local ordinary dirty helper restoration used as explicit premise', + 'actual complete 19-event B4 order including both bridge signs', + 'exact group-ring coefficient and reverse-inverse proof; characteristic2 specialization valid', + 'terminal two-N physical realization and local old/code tariffs are conditional source mechanisms'], + 'unresolved': ['no native global phase admission', + 'no mixed 438/429 helper owner allocation or full width/stock moment', + 'no source-access, precision, tape or outer all-size theorem', + 'fails the necessary beta002 budget, so not a positive kappa candidate']} + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--write', action='store_true') + args = ap.parse_args() + data = receipt() + path = HERE / 'CLOSED-HYBRID.json' + if args.write: + path.write_text(json.dumps(data, sort_keys=True, indent=2)+'\n') + else: + need(json.loads(path.read_bytes()) == data, 'stored receipt differs') + print(data['status']) + print('extra642 > allowance492; rank-saving vs old = -102; all8 inputs restored') + + +if __name__ == '__main__': + main() diff --git a/research/bit-fixed-controller-repairs/frozen/hybrid/early_promotion.py b/research/bit-fixed-controller-repairs/frozen/hybrid/early_promotion.py new file mode 100644 index 0000000000..66529000b4 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/hybrid/early_promotion.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Actual port-route witness against free future codes after early promotion. + +Read-only reuse of the pinned exact E8 route reconstruction. This establishes +one missing native admission, not an obstruction to all changed controllers. +Apache-2.0; prepared with substantial OpenAI Codex assistance. +""" +import argparse +import gzip +from hashlib import sha256 +import json +from pathlib import Path +import sys + +sys.dont_write_bytecode = True +HERE = Path(__file__).resolve().parent +OLD = Path('/Users/ross/git/math/.research-automation/runs/' + 'kappa-3605-successor-20261018T0940Z/major-frontier') +ENDPOINT = HERE.parent / 'bit-endpoint' +sys.path.insert(0, str(ENDPOINT)) +import expanded_sections as source + + +def need(p, message): + if not p: + raise ValueError(message) + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('--write', action='store_true') + args = ap.parse_args() + inp = OLD/'recursive/BIT-THREE-ROW-INPUT.json' + mat = json.loads(inp.read_bytes())['matrices'] + R, K = mat['R'], mat['K'] + W = K[:] + for p in (0, 1, 2): + W[p] = 0 + A = [i ^ row for i, row in zip(source.eye(111), source.product(W, R))] + p, q = next((p, q) for p, row in enumerate(A) + for q in source.bits(row) if p != q) + raw = source.cap.RAW.read_bytes() + need(sha256(raw).hexdigest() == source.cap.RAW_SHA, 'R438 source pin') + word = json.loads(gzip.decompress(raw)) + rho, cap, P, geometry = source.roots_and_routes(word) + # rho_q fixes the source physical root line P_q, whereas rho_p need not. + delta = list(map(source.F, word['lines'][q])) + [source.F(0)]*7 + target = [row + [source.F(0)]*7 for row in P[p]] + target += [[source.F(0)]*15 for _ in range(7)] + relative = source.mm(rho[p], rho[q]) + image = [sum(x*y for x,y in zip(row, delta)) for row in relative] + target_component = [sum(x*y for x,y in zip(row, image)) for row in target] + defect = [x-y for x,y in zip(image, target_component)] + need(any(image[8:]) and any(defect), 'promoted P flag not preserved') + mod101 = lambda x: x.numerator*pow(x.denominator, -1, 101) % 101 + need(any(map(mod101, image[8:])), 'actual odd field witness') + # The actual diagonal relative route fixes its own promoted flag. + diagonal = source.mm(rho[q], rho[q]) + diagonal_image = [sum(x*y for x,y in zip(row, delta)) for row in diagonal] + need(diagonal_image == delta, 'diagonal preserved-line control') + zero_flag = [[source.F(0)]*15 for _ in range(15)] + need(source.mm(relative, zero_flag) == source.mm(zero_flag, relative), + 'unpromoted zero-frame native preparation control') + data = { + 'status': 'PASS_ACTUAL_EARLY_PROMOTION_LOSES_FUTURE_CODE_ADMISSION', + 'scientific_pin': '20ecf2891d80b5acf18d980b2164fb44ea7faa90', + 'matrix_input_sha256': sha256(inp.read_bytes()).hexdigest(), + 'route_reconstruction_sha256': sha256((ENDPOINT/'expanded_sections.py').read_bytes()).hexdigest(), + 'R438_word_sha256': sha256(raw).hexdigest(), + 'code_offdiagonal': {'output_port': p, 'input_port': q, + 'coefficient': 1}, + 'native_address_input': list(map(str, delta)), + 'native_address_output': list(map(str, image)), + 'output_fresh_coordinates_mod101': list(map(mod101, image[8:])), + 'defect_outside_target_Pp': list(map(str, defect)), + 'covered_domain': 'exact rational address geometry and odd ADDRESS field F101; arbitrary binary VALUE delta at the listed input port/address', + 'logical_boundary': 'initial Y ZERO -> P_p costs one111-port rank-one sweep; after promotion same-port X/Y scalar ADD is admitted but generic cross-port future A code is not', + 'reason': 'rho_s,q fixes P_q, but rho_s,p^-1 rho_s,q sends P_q into fresh E_s outside target P_p for p!=q', + 'controls': ['diagonal relative route fixes its physical root line', + 'unpromoted zero flag is preserved by every relative route'], + 'extra_undo_code_redo_charge': {'rank_one_children_per_bank': 222, + 'scalar_access_and_precision': 'additional; not waived'}, + 'limits': ['does not exclude a new native factory accepting promoted Y', + 'does not exclude a changed current-word N cancellation', + 'no general lower bound or positive kappa claim'], + 'geometry_receipt': geometry} + path = HERE/'EARLY-PROMOTION.json' + if args.write: + path.write_text(json.dumps(data, sort_keys=True, indent=2)+'\n') + else: + need(json.loads(path.read_bytes()) == data, 'stored receipt differs') + print(data['status']) + print('offdiagonal', p, q, 'fresh mod101', data['output_fresh_coordinates_mod101']) + + +if __name__ == '__main__': + main() diff --git a/research/bit-fixed-controller-repairs/frozen/provenance/bit_cap_copy_local.py b/research/bit-fixed-controller-repairs/frozen/provenance/bit_cap_copy_local.py new file mode 100644 index 0000000000..679be90ff9 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/provenance/bit_cap_copy_local.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python3 +"""Local-only exact native cap-copy audit, independent of any controller. + +Inputs are the pinned R438 word and frozen signed six-copy local word. The +16-column ADDRESS identities hold over every odd field where dyadic entries +are interpreted. Scalar integer cleanup and rounded child errors are separate. +Apache-2.0; substantial OpenAI Codex assistance. +""" + +import argparse +from collections import Counter +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +RAW = Path('/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz') +RAW_SHA = 'a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022' + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def canonical(value): + return json.dumps(value, sort_keys=True, separators=(',', ':')).encode() + + +def rank(rows): + basis = {} + for row in rows: + row = list(map(Q, row)) + for j, old in sorted(basis.items()): + c = row[j] + row = [x-c*y for x,y in zip(row,old)] + j = next((j for j,x in enumerate(row) if x), None) + if j is not None: + c = row[j] + basis[j] = [x/c for x in row] + return len(basis) + + +def identity(n): + return [[Q(i == j) for j in range(n)] for i in range(n)] + + +def multiply(a, b): + return [[sum(x*y for x,y in zip(row,col)) for col in zip(*b)] for row in a] + + +def exchange(u): + c = [[Q(i == j)-u[i][j] for j in range(8)] for i in range(8)] + return [c[i]+u[i] for i in range(8)]+[u[i]+c[i] for i in range(8)] + + +def address_identities(word): + ident = identity(8) + out = [] + for p, q in enumerate(word['lines']): + need(sum(x*x for x in q) == 4, 'actual E8 root norm') + start = [word['lines'][j] for j in word['frames'][word['start'][p]]] + cap = [word['lines'][j] for j in word['frames'][word['final'][111+p]]] + need(rank(start) == 1 and all(all(4*x == sum(a*b for a,b in zip(row,q))*y + for x,y in zip(row,q)) for row in start), 'actual entrance is not P_p') + need(rank(cap) == 7 and all(sum(x*y for x,y in zip(row,q)) == 0 for row in cap), + 'actual target cap is not K_p') + proj = [[Q(x*y,4) for y in q] for x in q] + complement = [[ident[i][j]-proj[i][j] for j in range(8)] for i in range(8)] + need(multiply(proj,proj) == proj and rank(proj) == 1, 'actual P_p projector') + need(multiply(exchange(ident),exchange(proj)) == exchange(complement), + 'D_I D_P differs from D_K') + need(multiply(exchange(proj),exchange(proj)) == identity(16), 'D_P squared differs from I') + encoded = [[[v.numerator,v.denominator] for v in row] for row in proj] + out.append(sha256(canonical(encoded)).hexdigest()) + need(len(out) == 111, 'actual punctured root count') + return out + + +def frame_replay(word, program, backward=False, fault=None): + dims = [rank(word['lines'][j] for j in f) for f in word['frames']] + masks = [sum(1 << j for j in f) for f in word['frames']] + need(dims[1] == 8, 'named FULL is not full') + frames = (word['final'] if backward else word['start'])[:]+[None] + open_source, copies, erases = None, [], 0 + paid = Counter() + rows = list(reversed(program['records'])) if backward else program['records'] + for raw in rows: + op,x,y,c,f,phase = raw + if op == 0: + old,new = (c,y) if backward else (y,c) + lo,hi = (new,old) if backward else (old,new) + need(frames[x] == old, 'MOVE source frame') + need(not masks[lo] & ~masks[hi] and dims[hi]-dims[lo] == f > 0, 'MOVE rank or containment') + frames[x] = new + paid[f] += 1 + elif op == 1: + need(x < 660 and x != y and frames[x] == frames[y] == f, 'ADD common frame') + need(open_source != x, 'immutable copied source changed') + elif op == (3 if backward else 2): + need(open_source is None and y == 660 and frames[660] is None, 'COPY fresh private field') + if fault == 'copy_to_full': + f = 1 + need(frames[x] == c == 1 and not masks[f] & ~masks[c], 'COPY source FULL and target nested') + need(dims[c]-dims[f] == 1, 'COPY does not use rank-one cap descent') + frames[660],open_source = f,x + copies.append({'source':x,'source_frame':c,'private_frame':f,'rank':1}) + paid[1] += 1 + else: + need(op == (2 if backward else 3), 'unknown native opcode') + need(open_source == x and y == 660 and frames[x] == c and frames[660] == f, + 'ERASE original snapshot source/frame') + frames[660],open_source = None,None + erases += 1 + need(open_source is None and frames[:660] == (word['start'] if backward else word['final']), 'native endpoint') + need(len(copies) == erases == 6, 'six closed immutable snapshots') + return {'copies':copies,'literal_erases':erases,'paid_profile':dict(sorted(paid.items())), + 'maximum_simultaneous_private_snapshots':1} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument('--write', action='store_true') + args = parser.parse_args() + raw = RAW.read_bytes() + need(sha256(raw).hexdigest() == RAW_SHA, 'R438 source pin') + word = json.loads(gzip.decompress(raw)) + meta = json.loads((HERE/'BIT-SIGNED-INPUT.json').read_bytes()) + packed = (HERE/'BIT-SIGNED-INPUT-WORD.json.gz').read_bytes() + decoded = gzip.decompress(packed) + need(sha256(packed).hexdigest() == meta['word_gzip_sha256'] and + sha256(decoded).hexdigest() == meta['word_canonical_sha256'], 'frozen signed word pin') + program = json.loads(decoded) + need(program['start'] == word['start'] and program['final'] == word['final'], 'retained native boundaries') + projectors = address_identities(word) + forward,backward = frame_replay(word,program),frame_replay(word,program,True) + try: + frame_replay(word,program,fault='copy_to_full') + except ValueError as error: + negative = str(error) + else: + raise ValueError('rank-zero FULL copy mutation escaped') + receipt = {'status':'PASS_LOCAL_SIX_CAP_COPY_NATIVE_CONTRACT', + 'raw_R438_gzip_sha256':RAW_SHA,'signed_word_canonical_sha256':meta['word_canonical_sha256'], + 'actual_port_count':111,'actual_entrance_and_target_frames':222, + 'projector_sha256':projectors,'address_identity_columns':3552, + 'forward':forward,'literal_inverse':backward,'negative_control':negative, + 'domain':'Exact dyadic projectors and ADDRESS matrices; every odd modulus where their dyadic coefficients are interpreted. VALUE scalar identity and native recursive child errors are separate.', + 'source_role_rule':'COPY may read an actual source field or an arbitrary helper, provided the physical source stays unchanged until ERASE. No helper-only restriction is used.', + 'limits':['local native/frame contract only','no global controller, endpoint decoder, owner allocation, precision theorem, tape bound or kappa claim']} + path = HERE/'BIT-CAP-COPY-LOCAL.json' + if args.write: + path.write_text(json.dumps(receipt,sort_keys=True,indent=2)+'\n') + else: + need(json.loads(path.read_bytes()) == json.loads(canonical(receipt)), 'complete cap-copy receipt differs') + print(receipt['status']) + + +if __name__ == '__main__': + main() diff --git a/research/bit-fixed-controller-repairs/frozen/recipe/BIT-NILPOTENT-RECIPE.json b/research/bit-fixed-controller-repairs/frozen/recipe/BIT-NILPOTENT-RECIPE.json new file mode 100644 index 0000000000..dde77a8967 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/recipe/BIT-NILPOTENT-RECIPE.json @@ -0,0 +1,2020 @@ +{ + "all_size_scope": "Polynomial identity for every nonidentity involution N over characteristic2. No finite Fourier kernel expansion is used.", + "cases": [ + { + "B": 1, + "epsilon_matrix_A": [ + [ + 0, + 1 + ], + [ + 1, + 1 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "kind": "exchange" + } + ], + "rank_A": 2, + "rank_defect_M": 2, + "raw_endpoint_ring_entries": [ + [ + 1, + 3 + ], + [ + 3, + 2 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 1 + ], + [ + 1, + 0 + ] + ], + "trace_defect": 1 + }, + { + "B": 2, + "epsilon_matrix_A": [ + [ + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1 + ], + [ + 1, + 1, + 1, + 0 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "kind": "exchange" + } + ], + "rank_A": 4, + "rank_defect_M": 3, + "raw_endpoint_ring_entries": [ + [ + 1, + 0, + 0, + 3 + ], + [ + 3, + 2, + 0, + 0 + ], + [ + 0, + 3, + 1, + 3 + ], + [ + 3, + 3, + 3, + 1 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 1 + ], + [ + 1, + 1, + 1, + 1 + ] + ], + "trace_defect": 1 + }, + { + "B": 3, + "epsilon_matrix_A": [ + [ + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 2, + "reverse": true, + "stage": 5 + }, + { + "kind": "local", + "pair": 2, + "reverse": false, + "stage": 6 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "kind": "exchange" + } + ], + "rank_A": 6, + "rank_defect_M": 6, + "raw_endpoint_ring_entries": [ + [ + 1, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 2, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 3 + ], + [ + 3, + 3, + 3, + 1, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 1, + 3 + ], + [ + 0, + 3, + 3, + 3, + 3, + 1 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "trace_defect": 1 + }, + { + "B": 4, + "epsilon_matrix_A": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 2, + "reverse": true, + "stage": 5 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 2, + "reverse": false, + "stage": 6 + }, + { + "coefficient": -1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 3, + "reverse": true, + "stage": 7 + }, + { + "kind": "local", + "pair": 3, + "reverse": false, + "stage": 8 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 2 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "kind": "exchange" + } + ], + "rank_A": 8, + "rank_defect_M": 7, + "raw_endpoint_ring_entries": [ + [ + 1, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 2, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 3, + 1, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 3 + ], + [ + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 1, + 3 + ], + [ + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "trace_defect": 1 + }, + { + "B": 5, + "epsilon_matrix_A": [ + [ + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 2, + "reverse": true, + "stage": 5 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 2, + "reverse": false, + "stage": 6 + }, + { + "coefficient": -1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 3, + "reverse": true, + "stage": 7 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 4 + }, + { + "kind": "local", + "pair": 3, + "reverse": false, + "stage": 8 + }, + { + "coefficient": -1, + "dst": 3, + "kind": "bridge", + "src": 4 + }, + { + "kind": "local", + "pair": 4, + "reverse": true, + "stage": 9 + }, + { + "kind": "local", + "pair": 4, + "reverse": false, + "stage": 10 + }, + { + "coefficient": 1, + "dst": 4, + "kind": "bridge", + "src": 3 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 2 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "kind": "exchange" + } + ], + "rank_A": 10, + "rank_defect_M": 10, + "raw_endpoint_ring_entries": [ + [ + 1, + 3, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 1, + 3, + 0, + 0, + 0, + 3 + ], + [ + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 3 + ], + [ + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 0, + 3, + 1, + 3 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "trace_defect": 1 + }, + { + "B": 6, + "epsilon_matrix_A": [ + [ + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 0 + ] + ], + "events": [ + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 0 + }, + { + "kind": "local", + "pair": 0, + "reverse": true, + "stage": 1 + }, + { + "coefficient": 1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 0, + "reverse": false, + "stage": 2 + }, + { + "coefficient": -1, + "dst": 0, + "kind": "bridge", + "src": 1 + }, + { + "kind": "local", + "pair": 1, + "reverse": true, + "stage": 3 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 1, + "reverse": false, + "stage": 4 + }, + { + "coefficient": -1, + "dst": 1, + "kind": "bridge", + "src": 2 + }, + { + "kind": "local", + "pair": 2, + "reverse": true, + "stage": 5 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 2, + "reverse": false, + "stage": 6 + }, + { + "coefficient": -1, + "dst": 2, + "kind": "bridge", + "src": 3 + }, + { + "kind": "local", + "pair": 3, + "reverse": true, + "stage": 7 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 4 + }, + { + "kind": "local", + "pair": 3, + "reverse": false, + "stage": 8 + }, + { + "coefficient": -1, + "dst": 3, + "kind": "bridge", + "src": 4 + }, + { + "kind": "local", + "pair": 4, + "reverse": true, + "stage": 9 + }, + { + "coefficient": 1, + "dst": 4, + "kind": "bridge", + "src": 5 + }, + { + "kind": "local", + "pair": 4, + "reverse": false, + "stage": 10 + }, + { + "coefficient": -1, + "dst": 4, + "kind": "bridge", + "src": 5 + }, + { + "kind": "local", + "pair": 5, + "reverse": true, + "stage": 11 + }, + { + "kind": "local", + "pair": 5, + "reverse": false, + "stage": 12 + }, + { + "coefficient": 1, + "dst": 5, + "kind": "bridge", + "src": 4 + }, + { + "coefficient": 1, + "dst": 4, + "kind": "bridge", + "src": 3 + }, + { + "coefficient": 1, + "dst": 3, + "kind": "bridge", + "src": 2 + }, + { + "coefficient": 1, + "dst": 2, + "kind": "bridge", + "src": 1 + }, + { + "coefficient": 1, + "dst": 1, + "kind": "bridge", + "src": 0 + }, + { + "kind": "exchange" + } + ], + "rank_A": 12, + "rank_defect_M": 11, + "raw_endpoint_ring_entries": [ + [ + 1, + 0, + 0, + 3, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 3, + 1, + 3, + 0, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 3, + 0, + 0, + 0, + 3 + ], + [ + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 1, + 3, + 0, + 0, + 0, + 3 + ], + [ + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 3 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1, + 0, + 0 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 0, + 3, + 0, + 3, + 1, + 3 + ], + [ + 0, + 3, + 0, + 3, + 0, + 3, + 0, + 3, + 3, + 3, + 3, + 1 + ] + ], + "relative_to_common_N_defect_M": [ + [ + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 0 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1 + ], + [ + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 1, + 1 + ] + ], + "trace_defect": 1 + } + ], + "limits": [ + "Changed bank pairing, shared native stages, source normalization and altered scalar controls can change A and are outside this fixedrecipe bound.", + "No all-caller lower bound or negative kappa claim follows.", + "The seeded-star construction is an explicit changed topology and is deliberately outside this screen." + ], + "parity": "Each such repair projector has trace1. The fixed defect trace is1, so the number of repair N events is odd. At B1 rank2 plus trace1 gives minimum at least3.", + "rank_repair_bound": "For this fixed evaluated word R=I+epsilon A, its defect relative common parent N I is I+epsilon(A+I). Repair gates consisting of a scalar-GL-conjugated single-bank N have first-order rank1; k such added gates sum at most rankk. Thus repairing the fixed B4 word needs at least7 such extra N events (777 rank1 for111ports). This statement is not about a redesigned scalar controller that changes existing query pullbacks.", + "ring": "F2[N]/(N^2-1), epsilon=N+1, epsilon^2=0. F=[[1,0],[1,N]], B=[[N,1],[0,1]]. All old bridges and terminal bank exchange are literally retained.", + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "source_recipe_sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "status": "PASS_FIXED_RECIPE_NILPOTENT_DEFECT_MATRICES" +} diff --git a/research/bit-fixed-controller-repairs/frozen/recipe/bit_nilpotent_recipe.py b/research/bit-fixed-controller-repairs/frozen/recipe/bit_nilpotent_recipe.py new file mode 100644 index 0000000000..401610bdea --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/recipe/bit_nilpotent_recipe.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +"""Fixed routed recipe over F2[N]/(N^2-1); not a changed-caller obstruction. +Apache-2.0. Substantial OpenAI Codex assistance. +""" +import argparse,ast,json +from hashlib import sha256 +from pathlib import Path +from bit_seeded_star import mul,plus,scale,ident,need +HERE=Path(__file__).resolve().parent +SOURCE=Path('/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py') +def rank(rows): + d={} + for x in rows: + while x: + k=x.bit_length()-1 + if k in d:x^=d[k] + else:d[k]=x;break + return len(d) +def main(): + ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--write',action='store_true');a=ap.parse_args() + raw=SOURCE.read_bytes();t=ast.parse(raw);f=next(x for x in t.body if isinstance(x,ast.FunctionDef)and x.name=='recipe');env={};exec(compile(ast.Module(body=[f],type_ignores=[]),str(SOURCE),'exec'),env) + cases=[] + for B in range(1,7): + n=2*B;z=ident(n);events=env['recipe'](B) + for e in events: + if e['kind']=='local': + i=2*e['pair'];x,y=z[i],z[i+1] + if e['reverse']:z[i]=plus(scale(x,2),y) + else:z[i+1]=plus(x,scale(y,2)) + elif e['kind']=='bridge': + d,s=e['dst'],e['src'];z[2*d]=plus(z[2*d],z[2*s]);z[2*s+1]=plus(z[2*s+1],z[2*d+1]) + elif e['kind']=='exchange':z=[r for j in range(B)for r in(z[2*j+1],z[2*j])] + need(all(((x&1)^(x>>1))==int(i==j)for i,r in enumerate(z)for j,x in enumerate(r)),'constant epsilon0 endpoint I') + A=[[x>>1 for x in r]for r in z];M=[[x^int(i==j)for j,x in enumerate(r)]for i,r in enumerate(A)] + rA=rank([sum(x<>1;b0,b1=b&1,b>>1 + return ((a0*b0)^(a1*b1))|(((a0*b1)^(a1*b0))<<1) +def plus(a,b):return [x^y for x,y in zip(a,b)] +def scale(a,q):return[mul(x,q)for x in a] +def ident(n):return[[int(i==j)for j in range(n)]for i in range(n)] +def inverse_event(e):return e # Every declared GF2 primitive here is involutive. +def apply(z,e): + z=[r[:]for r in z];i,j=e['source'],e['target'];k=e['kind'] + if k=='old_F':z[j]=plus(z[j],scale(z[i],2)) + elif k=='old_B':z[i]=plus(z[i],scale(z[j],2)) + elif k=='exchange':z[i],z[j]=z[j],z[i] + elif k=='new_F':z[j]=plus(z[i],scale(z[j],2)) + elif k=='new_F_inverse':z[j]=scale(plus(z[j],z[i]),2) + elif k=='CNOT':z[j]=plus(z[j],z[i]) + else:raise ValueError(k) + return z + +def main(): + ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--write',action='store_true');a=ap.parse_args() + word=[{'kind':'old_F','source':0,'target':1,'stage':0},{'kind':'old_B','source':0,'target':1,'stage':1},{'kind':'old_F','source':0,'target':1,'stage':2},{'kind':'exchange','source':0,'target':1,'cut':'afterstage2'}] + for j in range(2,8):word.append({'kind':'new_F','source':0,'target':j,'stage':j+1}) + # The source is unchanged by every fanout; terminal CNOTs cancel those + # entering-source columns, once all eight fronts equal the common parent. + for j in reversed(range(2,8)):word.append({'kind':'CNOT','source':0,'target':j,'cut':'terminal common NGamma'}) + z=ident(8);prefix=[] + for e in word: + z=apply(z,e);prefix.append(z) + target=scale_identity=[[2*int(i==j)for j in range(8)]for i in range(8)] + need(z==target,'all eight independent raw input columns reach common N') + back=z + for e in reversed(word): + inv=dict(e) + if inv['kind']=='new_F':inv['kind']='new_F_inverse' + back=apply(back,inv) + need(back==ident(8),'literal reverse-inverse all raw input columns') + # Defect-sensitive negative controls alter actual words. + bad=ident(8) + for e in word: + if e.get('stage')==1:continue + bad=apply(bad,e) + need(bad!=target,'omitted seed B rejected') + bad=ident(8) + for k,e in enumerate(word): + if k==len(word)-1:continue + bad=apply(bad,e) + need(bad!=target,'omitted terminal CNOT rejected') + # Pure new-F diagonalization cannot create source common-axis progress. + single=apply(apply(ident(2),{'kind':'new_F','source':0,'target':1}),{'kind':'CNOT','source':0,'target':1}) + need(single==[[1,0],[0,2]],'source remains I under postCNOT diagonalization') + windows=[{'bank':0,'active_stages':list(range(9)),'fresh_idle_query_ranks':[]},{'bank':1,'active_stages':[0,1,2],'fresh_idle_query_ranks':[42]}] + for j in range(2,8): + s=j+1;windows.append({'bank':j,'active_stages':[s],'fresh_idle_query_ranks':[x for x in(7*s,7*(8-s))if x]}) + out={'status':'PASS_SEEDED_STAR_EIGHT_RAW_INPUT_COLUMNS','scientific_pin':'20ecf2891d80b5acf18d980b2164fb44ea7faa90', + 'coefficient_ring':'F2[N]/(N^2-1), entry encoded a+2*b for a+bN. Fresh Gs commute mutually and with N; cumulative Gamma is stripped only at matched fresh-prefix cuts.', + 'assumed_local_interfaces':['old_F_N=(x,y+Nx), old_B_N=(x+Ny,y), three clean rank7 stages, ordinary helper restoration as supplied by the old R438 factory.','new_F=(x,x+Ny), six stages, each from the changed R429 full-target factory. Its helpers and target preencoding must be admitted at the actual common-past prefix; this record does not establish that native binding.'], + 'word':word,'prefix_rows':prefix,'endpoint_rows':z,'inverse_endpoint_rows':back, + 'identity':'Three old F_N/B_N/F_N plus SWAP give diag(N,N). Six new F calls from bank0 to banks2..7 yield N(x0,x1,x2+x0,...,x7+x0). Six terminal CNOTs then yield N times I8.', + 'fresh_path':'Every active call advances its two banks by its stage G_s; complete every inactive fresh interval by the listed native idle query. All eight banks must reach Gamma9 before the terminal CNOTs.', + 'public_fresh_idle_windows':windows, + 'conditional_local_invoice':'3 old factories at private63 plus6 changed factories at private3; nominal raw rank deficit2*111-3*63-6*3=15 before padding, changed owner allocation, moments and precision. No unchanged nineteen-event owner witness applies.', + 'pure_newF_control':'PostCNOT * newF = diag(I,N). It leaves arbitrary raw source a unchanged, so it does not alone give common N on both raw inputs. An entrance normalization a=Nx must be paid or supplied by an explicit encoded-input caller contract.', + 'negative_controls':['Omit old seed B: wrong all-input endpoint.','Omit one terminal CNOT: one original x0 term remains.'], + 'all_size_scope':'The written word is a polynomial identity for every involution N over characteristic2 and every commuting fresh Gs. No finite Fourier expansion, one-bit support shortcut or clean data assumption is used.', + 'remaining':['Native source/target pre/post A admission at these changed cuts, all429 helper dirt and return identities require recursive lane producer binding.','New chronological whole-helper owner allocation and full moments, arity, rounding/precision and tape costs are not supplied.','No positive kappa follows from nominal D15.'], + 'attribution':'Recursive lane proposed three-old-call seed and six-new-call fanout; root proposed testing pure newF diagonalization. This lane independently verifies the changed word on all raw columns, inverse and defect controls, and separates the missing source input normalization.'} + out=json.loads(json.dumps(out));target_path=HERE/'BIT-SEEDED-STAR.json' + if a.write:target_path.write_text(json.dumps(out,indent=2,sort_keys=True)+'\n') + else:need(json.loads(target_path.read_bytes())==out,'stored seeded star differs') + print(out['status']);print('8 raw inputs; reverse-inverse;2 controls; changed idle windows PASS') +if __name__=='__main__':main() diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/CHECKS.json.gz b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/CHECKS.json.gz new file mode 100644 index 0000000000..417af54cfc Binary files /dev/null and b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/CHECKS.json.gz differ diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json new file mode 100644 index 0000000000..98dfb2409f --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/SOURCE-DEPENDENCIES.json @@ -0,0 +1,36 @@ +{ + "checker_sha256": "148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138", + "matrices": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/BIT-THREE-ROW-INPUT.json", + "sha256": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979" + }, + "r438": { + "path": "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "sha256": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022" + }, + "read_only_predecessors": { + "old_hybrid": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/closed_hybrid.py", + "runtime_dependency": false, + "sha256": "78f92b8b8fdb6528bd87f974f3022e73c9b60877f0022200fe0b4422da2b7738" + }, + "old_promotion": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/hybrid-independent/early_promotion.py", + "runtime_dependency": false, + "sha256": "d59e5487251929416fa657f45e617d78a3392310203f1df08389d3746acd6732" + }, + "old_routes": { + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/bit-endpoint/expanded_sections.py", + "runtime_dependency": false, + "sha256": "b5b0f01da04d95ccaae56cfb503bbf12bdd47442a924802c280089acc564795b" + } + }, + "recipe": { + "path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8" + }, + "roots": { + "path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "sha256": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55" + } +} diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/VALIDATION.json b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/VALIDATION.json new file mode 100644 index 0000000000..5b712d68cb --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/VALIDATION.json @@ -0,0 +1,90 @@ +{ + "checker_sha256": "148b456444486d4fde75c83d20717aef7dcd2c6aef31adb009035f834c530138", + "full_receipt_byte_identical": true, + "python": "Python 3.12.14", + "receipt_canonical_sha256": "f8344bb945fdf069140991ad6c293ed1a85eed8b17258a10c41aeda0e03907c8", + "receipt_gzip_sha256": "8a76a7141b4851084923e87c8f17bc8c02db6543d7614bc2c911e45e43a0ef8f", + "receipt_sha256": "c1c1444d09bda057e6fa12c97fe8e7c4674ad0076d83e1d7ad7f5975ca946442", + "results": [ + { + "command": [ + "/Users/ross/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-B", + "-W", + "error", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/check_hybrid.py", + "--recipe", + "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "--matrices", + "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/BIT-THREE-ROW-INPUT.json", + "--r438", + "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "--roots", + "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "--output", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/CHECKS.json" + ], + "exit_code": 0, + "mode": "normal", + "output_sha256": "c1c1444d09bda057e6fa12c97fe8e7c4674ad0076d83e1d7ad7f5975ca946442", + "seconds": 0.2952352080028504, + "stdout": "{\"cases\": 28, \"receipt_canonical_sha256\": \"f8344bb945fdf069140991ad6c293ed1a85eed8b17258a10c41aeda0e03907c8\", \"status\": \"PASS_ALL_B_PROOF_FIXTURES_TWO_CODE_HYBRID_AND_SELECTED_NATIVE_WITNESS\", \"word_controls\": 12}" + }, + { + "command": [ + "/Users/ross/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-B", + "-W", + "error", + "-O", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/check_hybrid.py", + "--recipe", + "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "--matrices", + "/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier/recursive/BIT-THREE-ROW-INPUT.json", + "--r438", + "/Users/ross/git/math/integer-mult-bounds/research/bit-r438-transport-rehost/words/r438-t154.json.gz", + "--roots", + "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz", + "--output", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/CHECKS-O.json" + ], + "exit_code": 0, + "mode": "optimized", + "output_sha256": "c1c1444d09bda057e6fa12c97fe8e7c4674ad0076d83e1d7ad7f5975ca946442", + "seconds": 0.3577241659804713, + "stdout": "{\"cases\": 28, \"receipt_canonical_sha256\": \"f8344bb945fdf069140991ad6c293ed1a85eed8b17258a10c41aeda0e03907c8\", \"status\": \"PASS_ALL_B_PROOF_FIXTURES_TWO_CODE_HYBRID_AND_SELECTED_NATIVE_WITNESS\", \"word_controls\": 12}" + }, + { + "command": [ + "/Users/ross/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3", + "-I", + "-O", + "-B", + "-W", + "error", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/check_hybrid.py", + "--recipe", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/transport with spaces/recipe.py.gz", + "--matrices", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/transport with spaces/matrices.json.gz", + "--r438", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/transport with spaces/r438.json.gz", + "--roots", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/transport with spaces/roots.json.gz", + "--output", + "/Users/ross/git/math/.research-automation/runs/unpublished-round2-20261020T1106Z/b07-hybrid-review/CHECKS-TRANSPORT.json" + ], + "exit_code": 0, + "mode": "compressed_inputs_path_spaces", + "output_sha256": "c1c1444d09bda057e6fa12c97fe8e7c4674ad0076d83e1d7ad7f5975ca946442", + "seconds": 0.36249387499992736, + "stdout": "{\"cases\": 28, \"receipt_canonical_sha256\": \"f8344bb945fdf069140991ad6c293ed1a85eed8b17258a10c41aeda0e03907c8\", \"status\": \"PASS_ALL_B_PROOF_FIXTURES_TWO_CODE_HYBRID_AND_SELECTED_NATIVE_WITNESS\", \"word_controls\": 12}" + } + ], + "route_controls": 3, + "status": "PASS_NORMAL_OPTIMIZED_COMPRESSED_INPUTS", + "word_controls": 12 +} diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/check.py b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/check.py new file mode 100644 index 0000000000..5d81e9ce4c --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/hybrid/check.py @@ -0,0 +1,594 @@ +#!/usr/bin/env python3 +"""Independent signed hybrid-controller and selected native-route audit. + +Standard library only. All scientific inputs are explicit and authenticated. +The arbitrary-input algebra is abstract; native realization stays conditional. +Apache-2.0. Prepared with substantial OpenAI Codex assistance. +""" +import argparse +import ast +import copy +from fractions import Fraction as F +import gzip +import hashlib +import json +from pathlib import Path + + +PINS = { + "recipe": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "matrices": "e5edb9e4e738192f98bd520ae6c1e8f1ddb19a0074ee9a1044e309b81e39c979", + "r438": "a353999bceac4ac957f540adfd3e5f8768297138b27132eeb83332e2ea4b1022", + "roots": "1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55", +} + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(data): + return json.dumps(data, sort_keys=True, separators=(",", ":")).encode() + + +def digest(data): + return hashlib.sha256(data).hexdigest() + + +def read_source(path, name): + raw = path.read_bytes() + # Matrices and recipe may be losslessly compressed for portable packaging. + if name in ("matrices", "recipe") and raw[:2] == b"\x1f\x8b": + raw = gzip.decompress(raw) + need(digest(raw) == PINS[name], "source pin: " + name) + return raw + + +def reduce_word(word): + stack = [] + for g in word: + if stack and stack[-1] == -g: + stack.pop() + else: + stack.append(g) + return tuple(stack) + + +def ident(n): + return [{(i, ()): 1} for i in range(n)] + + +def matrix_product(left, right): + result = [] + for row in left: + out = {} + for (middle, first), coefficient in row.items(): + for (column, second), value in right[middle].items(): + key = (column, reduce_word(first + second)) + out[key] = out.get(key, 0) + coefficient * value + result.append({key: value for key, value in out.items() if value}) + return result + + +def transpose(matrix): + # Separate starred generators; preserve exponent and reverse factor order. + result = [{} for _ in matrix] + for row, entries in enumerate(matrix): + for (column, word), value in entries.items(): + starred = tuple((1 if g > 0 else -1) * (10000 + abs(g)) + for g in reversed(word)) + result[column][(row, starred)] = value + return result + + +def serialize(matrix): + return [[[column, list(word), value] + for (column, word), value in sorted(row.items())] + for row in matrix] + + +def endpoint(n): + return [{(i, ()): 1 if i % 2 == 0 else -1} for i in range(n)] + + +def primitive_matrix(event, n, inverse=False): + kind = event["kind"] + out = ident(n) + if kind == "add": + need(event["dst"] != event["src"], "ADD roles must be distinct") + out[event["dst"]][(event["src"], ())] = ( + event["coefficient"] * (-1 if inverse else 1)) + elif kind == "code": + g = event["generator"] * (-1 if inverse else 1) + out[event["register"]] = {(event["register"], (g,)): 1} + elif kind == "exchange": + out = [{(i ^ 1, ()): 1} for i in range(n)] + elif kind == "normalize": + pass + else: + raise ValueError("unknown primitive: " + kind) + return out + + +def flatten(events): + primitives = [] + for event in events: + kind = event["kind"] + if kind == "local": + x, y = 2 * event["pair"], 2 * event["pair"] + 1 + g = event["stage"] + 1 + if event["reverse"]: + primitives.append(dict(kind="add", dst=x, src=y, coefficient=-1)) + if event.get("coded", False): + primitives.append(dict(kind="code", register=y, generator=-g, + origin="local")) + else: + if event.get("coded", False): + primitives.append(dict(kind="code", register=x, generator=g, + origin="local")) + primitives.append(dict(kind="add", dst=y, src=x, coefficient=1)) + elif kind == "bridge": + d, s, c = event["dst"], event["src"], event["coefficient"] + primitives.extend([ + dict(kind="add", dst=2*d, src=2*s, coefficient=c), + dict(kind="add", dst=2*s+1, src=2*d+1, coefficient=-c)]) + else: + primitives.append(dict(event)) + return primitives + + +def evaluate(events, n, inverse=False): + out = ident(n) + primitives = flatten(events) + for event in reversed(primitives) if inverse else primitives: + out = matrix_product(primitive_matrix(event, n, inverse), out) + return out + + +def independent_recipe(b): + need(type(b) is int and b >= 1, "positive bank count") + events = [dict(kind="local", stage=0, pair=0, reverse=False)] + for j in range(b): + events.append(dict(kind="local", stage=2*j+1, pair=j, reverse=True)) + if j + 1 < b: + events.append(dict(kind="bridge", dst=j, src=j+1, coefficient=1)) + events.append(dict(kind="local", stage=2*j+2, pair=j, reverse=False)) + if j + 1 < b: + events.append(dict(kind="bridge", dst=j, src=j+1, coefficient=-1)) + events.extend(dict(kind="bridge", dst=j+1, src=j, coefficient=1) + for j in range(b-2, -1, -1)) + events.append(dict(kind="exchange")) + return events + + +def source_recipe(raw): + nodes = [node for node in ast.parse(raw).body + if isinstance(node, ast.FunctionDef) and node.name == "recipe"] + need(len(nodes) == 1, "exactly one pinned recipe") + env = {} + exec(compile(ast.Module(body=nodes, type_ignores=[]), "", + "exec", dont_inherit=True, optimize=0), env) + return env["recipe"] + + +def make_hybrid(events, variant): + need(variant in ("historical", "two_code"), "known hybrid variant") + result = [] + for event in events: + if event["kind"] == "local": + result.append(dict(event, coded=event["stage"] in (0, 1))) + if variant == "historical" and event["stage"] in (0, 1): + result.append(dict(kind="code", register=0, + generator=-event["stage"]-1)) + elif event["kind"] == "exchange": + result.append(dict(kind="normalize", register=1, + direction="cap_to_FULL", rank_one_children=111)) + if variant == "historical": + result.extend([ + dict(kind="code", register=1, generator=2), + dict(kind="code", register=0, generator=2), + dict(kind="add", dst=0, src=1, coefficient=-1), + dict(kind="code", register=1, generator=1), + dict(kind="add", dst=0, src=1, coefficient=1), + dict(kind="code", register=1, generator=-1)]) + else: + result.extend([ + dict(kind="add", dst=1, src=0, coefficient=-1), + dict(kind="code", register=1, generator=2), + dict(kind="add", dst=1, src=0, coefficient=1), + dict(kind="code", register=1, generator=-1)]) + result.extend([ + dict(kind="normalize", register=1, direction="FULL_to_cap", + rank_one_children=111), + dict(event)]) + else: + result.append(dict(event)) + return result + + +def expected_preterminal(b, variant): + rows = [] + if variant == "historical": + rows.extend([ + {(0, (-2,)): 1, (0, (-2, 1)): -1, (1, (-2,)): -1}, + {(0, (-2,)): 1}]) + else: + rows.extend([ + {(1, ()): -1}, + {(1, ()): -1, (1, (-2,)): 1, (0, (-2, 1)): 1}]) + for j in range(1, b): + rows.extend([{(2*j+1, ()): -1}, {(2*j, ()): 1}]) + return rows + + +def check_normalizations(word): + actual = [e for e in word if e["kind"] == "normalize"] + expected = [ + dict(kind="normalize", register=1, direction="cap_to_FULL", rank_one_children=111), + dict(kind="normalize", register=1, direction="FULL_to_cap", rank_one_children=111)] + need(actual == expected, "declared native normalization inventory") + first = next(i for i,e in enumerate(word) if e["kind"] == "normalize") + need(not any(e["kind"] in ("local","bridge") for e in word[first:]), + "normalizations at terminal cut") + need(word[-2] == expected[1] and word[-1]["kind"] == "exchange", + "demotion immediately before terminal exchange") + + +def audit_word(word, b, variant): + n = 2*b + out = evaluate(word, n) + need(out == endpoint(n), variant + ": all-input endpoint") + inverse = evaluate(word, n, inverse=True) + need(inverse == endpoint(n), variant + ": inverse endpoint") + need(matrix_product(out, inverse) == ident(n), variant + ": right inverse") + need(matrix_product(inverse, out) == ident(n), variant + ": left inverse") + dual = ident(n) + for event in flatten(word): + dual = matrix_product(transpose(primitive_matrix(event, n, True)), dual) + need(dual == transpose(inverse), variant + ": chronological dual") + need(matrix_product(transpose(out), dual) == ident(n), + variant + ": transpose-inverse identity") + cut = next(i for i, event in enumerate(word) if event["kind"] == "normalize") + before = evaluate(word[:cut], n) + need(before == expected_preterminal(b, variant), variant + ": terminal pullback") + codes = [e for e in word if e["kind"] == "code"] + additions = [e for e in word if e["kind"] == "add"] + need(len(codes) == (6 if variant == "historical" else 2), "code inventory") + need(len(additions) == 2, "added scalar sweep inventory") + check_normalizations(word) + need(sum(e["kind"] == "local" and not e["coded"] for e in word) == 2*b-1, + "clean local inventory") + bridges = sum(e["kind"] == "bridge" for e in word) + need(bridges == 3*b-3, "full inherited bridge inventory") + locals_count = sum(e["kind"] == "local" for e in word) + need(locals_count == 2*b+1, "full local inventory") + need(sum(e["kind"] == "exchange" for e in word) == 1, + "full terminal exchange inventory") + macro_inventory = dict( + coded_local_calls=2, clean_local_calls=2*b-1, + inherited_bridges=bridges, inherited_scalar_bank_ADD_sweeps=2*bridges, + additional_scalar_bank_ADD_sweeps=2, + additional_prefix_code_applications=2 if variant=="historical" else 0, + additional_terminal_code_applications=4 if variant=="historical" else 2, + terminal_normalization_sweeps=2, children_per_normalization_sweep=111, + terminal_pair_exchanges=b, + known_nonlocal_scalar_ADDs=2*bridges*111+len(codes)*1499+222, + local_internal_ADDs="same local words in both comparators; not repriced here", + original_idle_owners="retained as a separate native caller premise") + return dict(bank_pairs=b, formal_inputs=n, variant=variant, + controller_events=len(word), word=word, + complete_macro_inventory=macro_inventory, + preterminal=serialize(before), endpoint=serialize(out), + literal_inverse_endpoint=serialize(inverse), + inverse_transpose_endpoint=serialize(dual), + added_code_occurrences=len(codes), + added_bank_ADD_sweeps=len(additions), + added_scalar_ADDs=len(codes)*1499+222, + normalization_rank_one_children=222, + clean_replacements=2*b-1, + extra_rank_mass_vs_fullycoded=(2*b-1)*60+222, + net_rank_mass_saved_vs_allclean=-102) + + +def expect_failure(name, operation, message): + try: + operation() + except ValueError as error: + need(str(error) == message, name + ": wrong rejection: " + str(error)) + return dict(mutation=name, rejected=True, intended_message=message) + raise ValueError(name + ": control did not reject") + + +def mutation_controls(events): + controls = [] + original = make_hybrid(events, "two_code") + n = 8 + def endpoint_gate(word): + need(evaluate(word, n) == endpoint(n), "mutated all-input endpoint") + code_indices = [i for i,e in enumerate(original) if e["kind"] == "code"] + add_indices = [i for i,e in enumerate(original) if e["kind"] == "add"] + for i in code_indices + add_indices: + bad = copy.deepcopy(original) + del bad[i] + controls.append(expect_failure("omit_event_"+str(i), + lambda bad=bad: endpoint_gate(bad), + "mutated all-input endpoint")) + for name, index, field, value in [ + ("wrong_code_direction", code_indices[0], "generator", -2), + ("wrong_code_bank", code_indices[1], "register", 0), + ("wrong_compensation_sign", add_indices[0], "coefficient", 1)]: + bad = copy.deepcopy(original) + bad[index][field] = value + controls.append(expect_failure(name, lambda bad=bad: endpoint_gate(bad), + "mutated all-input endpoint")) + bad = copy.deepcopy(original) + next(e for e in bad if e.get("stage") == 2)["coded"] = True + controls.append(expect_failure("stale_coded_F2", lambda: endpoint_gate(bad), + "mutated all-input endpoint")) + # The overall signed endpoint is involutive; repeating it is not a control. + state = evaluate(original, n) + changed = False + for event in reversed(flatten(original)): + wrong = event["kind"] == "code" and not changed + state = matrix_product(primitive_matrix(event, n, not wrong), state) + changed = changed or wrong + controls.append(expect_failure( + "literal_inverse_one_code_direction", + lambda: need(state == ident(n), "mutated literal inverse"), + "mutated literal inverse")) + # Frame normalization is abstractly the identity. Its absence cannot be + # detected by this logical endpoint, so test the declared native inventory. + normalizations = [i for i,e in enumerate(original) if e["kind"] == "normalize"] + for omitted in normalizations: + bad = copy.deepcopy(original) + del bad[omitted] + need(evaluate(bad,n) == endpoint(n), + "omitted normalization has unchanged abstract endpoint") + control = expect_failure( + "omit_normalization_"+str(omitted), + lambda bad=bad: check_normalizations(bad), + "declared native normalization inventory") + control["logical_endpoint_still_passes"] = True + control["rejection_scope"] = "declared inventory, not native realization proof" + controls.append(control) + bad = copy.deepcopy(original) + bad[normalizations[0]]["register"] = 0 + controls.append(expect_failure( + "wrong_normalization_bank",lambda: check_normalizations(bad), + "declared native normalization inventory")) + # Independent generators really do not commute or equal their transposes. + need(reduce_word((1,2,-1,-2)) != (), "noncommutative representation") + need(transpose([{(0,(1,)):1}]) != [{(0,(-1,)):1}], + "transpose must not be inverse") + return controls + + +def mm(a, b): + return [[sum(x*y for x,y in zip(row,column)) for column in zip(*b)] + for row in a] + + +def tr(a): + return [list(row) for row in zip(*a)] + + +def eye(n): + return [[F(i == j) for j in range(n)] for i in range(n)] + + +def mv(a, vector): + return [sum(x*y for x,y in zip(row,vector)) for row in a] + + +def serialq(a): + return [[str(x) for x in row] for row in a] + + +def route_witness(matrices, raw_word, root_word): + mat = matrices["matrices"] + k, r = mat["K"], mat["R"] + need(len(k) == 111 and len(r) == 9, "actual code dimensions") + a = [] + for p, mask in enumerate(k): + row = 1 << p + if p not in (0,1,2): + for j, data in enumerate(r): + if mask >> j & 1: + row ^= data + a.append(row) + need((a[3] & 1) == 1, "actual A[3,0]") + full_lines = root_word["lines"] + need(len(full_lines) == 120, "full E8 line inventory") + p, q = 3, 0 + selected = {raw_word["ports_geom"][p], raw_word["ports_geom"][q]} + # Reconstruct the same deterministic discovery tree, only composing routes + # on the paths needed for the selected witness. No all-pairs claim. + parent = {0: None} + edge = {} + frontier = [0] + while not selected <= parent.keys(): + later = [] + for source in frontier: + for target in range(120): + dot = sum(x*y for x,y in zip(full_lines[source],full_lines[target])) + if target in parent or abs(dot) != 2: + continue + sign = 1 if dot == 2 else -1 + d = [F(x-sign*y) for x,y in zip(full_lines[source],full_lines[target])] + norm = sum(x*x for x in d) + reflection = [[F(i==j)-2*d[i]*d[j]/norm for j in range(8)] + for i in range(8)] + parent[target] = source + edge[target] = reflection + later.append(target) + need(later, "selected route labels reachable") + frontier = later + routes, projections, paths = {}, {}, {} + for port in (p,q): + label = raw_word["ports_geom"][port] + need(raw_word["lines"][port] == full_lines[label], "selected actual root") + path, current = [], label + while parent[current] is not None: + path.append(current) + current = parent[current] + g = eye(8) + for target in reversed(path): + g = mm(edge[target],g) + root = [F(x) for x in raw_word["lines"][port]] + cap = [row[1:] for row in g] + projection = [[x*y/4 for y in root] for x in root] + need(mm(tr(cap),cap) == eye(7), "selected cap orthonormal") + need(mm(cap,tr(cap)) == [[F(i==j)-projection[i][j] for j in range(8)] + for i in range(8)], "selected cap projector") + rho = [projection[i]+cap[i] for i in range(8)] + rho += [row+[F(0)]*7 for row in tr(cap)] + need(tr(rho) == rho and mm(rho,rho) == eye(15), + "selected route symmetric involution") + routes[port], projections[port], paths[port] = rho,projection,list(reversed(path)) + vector = [F(x) for x in raw_word["lines"][q]]+[F(0)]*7 + need(mv(routes[q],vector) == vector, "source route fixes source root line") + relative = mm(routes[p],routes[q]) # rho_p^-1 rho_q; both involutions. + output = mv(relative,vector) + expected = [F(0)]*15 + expected[10] = F(2) + need(output == expected, "selected exact fresh-coordinate witness") + target = [row+[F(0)]*7 for row in projections[p]]+[[F(0)]*15 for _ in range(7)] + defect = [x-y for x,y in zip(output,mv(target,output))] + need(defect == expected, "fresh output lies outside target P3") + mod101 = [x.numerator*pow(x.denominator,-1,101)%101 for x in output] + need(mod101[10] == 2, "odd-field fresh witness") + # The binary function f(w)=1[w_10=0] is constant on target P3 cosets, + # but f(T*0)=1 differs from f(T*(2e0))=0 although 2e0 is in source P0. + # This gives an explicit quotient/pullback separator, rather than assuming + # a point delta is admissible on an entire source-frame fiber. + separator_at_zero, separator_at_image = 1, int(mod101[10] == 0) + need(separator_at_zero != separator_at_image, "binary VALUE fiber separator") + target_fiber_vector = [F(x) for x in raw_word["lines"][p]]+[F(0)]*7 + inverse_relative = mm(routes[q],routes[p]) + need(mm(relative,inverse_relative) == eye(15), "relative inverse orientation") + inverse_image = mv(inverse_relative,target_fiber_vector) + need(inverse_image == expected, "direct source VALUE pushforward witness") + inverse_mod101 = [x.numerator*pow(x.denominator,-1,101)%101 for x in inverse_image] + pushed_at_zero, pushed_at_target_shift = 1, int(inverse_mod101[10] == 0) + need(pushed_at_zero != pushed_at_target_shift, "forward VALUE admission failure") + need(mv(mm(routes[q],routes[q]),vector) == vector, "diagonal route control") + zero = [[F(0)]*15 for _ in range(15)] + need(mm(relative,zero) == mm(zero,relative) == zero, "ZERO frame control") + controls = [] + controls.append(expect_failure( + "omitted_relative_route", + lambda: need(any(mv(eye(15),vector)[8:]), "fresh-coordinate witness required"), + "fresh-coordinate witness required")) + controls.append(expect_failure( + "diagonal_substituted_for_offdiagonal", + lambda: need(any(mv(mm(routes[q],routes[q]),vector)[8:]), + "fresh-coordinate witness required"), + "fresh-coordinate witness required")) + controls.append(expect_failure( + "delete_actual_A30", + lambda: need(((a[3]^1)&1) == 1, "actual A[3,0]"), + "actual A[3,0]")) + return dict(status="PASS_SELECTED_A30_EARLY_PROMOTION_COUNTEREXAMPLE", + binary_code_rows=a, output_port=p,input_port=q,coefficient=1, + selected_route_paths={str(i): paths[i] for i in (p,q)}, + selected_route_matrices={str(i): serialq(routes[i]) for i in (p,q)}, + input_address=list(map(str,vector)), + output_address=list(map(str,output)), + defect_outside_target_P3=list(map(str,defect)), + output_mod101=mod101, + binary_VALUE_separator=dict( + function="f(w)=1 if w_10=0 in F101, else 0", + constant_on_target_P3=True, + at_T_zero=separator_at_zero,at_T_source_P0_vector=separator_at_image, + implication="pullback along T is not constant on source P0"), + direct_forward_VALUE_witness=dict( + address_push="T=rho3^-1*rho0", + VALUE_push="g(w)=f(T^-1*w)", + source_function="f(w)=1 if w_10=0 in F101, else 0", + source_function_constant_on_P0=True, + target_P3_vector=list(map(str,target_fiber_vector)), + inverse_address_image=list(map(str,inverse_image)), + g_at_zero=pushed_at_zero,g_at_target_P3_shift=pushed_at_target_shift, + implication="g is not constant on target P3"), + exact_fresh_coordinates=list(map(str,output[8:])), + selected_routes_checked=2,ordered_offdiagonal_pairs_checked=1, + all_12210_ordered_pairs_replayed=False, + controls=controls, + scope="Rational ADDRESS and ADDRESS field F101; explicit binary VALUE separator", + excluded_claim="No obstruction to all changed promoted-input factories") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + for name in PINS: + parser.add_argument("--"+name, required=True, type=Path) + parser.add_argument("--output", required=True, type=Path) + args = parser.parse_args() + sources = {name: read_source(getattr(args,name),name) for name in PINS} + recipe = source_recipe(sources["recipe"]) + cases = [] + # All-B proof is written separately. These are finite implementation fixtures. + for b in list(range(1,13))+[16,32]: + events = recipe(b) + need(events == independent_recipe(b), "pinned recipe reconstruction") + need(len(events) == 5*b-1, "recipe event count") + need(evaluate(events,2*b) == endpoint(2*b), "all-clean signed endpoint") + for variant in ("historical","two_code"): + cases.append(audit_word(make_hybrid(events,variant),b,variant)) + b4 = recipe(4) + controls = mutation_controls(b4) + route = route_witness(json.loads(sources["matrices"]), + json.loads(gzip.decompress(sources["r438"])), + json.loads(gzip.decompress(sources["roots"]))) + # Determinant exponent certificate under a0=t, a1=u, all other a_s=1. + prefix_exponents = [1,-1] + terminal_exponents = [0,0] + for event in make_hybrid(b4,"two_code"): + if event["kind"] == "code": + generator = event["generator"] + terminal_exponents[abs(generator)-1] += 1 if generator>0 else -1 + need(terminal_exponents == [-1,1], "terminal determinant correction") + need([a+b for a,b in zip(prefix_exponents,terminal_exponents)] == [0,0], + "determinant exponents cancel") + receipt = dict( + status="PASS_ALL_B_PROOF_FIXTURES_TWO_CODE_HYBRID_AND_SELECTED_NATIVE_WITNESS", + scientific_pin="20ecf2891d80b5acf18d980b2164fb44ea7faa90", + sources=PINS, algebra="Integral free group algebra; transpose generators independent", + finite_bank_counts=list(range(1,13))+[16,32],cases=cases, + word_controls=controls, early_promotion=route, + two_code_lower_bound=dict( + scalar_specialization="a0=t,a1=u,other generators=1 over Q(t,u)", + prefix_determinant_exponents=prefix_exponents, + required_added_exponents=[-1,1],attained_added_exponents=terminal_exponents, + minimum_added_single_bank_generator_occurrences=2, + restrictions=["same first coded F0,B1","all remaining locals clean", + "no extra coded local","single-bank a_s or a_s^-1 primitives", + "scalar determinant-neutral mixing and logical normalization", + "fixed all-clean signed endpoint", + "no free composite-code primitive or new operator-valued gate"]), + invoice=dict(historical_code_occurrences=6,new_code_occurrences=2, + historical_scalar_ADDs=9216,new_scalar_ADDs=3220, + scalar_ADDs_saved=5996,normalization_rank_one_children=222, + conditional_net_rank_saving_vs_allclean=-102, + formula_extra_rank_vs_fullycoded="60*(2*B-1)+222", + historical_B4_allowances_only={"beta_002":492,"beta_003":309}, + historical_B4_extra_rank=642), + scope=["written proof covers every B>=1 and arbitrary 2B input banks", + "finite replay covers listed bank counts only", + "local arbitrary-helper restoration and copied-field cleanup are premises", + "signed abstract local map is not an assertion about actual R429 integer target", + "native phase, mixed owners, access, precision and full recurrence remain conditional", + "two-code optimum is for the stated generator-occurrence alphabet only", + "no new rank saving, physical optimum, kappa or formal-kernel proof"]) + # Output is external; no package-relative writes or hidden dependencies. + args.output.parent.mkdir(parents=True,exist_ok=True) + args.output.write_text(json.dumps(receipt,sort_keys=True,indent=2)+"\n") + print(json.dumps({"status":receipt["status"],"cases":len(cases), + "word_controls":len(controls), + "receipt_canonical_sha256":digest(canonical(receipt))}, + sort_keys=True)) + + +if __name__ == "__main__": + main() diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/recipe/CHECKS.json.gz b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/CHECKS.json.gz new file mode 100644 index 0000000000..11f14c0d8f Binary files /dev/null and b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/CHECKS.json.gz differ diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/recipe/SOURCE-DEPENDENCIES.json b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/SOURCE-DEPENDENCIES.json new file mode 100644 index 0000000000..0ee87bb402 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/SOURCE-DEPENDENCIES.json @@ -0,0 +1,31 @@ +{ + "dependencies": [ + { + "name": "source_recipe", + "path": "/Users/ross/git/math/integer-mult-bounds/research/e8-bit-p111-tuned/vendor/pr510/e8-r480-nine-stage/vendor/e8-r715-eleven-stage-whole/code/global_k.py", + "sha256": "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8", + "use": "authenticated recipe function only; module imports/main excluded" + }, + { + "name": "historical_recipe_checker", + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_nilpotent_recipe.py", + "sha256": "d2649a223c4fd221e64dc059422bcf796fbe1becc524911c7e84c0cf475b2b7e", + "use": "review provenance only; not executed or imported" + }, + { + "name": "historical_receipt", + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/BIT-NILPOTENT-RECIPE.json", + "sha256": "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a", + "use": "all six complete case dictionaries replayed; rest immutable source provenance" + }, + { + "name": "historical_ring_helpers", + "path": "/Users/ross/git/math/.research-automation/runs/kappa-major-20261018T1330Z/shared-helper-algebra/bit_seeded_star.py", + "sha256": "91d3bbebfad36836b48949a2d231afd3eb8dd46f0443d45f7e19ff9779468347", + "use": "review provenance only; independent checker does not import this arithmetic" + } + ], + "new_checker_sha256": "50ef2041dc27c11189e0f4293cd30aed2ee372b1a6e928dbe6197e21ceab75de", + "scientific_pin": "20ecf2891d80b5acf18d980b2164fb44ea7faa90", + "written_proof_sha256": "9601bf1cfdd196e30c885f2d880f6322c3e1d11c898a1689ad8087259b573988" +} diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/recipe/VALIDATION.json b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/VALIDATION.json new file mode 100644 index 0000000000..fca5b657e4 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/VALIDATION.json @@ -0,0 +1,63 @@ +{ + "checker_sha256": "50ef2041dc27c11189e0f4293cd30aed2ee372b1a6e928dbe6197e21ceab75de", + "command_path_aliases": "Input aliases refer to exact files and hashes in SOURCE-DEPENDENCIES.json. Output paths may be external.", + "commands": [ + [ + "python3.12", + "-I", + "-B", + "check.py", + "--recipe-source", + "GLOBAL_K.py", + "--historical-receipt", + "BIT-NILPOTENT-RECIPE.json", + "--output", + "CHECKS.json" + ], + [ + "python3.12", + "-I", + "-O", + "-B", + "check.py", + "--recipe-source", + "GLOBAL_K.py", + "--historical-receipt", + "BIT-NILPOTENT-RECIPE.json", + "--output", + "CHECKS-OPTIMIZED.json" + ] + ], + "executions": [ + { + "elapsed_seconds": 0.09675, + "exit_code": 0, + "optimization": false, + "stderr": "", + "stdout": "PASS_FIXED_RECIPE_ALL_B_PROOF_CERTIFICATES\nB=1..12; all historical B=1..6 cases; 72 arbitrary-input instantiations; 12 intended rejections\n" + }, + { + "elapsed_seconds": 0.122042, + "exit_code": 0, + "optimization": true, + "stderr": "", + "stdout": "PASS_FIXED_RECIPE_ALL_B_PROOF_CERTIFICATES\nB=1..12; all historical B=1..6 cases; 72 arbitrary-input instantiations; 12 intended rejections\n" + } + ], + "exit_codes": [ + 0, + 0 + ], + "finite_B_cases": 12, + "formal_kernel_proof": false, + "full_input_instantiations": 72, + "historical_full_cases": 6, + "intended_negative_controls": 12, + "python": "CPython 3.12.14", + "receipt_bytes": 194305, + "receipt_sha256": "e829f99da71b9a6b1a533d7743cc249e15ab7f65a936c7b89800c24e4b9dc687", + "receipts_byte_identical": true, + "spectator_negative_control": "Actual B4 complete passing replay, N=[[0,1],[1,0]], one dirty spectator; mutate its target I to N and require literal dirty spectator restoration rejection.", + "status": "PASS_NORMAL_AND_OPTIMIZED_IDENTICAL_RECEIPTS", + "utc_recorded": "2026-10-20T12:26:14.707742+00:00" +} diff --git a/research/bit-fixed-controller-repairs/frozen/reviews/recipe/check.py b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/check.py new file mode 100644 index 0000000000..ac139ca189 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/reviews/recipe/check.py @@ -0,0 +1,410 @@ +#!/usr/bin/env python3 +"""Independent fixed-recipe repair certificate. Apache-2.0. + +Prepared with substantial OpenAI Codex assistance. No search is executed. +The all-parameter proof is in PROOF.md; this checker covers B=1,...,12. +""" +import argparse +import ast +import hashlib +import json +from pathlib import Path + +RECIPE_SHA = "6368196a393ac25bb2918880e4c4bd31ed733b762c27b6873ab391cbc0c5c3c8" +HISTORICAL_SHA = "ef97f43313ccffb7a8ea5965d37b37452b70cf4ccfbafe81e9e92e46d0f1a14a" +PIN = "20ecf2891d80b5acf18d980b2164fb44ea7faa90" + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def identity(n): + return [1 << i for i in range(n)] + + +def rank(rows): + pivots = {} + for row in rows: + while row: + i = row.bit_length() - 1 + if i in pivots: + row ^= pivots[i] + else: + pivots[i] = row + break + return len(pivots) + + +def dot(a, b): + return (a & b).bit_count() & 1 + + +def column(rows, j): + return sum(((r >> j) & 1) << i for i, r in enumerate(rows)) + + +def outer(u, v, n): + return [v if (u >> i) & 1 else 0 for i in range(n)] + + +def add(a, b): + need(len(a) == len(b), "matrix dimensions") + return [x ^ y for x, y in zip(a, b)] + + +def multiply(a, b): + answer = [] + for row in a: + value = 0 + while row: + bit = row & -row + value ^= b[bit.bit_length() - 1] + row ^= bit + answer.append(value) + return answer + + +def inverse(a): + n = len(a) + z = [r | (1 << (n + i)) for i, r in enumerate(a)] + for j in range(n): + positions = [i for i in range(j, n) if (z[i] >> j) & 1] + need(bool(positions), "scalar conjugator singular") + p = positions[0] + z[j], z[p] = z[p], z[j] + for i in range(n): + if i != j and (z[i] >> j) & 1: + z[i] ^= z[j] + return [r >> n for r in z] + + +def transpose(rows, n): + return [column(rows, j) for j in range(n)] + + +def trace(rows): + return sum((row >> i) & 1 for i, row in enumerate(rows)) & 1 + + +def extract_recipe(raw): + tree = ast.parse(raw) + matches = [ + node for node in tree.body + if isinstance(node, ast.FunctionDef) and node.name == "recipe" + ] + need(len(matches) == 1, "recipe definition multiplicity") + function = matches[0] + need(not function.decorator_list, "decorated recipe excluded") + environment = {"__builtins__": {"dict": dict, "range": range, "reversed": reversed}} + exec(compile(ast.Module(body=[function], type_ignores=[]), + "", "exec", + dont_inherit=True, optimize=0), environment) + return environment["recipe"] + + +def bound_bytes(path, expected, message): + raw = path.read_bytes() + need(hashlib.sha256(raw).hexdigest() == expected, message) + return raw + + +def evaluate(events, banks): + """Dual-number matrices as separate constant and epsilon bit rows.""" + n = 2 * banks + constant, epsilon = identity(n), [0] * n + for event in events: + kind = event["kind"] + if kind == "local": + i = 2 * event["pair"] + need(0 <= i < n - 1, "local bank range") + if event["reverse"]: + # x <- (1+epsilon)x+y, with y unchanged. + epsilon[i] ^= constant[i] ^ epsilon[i + 1] + constant[i] ^= constant[i + 1] + else: + # y <- x+(1+epsilon)y, with x unchanged. + epsilon[i + 1] ^= epsilon[i] ^ constant[i + 1] + constant[i + 1] ^= constant[i] + elif kind == "bridge": + d, s = 2 * event["dst"], 2 * event["src"] + need(d != s and 0 <= d < n and 0 <= s < n, "bridge bank range") + need(event["coefficient"] in (-1, 1), "bridge coefficient") + constant[d] ^= constant[s] + epsilon[d] ^= epsilon[s] + constant[s + 1] ^= constant[d + 1] + epsilon[s + 1] ^= epsilon[d + 1] + elif kind == "exchange": + for i in range(0, n, 2): + constant[i], constant[i + 1] = constant[i + 1], constant[i] + epsilon[i], epsilon[i + 1] = epsilon[i + 1], epsilon[i] + else: + raise ValueError("unknown recipe event") + return constant, epsilon + + +def grouped(rows, banks): + permutation = list(range(0, 2 * banks, 2)) + list(range(1, 2 * banks, 2)) + return [ + sum(((rows[i] >> j) & 1) << k for k, j in enumerate(permutation)) + for i in permutation + ] + + +def ungrouped(rows, banks): + permutation = list(range(0, 2 * banks, 2)) + list(range(1, 2 * banks, 2)) + answer = [0] * (2 * banks) + for i, original_i in enumerate(permutation): + answer[original_i] = sum( + ((rows[i] >> j) & 1) << original_j + for j, original_j in enumerate(permutation) + ) + return answer + + +def closed_form(banks): + b = banks + c = [sum(((b - max(i, j)) & 1) << j for j in range(b)) for i in range(b)] + d = [(1 << i) | ((1 << (i - 1)) if i else 0) for i in range(b)] + e = [1] + [(1 << i) - 1 for i in range(1, b)] + a = [row << b for row in c] + [d[i] | (e[i] << b) for i in range(b)] + m = add(a, identity(2 * b)) + return a, m, c, d, e + + +def projector_conjugator(u, v, n): + need(u != 0 and v != 0 and dot(v, u) == 1, "repair is not a rank-one idempotent") + pivot = (v & -v).bit_length() - 1 + columns = [u] + for j in range(n): + if j != pivot: + columns.append((1 << j) ^ ((1 << pivot) if (v >> j) & 1 else 0)) + scalar = transpose(columns, n) + scalar_inverse = inverse(scalar) + need(scalar_inverse[0] == v, "conjugator first dual") + paid = [1] + [0] * (n - 1) + p = outer(u, v, n) + need(multiply(multiply(scalar, paid), scalar_inverse) == p, + "scalar conjugation projector") + need(multiply(p, p) == p and rank(p) == 1 and trace(p) == 1, + "projector identities") + return scalar, scalar_inverse + + +def repair_projectors(m, banks): + n, y0 = 2 * banks, banks + result = [] + if banks & 1: + for j in range(n): + if j != y0: + result.append((column(m, j), 1 << j)) + result += [(column(m, y0) ^ (1 << y0), 1 << y0), + (1 << y0, 1 << y0)] + else: + for j in range(banks): + result.append((column(m, j), (1 << j) ^ ((1 << y0) if j & 1 else 0))) + for j in range(banks + 1, n): + result.append((column(m, j), 1 << j)) + return result + + +def validate_repair(m, projectors): + n = len(m) + total = [0] * n + records = [] + for u, v in projectors: + scalar, scalar_inverse = projector_conjugator(u, v, n) + total = add(total, outer(u, v, n)) + records.append({"u_bits": u, "v_bits": v, + "scalar_rows": scalar, "scalar_inverse_rows": scalar_inverse}) + need(total == m, "repair coefficient endpoint") + return records + + +def tensor(rows, n_block): + """Kronecker product in bank-major order, bit-packed binary matrices.""" + width = len(n_block) + answer = [] + for row in rows: + for block_row in n_block: + answer.append(sum(block_row << (j * width) + for j in range(len(rows)) if (row >> j) & 1)) + return answer + + +def instantiated_endpoint(a, m, projectors, base_n, spectators, + wrong_first_spectator_target=False): + """Exact arbitrary-input matrix replay, including dirty identity spectators.""" + n, w = len(a), len(base_n) + need(multiply(base_n, base_n) == identity(w), "N is not an involution") + epsilon = add(base_n, identity(w)) + need(any(epsilon), "N identity representation excluded from obstruction") + r = n + spectators + enlarged_a = a[:] + [0] * spectators + enlarged_m = m[:] + [0] * spectators + endpoint = add(identity(r * w), tensor(enlarged_a, epsilon)) + for u, v in projectors: + event = add(identity(r * w), tensor(outer(u, v, r), epsilon)) + endpoint = multiply(event, endpoint) + target = tensor(identity(n) + [0] * spectators, base_n) + for i in range(n * w, r * w): + target[i] = 1 << i + if wrong_first_spectator_target: + need(spectators > 0, "spectator mutation needs a spectator") + for i in range(w): + target[n * w + i] = base_n[i] << (n * w) + need(endpoint[n * w:] == target[n * w:], + "literal dirty spectator restoration") + need(endpoint == target, "instantiated full dirty-input endpoint") + need(rank(tensor(enlarged_m, epsilon)) == rank(enlarged_m) * rank(epsilon), + "instantiated tensor rank") + return {"ports_per_bank": w, "spectators": spectators, "N_rows": base_n, + "all_input_columns": r * w, "epsilon_rank": rank(epsilon), + "defect_rank": rank(enlarged_m) * rank(epsilon)} + + +def reject(name, operation, expected): + try: + operation() + except ValueError as error: + need(str(error) == expected, "wrong rejection for " + name) + return {"name": name, "rejection": str(error)} + raise ValueError("negative control accepted: " + name) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--recipe-source", type=Path, required=True) + parser.add_argument("--historical-receipt", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + args = parser.parse_args() + recipe_raw = bound_bytes(args.recipe_source, RECIPE_SHA, "recipe source hash") + historical_raw = bound_bytes(args.historical_receipt, HISTORICAL_SHA, "historical receipt hash") + recipe = extract_recipe(recipe_raw) + historical = json.loads(historical_raw) + need(historical["scientific_pin"] == PIN and historical["source_recipe_sha256"] == RECIPE_SHA, + "historical source binding") + cases = [] + for b in range(1, 13): + n = 2 * b + events = recipe(b) + constant, epsilon = evaluate(events, b) + a, m, c, d, e = closed_form(b) + need(constant == identity(n), "recipe constant endpoint") + need(grouped(epsilon, b) == a, "recipe closed-form coefficient") + schur = add(add(e, identity(b)), multiply(d, c)) + need(schur == [c[0]] + identity(b)[1:], "Schur row formula") + expected_rank = n if b & 1 else n - 1 + expected_count = n + 1 if b & 1 else n - 1 + need(rank(a) == n and rank(m) == expected_rank and trace(m) == 1, + "rank and trace theorem") + if not b & 1: + kernel = (1 << b) | sum(1 << j for j in range(1, b, 2)) + need(all(dot(row, kernel) == 0 for row in m), "even kernel formula") + else: + kernel = None + projectors = repair_projectors(m, b) + repairs = validate_repair(m, projectors) + need(len(projectors) == expected_count, "attaining repair count") + need(len(projectors) >= rank(m) and len(projectors) & 1 == trace(m), + "lower bound match") + instantiations = [] + if b <= 8: + for base_n in ([2, 1], [3, 2], [3, 2, 12, 8]): + for spectators in (0, 1, 3): + instantiations.append(instantiated_endpoint(a, m, projectors, base_n, spectators)) + if b <= 6: + old = historical["cases"][b - 1] + raw_n_entries = [ + [(((constant[i] >> j) & 1) ^ ((epsilon[i] >> j) & 1)) + | (((epsilon[i] >> j) & 1) << 1) for j in range(n)] + for i in range(n) + ] + old_a = [[(epsilon[i] >> j) & 1 for j in range(n)] for i in range(n)] + old_m = [[old_a[i][j] ^ int(i == j) for j in range(n)] for i in range(n)] + recovered = {"B": b, "events": events, "raw_endpoint_ring_entries": raw_n_entries, + "epsilon_matrix_A": old_a, "relative_to_common_N_defect_M": old_m, + "rank_A": n, "rank_defect_M": expected_rank, "trace_defect": 1} + need(recovered == old, "complete historical case replay") + cases.append({"B": b, "events": events, "constant_rows": constant, + "epsilon_A_grouped_rows": a, "defect_M_grouped_rows": m, + "C_rows": c, "D_rows": d, "E_rows": e, "schur_rows": schur, + "rank_A": n, "rank_M": expected_rank, "trace_M": 1, + "even_kernel_bits": kernel, "minimum_repair_calls": expected_count, + "repair_projectors": repairs, "instantiations": instantiations}) + + b = 4 + a, m, _, _, _ = closed_form(b) + events = recipe(b) + projectors = repair_projectors(m, b) + controls = [] + bad = [dict(event) for event in events] + bad[0]["reverse"] = True + controls.append(reject("reverse initial local call", + lambda: need(evaluate(bad, b) == (identity(8), ungrouped(a, b)), + "changed word endpoint"), + "changed word endpoint")) + bridge_index = next(i for i, event in enumerate(events) if event["kind"] == "bridge") + bad_bridge = events[:bridge_index] + events[bridge_index + 1:] + controls.append(reject("omit first bridge", + lambda: need(evaluate(bad_bridge, b) == (identity(8), ungrouped(a, b)), + "changed word endpoint"), + "changed word endpoint")) + controls.append(reject("omit terminal exchange", + lambda: need(evaluate(events[:-1], b) == (identity(8), ungrouped(a, b)), + "changed word endpoint"), + "changed word endpoint")) + controls.append(reject("omit one attaining repair", + lambda: validate_repair(m, projectors[:-1]), + "repair coefficient endpoint")) + controls.append(reject("trace-zero rank-one coupling", + lambda: projector_conjugator(1, 2, 8), + "repair is not a rank-one idempotent")) + controls.append(reject("wrong even kernel parity", + lambda: need(all(dot(row, 1 << b) == 0 for row in m), + "even kernel formula"), + "even kernel formula")) + controls.append(reject("non-involutive N", + lambda: instantiated_endpoint(a, m, projectors, [2, 3], 1), + "N is not an involution")) + controls.append(reject("identity N obstruction hypothesis", + lambda: instantiated_endpoint(a, m, projectors, [1, 2], 1), + "N identity representation excluded from obstruction")) + controls.append(reject("duplicate recipe definition", + lambda: extract_recipe(b"def recipe(K): return []\ndef recipe(K): return []\n"), + "recipe definition multiplicity")) + controls.append(reject("missing recipe definition", + lambda: extract_recipe(b"def another(K): return []\n"), + "recipe definition multiplicity")) + controls.append(reject("changed epsilon formula", + lambda: need(add(a, [1] + [0] * 7) == grouped(evaluate(events, b)[1], b), + "recipe closed-form coefficient"), + "recipe closed-form coefficient")) + controls.append(reject("dirty spectator incorrectly receives N", + lambda: instantiated_endpoint( + a, m, projectors, [2, 1], 1, + wrong_first_spectator_target=True), + "literal dirty spectator restoration")) + output = { + "status": "PASS_FIXED_RECIPE_ALL_B_PROOF_CERTIFICATES", + "scientific_pin": PIN, + "source_hashes": {"recipe": RECIPE_SHA, "historical_receipt": HISTORICAL_SHA}, + "finite_coverage": {"B": [1, 12], "full_binary_instantiation_B": [1, 8], + "binary_N_matrices": 3, "spectator_counts": [0, 1, 3], + "historical_full_cases": 6}, + "all_parameter_written_theorem": "k(B)=2B+1 for odd B; k(B)=2B-1 for even B", + "coordinate_order": "x0,...,x(B-1),y0,...,y(B-1)", + "cases": cases, "negative_controls": controls, + "formal_kernel_proof": False, + "limits": ["Fixed recipe and scalar-GL-conjugated single-bank N repairs only.", + "Every finite number of independently dirty restored spectator banks is covered by the written bound.", + "Native scalar access, each N implementation and its price, fresh frames, helper restoration and precision remain separate."] + } + args.output.write_text(json.dumps(output, indent=2, sort_keys=True) + "\n") + print(output["status"]) + print("B=1..12; all historical B=1..6 cases; 72 arbitrary-input instantiations; 12 intended rejections") + + +if __name__ == "__main__": + main() diff --git a/research/bit-fixed-controller-repairs/frozen/routes/expanded_sections.py b/research/bit-fixed-controller-repairs/frozen/routes/expanded_sections.py new file mode 100644 index 0000000000..5ba1e11ac5 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/routes/expanded_sections.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +"""Exact135-repair scalar closure and actual fresh-coordinate route witness. + +Scalar closure is not a native endpoint. The fresh-coordinate test proves +that this candidate fails even on arbitrary binary VALUE functions over an +explicit odd ADDRESS field. No kappa or completed supplier is claimed. +Substantial OpenAI Codex assistance. +""" +import argparse,gzip,json,sys +from fractions import Fraction as F +from hashlib import sha256 +from pathlib import Path +sys.dont_write_bytecode=True +HERE=Path(__file__).resolve().parent +OLD=Path('/Users/ross/git/math/.research-automation/runs/kappa-3605-successor-20261018T0940Z/major-frontier') +REPO=Path('/Users/ross/git/math/integer-mult-bounds') +sys.path.insert(0,str(OLD/'recursive')) +import bit_cap_copy_local as cap + +def need(b,s): + if not b:raise ValueError(s) + +def bits(x): + while x: + b=x&-x;yield b.bit_length()-1;x^=b +def xor(xs): + x=0 + for a in xs:x^=a + return x +def eye(n):return [1<>j&1),None) + need(p is not None,'singular binary code');w[p],w[j]=w[j],w[p] + for p in range(n): + if p!=j and w[p]>>j&1:w[p]^=w[j] + need([r&((1<>n for r in w] + +def mm(a,b): + bt=list(zip(*b));return [[sum(x*y for x,y in zip(row,col)) for col in bt] for row in a] +def tr(a):return list(map(list,zip(*a))) +def eyeq(n):return [[F(i==j) for j in range(n)] for i in range(n)] +def serial(a):return [[str(x) for x in row] for row in a] + +def roots_and_routes(word): + rawpath=REPO/'research/e8-bit-carrier-skeleton/data/bit/bitE8-r865.json.gz' + raw=rawpath.read_bytes();full=json.loads(gzip.decompress(raw));lines=full['lines'] + I=eyeq(8);gs={0:I};todo=[0] + while todo: + more=[] + for p in todo: + for q in range(120): + ip=sum(x*y for x,y in zip(lines[p],lines[q]))//2 + if q in gs or abs(ip)!=1:continue + d=[F(x-y if ip==1 else x+y) for x,y in zip(lines[p],lines[q])] + norm=sum(x*x for x in d) + r=[[F(i==j)-2*d[i]*d[j]/norm for j in range(8)] for i in range(8)] + gs[q]=mm(r,gs[p]);more.append(q) + todo=more + need(len(gs)==120,'all actual E8 routes') + rho=[];AA=[];PP=[] + for p,label in enumerate(word['ports_geom']): + q=word['lines'][p];g=gs[label];a=[row[1:] for row in g] + P=[[F(x*y,4) for y in q] for x in q] + need(mm(tr(a),a)==eyeq(7),'actual orthonormal cap basis') + need(mm(a,tr(a))==[[I[i][j]-P[i][j] for j in range(8)] for i in range(8)],'actual cap projector') + r=[P[i]+a[i] for i in range(8)]+[row+[F(0)]*7 for row in tr(a)] + need(mm(r,r)==eyeq(15) and tr(r)==r,'actual involutive route') + rho.append(r);AA.append(a);PP.append(P) + # Every ordered distinct pair moves the fresh coordinate, even mod101. + failures=[];count=0 + for p in range(111): + for q in range(111): + if p==q:continue + aq=mm(tr(AA[p]),[[F(x)] for x in word['lines'][q]]) + need(any(x[0] for x in aq),'distinct-line fresh crossblock') + need(any((x[0].numerator*pow(x[0].denominator,-1,101))%101 for x in aq), + 'fresh crossblock nonzero mod101') + count+=1 + return rho,AA,PP,{'full_root_word_sha256':sha256(raw).hexdigest(),'ordered_distinct_pairs_checked':count,'address_prime':101} + +def main(): + ap=argparse.ArgumentParser(description=__doc__);ap.add_argument('--write',action='store_true');args=ap.parse_args() + inp=OLD/'recursive/BIT-THREE-ROW-INPUT.json';mat=json.loads(inp.read_bytes())['matrices'];R,K=mat['R'],mat['K'] + W=K[:] + for p in (0,1,2):W[p]=0 + A=[i^r for i,r in zip(eye(111),product(W,R))];AI=inverse(A) + J=[i^r for i,r in zip(eye(111),product(K,R))] + codes=[A]*8+[eye(111)];repairs=[];prefix=eye(111) + for s,a in enumerate(codes): + ai=inverse(a);Q=[i^r for i,r in zip(eye(111),product(J,ai))] + rows=[p for p,r in enumerate(Q) if r];need(rows==([0,1,2] if s<8 else list(range(111))),'actual physical repair rows') + repairs.append({'stage':s,'rows':rows,'queries':Q}) + prefix=product(a if s%2==0 else ai,prefix) + need(prefix==eye(111),'all111 scalar input columns close') + wordpath=cap.RAW;raw=wordpath.read_bytes();need(sha256(raw).hexdigest()==cap.RAW_SHA,'R438 source word pin') + word=json.loads(gzip.decompress(raw));rho,AA,PP,geo=roots_and_routes(word) + # Latest nonidentity factor is reverse stage7, whose coefficient matrixAI + # has an offdiagonal. Stage8 is the exact identity factor. + p,q=next((p,q) for p,row in enumerate(AI) for q in bits(row) if p!=q) + cross=mm(tr(AA[p]),PP[q]);i=next(i for i in range(8) if any(row[i] for row in cross)) + a=[F(j==i) for j in range(15)];b=[row[i] for row in mm(rho[p],rho[q])] + need(a[8:]==[0]*7 and any(b[8:]),'fresh-fiber delta witness') + # Literal pullback rule: row addresses use d*rho; the delta image is the + # corresponding inverse map, column rho_p*rho_q*a as recorded above. + need(b==[sum(rho[p][j][k]*rho[q][k][i] for k in range(15)) for j in range(15)],'ordered delta coordinate action') + b101=[x.numerator*pow(x.denominator,-1,101)%101 for x in b] + need(any(b101[8:]),'explicit odd-field delta witness') + # A missing offdiagonal cannot diagnose this phenomenon; diagonal routes + # fix the whole fresh coordinate. Omitting the port-relative route would + # incorrectly turn every factor into its scalar augmentation. + need(mm(rho[p],rho[p])==eyeq(15),'diagonal route control') + off_without_routes=eyeq(15);need(not any(off_without_routes[j][i] for j in range(8,15)),'omitted-route control') + sourcepath=REPO/'research/e8-bit-carrier-skeleton/code/nine/geometry.py' + out={'status':'PASS135_REPAIR_SCALAR_CLOSURE_AND_NATIVE_FRESH_FIBER_FAILURE', + 'R438_word_sha256':sha256(raw).hexdigest(),'matrix_input_sha256':sha256(inp.read_bytes()).hexdigest(), + 'actual_geometry_source_sha256':sha256(sourcepath.read_bytes()).hexdigest(), + 'codes':codes,'stage_repairs':repairs,'total_rank_one_copies':135,'previous_total':27,'extra_copies':108, + 'source_codes_binary_invertible':True,'scalar_all111_columns_endpoint_identity':True, + 'local_tariff':'eight3-row coded calls plus one111-row ordinary-source call; one private field live per snapshot, no new dirty helper', + 'fresh_coordinate_witness':{'latest_stage':7,'local_factor':'A^-1','output_port':p,'input_port':q, + 'coefficient':(AI[p]>>q)&1,'input_address_15':list(map(str,a)), + 'output_address_15':list(map(str,b)),'output_address_mod101':b101, + 'global_fresh_axes':list(range(8+7*6,8+7*7)), + 'compact_endpoint_input':'(G6...G0)^-1 delta(input_port q,input_address a)', + 'difference':'G7 delta has nonzero output at port p with freshE7!=0; (G6...G0)^-1 delta is supported wholly in freshE7=0'}, + 'geometry':geo,'controls':['diagonal relative route fixes fresh block','omitting relative route loses fresh witness'], + 'theorem_scope':'For any finite common-E controller with scalar invertible stage codes and these once-only fresh-block routes, exact endpointidentity forces every scalar stage code diagonal. OverF2 it forcesI, hence111physical repair rows perstage in this row-repair grammar.', + 'limits':['arbitrary changedcaller, operator-valued codes, revisiting fresh blocks, extra terminal stages and non-common-E controllers remain outside this theorem', + '135-copy candidate is only scalar closure and fails native endpoint; no whole supplier, signed local words or kappa admission']} + out=json.loads(json.dumps(out));path=HERE/'EXPANDED-SECTIONS.json' + if args.write:path.write_text(json.dumps(out,sort_keys=True,indent=2)+'\n') + else:need(json.loads(path.read_bytes())==out,'complete route receipt differs') + print(out['status']);print('scalarcopies135; actualfreshwitness',p,q,'axis',i,'mod101',b101[8:]) + +if __name__=='__main__':main() diff --git a/research/bit-fixed-controller-repairs/frozen/upstream/global_k.py b/research/bit-fixed-controller-repairs/frozen/upstream/global_k.py new file mode 100644 index 0000000000..3df12bd632 --- /dev/null +++ b/research/bit-fixed-controller-repairs/frozen/upstream/global_k.py @@ -0,0 +1,264 @@ +# Generalised from PR #443's global_kernel.py to an arbitrary odd stage count S = 2K+1 (compressed window m = 1+7S) +# by DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code. At the defaults (S = 9, 32 replicas) the emitted +# GLOBAL-TEMPLATE.json.gz and GLOBAL.json equal PR #443's (GLOBAL.json except wall-clock seconds). +# Kernel integration of PR436/PR386 by chafreaky, with OpenAI Codex assistance. +# Original copyright and attribution retained below. This variant uses explicit +# residual isometries and mixed-width banks; the original all-zero-start +# requirement is replaced by the verified kernel entrance contract. +"""Source-bound compressed S-stage (S = 2K+1 odd, default 9) bit template with independent replicas. +PR386 global identity and PR436 generalization by Zhihao Chen and eumemic, +with their disclosed OpenAI Codex and Anthropic Claude assistance, Apache-2.0. +PR439 explicit residual routes and this replication extension by chafreaky, +with OpenAI Codex assistance. All owner assignments and emitted calls are checked. +Historical PR386 regression is performed by the unchanged parent wrapper. +""" +import argparse, gzip, hashlib, json, struct, time +from collections import Counter +from pathlib import Path +import os, sys +sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../e8-r740-replica32/code')) +from bank_routes_k import placement, validate_isometries +from config import REPLICAS + +H,L,K,T,M=8,9,4,REPLICAS,64 # overwritten in main() from --stages / --replicas +NAMES={5:'FIVE',7:'SEVEN',9:'NINE',11:'ELEVEN',13:'THIRTEEN'} +def sha(p): return hashlib.sha256(p.read_bytes()).hexdigest() +def write(p,x): p.write_text(json.dumps(x,indent=2)+'\n') + +def recipe(K): + out=[dict(kind='local',stage=0,pair=0,reverse=False)]; stage=1 + for j in range(K): + out.append(dict(kind='local',stage=stage,pair=j,reverse=True)); stage+=1 + if j=5 and a.stages%2==1; L=a.stages; K=(L-1)//2; T=a.replicas; M=1+7*L; NOBANK=a.no_banks + if L!=9: assert NOBANK, 'bank tiling is only emitted for the nine-stage layout; use --no-banks and host every residual' + DEFICIT=T*(2*K*120-9*H*L) + wp=a.word; w=json.loads(gzip.decompress(wp.read_bytes()) if wp.suffix=='.gz' else wp.read_bytes()) + V,R=w['v'],w['R']; LOCAL=2*V+R; DATA=2*K*V*T; LIVE=DATA+L*R + assert (w['h'],V,w['form'])==(8,120,'/2') + geo=json.loads((out/'GEOMETRY.json').read_text()) + assert geo['status']=='PASS_COMPRESSED_%s_BIT_GEOMETRY_AND_BANK_BLOCKS'%NAMES[L] and geo['stages']==L and geo['m']==M + # the port routes depend only on the labels: same 120 label vectors, in the same order + assert len(geo['ports'])==V and all(p['port']==t and p['q']==w['lines'][t] for t,p in enumerate(geo['ports'])) + rp=a.local_check/'records/249-records.bin'; raw=rp.read_bytes(); rec=list(struct.iter_unpack('<6i',raw)) + state=json.loads((a.local_check/'records/249-states.json').read_text()) + fs=json.loads((a.local_check/'records/frames.json').read_text())['frames'] + dims={int(f):z['dim'] for f,z in fs.items()} + lg=json.loads((a.local_check/'cout/legality.json').read_text()) + cc=json.loads((a.local_check/'cout/columns.json').read_text()) + assert lg['status'].startswith('PASS') and cc['status'].startswith('PASS') + assert (state['v'],state['n'])==(V,LOCAL) and lg['copies']==lg['erasures']==9 + ADDS=lg['common_frame_ADDs'] + assert cc['formal_columns_checked']==4*V+R and cc['local_scalar_additions']==ADDS + initial=[state['initial'][str(i)] for i in range(LOCAL)] + final=[state['final'][str(i)] for i in range(LOCAL)] + assert all(dims[final[i]]==H for i in range(2*V,LOCAL)) + widths=[H-dims[initial[i]] for i in range(2*V,LOCAL)] + ENT=sum(H-z for z in widths) + if NOBANK: place,NB=None,None; LIVE=DATA + else: + place,NB=placement(widths,T,M) + assert T%8==0 and T*(H*R-ENT)%M==0 and NB==T*(H*R-ENT)//M + LIVE=DATA+L*NB + isometries=json.loads(a.isometries.read_text()) + assert validate_isometries(isometries,w['frames'],w['lines'],dims)==set(initial[2*V:]) + streams={}; checks={}; localH=None + for reverse in (False,True): + cur=(final if reverse else initial)[:]+[-1]; val=[1<=0 + cur[x]=newf + if f: hist[f]+=1 + events.append([0,x,oldf,newf,f,int(reverse)]) + elif op==1: + assert cur[x]==cur[y]==f and x!=y and x