diff --git a/research/joint-query-extra-b2-observation-seed3e62/README.md b/research/joint-query-extra-b2-observation-seed3e62/README.md new file mode 100644 index 0000000000..8ecf84cd93 --- /dev/null +++ b/research/joint-query-extra-b2-observation-seed3e62/README.md @@ -0,0 +1,136 @@ +# A paid ordinary-to-selected B2 observation at the first QQ16 cut + +**Exact local witness repair and conditional profile budget. No complete controller or κ claim.** + +The current selected checkpoint is unchanged at +`certificates/selected-result.json` SHA-256 +`10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`. Its accepted review, +source manifest, assembly certificate and reproduction target are pinned in `SOURCES.json`. +The local QQ16 words from merged PR #1969 are also pinned there. This package builds on its +reviewed selected-output witness; it does not rerun that witness or the complete local-word replay. + +## Changed observation + +The reviewed QQ16 witness uses the fixed F0/B1 pair and retains the ordinary schedule. It gives +eight independent lost directions + +```text +h_k = (48 I - B1* B1) B2* e_k, k = 0,...,7, +``` + +where `B_s = R_s iota_U`, `*` is transpose, and `e_k` is the kth centre basis vector at the +identity cover element. Its established Gram identities are + +```text +B1 B1* = 48 I +B2 B2* = 48 I +identity-coefficient(B2 B1* B1 B2*) = 192 I. +``` + +The current query `q2 = B2 Y + ell_2,A Y_A` can vanish on these directions. The proposed changed +interface adds the distinct ordinary-to-selected read + +```text +q_extra = B2 X_U +``` + +immediately before F0. The read does not change `X_U`. For every `k`, + +```text +B1 h_k = 48 B1 B2* e_k - B1 B1* B1 B2* e_k = 0, +identity-coefficient(B2 h_k) = (48*48 - 192)e_k = 2112 e_k. +``` + +Thus `q_extra` distinguishes all eight directions of this fixed obstruction family. The selected +record `X_0,T` on the witness is +`P_0,T ell_0,A P_2,A B2 h_k`; the cited witness proof establishes that this factor is an invertible +map between the selected coordinate spaces. The new observation therefore carries the missing +eight-dimensional information on this witness family. It does **not** prove that the whole +controller becomes injective on arbitrary inputs. + +The short verifier checks the exact 8-dimensional arithmetic consequence of these pinned Gram +identities and the profile calculations. The source route enumeration and original witness proof +remain the prior reviewed evidence; this package does not present them as an independent replay. + +## Observation invoice and its limit + +The proposed observation reads 96 ordinary source coordinates and returns eight independent query +coordinates. Since `B2 B2* = 48 I`, its output rank is eight. The source is read-only, so the +observation itself needs no source restoration. The eight returned values must still be hosted as +an added output state. A selected-word address/frame wrapper, output storage, helper ownership, +dirty-state restoration and recursive precision are not supplied by this changed-interface +definition. In particular, this package does not set any of those costs to zero in a supplier +claim. + +For an optimistic **profile-only** screen, the merged QQ16 `B_s,t` local word has native profile +`{1:2436, 2:418, 3:432, 4:142, 5:82}` and rank mass 5,546. If the eight new outputs could be +carried together in a single rank-8 child, profile mass would be 5,554. The exact selected +ceiling model then leaves only **0.043725878%** headroom over the selected word, before any new +address, copy, helper, frame, hosting or restoration toll. With eight separate rank-one output +charges the ceiling is already **0.035543596% below** the selected word. The profile variants are +shown below; the rank-8 envelope is not a proved implementation of the observation. + +| Profile | Local mass | Ceiling upper | Change from selected upper | +|---|---:|---:|---:| +| Selected `{1:2412,2:418,3:432,4:142,5:82,8:8}` | 5,586 | `169005411/100000000000` | baseline | +| QQ16 B word `{1:2436,2:418,3:432,4:142,5:82}` | 5,546 | `845992169/500000000000` | +0.114211018% | +| B word plus one ideal rank-8 output child | 5,554 | `1690793101/1000000000000` | +0.043725878% | +| B word plus eight rank-one output charges | 5,554 | `422363351/250000000000` | −0.035543596% | + +With the rank-8 envelope, two additional rank-one-equivalent charges still leave a positive +ceiling difference; three put it below the selected word. This leaves essentially no budget for +the real observation's output routing and hosting. The exact query-row ADD invoice and its native +address/frame implementation are not derived here, so this is a favorable stopping screen rather +than a complete controller cost. + +## Scope and predecessors + +- [PR #1969](https://github.com/CrocSwap/integer-mult-bounds/pull/1969), merged at head + `a6e6ad3936f67b8f63b5b68c5e75d540610a65e7`, supplies the local joint-query words and native + contracts. This package adds a distinct ordinary-to-selected read of `B2 X_U` at the first cut. +- The selected-output witness and its independent review show that fixed F0/B1 loses the eight + directions above even when the listed selected outputs and query histories are observed. This + package uses that result as a pinned premise and asks whether one specified changed observation + exposes those directions. +- Discussion #1976 changes swapped-chart source-code order; its source-only order obstruction is + adjacent but does not study this first-cut observation. + +Claim and handoff: [Discussion #2074](https://github.com/CrocSwap/integer-mult-bounds/discussions/2074). +Contribution: [PR #2079](https://github.com/CrocSwap/integer-mult-bounds/pull/2079). + +## Reproduce + +From the repository root: + +```sh +python3 -I -B research/joint-query-extra-b2-observation-seed3e62/verify.py +python3 scripts/research_package.py --package research/joint-query-extra-b2-observation-seed3e62 --check-only +``` + +Expected verifier prefix: `PASS_QQ16_EXTRA_B2_OBSERVATION_SCREEN`. The first command verifies the +exact eight-direction consequence from the pinned identities and certifies the profile brackets; +the metadata checker validates package pins and declarations only. Neither command constructs or +checks a native controller. + +## Open next questions + +- **Can this observation be implemented in the selected word's native interface?** The local + ceiling leaves only two rank-one-equivalent units for every added mapping and hosting cost. + First compile the exact `B2` read at the pre-F0 source frame and count query-row operations, + output writes and cover maps. Blocked by the missing native address and output-storage contract. +- **Does adding `q_extra` close the full controller?** Distinguishing the reviewed eight-direction + witness is only a subspace result. First form the full ordered map with the new output row and + compute its kernel while preserving all 480 ordinary helpers and selected endpoints. Blocked by + the absence of a new full controller word. + +## Pins and credit + +Cycle seed `3e62c004252727348ccea2dae9bbded6`, track `recursive-interfaces`, task +`joint-query-controller`, priority revision 4, exact base +`7c1e7811c730b17fe0eeef6c82ef011318b0465e`, selected-record SHA-256 +`10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32`. The cycle task and bounded +scope are recorded in `TASK.json`; the reviewed QQ16 and selected sources are pinned in +`SOURCES.json`. Credit Ali Romman and the PR #1969 lineage for the existing QQ16 words and +selected-output witness. Prepared by Cinna Davis with substantial OpenAI Codex assistance in +choosing the added observation, deriving its exact action on the witness family, and pricing the +conditional profile. diff --git a/research/joint-query-extra-b2-observation-seed3e62/SOURCES.json b/research/joint-query-extra-b2-observation-seed3e62/SOURCES.json new file mode 100644 index 0000000000..6e6629cb62 --- /dev/null +++ b/research/joint-query-extra-b2-observation-seed3e62/SOURCES.json @@ -0,0 +1,132 @@ +{ + "schema_version": 1, + "base_commit": "7c1e7811c730b17fe0eeef6c82ef011318b0465e", + "predecessors": [ + { + "pr": 1969, + "head": "a6e6ad3936f67b8f63b5b68c5e75d540610a65e7", + "status": "merged" + } + ], + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "purpose": "Current accepted record." + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7", + "purpose": "Priority revision 4 task source." + }, + { + "path": "docs/research/community-batch1099-review.md", + "usage": "provenance", + "git_blob": "6cb6ec061a071a06a2d18cd4dc3e9a2b05d28099", + "sha256": "7e76d2c38e5fce30587835b7251df1430488ae4dd372611ef69a3f03f476b6cb", + "purpose": "Current selected construction review." + }, + { + "path": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "usage": "provenance", + "git_blob": "6a75493790b4eff9c4a98051ef8b01d6aad0d5a8", + "sha256": "79b3de5db3dbcb9829789ba58e9e45758926031e2a7d80667a08429d369be53b", + "purpose": "Selected source manifest." + }, + { + "path": "research/community-frontier1094-audit/ASSEMBLY.json", + "usage": "provenance", + "git_blob": "5fd676df060f3b450782fdf5ff5f6beb63a5eeb0", + "sha256": "1122cb3a575f8c788345fc1bf4c108ac7c3250fb81a5988671f5eb04b3ab3045", + "purpose": "Selected assembly certificate." + }, + { + "path": "scripts/verify_frontier1094.py", + "usage": "provenance", + "git_blob": "96e6c1386bd052b9bcaf136d934406f3f0c3f777", + "sha256": "c7e20f59968ed5736fb859735de4de207de3418083e37012310ebcded946b949", + "purpose": "Selected full reproduction script." + }, + { + "path": "Makefile", + "usage": "provenance", + "git_blob": "448f13b58fbe3492e2ea6b2005c8822aefe2765c", + "sha256": "029076ba6558f4c97d59d508baeb47847e0fad3545ed1fd22943ab9d6c84c2b9", + "purpose": "Selected target is make frontier1094-verify." + }, + { + "path": "docs/research/pr-ledger.md", + "usage": "provenance", + "git_blob": "8d3c07877f77b1b3c51d20adaed7afa4a65b0284", + "sha256": "36bdfef4dc40f0b2872d8191350c90a90f653838ba3f694236042f7266ac061a", + "purpose": "Disposition of PR #1969." + }, + { + "path": "research/complex-local-word-ceiling/README.md", + "usage": "input", + "git_blob": "f5f742f8196da29d2c3f4dffb3c27685ca9401f6", + "sha256": "b60be039cb0e03e064a27407d0bce9e58908d793da5ee405c876de5aebfa5f81", + "purpose": "Selected profile and ceiling assumptions." + }, + { + "path": "research/complex-local-word-ceiling/ceiling.py", + "usage": "input", + "git_blob": "6c0f54527d879396f689523bfde19928a9b6157c", + "sha256": "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc", + "purpose": "Imported exact local ceiling engine." + }, + { + "path": "research/joint-query/README.md", + "usage": "input", + "git_blob": "2bf4fc0aa252c01242278cb58befc350acf7c85f", + "sha256": "419f076e46f5a6ce43efe30a608baed0a535034c388e1ac76a29a2026685ba77", + "purpose": "Merged QQ16 local and global open-scope context." + }, + { + "path": "research/joint-query/SOURCES.json", + "usage": "provenance", + "git_blob": "3e66629292d42f592a0d73a4a42f7f3a02bd62a5", + "sha256": "fabc6686e5d3ac0e4bb4397c147037b9285abfa671614590dad6d4e16b4dc0fc", + "purpose": "PR #1969 source manifest." + }, + { + "path": "research/joint-query/evidence/CONSERVED-QQ16.json", + "usage": "input", + "git_blob": "7a155a27dcf7f1ccd48e40d57a2c5d2724016e9b", + "sha256": "b91eb8599c403db55c889bb225a1cd93f46fdb83eb339f101d18843d52b1c920", + "purpose": "Exact local B word profile." + }, + { + "path": "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "usage": "input", + "git_blob": "307650f45e37c28d14fe913958efa4fb429242b7", + "sha256": "52f2ee565320f05282c637aa79eee100606c24240b1b5866f0c8d62e7913c9fc", + "purpose": "Exact witness proof used as a premise." + }, + { + "path": "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json", + "usage": "input", + "git_blob": "5082d791d0b993492cbc5bf61ac3b69e82c96f3f", + "sha256": "e35e5868a1322e406191079c0675975b139692ba50b1e2e5fb8a40b6480519f4", + "purpose": "Witness receipt and eight identity coefficients." + }, + { + "path": "research/joint-query/evidence/QQ16-RATIONAL-OBSERVATION-REVIEW.md", + "usage": "input", + "git_blob": "c6ecf75654a084a9cc001bd62663f341976bae7a", + "sha256": "9a06ff40830ef80d3566fce77c78639cb64d519d487a0a7f57d543c3146e2c49", + "purpose": "Reviewed Gram identities for B2 response." + }, + { + "path": "research/joint-query/evidence/QQ16-RATIONAL-OBSERVATION-REVIEW.json", + "usage": "provenance", + "git_blob": "e649641e9b44af2fff9742df51d439890c1a19cc", + "sha256": "588a3ce4593576ae921e97c6ced6a050f88736f29708cfee117385b254cd358f", + "purpose": "Independent witness review receipt." + } + ] +} diff --git a/research/joint-query-extra-b2-observation-seed3e62/TASK.json b/research/joint-query-extra-b2-observation-seed3e62/TASK.json new file mode 100644 index 0000000000..a16e1d520f --- /dev/null +++ b/research/joint-query-extra-b2-observation-seed3e62/TASK.json @@ -0,0 +1,98 @@ +{ + "schema_version": 1, + "track": "recursive-interfaces", + "seed": "3e62c004252727348ccea2dae9bbded6", + "task_id": "joint-query-controller", + "priority_revision": 4, + "scope_key": "02bce92b72da04827675", + "selector_scope_key": "22e535909f1d243e7553", + "base_commit": "7c1e7811c730b17fe0eeef6c82ef011318b0465e", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "catalog_sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7", + "claim_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2074", + "pull_request": "https://github.com/CrocSwap/integer-mult-bounds/pull/2079", + "claim_expiry_utc": "2026-10-14T20:42:00Z", + "overlap_snapshot": { + "searched_at": "2026-10-14T18:37:34Z", + "open_prs": 345, + "discussions": 720, + "complete_pagination": true, + "warnings": [], + "exact_scope_claim_found": false + }, + "original_card": { + "id": "joint-query-controller", + "question": "Can one explicitly changed QQ16 interface recover the missing chart query and close a two-call controller within a favorable full budget?", + "starting_points": [ + "research/joint-query/README.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "research/joint-query/evidence/JOINT-QUERY-TRANSFER.md", + "docs/research/community-efficient1000-review.md" + ], + "methods": [ + "Add one explicitly priced ordinary-to-selected observation and derive the ordered two-call map and inverse.", + "Change the first local pair or retained state, then test the existing lost-observation witness and price all new operations." + ], + "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.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the fixed-first-pair QQ16 witness before designing a controller. The checked #1969 local words do not evade that witness or supply global placement.", + "scope": "Source-bound orientation only. Read the named package and review before relying on its local evidence; this command is not its replay or supplier admission." + }, + "first_experiment": "Apply the existing witness to one proposed extra observation or changed first pair. If it still loses the required record, stop. Otherwise derive one ordered two-call identity and charge the added read, chart maps and restoration before extending to more stages.", + "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." + ], + "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." + ], + "overlap_terms": [ + "QQ16", + "joint-query", + "changing-chart controller", + "selected observation", + "1969" + ] + }, + "scope_status": "refined", + "actual_scope": "Add one ordinary-to-selected query q_extra=B2 X_U at the pre-F0 cut. Determine its exact response on the eight lost-query directions h_k, and price its eight independent outputs against the selected local ceiling.", + "scope_change_reason": "The catalogue allows one explicitly paid observation. This narrows that interface change to the actual stage-2 source map on the 96 ordinary X_U coordinates at the first cut, distinct from the existing future query B2 Y + ell_2,A Y_A.", + "bottleneck_link": "The fixed F0/B1 selected-only observation set loses eight independent directions. The extra read exposes those directions, but a local B word has only 0.1142% packing headroom before the added output is charged.", + "budget_minutes": 60, + "stop_rule": "Check only the eight witness directions and one extra B2 X_U observation. Price the most favorable rank-8 output envelope and a separate rank-one-per-output case; stop before broader controller search if native output/hosting tolls exceed the remaining ceiling headroom.", + "outcome": "partial", + "result_status": "The extra query separates the reviewed eight-dimensional witness family, but its native wrapper, output hosting and full-controller injectivity remain unestablished.", + "evidence": "verify.py checks the pinned witness arithmetic, eight independent outputs, rank-profile variants, exact selected ceiling brackets, and two-unit remaining toll boundary.", + "predecessors": [ + { + "pr": 1969, + "head": "a6e6ad3936f67b8f63b5b68c5e75d540610a65e7", + "status": "merged", + "role": "local QQ16 joint-query words and native B profiles" + } + ], + "author": "Cinna Davis", + "ai_assistance": "Substantial OpenAI Codex assistance in selecting the extra query, deriving its exact action on the witness family, calculating the conditional profile envelope, and packaging the verifier.", + "open_questions": [ + { + "question": "Can B2 X_U be implemented at the pre-F0 cut with a legal native source/address route and hosted eight-output state?", + "why_it_matters": "The ideal profile has only 0.0437% ceiling headroom after a rank-8 output charge and only two further rank-one-equivalent units.", + "first_step": "Compile the exact B2 row map at the live X_U frames and count every source read, row operation, output write, cover map, frame transition and dirty restoration.", + "blocked_by": "The current joint-query certificate does not provide this additional ordinary-to-selected output channel." + }, + { + "question": "Does the augmented observation make the complete controller injective on all inputs?", + "why_it_matters": "Separating the eight reviewed null directions is only a subspace result and does not establish a recursive interface.", + "first_step": "Form the full ordered observation and endpoint map with the added q_extra row and compute its exact kernel.", + "blocked_by": "No full controller using q_extra has been constructed." + } + ] +} diff --git a/research/joint-query-extra-b2-observation-seed3e62/VERIFY.json b/research/joint-query-extra-b2-observation-seed3e62/VERIFY.json new file mode 100644 index 0000000000..1a3dbb0ab9 --- /dev/null +++ b/research/joint-query-extra-b2-observation-seed3e62/VERIFY.json @@ -0,0 +1,27 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/complex-local-word-ceiling/README.md", + "research/complex-local-word-ceiling/ceiling.py", + "research/joint-query/README.md", + "research/joint-query/evidence/CONSERVED-QQ16.json", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md", + "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json", + "research/joint-query/evidence/QQ16-RATIONAL-OBSERVATION-REVIEW.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Pinned selected and QQ16 sources; exact B1/B2 response on eight witness directions; negative coefficient controls; selected, rank-8 and rank-one ceiling brackets and two-unit overhead boundary. Does not replay source routes or establish a full controller." + } + ] +} diff --git a/research/joint-query-extra-b2-observation-seed3e62/verify.py b/research/joint-query-extra-b2-observation-seed3e62/verify.py new file mode 100644 index 0000000000..450be5bbf8 --- /dev/null +++ b/research/joint-query-extra-b2-observation-seed3e62/verify.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +"""Check the reviewed QQ16 witness consequence and the extra-query profile envelope.""" +from __future__ import annotations + +import hashlib +import importlib.util +import json +from fractions import Fraction as Q +from pathlib import Path +import sys + + +ROOT = Path(__file__).resolve().parents[2] +SELECTED_SHA256 = "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" +WITNESS_SHA256 = "e35e5868a1322e406191079c0675975b139692ba50b1e2e5fb8a40b6480519f4" +WITNESS_PROOF_SHA256 = "52f2ee565320f05282c637aa79eee100606c24240b1b5866f0c8d62e7913c9fc" +OBSERVATION_REVIEW_SHA256 = "9a06ff40830ef80d3566fce77c78639cb64d519d487a0a7f57d543c3146e2c49" +QQ16_INVOICE_SHA256 = "b91eb8599c403db55c889bb225a1cd93f46fdb83eb339f101d18843d52b1c920" +CEILING_SHA256 = "86a1432870b3b21d8454106ec9162fddc0471472d9214c590a1420f2426cedfc" + + +def require(condition: bool, message: str) -> None: + if not condition: + raise RuntimeError(message) + + +def digest(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def import_pinned_ceiling(): + path = ROOT / "research/complex-local-word-ceiling/ceiling.py" + require(digest(path) == CEILING_SHA256, "pinned selected ceiling implementation changed") + spec = importlib.util.spec_from_file_location("pinned_complex_ceiling", path) + require(spec is not None and spec.loader is not None, "cannot load pinned ceiling") + module = importlib.util.module_from_spec(spec) + sys.modules[spec.name] = module + spec.loader.exec_module(module) + return module + + +def main() -> None: + selected_path = ROOT / "certificates/selected-result.json" + witness_path = ROOT / "research/joint-query/evidence/QQ16-SELECTED-WITNESS.json" + proof_path = ROOT / "research/joint-query/evidence/QQ16-SELECTED-WITNESS.md" + review_path = ROOT / "research/joint-query/evidence/QQ16-RATIONAL-OBSERVATION-REVIEW.md" + invoice_path = ROOT / "research/joint-query/evidence/CONSERVED-QQ16.json" + require(digest(selected_path) == SELECTED_SHA256, "selected record hash changed") + require(digest(witness_path) == WITNESS_SHA256, "pinned witness receipt changed") + require(digest(proof_path) == WITNESS_PROOF_SHA256, "pinned witness proof changed") + require(digest(review_path) == OBSERVATION_REVIEW_SHA256, "pinned observation review changed") + require(digest(invoice_path) == QQ16_INVOICE_SHA256, "pinned QQ16 invoice changed") + + witness = json.loads(witness_path.read_text()) + require(witness["ordinary_gram"] == 48, "witness Gram scalar changed") + require(witness["identity_coefficients"] == ["2112"] * 8, + "reviewed B2 response is not eight independent 2112 coordinates") + require(witness["relative_routes_checked"] == 96, + "pinned witness route count changed") + + # Apply the reviewed exact identities B1 B1* = B2 B2* = 48 I and + # [B2 B1* B1 B2*]_identity = 192 I to each of the eight basis directions. + gram = 48 + cross_identity_coefficient = 192 + query_diagonal = gram * gram - cross_identity_coefficient + require(query_diagonal == 2112, "B2 h coefficient arithmetic changed") + query_outputs = [] + old_query_outputs = [] + for k in range(8): + e = tuple(int(i == k) for i in range(8)) + query_outputs.append(tuple(query_diagonal * x for x in e)) + # The old B1 response vanishes because B1 B1* = 48 I. + old_query_outputs.append(tuple(0 for _ in e)) + require(query_outputs == [tuple(2112 * int(i == k) for i in range(8)) for k in range(8)], + "extra B2 observation failed to separate a witness direction") + require(len(set(query_outputs)) == 8 and all(old == (0,) * 8 for old in old_query_outputs), + "old/new query separation control failed") + require(gram * gram - (cross_identity_coefficient + 1) == 2111, + "cross-coefficient mutation control failed") + rotated_outputs = [output[1:] + output[:1] for output in query_outputs] + require(rotated_outputs != query_outputs, + "output-coordinate permutation control failed") + require(len(set(rotated_outputs)) == 8, + "output-coordinate permutation unexpectedly merged witnesses") + + ceiling = import_pinned_ceiling() + selected = {1: 2412, 2: 418, 3: 432, 4: 142, 5: 82, 8: 8} + selected_lo, selected_hi = ceiling.ceiling(selected, 73, 896, 9, 64, grid=Q(1, 10**12)) + require(selected_lo == Q(1690054109, 10**12) + and selected_hi == Q(169005411, 10**11), "selected ceiling bracket changed") + + invoice = json.loads(invoice_path.read_text()) + b_profile = {int(k): int(v) for k, v in invoice["invoices"]["B"]["native_profile"].items()} + require(b_profile == {1: 2436, 2: 418, 3: 432, 4: 142, 5: 82}, + "merged QQ16 B profile changed") + require(sum(r * n for r, n in b_profile.items()) == 5546, + "merged QQ16 B rank mass changed") + + rank8 = b_profile.copy() + rank8[8] = rank8.get(8, 0) + 1 + rank8_one_extra = rank8.copy() + rank8_one_extra[1] += 1 + rank8_two_extra = rank8.copy() + rank8_two_extra[1] += 2 + rank8_three_extra = rank8.copy() + rank8_three_extra[1] += 3 + eight_rank1 = b_profile.copy() + eight_rank1[1] += 8 + + profiles = {"B": b_profile, "B+rank8": rank8, "B+rank8+1rank1": rank8_one_extra, + "B+rank8+2rank1": rank8_two_extra, "B+rank8+3rank1": rank8_three_extra, + "B+8rank1": eight_rank1} + brackets = {name: ceiling.ceiling(p, 73, 896, 9, 64, grid=Q(1, 10**12)) + for name, p in profiles.items()} + require(brackets["B+rank8"] == (Q(16907931, 10**10), Q(1690793101, 10**12)), + "rank-8 output bracket changed") + require(brackets["B+8rank1"][1] == Q(422363351, 250000000000), + "eight rank-one output bracket changed") + require(brackets["B+rank8+2rank1"][0] == Q(1690160547, 10**12), + "two-unit overhead bracket changed") + require(brackets["B+rank8+3rank1"][1] == Q(1689844449, 10**12), + "three-unit overhead bracket changed") + require(brackets["B+rank8"][0] > selected_hi, + "ideal rank-8 output envelope no longer clears selected ceiling") + require(brackets["B+rank8+2rank1"][0] > selected_hi, + "two-unit residual budget no longer clears selected ceiling") + require(brackets["B+rank8+3rank1"][1] < selected_lo, + "three-unit overhead did not fall below selected ceiling") + require(brackets["B+8rank1"][1] < selected_lo, + "eight separate output tariffs did not fail the selected ceiling") + + print("PASS_QQ16_EXTRA_B2_OBSERVATION_SCREEN") + print("witness_directions=8 old_B1_response=0 new_B2_identity_coefficient=2112") + print("query_shape=96_ordinary_inputs_to_8_independent_outputs source_mutation=0") + print(f"selected_ceiling=[{selected_lo},{selected_hi}]") + for name in profiles: + lo, hi = brackets[name] + mass = ceiling.model(profiles[name], 73, 896, 9, 64)["local_mass"] + gain = float((hi / selected_hi - 1) * 100) + print(f"{name} mass={mass} ceiling=[{lo},{hi}] upper_gain_pct={gain:.9f}") + print("scope=reviewed_witness_subspace_only; native_wrapper_and_full_controller=not_established") + + +if __name__ == "__main__": + main()