From 251d984900c60e9e30c48333fe50731a6778dbce Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 20 Oct 2026 03:57:35 +0000 Subject: [PATCH] Price the sum-only encoded P104 consumer at 192 transports. Publishing the corrected sums on Y without restoring x still pays the same native increment as the source-preserving return, so the nine-stage screen stays short by 3272. The scalar gap is not a rank-profile gap. Co-authored-by: unpaidmoon --- research/p104-encoded-sum-consumer/README.md | 99 ++++++++ .../p104-encoded-sum-consumer/SOURCES.json | 18 ++ research/p104-encoded-sum-consumer/TASK.json | 88 +++++++ .../p104-encoded-sum-consumer/VERIFY.json | 28 +++ research/p104-encoded-sum-consumer/verify.py | 230 ++++++++++++++++++ 5 files changed, 463 insertions(+) create mode 100644 research/p104-encoded-sum-consumer/README.md create mode 100644 research/p104-encoded-sum-consumer/SOURCES.json create mode 100644 research/p104-encoded-sum-consumer/TASK.json create mode 100644 research/p104-encoded-sum-consumer/VERIFY.json create mode 100644 research/p104-encoded-sum-consumer/verify.py diff --git a/research/p104-encoded-sum-consumer/README.md b/research/p104-encoded-sum-consumer/README.md new file mode 100644 index 0000000000..3b91bce901 --- /dev/null +++ b/research/p104-encoded-sum-consumer/README.md @@ -0,0 +1,99 @@ +# Sum-only consumer of the encoded P104 exit + +**Negative budget result. No new kappa.** Discussion #1166 comment 19032700, +task 2, asks for one downstream consumer that keeps the PR #3943 encoded +endpoint and does not pay an unaffordable source return. This package prices +the consumer whose published outputs are the corrected sums `w_i` on `Y_i` at +`H_i`, with `q` and the 72 dirty helpers left in place and `x` not restored. + +The native bill still fails. The protocol pays the same 192 rank-one +transports as PR #3943's source-preserving return. Its scalar arithmetic is +smaller, and that scalar gap is not a rank-profile gap. Selected kappa stays +`0.001672660197076918`. + +## What is proved here + +The producer placement is taken from PR #3943 at +`2cba526a4ebe0ef6c3c0143498adcf67dca97941`: `w_N` sits on `X_N` at `H_n`, +`w_J` sits on `Y_J` at `H_j`, `q` sits on `X_J` at FULL, and `v_N` sits on +`Y_N` at FULL. This package does not replay the 3,642-event prefix or the +1,664-event tail. The inherited encoded profile is +`(1282, 58, 86, 104, 48, 24, 8, 8)`, mass 2,576, and the published +optimistic progress credit is 2,312. + +From that exit the sum-only continuation is: + +1. Lift each of the 96 `X_n` banks from `H_n` to FULL. +2. Clear `Y_n` by the unit update `Y_n -= Y_n`, then add `Y_n += X_n`. +3. Descend `Y_n` from FULL to `H_n`. + +On every checked integer pattern, including one-port separating inputs, +`Y_N` becomes `w_N`, `Y_J` stays `w_J`, `q` and all 72 helpers stay put, and +`X_N` still holds `w_N` at FULL. So `x` is not recovered. The schedule is +192 transports and 192 unit additions, with no half-coefficient pass and no +restoring doubles. PR #3943's source-preserving adapter uses the same 192 +transports plus 960 unit additions, 104 halves and 104 doubles. + +The occupancy floor is the same 192. The 96 target hyperplanes are pairwise +incomparable, so one nested transport has at most one of them as an endpoint. +Publishing `w_n` on the distinct bank `Y_n` at `H_n` needs one departure of +`X_n` and one arrival of `Y_n`. The copy schedule meets that count. + +Native mass is therefore `2576 + 192 = 2768`, the same mass PR #3943 already +rejects for the legacy return. In that equal-profile screen, with +`s = 9`, `m = 73`, `W = 832` and progress `2312`, the paid-mass lower bound +is 64,008 against capacity 60,736, deficit **3,272**. Subtracting the 768 +saved unit additions from the native mass is a different accounting and is +rejected here; those additions are not rank children. The untouched encoded +exit, deficit 1,544 in the same screen, is PR #3943's result and is not +re-proved from the word. + +## What this does not establish + +No literal 5,370-event producer was executed. No physical owner, phase, +signed-floor width, tape, or opposite orientation is supplied. Clearing by +`Y -= Y` is one unit addition in characteristic not 2; a model that forbids +a self-update can spend one CLEAR instead, and the transport floor does not +move. A consumer that reads `w_N` from `X_N` and never publishes it on `Y_N` +is outside the floor. The equal-profile screen is the published necessary +test, not an owner embedding and not a universal P104 obstruction. + +This is not PR #4006. That fusion returns `X = x` on the source-preserving +variant and saves 768 cleanup additions inside the correction word. It does +not remove the 192-transport native increment charged when the corrected +sums have to occupy the `Y` hyperplanes. + +## Reproduce + +Python 3.12, standard library, from the repository root: + +```sh +python3 scripts/research_package.py --package research/p104-encoded-sum-consumer +``` + +The direct check prints + +```text +PASS_ENCODED_SUM_CONSUMER transports=192 unit_adds=192 halves=0 native_mass=2768 deficit_s9=3272 encoded_deficit_s9=1544 x_restored=0 +``` + +## Open next questions + +A useful successor has to publish a different interface or delete native +children. One candidate is a consumer that reads `w_N` on `X_N` at `H_n` +and does not move those 96 banks onto `Y`. That interface avoids this +192-transport floor, but the inherited encoded mass 2,576 still misses the +published nine-stage screen by 1,544 before any new charge. Price it only +with a changed coverage credit or a named deletion of rank children, and +stop when the favorable bill remains above capacity. + +## Credit + +The encoded exit, the profile, the progress credit and the source-preserving +adapter are Chris R / Clear1nsight, PR #3943, following PR #3882. The channel +lineage is Rohan Arun / PR #1972, Chafik Boukhalfa / PR #1991 and Adam Gall / +PR #1940. The occupancy method follows the terminal-floor argument recorded +in that package. New work is the sum-only schedule, its separating-input +floor and the observation that the scalar gap does not change the rejected +native mass. unpaidmoon, with substantial Cursor Grok assistance. Apache-2.0. +No independent human or formal-kernel review. diff --git a/research/p104-encoded-sum-consumer/SOURCES.json b/research/p104-encoded-sum-consumer/SOURCES.json new file mode 100644 index 0000000000..a604c6a640 --- /dev/null +++ b/research/p104-encoded-sum-consumer/SOURCES.json @@ -0,0 +1,18 @@ +{ + "schema_version": 1, + "base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81", + "sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5", + "sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0" + } + ] +} diff --git a/research/p104-encoded-sum-consumer/TASK.json b/research/p104-encoded-sum-consumer/TASK.json new file mode 100644 index 0000000000..54092c32b1 --- /dev/null +++ b/research/p104-encoded-sum-consumer/TASK.json @@ -0,0 +1,88 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 6, + "base_commit": "bb4bccbf42844d2801487450727c2f63e10d1d0f", + "original_card": { + "id": "p104-side-correction", + "question": "Can the proposed P104 joint endpoint flags be realized by a chronological correction program with coefficients, dirty restoration and an affordable complete bill?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.md", + "research/p104-joint-unit-flags/README.md" + ], + "methods": [ + "Construct one side-correction word at an explicit chronological cut with the needed frames still available.", + "Derive a lower bound on the side correction and hosting costs that decides whether this channel can beat the selected budget." + ], + "acceptance_gate": "An exact arbitrary-input identity, source/target frame availability and restoration at the chosen cut, plus the complete channel+correction+idle/hosting bill or an explicit favorable bound. The native channel alone is not a supplier. A scoped local result may be retained without a complete supplier. Expanding it into further construction rounds requires the family-level budget and obligation gate in research-family-status.md; an optimistic passing relaxation alone is not acceptance.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the revision-6 family record and #2981 static joint flags, alongside the reviewed #1991 channel. #2981 is an author-checked source archive, not an independently validated executable correction or a refutation of program-level lifetime floors.", + "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": "After checking live handoffs, pin one named collection from #2981 and attach acquisition/delivery times, source dependencies and coefficient requirements. Test legal access and arbitrary dirty restoration; price any completion against the full channel/endpoint/hosting allowance. Stop with the exact missing implication or a scoped counterexample rather than expanding the static cover census.", + "bottleneck_link": "Completing an already realized changed channel tests a concrete construction opportunity, instead of refining the incumbent packing. A positive local result still needs global and all-size admission.", + "allowed_variations": [ + "One correction factorization, one chronological cut, or one explicit hosting obstruction.", + "A changed correction schedule with an updated full bill and native frame contract." + ], + "scope_change_triggers": [ + "Recompiling the already certified low-rank channel without closing a new obligation.", + "Treating a pending ancestor, local histogram or unpriced side correction as an admitted global supplier.", + "Repeating a correction or physical conversion already supplied by a pending follow-up without adding independent coverage or a different unresolved obligation.", + "Repeating the 208-flag static matching or calling a static nested cover a chronological correction program. Independent audit of that certificate is distinct and remains useful." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991", + "2586", + "endpoint transport", + "physical dual", + "relay composition", + "2981", + "joint unit flags", + "acquisition delivery", + "static nesting" + ], + "existing_checks": [ + { + "scope": "PR #2981 reports static joint endpoint flags and a matching of 208 departure and arrival flags; archival intake is not independent verification.", + "evidence": "research/p104-joint-unit-flags/README.md", + "remaining": "Independent flag check and a chronological coefficient program with dirty restoration and a complete cost.", + "status": "author-checked", + "source_commit": "3d24b92d8ba057b57cb2d480170ec407520e6882", + "selected_record_sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129" + } + ] + }, + "scope_status": "refined", + "actual_scope": "Price one sum-only consumer of the PR #3943 encoded exit that publishes w_i on Y_i without restoring x, and decide whether its native bill clears the published nine-stage screen.", + "scope_change_reason": "Discussion #1166 comment 19032700 task 2 asks for a downstream consumer of the encoded endpoint, not another static flag matching. The card method used is the side-correction cost bound. The 3,642-event prefix is cited, not replayed.", + "bottleneck_link": "The encoded exit is a concrete P104 correction interface. Its consumer either removes paid native mass or it does not. This sum-only continuation keeps the rejected 192-transport increment, so the scalar cleanup saving is not a supplier.", + "budget_minutes": 60, + "stop_rule": "Stop when the favorable native bill of publishing w on Y still exceeds the published nine-stage capacity. Do not build a larger word after that failure.", + "outcome": "negative-result", + "evidence": "Author-checked finite certificate: the copy schedule attains 192 transports and 192 unit additions, the occupancy count is 192, and the inherited mass 2576 plus those transports reproduces deficit 3272. The prefix was not replayed.", + "author": "unpaidmoon", + "ai_assistance": "Substantial Cursor Grok assistance for the schedule, the occupancy count, the screen arithmetic and the package text.", + "open_questions": [ + { + "question": "Can a consumer read w_N from X_N at H_n and avoid publishing those values on Y_N, under a coverage credit different from the rejected encoded-exit screen?", + "why_it_matters": "That interface is the only reading of comment 19032700 that avoids this 192-transport floor. The inherited encoded mass still misses the published screen by 1544 before new charges.", + "first_step": "Name the downstream equations that accept w_N on X_N, write the changed progress credit, and compare it with mass 2576 plus every new charge.", + "blocked_by": "No such downstream equation is identified in PR #3943, and a changed coverage law is not supplied." + } + ] +} diff --git a/research/p104-encoded-sum-consumer/VERIFY.json b/research/p104-encoded-sum-consumer/VERIFY.json new file mode 100644 index 0000000000..f18af702b1 --- /dev/null +++ b/research/p104-encoded-sum-consumer/VERIFY.json @@ -0,0 +1,28 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [], + "commands": [ + { + "argv": [ + "{python}", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Sum-only identity on four patterns and four separating ports, 192-transport floor, nine-stage deficit 3272, three-stage split between linear gap 1160 and paid deficit 3104, and controls for a missing copy, a sign flip, omitted descents and a scalar-as-native mischarge." + }, + { + "argv": [ + "{python}", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 60, + "checks": "Same certificate with assertions disabled, using explicit failures rather than assert." + } + ] +} diff --git a/research/p104-encoded-sum-consumer/verify.py b/research/p104-encoded-sum-consumer/verify.py new file mode 100644 index 0000000000..4514543c64 --- /dev/null +++ b/research/p104-encoded-sum-consumer/verify.py @@ -0,0 +1,230 @@ +#!/usr/bin/env python3 +"""Sum-only consumer of the PR #3943 encoded exit, and its native bill. + +The producer placement is the published encoded exit: w_N on X_N at H_n, +w_J on Y_J at H_j, q on X_J at FULL, and v_N on Y_N at FULL. This checker +does not replay that 3,642-event prefix. It checks the continuation that +publishes every corrected sum w_i on Y_i at H_i, leaves q and the helpers +in place, and does not restore x. + +Chris R / Clear1nsight, PR #3943, proved the source-preserving return. The +new claim is the weaker sum-only protocol and the occupancy floor under +that weaker output. unpaidmoon, with substantial Cursor Grok assistance. +""" + +from __future__ import annotations + +J = 8 +N = 96 +HELPERS = 72 +# Published PR #3943 figures at head 2cba526a4ebe0ef6c3c0143498adcf67dca97941. +# Inherited, not recomputed from the native word. +ENCODED_PROFILE = (1282, 58, 86, 104, 48, 24, 8, 8) +ENCODED_MASS = 2576 +PROGRESS = 2312 +LEGACY_TRANSPORTS = 192 +LEGACY_UNIT_ADDS = 960 +LEGACY_HALVES = 104 + + +def fail(message): + raise SystemExit("FAIL_ENCODED_SUM_CONSUMER " + message) + + +def mass(profile): + total = 0 + for rank, count in enumerate(profile, start=1): + total += rank * count + return total + + +def blank_state(values): + return { + "XN": list(values["XN"]), + "YN": list(values["YN"]), + "XJ": list(values["XJ"]), + "YJ": list(values["YJ"]), + "H": list(values["H"]), + "XN_chart": ["H"] * N, + "YN_chart": ["FULL"] * N, + "XJ_chart": ["FULL"] * J, + "YJ_chart": ["H"] * J, + } + + +def copy_sums(state, *, clear=True, sign=1, descend=True): + """Lift each X_n, replace Y_n by sign * X_n, then descend Y_n.""" + transports = [] + unit_adds = 0 + for n in range(N): + if state["XN_chart"][n] != "H": + fail("lift started off H_n") + state["XN_chart"][n] = "FULL" + transports.append(("lift", n)) + if clear: + state["YN"][n] = state["YN"][n] - state["YN"][n] + unit_adds += 1 + state["YN"][n] = state["YN"][n] + sign * state["XN"][n] + unit_adds += 1 + if descend: + if state["YN_chart"][n] != "FULL": + fail("descent started off FULL") + state["YN_chart"][n] = "H" + transports.append(("descend", n)) + return transports, unit_adds + + +def require_sums(before, after): + if after["YN"] != before["XN"]: + fail("Y_N is not w_N") + if after["YJ"] != before["YJ"]: + fail("Y_J moved") + if after["XJ"] != before["XJ"]: + fail("q moved") + if after["H"] != before["H"]: + fail("a helper moved") + if after["XN"] != before["XN"]: + fail("X_N value changed") + if after["YN_chart"] != ["H"] * N or after["XN_chart"] != ["FULL"] * N: + fail("sum-only charts are not H_n on Y and FULL on X") + if after["YJ_chart"] != before["YJ_chart"] or after["XJ_chart"] != before["XJ_chart"]: + fail("untouched charts changed") + + +def incidence_floor(transports): + """Each nested transport meets at most one of the 96 hyperplanes.""" + seen = [] + for kind, index in transports: + if kind not in ("lift", "descend") or not 0 <= index < N: + fail("transport outside the N hyperplanes") + seen.append(index) + if len(seen) != len(transports): + fail("incidence tally dropped a transport") + # Each recorded transport contributes one hyperplane endpoint. The + # incomparability hypothesis is what forbids one transport from covering + # two of these hyperplanes; this tally does not re-prove that geometry. + return len(seen) + + +def screen(native_mass, stages=9): + progress = PROGRESS + width = 8 * stages + 1 + roles = 104 * (stages - 1) + credit_gap = stages * (native_mass - progress - 104) + 104 + paid = stages * native_mass + max(0, (width - 1) * roles - stages * progress) + capacity = width * roles + return { + "width": width, + "roles": roles, + "credit_gap": credit_gap, + "paid": paid, + "capacity": capacity, + "deficit": paid - capacity, + } + + +def pattern(seed): + return { + "XN": [seed + 3 * n for n in range(N)], + "YN": [-(seed + 5 * n + 1) for n in range(N)], + "XJ": [seed * 17 + j for j in range(J)], + "YJ": [1000 + seed + j * j for j in range(J)], + "H": [seed - 40 * h for h in range(HELPERS)], + } + + +def main(): + if mass(ENCODED_PROFILE) != ENCODED_MASS: + fail("encoded profile is not mass 2576") + encoded_h1 = ENCODED_PROFILE[0] + sum_profile = (encoded_h1 + 2 * N,) + ENCODED_PROFILE[1:] + if mass(sum_profile) != ENCODED_MASS + 2 * N: + fail("sum-only mass is not encoded mass plus 192") + if 2 * N != LEGACY_TRANSPORTS: + fail("N is not 96") + + for seed in (0, 1, -4, 19): + values = pattern(seed) + before = blank_state(values) + after = blank_state(values) + transports, unit_adds = copy_sums(after) + require_sums(before, after) + if len(transports) != 2 * N or unit_adds != 2 * N: + fail("protocol size drifted") + if incidence_floor(transports) != 2 * N: + fail("attained transports do not meet the floor count") + # x is not restored: X_N still holds w_N, at FULL, not the preimage x_N. + if after["XN"] != values["XN"] or after["XN_chart"][0] != "FULL": + fail("x restoration was smuggled into the sum protocol") + + # Separating inputs: only coordinate n is nonzero, and it must still move. + for n in (0, 1, 47, 95): + values = pattern(0) + for key in ("XN", "YN", "XJ", "YJ", "H"): + values[key] = [0] * len(values[key]) + values["XN"][n] = 8 + before = blank_state(values) + after = blank_state(values) + transports, _unit_adds = copy_sums(after) + require_sums(before, after) + touched = [index for _kind, index in transports] + if touched.count(n) != 2: + fail("separating port %s did not pay two transports" % n) + + # Counting bound: 96 incomparable hyperplanes, two incidences each. + if 2 * N != 192: + fail("floor is not 192") + if incidence_floor([("lift", n) for n in range(N)] + [("descend", n) for n in range(N)]) < 192: + fail("attaining schedule under-counted") + + skipped = blank_state(pattern(3)) + copy_sums(skipped, clear=False, sign=0, descend=True) + if skipped["YN"] == pattern(3)["XN"]: + fail("a missing copy still published w_N") + + flipped = blank_state(pattern(3)) + copy_sums(flipped, sign=-1) + if flipped["YN"] == pattern(3)["XN"]: + fail("a sign flip still published w_N") + + parked = blank_state(pattern(3)) + copy_sums(parked, descend=False) + if parked["YN_chart"] == ["H"] * N: + fail("omitted descents still occupied H_n") + + honest = screen(ENCODED_MASS + LEGACY_TRANSPORTS) + encoded_only = screen(ENCODED_MASS) + scalar_as_native = screen(ENCODED_MASS + LEGACY_TRANSPORTS - (LEGACY_UNIT_ADDS - 2 * N)) + # Published PR #3943 sample row at nine stages. Here (m-1)W > sP, so the + # linear gap equals the positive-part deficit. + if (honest["paid"], honest["capacity"], honest["deficit"]) != (64008, 60736, 3272): + fail("nine-stage return deficit is not 3272") + if honest["credit_gap"] != 3272: + fail("nine-stage linear gap drifted") + if (encoded_only["paid"], encoded_only["capacity"], encoded_only["deficit"]) != (62280, 60736, 1544): + fail("encoded-exit deficit is not 1544") + # At three stages the positive part is zero. The linear gap 1160 is the + # published weaker bound; the paid-mass deficit is larger and still positive. + three = screen(ENCODED_MASS + LEGACY_TRANSPORTS, 3) + if (three["paid"], three["capacity"], three["deficit"], three["credit_gap"]) != (8304, 5200, 3104, 1160): + fail("three-stage return bill does not match the published split") + if scalar_as_native["deficit"] >= 0: + fail("control: charging the scalar saving as native rank did not change the sign") + if honest["deficit"] <= 0 or three["deficit"] <= 0: + fail("sum-only native bill was affordable") + + # Legacy source return and this sum-only consumer add the same 192 rank-one + # transports. The 768-unit-ADD scalar gap is not a rank-profile gap. + if (encoded_h1 + LEGACY_TRANSPORTS, *ENCODED_PROFILE[1:]) != sum_profile: + fail("sum-only profile is not the legacy native increment") + if LEGACY_HALVES != 104 or 2 * N != 192: + fail("scalar comparison constants drifted") + + print( + "PASS_ENCODED_SUM_CONSUMER transports=192 unit_adds=192 halves=0 " + "native_mass=2768 deficit_s9=3272 encoded_deficit_s9=1544 x_restored=0" + ) + + +if __name__ == "__main__": + main()