From 47242572d3b22ce49371245edc561dd75bf263e8 Mon Sep 17 00:00:00 2001 From: Matarener Date: Tue, 27 Oct 2026 20:44:17 +0000 Subject: [PATCH] Add per-port floor of fifteen rank-one requests for the thin query stages (atlas P8 impossible per port; no new kappa) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011VhYm7snqz3dTqtSmNzcn8 --- research/p104-thin-query-port-floor/README.md | 86 ++ .../p104-thin-query-port-floor/RESULT.json | 840 ++++++++++++++++++ .../p104-thin-query-port-floor/SOURCES.json | 48 + research/p104-thin-query-port-floor/TASK.json | 90 ++ .../p104-thin-query-port-floor/VERIFY.json | 24 + .../p104-thin-query-port-floor/portfloor.py | 192 ++++ research/p104-thin-query-port-floor/verify.py | 97 ++ 7 files changed, 1377 insertions(+) create mode 100644 research/p104-thin-query-port-floor/README.md create mode 100644 research/p104-thin-query-port-floor/RESULT.json create mode 100644 research/p104-thin-query-port-floor/SOURCES.json create mode 100644 research/p104-thin-query-port-floor/TASK.json create mode 100644 research/p104-thin-query-port-floor/VERIFY.json create mode 100644 research/p104-thin-query-port-floor/portfloor.py create mode 100644 research/p104-thin-query-port-floor/verify.py diff --git a/research/p104-thin-query-port-floor/README.md b/research/p104-thin-query-port-floor/README.md new file mode 100644 index 0000000000..ac92551933 --- /dev/null +++ b/research/p104-thin-query-port-floor/README.md @@ -0,0 +1,86 @@ +# The fifteen thin query stages need fifteen rank-one requests per port + +**Scoped negative result; no new κ.** The retained p16 controllers keep 15 chronological `QUERY_SHEAR` stages, +each paid as one rank-one request per port line (1,560 on the p104 word of +[PR #5907](https://github.com/CrocSwap/integer-mult-bounds/pull/5907), 1,680 on the +[PR #5398](https://github.com/CrocSwap/integer-mult-bounds/pull/5398) direct controller). Target **P8** of the +κ ≥ 0.0035 atlas ([PR #5586](https://github.com/CrocSwap/integer-mult-bounds/pull/5586), `provider-targets.md`) +asks for a causal linear realization of all 15 stages with at most 528 requests in total, each latent channel +evaluated on a currently available linear combination of fields, the 18 full calls kept. This package shows that +**on every port the 15 shear results are linearly independent modulo everything that is free**, so any such +realization needs at least 15 requests per port, i.e. at least the present count. P8 cannot be met by per-port +channels on any of the three retained controllers; the only route left is a channel that serves several ports at +once, which is a new physical primitive and not a controller rewrite. + +Base: canonical main `19fdb086ea96af9a9f87936a2b888e10af4ed810`. Inputs are pinned in [SOURCES.json](SOURCES.json). + +## The count + +One central port. The 32 banks hold elements of `R = K[Q, Q⁻¹]`; bank `i` starts with the formal symbol `b_i`. +The controller alphabet is replayed literally (`research/p104-productive-controller/caller.py`): `ADD` with a +scalar, `SWAP`/`SIGNED_SWAP`, `Q_POWER ±2` and the stage markers are free; a `LOCAL` is a paid full call that +yields `Q⁻¹x` (or `Qx` backward) for its source content `x`; a `QUERY_SHEAR` must deliver `Q⁻¹u_j` (or `−Qu_j`) for +the actual source content `u_j`, which includes the results of earlier stages. + +A rank-one latent channel evaluated on one available content `v` yields an element of `R·v`, and `Q^{2k}v` is +already free, so each channel adds at most one generator to the free span. With the 18 full calls kept, after `m` +channels every content lies in `F + span(q_1, …, q_m)`, where `F` is the span of the initial banks and the 18 +full-call outputs. All 15 shear results must lie there, hence + + m ≥ dim(F + span{n_1, …, n_15}) − dim F. + +The markers are specialised to 1 and `Q²` to a nonzero scalar θ; both are ring homomorphisms, so a realization in +the marked Laurent model maps to one in the specialised model and the specialised count is a valid lower bound. +Over `Q` with exact rationals, for θ = 7/3 and θ = 11/5, on each of the three controllers: + +| Controller | Events | dim F | dim (F + shear results) | Floor per port | Greedy causal realization | +|---|---:|---:|---:|---:|---:| +| PR5398 direct (`kappa-backward-controller-20261023`) | 162 | 49 | 64 | **15** | 15 | +| Joint-helper lattice source (`joint-helper-lattice`) | 154 | 49 | 64 | **15** | 15 | +| p104 productive, all-forward (`p104-productive-controller`) | 218 | 49 | 64 | **15** | 15 | + +`F` plus the 15 results is the whole 64-dimensional port space. Each shear result is also independent of `F` plus +the other 14, so the floor does not depend on the order of events, and the greedy causal realization (query exactly +when the current result is outside `F` plus earlier results) attains it. The first "attainable" question of P8, +two consecutive stages in fewer requests, is answered negatively by the same count. + +Consequences: the thin pool is incompressible per port, 15 × 112 = 1,680 on the direct controller and +15 × 104 = 1,560 on the p104 word; the atlas's 528 is impossible with per-port channels. Together with +[`research/thin-query-shear-floor`](../thin-query-shear-floor/README.md) (fusion with a full call needs two +queries; parity floor 15 with lazy central frames) the per-port answer for the thin stages is complete. + +## Verification + +```sh +python3.12 -B research/p104-thin-query-port-floor/verify.py +``` + +Under a second, standard library only ([portfloor.py](portfloor.py)). It authenticates the pinned controllers; +computes the floor on all three for both values of θ; checks every result against the other 14; checks the greedy +count; runs three controls: a redundant sixteenth shear (the output of the last full call on its own pair) is +recognised as free with the floor unchanged; the flawed model that puts every present content into `F` (including +the queried results themselves) collapses to floor 0; declaring odd central powers free collapses to floor 0, so +the whole floor is the odd-power obstruction; and compares [RESULT.json](RESULT.json) in full. +Marker: `PASS_P104_THIN_QUERY_PORT_FLOOR`. + +## Scope and limits + +Per-port, linear, scalar model: a channel acts on one port line through the central algebra, as every retained +request does. A channel acting on several ports at once is outside the model and outside the present price list +(the P104 physical contract fixes a central port and a 17-axis route per port); it is not excluded here. The +markers are specialised, which can only lower the floor. Native maps, the caller, the compiler and the outer checks +are not involved; the selected record is unchanged. Agent check, not human acceptance. + +## Open next questions + +- Can one latent channel serve several port lines inside the P104 physical contract? First step: state it as a + physical job in `caller.py` terms and price it in the complete invoice; a channel of rank `r` serving `k` ports + must cost less than `k` H1. Blocked by a new physical primitive, not by this package. +- Does the symbolic-marker floor equal 15 or exceed it? Only of interest for a sharper statement; the conclusion + cannot change because specialisation is a homomorphism. First step: repeat the count over `K(θ, D_0..D_33)`. + +## Credit + +Cinna Davis (controllers), Ali Romman (PR5398 direct controller, PR5398 replay), Dugongue (atlas PR5586) and the +P104 lineage retain credit; nothing of theirs is modified. Prepared by Matarener with Claude (Anthropic) via +Claude Code. Apache-2.0. diff --git a/research/p104-thin-query-port-floor/RESULT.json b/research/p104-thin-query-port-floor/RESULT.json new file mode 100644 index 0000000000..72073b8114 --- /dev/null +++ b/research/p104-thin-query-port-floor/RESULT.json @@ -0,0 +1,840 @@ +{ + "controllers": { + "joint_helper_lattice": { + "events": 154, + "path": "research/joint-helper-lattice/CONTROLLER.json", + "receipts": { + "11/5": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 154, + "floor": 15, + "greedy_log": [ + [ + 5, + 2, + 0, + "query" + ], + [ + 12, + 4, + 1, + "query" + ], + [ + 19, + 6, + 2, + "query" + ], + [ + 26, + 8, + 3, + "query" + ], + [ + 33, + 10, + 4, + "query" + ], + [ + 40, + 12, + 5, + "query" + ], + [ + 47, + 14, + 6, + "query" + ], + [ + 53, + 16, + 7, + "query" + ], + [ + 59, + 18, + 8, + "query" + ], + [ + 65, + 20, + 9, + "query" + ], + [ + 71, + 22, + 10, + "query" + ], + [ + 77, + 24, + 11, + "query" + ], + [ + 83, + 26, + 12, + "query" + ], + [ + 89, + 28, + 13, + "query" + ], + [ + 95, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "11/5" + }, + "7/3": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 154, + "floor": 15, + "greedy_log": [ + [ + 5, + 2, + 0, + "query" + ], + [ + 12, + 4, + 1, + "query" + ], + [ + 19, + 6, + 2, + "query" + ], + [ + 26, + 8, + 3, + "query" + ], + [ + 33, + 10, + 4, + "query" + ], + [ + 40, + 12, + 5, + "query" + ], + [ + 47, + 14, + 6, + "query" + ], + [ + 53, + 16, + 7, + "query" + ], + [ + 59, + 18, + 8, + "query" + ], + [ + 65, + 20, + 9, + "query" + ], + [ + 71, + 22, + 10, + "query" + ], + [ + 77, + 24, + 11, + "query" + ], + [ + 83, + 26, + 12, + "query" + ], + [ + 89, + 28, + 13, + "query" + ], + [ + 95, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "7/3" + } + }, + "stages": [ + 2, + 4, + 6, + 8, + 10, + 12, + 14, + 16, + 18, + 20, + 22, + 24, + 26, + 28, + 30 + ] + }, + "p104_productive": { + "events": 218, + "path": "research/p104-productive-controller/CONTROLLER.json", + "receipts": { + "11/5": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 218, + "floor": 15, + "greedy_log": [ + [ + 9, + 2, + 0, + "query" + ], + [ + 20, + 4, + 1, + "query" + ], + [ + 31, + 6, + 2, + "query" + ], + [ + 42, + 8, + 3, + "query" + ], + [ + 53, + 10, + 4, + "query" + ], + [ + 64, + 12, + 5, + "query" + ], + [ + 75, + 14, + 6, + "query" + ], + [ + 85, + 16, + 7, + "query" + ], + [ + 95, + 18, + 8, + "query" + ], + [ + 105, + 20, + 9, + "query" + ], + [ + 115, + 22, + 10, + "query" + ], + [ + 125, + 24, + 11, + "query" + ], + [ + 135, + 26, + 12, + "query" + ], + [ + 145, + 28, + 13, + "query" + ], + [ + 155, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "11/5" + }, + "7/3": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 218, + "floor": 15, + "greedy_log": [ + [ + 9, + 2, + 0, + "query" + ], + [ + 20, + 4, + 1, + "query" + ], + [ + 31, + 6, + 2, + "query" + ], + [ + 42, + 8, + 3, + "query" + ], + [ + 53, + 10, + 4, + "query" + ], + [ + 64, + 12, + 5, + "query" + ], + [ + 75, + 14, + 6, + "query" + ], + [ + 85, + 16, + 7, + "query" + ], + [ + 95, + 18, + 8, + "query" + ], + [ + 105, + 20, + 9, + "query" + ], + [ + 115, + 22, + 10, + "query" + ], + [ + 125, + 24, + 11, + "query" + ], + [ + 135, + 26, + 12, + "query" + ], + [ + 145, + 28, + 13, + "query" + ], + [ + 155, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "7/3" + } + }, + "stages": [ + 2, + 4, + 6, + 8, + 10, + 12, + 14, + 16, + 18, + 20, + 22, + 24, + 26, + 28, + 30 + ] + }, + "pr5398_direct": { + "events": 162, + "path": "research/kappa-backward-controller-20261023/CONTROLLER.json", + "receipts": { + "11/5": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 162, + "floor": 15, + "greedy_log": [ + [ + 9, + 2, + 0, + "query" + ], + [ + 16, + 4, + 1, + "query" + ], + [ + 23, + 6, + 2, + "query" + ], + [ + 30, + 8, + 3, + "query" + ], + [ + 37, + 10, + 4, + "query" + ], + [ + 44, + 12, + 5, + "query" + ], + [ + 51, + 14, + 6, + "query" + ], + [ + 57, + 16, + 7, + "query" + ], + [ + 63, + 18, + 8, + "query" + ], + [ + 69, + 20, + 9, + "query" + ], + [ + 75, + 22, + 10, + "query" + ], + [ + 81, + 24, + 11, + "query" + ], + [ + 87, + 26, + 12, + "query" + ], + [ + 93, + 28, + 13, + "query" + ], + [ + 99, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "11/5" + }, + "7/3": { + "dim_free": 49, + "dim_free_plus_needs": 64, + "events": 162, + "floor": 15, + "greedy_log": [ + [ + 9, + 2, + 0, + "query" + ], + [ + 16, + 4, + 1, + "query" + ], + [ + 23, + 6, + 2, + "query" + ], + [ + 30, + 8, + 3, + "query" + ], + [ + 37, + 10, + 4, + "query" + ], + [ + 44, + 12, + 5, + "query" + ], + [ + 51, + 14, + 6, + "query" + ], + [ + 57, + 16, + 7, + "query" + ], + [ + 63, + 18, + 8, + "query" + ], + [ + 69, + 20, + 9, + "query" + ], + [ + 75, + 22, + 10, + "query" + ], + [ + 81, + 24, + 11, + "query" + ], + [ + 87, + 26, + 12, + "query" + ], + [ + 93, + 28, + 13, + "query" + ], + [ + 99, + 30, + 14, + "query" + ] + ], + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "locals": 18, + "query_shears": 15, + "theta": "7/3" + } + }, + "stages": [ + 2, + 4, + 6, + 8, + 10, + 12, + 14, + 16, + 18, + 20, + 22, + 24, + 26, + 28, + 30 + ] + } + }, + "controls": { + "contents_free_model": { + "dim_free": 64, + "floor": 0 + }, + "odd_powers_free": { + "dim_free": 32, + "floor": 0, + "greedy_queries": 0 + }, + "redundant_sixteenth_shear": { + "floor": 15, + "greedy_queries": 15, + "independent_of_all_others": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 0 + ], + "inserted": [ + "QUERY_SHEAR", + 32, + 15, + false + ], + "query_shears": 16 + } + }, + "summary": { + "atlas_P8_target": 528, + "floor_per_port": 15, + "minimum_requests": { + "p104_productive": 1560, + "pr5398_direct": 1680 + }, + "ports": { + "p104_productive": 104, + "pr5398_direct": 112 + }, + "thin_stages": 15 + } +} diff --git a/research/p104-thin-query-port-floor/SOURCES.json b/research/p104-thin-query-port-floor/SOURCES.json new file mode 100644 index 0000000000..2ff25e4a0b --- /dev/null +++ b/research/p104-thin-query-port-floor/SOURCES.json @@ -0,0 +1,48 @@ +{ + "schema_version": 1, + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "581f8d87008354eb5b869f7ed9de1317ad837ce8", + "sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "3404fbdd5e7529a0674eef26114b5071e4586cec", + "sha256": "ead6cdc9d0af6d58e8a49744d8ec8c7c15e13d2ba93c276c434bcf9b51b93a81" + }, + { + "path": "research/joint-helper-lattice/CONTROLLER.json", + "usage": "input", + "git_blob": "49a2f0675819f9deeea27ed77be2c2b6ff2e87e5", + "sha256": "1f5d6aa267e4e66048818714b5d3b5eae17a58abe91d15deeaa34574f7391a5f" + }, + { + "path": "research/kappa-0035-target-atlas/provider-targets.md", + "usage": "input", + "git_blob": "9031e818b0eef826942d0c1c3581090852a389a6", + "sha256": "65d5b27da5a9b5c302b354bc7981f56db97f6b1560484e958c02915e8a4f7634" + }, + { + "path": "research/kappa-backward-controller-20261023/CONTROLLER.json", + "usage": "input", + "git_blob": "01775a36ae1238350bf8cd859b04cb8c4589873b", + "sha256": "60cc512b39cdb9ea2c2ac6c6634c8d3f9627d96ace08ffa659a9d9472444122b" + }, + { + "path": "research/p104-productive-controller/CONTROLLER.json", + "usage": "input", + "git_blob": "cc539db709cf7a6c42872c4380902736ad453af3", + "sha256": "a84f6bbd547379597464e56c420cc665f96bc43a9a1351eed4b7cd0fce3cc4b9" + }, + { + "path": "research/p104-productive-controller/caller.py", + "usage": "input", + "git_blob": "6ac5e735691555ecafe2afbcff71edd923178113", + "sha256": "300d40043953e4f6aecfde8f2d1004b8ad6dc5a79ec3c7666c9908c2466c91c8" + } + ] +} diff --git a/research/p104-thin-query-port-floor/TASK.json b/research/p104-thin-query-port-floor/TASK.json new file mode 100644 index 0000000000..8cba2d3fb2 --- /dev/null +++ b/research/p104-thin-query-port-floor/TASK.json @@ -0,0 +1,90 @@ +{ + "schema_version": 1, + "task_id": "joint-query-controller", + "priority_revision": 8, + "base_commit": "19fdb086ea96af9a9f87936a2b888e10af4ed810", + "original_card": { + "id": "joint-query-controller", + "question": "Can a changed query demand or caller remove real work while satisfying native chronology and restoration?", + "starting_points": [ + "docs/research/current-priorities.md", + "docs/research/research-family-status.md", + "certificates/selected-result.json", + "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md" + ], + "methods": [ + "Construct and independently check one source-bound instance of the stated first experiment.", + "Seek an exact counterexample or target-specific complete-budget obstruction to that same proposed change." + ], + "acceptance_gate": "A source-bound arbitrary-input identity and legal producer/consumer boundary with the complete paid and productive target invoice, including restoration, ownership, native alignment and extra charges. Price under the actual current model; historical ceiling.py assumptions must be established before use. A favorable optimistic relaxation keeps a route open but is not a completed supplier. A scoped local result remains useful; expansion requires the family-level budget gate.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_selected_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read revision 8, the selected review and live exact-source handoffs. Then follow this card's bounded first_experiment.", + "scope": "Source-bound orientation only, not a supplier replay or theorem proof." + }, + "first_experiment": "Choose an exact caller and a new demand/interface hypothesis. Read the scoped #5617/#5631/#5649/#5747 and #5720/#5745 objections before rebuilding an excluded schedule. Compare the complete matched source/consumer protocols including all retained helper outputs. For an active-mode injection, first check #5745: its canonical delivery claim repays the eight removed centre jobs. Audit that exact claim or change its channel/feedback hypothesis; do not repeat the same free-injection search. Stop if the full favorable budget fails or the required restored output is unobservable.", + "bottleneck_link": "Judge the actual current supplier contract and complete signed target/paid bill; frozen-profile ceilings require an applicability proof.", + "allowed_variations": [ + "One exact source head, helper/cut region or quantified proposition and changed hypothesis; check live handoffs first. Different seeds are not different scopes." + ], + "scope_change_triggers": [ + "Changing source head, helper/cut domain, operation alphabet or caller boundary without recording the new scope.", + "Treating an archived proposal or local numerical pass as complete supplier admission." + ], + "overlap_terms": [ + "query demand", + "active mode", + "5720", + "5745", + "5747", + "caller" + ], + "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": "Selected PR5599: complete helper-subspace construction and independent caller replay; five framework assumptions remain.", + "evidence": "docs/research/pr-intake-evidence/pr5599-completion/PROOF-REVIEW.md", + "remaining": "The next experiment must identify uncovered source-specific work. Successor archive intake does not transfer this admission.", + "status": "reviewed", + "source_commit": "09dd0965711ca7eeb169057a420abab1c9052137", + "selected_record_sha256": "2a0220e866417774606e0f991e41b9c1d26b1f43b97857238cf478dbc7d330b5" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Per-port linear-information floor for the fifteen thin QUERY_SHEAR stages of the retained p16 controllers (PR5398 direct controller, joint-helper-lattice source, p104 productive all-forward controller): with the eighteen full calls kept, free scalar ADD/swap/even central powers/markers, and rank-one latent channels evaluated on one available content each, at least fifteen requests per port are needed; evaluates atlas kappa-0035 target P8 (528 requests in place of 15 x ports).", + "scope_change_reason": "The card asks whether a changed query demand or caller removes real work. Atlas PR5586 target P8 proposes exactly such a changed demand for the thin query stages (a causal state-space realization with at most 528 requests). Before constructing one, the exact per-port information count shows that no realization in the stated linear model can use fewer than fifteen requests per port, i.e. fewer than the present count, so P8 cannot be instantiated without a channel that serves several ports at once.", + "bottleneck_link": "The fifteen thin stages cost one rank-one request per port line (1,560 on the p104 word, 1,680 on the PR5398 controller), the only pool of paid rank-one work outside the local word; each removed request is worth about +4.1e-6 of conditional saving on the PR5907 word and the P8 plan (1,560 -> 528) would be worth about +0.0043. The floor shows the pool is incompressible per port: every shear result is linearly independent of the free span and of the other fourteen.", + "budget_minutes": 180, + "stop_rule": "Stop when the floor is computed exactly on all three retained controllers for two central-square values, each result is shown independent of all others, the greedy causal realization attains the floor, and the three controls (redundant shear recognised free; contents-free model and odd-powers-free model collapse to 0) pass.", + "outcome": "completed", + "evidence": "research/p104-thin-query-port-floor/RESULT.json", + "author": "Matarener", + "ai_assistance": "Prepared with Claude (Anthropic) via Claude Code.", + "open_questions": [ + { + "question": "Can one latent Gaussian channel serve several port lines at once inside the P104 physical contract (fixed central port and 17-axis route per port), so that the per-port floor does not bound the total request count?", + "why_it_matters": "It is the only way left for atlas target P8: with per-port channels the minimum is 15 x ports, the present count.", + "first_step": "State the cross-port channel as a physical job in research/p104-productive-controller/caller.py terms (which native map, which rank, which route allowance) and price it in the complete invoice; a channel of rank r serving k ports must cost less than k H1.", + "blocked_by": "A new physical primitive, not this package." + }, + { + "question": "Does the floor survive the symbolic stage markers D_s (not specialised) with the same value fifteen, or is it larger?", + "why_it_matters": "A larger symbolic floor would not change the conclusion; a smaller one is impossible because specialisation is a homomorphism. Only of interest for a sharper statement.", + "first_step": "Repeat portfloor.analyse over K(theta, D_0..D_33) with the markers as symbols; the module needs a field of rational functions instead of Fraction.", + "blocked_by": "Nothing; a few hours of work." + } + ] +} diff --git a/research/p104-thin-query-port-floor/VERIFY.json b/research/p104-thin-query-port-floor/VERIFY.json new file mode 100644 index 0000000000..ef1180c96e --- /dev/null +++ b/research/p104-thin-query-port-floor/VERIFY.json @@ -0,0 +1,24 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/joint-helper-lattice/CONTROLLER.json", + "research/kappa-0035-target-atlas/provider-targets.md", + "research/kappa-backward-controller-20261023/CONTROLLER.json", + "research/p104-productive-controller/CONTROLLER.json", + "research/p104-productive-controller/caller.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Authenticate pinned inputs; replay one central port of the three retained p16 controllers with the literal rational coefficients; exact rank over Q after Q^2 -> 7/3 and 11/5 of the free span (initial banks plus the eighteen full-call outputs, 49) and of the free span plus the fifteen shear results (64), so the floor is 15 per port; each shear result independent of the free span plus the other fourteen; greedy causal realization uses exactly 15; controls: redundant sixteenth shear recognised as free, contents-free model collapses to 0, odd-central-powers-free model collapses to 0; RESULT.json compared in full." + } + ] +} diff --git a/research/p104-thin-query-port-floor/portfloor.py b/research/p104-thin-query-port-floor/portfloor.py new file mode 100644 index 0000000000..d6ca0153fd --- /dev/null +++ b/research/p104-thin-query-port-floor/portfloor.py @@ -0,0 +1,192 @@ +"""Per-port linear-information floor for the thin QUERY_SHEAR stages of a p16 Laurent controller. Apache-2.0. + +Prepared for Matarener with Claude (Anthropic), via Claude Code. Python 3.12, standard library only. + +Model (one central port). The 32 banks hold elements of R = K[Q, Q^-1]; the initial content of bank i is the +formal symbol b_i. The controller alphabet (research/p104-productive-controller/caller.py) is replayed with the +literal rational coefficients. Free operations are ADD with a scalar, SWAP/SIGNED_SWAP, Q_POWER +-2 (even central +powers) and the stage markers of LOCAL/IDLE. Markers are specialised to 1 (a ring homomorphism, so every rank +difference below stays a valid lower bound for the marked contents). Q^2 is specialised to a nonzero scalar theta, +so R becomes the K-space K + K.Q of dimension 2 per bank; this is again a homomorphic image of the Laurent model. + +A LOCAL (paid full call, kept by atlas target P8) produces Q^{-1} x for its source content x (Q x in the backward +orientation) for free. A latent channel of rank one, evaluated on one available content v, produces an element of +R.v, i.e. at most one new generator beyond the free span (Q^{2k} v is already free). Hence after m channels every +content lies in F + span(q_1..q_m) where F is the K-span of the initial banks and the LOCAL outputs, and the m +channels must reproduce all shear results n_j = Q^{-1} u_j (or -Q u_j) of the QUERY_SHEAR events. Therefore + + m >= dim(F + span{n_j}) - dim(F). + +The causal greedy realization (query exactly when the current shear result is outside F + earlier query results) +is an upper bound inside the same model. +""" +from fractions import Fraction as Q +import json + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def plus(dst, src, c): + for k, v in src.items(): + x = dst.get(k, 0) + c * v + if x: + dst[k] = x + else: + dst.pop(k, None) + + +def shiftq(vec, dq): + return {(b, q + dq): v for (b, q), v in vec.items()} + + +def embed(vec, theta): + """K-coordinates after Q^2 -> theta: key (bank, parity).""" + out = {} + for (b, q), v in vec.items(): + par = q & 1 + key = (b, par) + out[key] = out.get(key, 0) + v * theta ** ((q - par) // 2) + return {k: v for k, v in out.items() if v} + + +class Space: + """Reduced row basis of a K-subspace of a sparse coordinate space.""" + def __init__(self): + self.rows = [] + + def reduce(self, v): + v = dict(v) + for key, row in self.rows: + if key in v: + c = v[key] + for k2, x in row.items(): + y = v.get(k2, 0) - c * x + if y: + v[k2] = y + else: + v.pop(k2, None) + return v + + def add(self, v): + v = self.reduce(v) + if not v: + return False + key = min(v) + c = 1 / v[key] + v = {k: x * c for k, x in v.items()} + new = [] + for key2, row in self.rows: + if key in row: + c2 = row[key] + row = dict(row) + for k2, x in v.items(): + y = row.get(k2, 0) - c2 * x + if y: + row[k2] = y + else: + row.pop(k2, None) + new.append((key2, row)) + self.rows = new + [(key, v)] + return True + + def contains(self, v): + return not self.reduce(v) + + def dim(self): + return len(self.rows) + + def copy(self): + s = Space() + s.rows = [(k, dict(r)) for k, r in self.rows] + return s + + +def analyse(word, theta, free_odd=False, contents_free=False): + """Replay one port. Returns the receipt dict. + + free_odd: control, declares Q^{+-1} free as well (R0 = R); the floor must collapse to 0. + contents_free: control, the flawed model that puts every present content into F (including the queried + results themselves); the floor must collapse to 0 as well. + """ + theta = Q(theta) + need(theta != 0, 'nonzero central square') + need(word['pairs'] == 16, 'p16 controller') + if free_odd: + # control: Q itself free, i.e. the homomorphic image Q -> 1, where R.b_i is one generator. + def emb(v): + out = {} + for (b, q), x in v.items(): + out[(b, 0)] = out.get((b, 0), 0) + x + return {k: x for k, x in out.items() if x} + else: + def emb(v): + return embed(v, theta) + banks = [{(i, 0): Q(1)} for i in range(32)] + F = Space() + for i in range(32): + F.add(emb(banks[i])) + needs, greedy, log = [], Space(), [] + locals_, shears = 0, 0 + for idx, e in enumerate(word['physical_events']): + op = e[0] + if op in ('LOCAL', 'QUERY_SHEAR'): + _, stage, pair, back = e + x, y = 2 * pair, 2 * pair + 1 + if back: + x, y = y, x + shear = shiftq(banks[x], 1 if back else -1) + sign = Q(-1 if back else 1) + if op == 'QUERY_SHEAR': + shears += 1 + n = {k: sign * v for k, v in shear.items()} + needs.append((idx, stage, pair, n)) + cur = F.copy() + for r in greedy.rows: + cur.add(dict(r[1])) + if cur.contains(emb(n)): + log.append([idx, stage, pair, 'free']) + else: + greedy.add(emb(n)) + log.append([idx, stage, pair, 'query']) + plus(banks[y], shear, sign) + if op == 'LOCAL': + locals_ += 1 + F.add(emb(shear)) + elif op == 'Q_POWER': + need(e[2] in (-2, 2), 'only even central powers are free') + banks[e[1]] = shiftq(banks[e[1]], e[2]) + elif op == 'IDLE': + pass # markers specialised to 1 + elif op == 'ADD': + plus(banks[e[1]], banks[e[2]], Q(e[3])) + elif op in ('SWAP', 'SIGNED_SWAP'): + a, b = banks[e[1]], banks[e[2]] + banks[e[1]], banks[e[2]] = b, ({k: -v for k, v in a.items()} if op == 'SIGNED_SWAP' else a) + else: + raise ValueError('controller opcode ' + op) + if contents_free: + for r in range(32): + F.add(emb(banks[r])) + dimF = F.dim() + G = F.copy() + for _, _, _, n in needs: + G.add(emb(n)) + # each shear result against the free span plus all the other shear results + singles = [] + for j in range(len(needs)): + H = F.copy() + for k, (_, _, _, n) in enumerate(needs): + if k != j: + H.add(emb(n)) + singles.append(int(not H.contains(emb(needs[j][3])))) + return {'theta': str(theta), 'events': len(word['physical_events']), 'locals': locals_, 'query_shears': shears, + 'dim_free': dimF, 'dim_free_plus_needs': G.dim(), 'floor': G.dim() - dimF, + 'greedy_queries': sum(1 for row in log if row[3] == 'query'), 'greedy_log': log, + 'independent_of_all_others': singles} + + +def read(path): + return json.loads(open(path).read()) diff --git a/research/p104-thin-query-port-floor/verify.py b/research/p104-thin-query-port-floor/verify.py new file mode 100644 index 0000000000..addf06d7dc --- /dev/null +++ b/research/p104-thin-query-port-floor/verify.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +"""Verify the per-port floor of fifteen rank-one requests for the thin QUERY_SHEAR stages. Apache-2.0. + +Prepared for Matarener with Claude (Anthropic), via Claude Code. Python 3.12, standard library only. +Checks: (0) pinned inputs; (1) on the three retained p16 controllers (PR5398 direct controller, the joint-helper +lattice source and the p104 productive all-forward controller) the fifteen shear results are linearly independent +modulo everything free, for two values of the central square, so at least fifteen rank-one requests per port are +needed, and each result is independent of the free span plus the other fourteen; (2) the greedy causal realization +uses exactly fifteen; (3) controls: a redundant sixteenth shear (the output of the last full call) is recognised as free (floor stays fifteen), the +flawed model that treats present contents as free collapses to 0, and declaring odd central powers free collapses +to 0; (4) RESULT.json equals the recomputed receipt. +""" +from copy import deepcopy +from fractions import Fraction as Q +from hashlib import sha256 +from pathlib import Path +import importlib.util, json, sys, time + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +CONTROLLERS = { + 'pr5398_direct': 'research/kappa-backward-controller-20261023/CONTROLLER.json', + 'joint_helper_lattice': 'research/joint-helper-lattice/CONTROLLER.json', + 'p104_productive': 'research/p104-productive-controller/CONTROLLER.json', +} +THETAS = ['7/3', '11/5'] + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def load(name, path): + spec = importlib.util.spec_from_file_location(name, path) + mod = importlib.util.module_from_spec(spec); sys.modules[name] = mod; spec.loader.exec_module(mod) + return mod + + +def main(): + t0 = time.time() + P = load('p104_port_floor', HERE/'portfloor.py') + pins = json.loads((HERE/'SOURCES.json').read_text()) + for row in pins['files']: + if row['usage'] == 'input': + need(sha256((ROOT/row['path']).read_bytes()).hexdigest() == row['sha256'], 'source pin ' + row['path']) + print('pins ok', flush=True) + result = {'controllers': {}, 'controls': {}} + for name, rel in CONTROLLERS.items(): + word = P.read(ROOT/rel) + receipts = {} + for theta in THETAS: + r = P.analyse(word, Q(theta)) + need(r['query_shears'] == 15 and r['locals'] == 18, name + ': 15 thin stages and 18 full calls') + need(r['floor'] == 15, name + ' theta ' + theta + ': floor 15') + need(r['greedy_queries'] == 15 and all(row[3] == 'query' for row in r['greedy_log']), name + ': greedy 15') + need(r['independent_of_all_others'] == [1] * 15, name + ': every result independent of the other fourteen') + receipts[theta] = r + need(receipts[THETAS[0]]['greedy_log'] == receipts[THETAS[1]]['greedy_log'], name + ': same stages') + result['controllers'][name] = {'path': rel, 'events': receipts[THETAS[0]]['events'], + 'stages': [row[1] for row in receipts[THETAS[0]]['greedy_log']], + 'receipts': receipts} + print(name, 'events', receipts[THETAS[0]]['events'], 'dim free', receipts[THETAS[0]]['dim_free'], + 'dim free+needs', receipts[THETAS[0]]['dim_free_plus_needs'], 'floor', receipts[THETAS[0]]['floor'], + 'greedy', receipts[THETAS[0]]['greedy_queries'], flush=True) + # controls on the productive controller + word = P.read(ROOT/CONTROLLERS['p104_productive']) + # a sixteenth shear appended after the last full call, on that call's pair and orientation: its result + # Q^{-1} x is exactly the paid output of that call, so the model must recognise it as free + dup = deepcopy(word) + last = [e for e in dup['physical_events'] if e[0] == 'LOCAL'][-1] + dup['physical_events'].append(['QUERY_SHEAR'] + last[1:]) + r = P.analyse(dup, Q(THETAS[0])) + need(r['query_shears'] == 16 and r['floor'] == 15 and r['greedy_queries'] == 15 and r['greedy_log'][-1][3] == 'free' + and r['independent_of_all_others'] == [1] * 15 + [0], 'redundant sixteenth shear is free') + result['controls']['redundant_sixteenth_shear'] = {'inserted': ['QUERY_SHEAR'] + last[1:], 'query_shears': 16, + 'floor': r['floor'], 'greedy_queries': r['greedy_queries'], + 'independent_of_all_others': r['independent_of_all_others']} + r = P.analyse(word, Q(THETAS[0]), contents_free=True) + need(r['floor'] == 0, 'flawed contents-free model collapses') + result['controls']['contents_free_model'] = {'dim_free': r['dim_free'], 'floor': r['floor']} + r = P.analyse(word, Q(THETAS[0]), free_odd=True) + need(r['floor'] == 0 and r['greedy_queries'] == 0, 'odd central powers free collapses') + result['controls']['odd_powers_free'] = {'dim_free': r['dim_free'], 'floor': r['floor'], 'greedy_queries': r['greedy_queries']} + print('controls', result['controls'], flush=True) + result['summary'] = {'floor_per_port': 15, 'thin_stages': 15, + 'ports': {'pr5398_direct': 112, 'p104_productive': 104}, + 'minimum_requests': {'pr5398_direct': 15 * 112, 'p104_productive': 15 * 104}, + 'atlas_P8_target': 528} + if '--write' in sys.argv: + (HERE/'RESULT.json').write_text(json.dumps(result, indent=1, sort_keys=True) + '\n') + need(json.loads((HERE/'RESULT.json').read_text()) == result, 'RESULT.json equals the recomputed receipt') + print('PASS_P104_THIN_QUERY_PORT_FLOOR %.1fs' % (time.time() - t0)) + + +if __name__ == '__main__': + main()