From c9eb6cd4e12068d82de1e46aeab48f5e91dfc668 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 25 Oct 2026 07:12:28 +0000 Subject: [PATCH] Record the one-role cap-two bill loss against the direct swap recipe. The #5083 five-call schedule, compiled into selected one-role reversed calls, has B=2F and misses the #5099 strict direct-recipe test on the admitted-saving screen. Co-authored-by: unpaidmoon --- research/cap2-one-role-direct-bill/README.md | 131 ++++++++++++++++++ .../cap2-one-role-direct-bill/SOURCES.json | 36 +++++ research/cap2-one-role-direct-bill/TASK.json | 70 ++++++++++ .../cap2-one-role-direct-bill/VERIFY.json | 25 ++++ research/cap2-one-role-direct-bill/verify.py | 130 +++++++++++++++++ 5 files changed, 392 insertions(+) create mode 100644 research/cap2-one-role-direct-bill/README.md create mode 100644 research/cap2-one-role-direct-bill/SOURCES.json create mode 100644 research/cap2-one-role-direct-bill/TASK.json create mode 100644 research/cap2-one-role-direct-bill/VERIFY.json create mode 100644 research/cap2-one-role-direct-bill/verify.py diff --git a/research/cap2-one-role-direct-bill/README.md b/research/cap2-one-role-direct-bill/README.md new file mode 100644 index 0000000000..fb4e7eb51d --- /dev/null +++ b/research/cap2-one-role-direct-bill/README.md @@ -0,0 +1,131 @@ +# One-role compilation of the cap-two schedule loses to the direct swap recipe + +**Scoped negative bill; no new κ.** The open handoff at +[discussion 1166, comment 19142691](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19142691) +asks for one eligible chronological caller and a complete +`F,Q,B,wNew,wDirect` bill for the cap-two ABI, then the strict test + +```text +B < (2F + 6Q - Delta)/4, Delta = wNew - wDirect. +``` + +This package names the caller the selected one-role BIT service can +actually run: the five-call schedule of +[#5083](https://github.com/CrocSwap/integer-mult-bounds/pull/5083), +compiled call-by-call into unweighted reversed calls. That bill fails the +test on the accounting screen already used by +[#5099](https://github.com/CrocSwap/integer-mult-bounds/pull/5099). +The selected conditional result stays +`κ = 605457647/200000000000`. + +## Caller and bill + +The formal schedule applies `a` on owners `{0,1}`, `b` on `{0,2}`, `a` on +`{2}`, `b` on `{1,2}`, and `a` on `{0,1}`. Under the reversed reading in +`notes/three-stage-cover-bit.tex`, `aba` is the ordinary swap `J13`. The +direct competitor for three such targets is the note's recipe +`J_A = R_tail F_A R_tail`, at most one width-`f` reversed call and two +width-`floor(f/2)` reversed calls on the same volume. Three targets +therefore cost at most `3F+6Q`, with `wDirect = 0` inside that count. + +The selected integer-width contract +(`notes/batched-bit-rows.tex`, general moment paragraph) gives each child +exactly `1/W` of the parent volume, and repetitions are separate calls. +[#5099](https://github.com/CrocSwap/integer-mult-bounds/pull/5099) records +the matching volume reading: two owners placed in one call raise the volume +to `2V/W` and do not create a cap-two discount. Each selected owner must +change, and a reversed generator on one owner is one unweighted width-`f` +call of price `F`. Spectator preservation is inside that call. The +optimistic one-role compilation is therefore + +```text +B = 2F, wNew = 0, Delta = 0. +``` + +Any extra restoration or positive outside cost only increases `B` or +`Delta`. The five-call word then costs `F+4B = 9F`. + +## Strict test + +With `B = 2F` and `Delta = 0`, + +```text +2F < (2F+6Q)/4 iff Q > F. +``` + +Equality `Q = F` is break-even and fails the strict test. The difference +from the direct upper recipe, divided by `F`, is + +```text +6(1 - Q/F). +``` + +The #5099 screen is the hypothetical same-volume model +`F = K f^(1-C)`, `Q = K floor(f/2)^(1-C)`, `K>0`, `0 ≤ C ≤ 17/5000`, +not a new physical law. It gives + +```text +Q/F ≤ 2^(C-1) < 200/399 < 1, +``` + +because `2^(1-C) > 399/200` is the exact integer inequality +`399^5000 < 2^4983 * 200^5000`. Hence `Q < F` at every integer width, and + +```text +(9F - (3F+6Q))/F > 398/133. +``` + +At `C = 0` the model is exact rather than a ratio cap: even widths lose by +`3F`, width one (where `Q = 0`) loses by `6F`, and odd widths lose by more +than `3F`. A positive `Delta` widens the loss. A negative `Delta` of size +greater than the gap could change the decision; none is proved. + +A price `B = F` with `Q = F/2` does satisfy the strict inequality +(threshold `5/4`). That control is outside the one-role service. The +failure is the price of two separate calls, not an algebra error. + +## What this does not show + +This stops the one-role compilation. It does not forbid a different +multi-owner primitive whose complete price is below `2F`, and it does not +rerun the #5083 formal-word proof or the #5099 package replay. The power +screen is the predecessor's accounting model; actual half-width prices +above the full-width price would be a different hypothesis and are not +supplied by the pinned notes. No physical fixture, emitter, changed +histogram, or selected-frontier edit is included. + +## Reproduce + +From the repository root, CPython 3.12, standard library only: + +```sh +python3 -I -W error -B research/cap2-one-role-direct-bill/verify.py +python3 scripts/research_package.py --package research/cap2-one-role-direct-bill +``` + +The direct command prints `PASS_CAP2_ONE_ROLE_DIRECT_BILL`. The registered +command also prints `PASS_REGISTERED_RESEARCH_PACKAGE`. Both finish in a +few seconds. The checker authenticates the pinned source bytes, the +one-role and direct-recipe sentences, the selected κ string, the integer +power bound, 128 widths, the break-even case, a below-threshold control, +and the sign of an unproved negative `Delta`. + +## Open next questions + +1. Can a changed multi-owner primitive meet `B < (2F+6Q-Delta)/4` with the + same volume, orientation, spectators and a fully charged outside bill? + That is the only remaining way through this gate. Start with one explicit + layout and its summed call list. The selected one-role service does not + supply a price below `2F`. +2. If that bill passes, does the changed inventory improve the selected + #5413 complex moment after finite work, both tails, compiler reserve and + outer transfer? A local BIT comparison is not a new κ. This question + stays blocked until a passing bill exists. + +## Credit + +Nick Petalas supplied the #5083 formal five-call word. Chris R / Clear1nsight +supplied the #5099 physical ceiling, the direct-recipe threshold and the +two-owner volume reading. The BIT notes retain their source authors. The +selected record is #5413. Prepared by unpaidmoon with substantial Cursor +Grok assistance. Apache-2.0. diff --git a/research/cap2-one-role-direct-bill/SOURCES.json b/research/cap2-one-role-direct-bill/SOURCES.json new file mode 100644 index 0000000000..d448e3970d --- /dev/null +++ b/research/cap2-one-role-direct-bill/SOURCES.json @@ -0,0 +1,36 @@ +{ + "schema_version": 1, + "base_commit": "32890bc5de034ab8fc93ac88ead7279a6a416d04", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446", + "sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602", + "sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72" + }, + { + "path": "notes/batched-bit-rows.tex", + "usage": "input", + "git_blob": "cbaa8cb42cad1e714a1d24b16ab160ae6eaf60c9", + "sha256": "ef72c0ead19373cbc19c8a3aacb44dd0f75353ee5f4d055f775a986a4878022c" + }, + { + "path": "notes/three-stage-cover-bit.tex", + "usage": "input", + "git_blob": "f05225d21f92cf8cef21b6e12601d5b4d61991f0", + "sha256": "47123a756f823c83a0d48cca2bf5add6472cd88410b13aed345e70c8834fb511" + }, + { + "path": "research/three-swap-cap2-physical-ceiling/README.md", + "usage": "input", + "git_blob": "fa88e42a198d91011bcb0b8104506cd4122a170d", + "sha256": "96d98163e93fa036e70b7efb88c96bba8a1086af7ece6379dba221ab9f91a4fe" + } + ] +} diff --git a/research/cap2-one-role-direct-bill/TASK.json b/research/cap2-one-role-direct-bill/TASK.json new file mode 100644 index 0000000000..a3732f63c5 --- /dev/null +++ b/research/cap2-one-role-direct-bill/TASK.json @@ -0,0 +1,70 @@ +{ + "schema_version": 1, + "task_id": "bit-new-register-model", + "priority_revision": 7, + "base_commit": "32890bc5de034ab8fc93ac88ead7279a6a416d04", + "original_card": { + "id": "bit-new-register-model", + "question": "Can an explicitly larger or nonabelian register model escape the scoped three-register obstruction?", + "starting_points": [ + "docs/research/research-family-status.md", + "research/bit-three-register-lower-bound/README.md", + "certificates/selected-result.json", + "research/bit-gl3-mixed-targets-length10/README.md", + "docs/research/community-efficient1000-review.md" + ], + "methods": [ + "Construct the smallest exact identity in a newly specified legal operation alphabet.", + "Derive a target-specific relaxation bound for that same explicit alphabet." + ], + "acceptance_gate": "Name the changed hypothesis, all counted roles and a uniform identity; finite column tests alone do not certify it. 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 Model section 1 of the three-register bound and identify the exact excluded free operations.", + "scope": "Positive control / source-bound orientation only; this is not a new construction or full cold replay." + }, + "first_experiment": "First compare the alphabet, role count and length with the fully replayed #1974 census and #2027 mixed-root tariff. Identify a changed premise and a legal native implementation; then price one smallest completed instance before searching larger words.", + "bottleneck_link": "A small-width completed saving changes the bit primitive; a finite-address identity alone is insufficient.", + "allowed_variations": [ + "Choose a fixed larger register count or a specified nonabelian operation family." + ], + "scope_change_triggers": [ + "Remaining inside the already-excluded three-register abelian model.", + "Repeating the two-register GL3 census or a covered three-register length without changing a hypothesis; a formal group-algebra word without native conversion is a partial result." + ], + "overlap_terms": [ + "three-register", + "nonabelian", + "group algebra" + ] + }, + "scope_status": "changed", + "actual_scope": "Bill the one-role compilation of the #5083 five-call schedule as the cap-two caller and test the #5099 direct-recipe inequality.", + "scope_change_reason": "The catalogue card asks for a new register alphabet. Discussion 1166 comment 19142691 already moved this card to the physical cap-two price gate. This package prices that gate's one-role compilation instead of opening another three-register census.", + "bottleneck_link": "A BIT-side cap-two saving can matter only if its complete bill beats the direct ordinary-swap recipe and then changes the binding complex supplier. This one-role bill fails the first comparison, so it cannot raise the selected conditional kappa.", + "budget_minutes": 60, + "stop_rule": "Stop this one-role compilation when the strict direct-recipe inequality fails. Unknown multi-owner prices stay blockers; do not build a fixture for a bill that already loses.", + "outcome": "negative-result", + "evidence": "Exact rational comparison in verify.py: one-role B=2F, Delta=0, and the #5099 power screen force a gap larger than 398/133 F. Source phrases in the pinned BIT notes and the #5099 README are authenticated before the arithmetic.", + "author": "unpaidmoon", + "ai_assistance": "Prepared by unpaidmoon with substantial Cursor Grok assistance.", + "open_questions": [ + { + "question": "Can a changed multi-owner primitive, not two one-role reversed calls, meet B<(2F+6Q-Delta)/4 with the same volume, orientation, spectators and a fully charged outside bill?", + "why_it_matters": "The one-role compilation loses on the #5099 screen. Only a strictly cheaper complete cap-two price could pass the direct-recipe gate.", + "first_step": "Exhibit one layout whose two returned jobs are the independent transformed owners, with every charged call summed into B, and test the inequality before any emitter.", + "blocked_by": "The selected one-role service has no such primitive. A price below 2F is not supplied." + }, + { + "question": "If a complete bill passes that gate, does the changed inventory improve the selected #5413 complex moment after finite work, both tails, compiler reserve and outer transfer?", + "why_it_matters": "A local BIT comparison is not a new conditional kappa.", + "first_step": "Bind that one passing occurrence to the selected complex consumer and price the repaid work.", + "blocked_by": "The one-role direct-recipe gate fails, and no passing multi-owner bill is known." + } + ] +} diff --git a/research/cap2-one-role-direct-bill/VERIFY.json b/research/cap2-one-role-direct-bill/VERIFY.json new file mode 100644 index 0000000000..cdd3a88893 --- /dev/null +++ b/research/cap2-one-role-direct-bill/VERIFY.json @@ -0,0 +1,25 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "notes/batched-bit-rows.tex", + "notes/three-stage-cover-bit.tex", + "research/three-swap-cap2-physical-ceiling/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-W", + "error", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 120, + "checks": "Source phrases, one-role bill B=2F, strict direct-recipe failure on the #5099 screen, positive below-threshold control, and break-even rejection." + } + ] +} diff --git a/research/cap2-one-role-direct-bill/verify.py b/research/cap2-one-role-direct-bill/verify.py new file mode 100644 index 0000000000..30e07134fc --- /dev/null +++ b/research/cap2-one-role-direct-bill/verify.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python3 +"""One-role cap-two bill against the direct ordinary-swap recipe. + +The arithmetic is exact. It does not execute a native program, compiler, +Lean build, or selected cold replay, and it does not claim a new kappa. + +Apache-2.0. Prepared by unpaidmoon with substantial Cursor Grok assistance. +""" +from fractions import Fraction +from hashlib import sha256 +import json +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[2] +PACKAGE = Path(__file__).resolve().parent + + +def need(ok, why): + if not ok: + raise SystemExit(why) + + +def sha(path): + return sha256(path.read_bytes()).hexdigest() + + +def authenticate(): + manifest = json.loads((PACKAGE / "SOURCES.json").read_text(encoding="utf-8")) + pinned = [] + for row in manifest["files"]: + path = ROOT / row["path"] + actual = sha(path) + need(actual == row["sha256"], "source byte mismatch: " + row["path"]) + pinned.append(row["path"]) + text = { + "rows": (ROOT / "notes/batched-bit-rows.tex").read_text(encoding="utf-8"), + "cover": (ROOT / "notes/three-stage-cover-bit.tex").read_text(encoding="utf-8"), + "ceiling": (ROOT / "research/three-swap-cap2-physical-ceiling/README.md").read_text(encoding="utf-8"), + } + need("operates on exactly\n$1/W$ of the parent's logical volume." in text["rows"], + "missing one-role volume sentence") + need("Repetitions in the list represent\nseparate calls." in text["rows"], + "missing separate-call sentence") + need("Every call preserves all complete spectator fields" in text["cover"], + "missing spectator sentence") + need(r"J_A=R_{\rm tail}F_AR_{\rm tail}" in text["cover"], "missing direct J recipe") + need(r"costs at most three children of widths $f,\lfloor f/2\rfloor," in text["cover"], + "missing three-child upper recipe") + need("B < (2F + 6Q - Delta)/4" in text["ceiling"], "missing #5099 threshold") + need("increases volume to `2V/W`" in text["ceiling"], "missing two-owner volume sentence") + need("No eligible chronological occurrence" in text["ceiling"], "missing open-caller sentence") + selected = json.loads((ROOT / "certificates/selected-result.json").read_text(encoding="utf-8")) + need(selected["kappa"] == "605457647/200000000000", "selected kappa moved") + return pinned, selected["kappa"] + + +def gap_over_f(b_over_f, q_over_f, delta_over_f=0): + """(F+4B+Delta - (3F+6Q)) / F for nonnegative rational ratios.""" + return 4 * b_over_f - 2 - 6 * q_over_f + delta_over_f + + +def main(): + pinned, kappa = authenticate() + # #5099 screen: 0<=C<=17/5000 implies 2^(1-C) > 399/200. + need(399 ** 5000 < 2 ** 4983 * 200 ** 5000, "power-screen integer bound") + boundary = Fraction(399, 200) + half_ratio_cap = Fraction(200, 399) # strict upper bound on (1/2)^(1-C) + need(Fraction(1, 2) + Fraction(3, 2) / boundary == Fraction(333, 266), + "nominal break-even cap") + # One-role service: B = 2F and Delta = 0. Strict success needs Q > F. + need(gap_over_f(2, 1, 0) == 0, "Q=F is break-even, not a strict win") + need(not (Fraction(2) < (2 + 6 * Fraction(1)) / 4), "B=2F and Q=F fails the strict test") + # On the screen, Q/F <= 2^(C-1) < 200/399 < 1. + need(half_ratio_cap < 1, "half-width ratio cap") + screen_gap = gap_over_f(2, half_ratio_cap, 0) + need(screen_gap == Fraction(398, 133), "screen gap at the unattained ratio cap") + need(screen_gap > 0, "one-role bill loses against the direct upper recipe") + # g(x)=6(x-1)/x increases for x>0, and the legal gap is strictly above g(boundary). + def g(x): + return 6 * (x - 1) / x + need(g(boundary) == Fraction(398, 133), "boundary gap identity") + need(g(boundary + Fraction(1, 10**6)) > g(boundary), "gap increases with the power") + # Every integer width: floor(f/2)/f <= 1/2, so the screen ratio is <= 1/2^(1-C). + width_cases = 0 + for f in range(1, 129): + half = f // 2 + need(half * 2 <= f, "floor half") + if f == 1: + q_over_f = Fraction(0, 1) + else: + q_over_f = Fraction(half, f) # tau=1, the most expensive half call inside C=0 + need(q_over_f <= Fraction(1, 2), "tau=1 half ratio") + difference = gap_over_f(2, q_over_f, 0) + need(difference > 0, "tau=1 one-role bill must lose") + if f % 2 == 0: + need(difference == 3, "even tau=1 gap is 3F") + elif f == 1: + need(difference == 6, "width-one gap is 6F") + else: + need(difference == 6 - 6 * q_over_f > 3, "odd tau=1 gap exceeds the even case") + width_cases += 1 + # Positive control: a multi-owner price below the threshold can pass. + # F=1, Q=1/2, Delta=0 => threshold = 5/4. B=1 is outside the one-role service. + threshold = (2 + 6 * Fraction(1, 2)) / 4 + need(threshold == Fraction(5, 4), "control threshold") + need(1 < threshold and gap_over_f(1, Fraction(1, 2), 0) < 0, "cheaper primitive can pass") + need(not (2 < threshold), "one-role price fails the same control") + # Positive outside cost cannot create a one-role win. + need(gap_over_f(2, half_ratio_cap, Fraction(1, 100)) > screen_gap, "positive Delta widens the loss") + # A negative Delta large enough can change the decision; it is not proved. + rescue = gap_over_f(2, half_ratio_cap, -screen_gap - 1) + need(rescue < 0, "unproved negative Delta is not a universal loss") + receipt = { + "status": "PASS_CAP2_ONE_ROLE_DIRECT_BILL", + "caller": "one-role compilation of the #5083 five-call schedule", + "bill": {"F": "F", "Q": "Q", "B": "2F", "wNew": "0", "wDirect": "0", "Delta": "0"}, + "strict_test": "B<(2F+6Q-Delta)/4", + "screen": {"C": "[0,17/5000]", "Q_over_F_strict_cap": "200/399", + "gap_over_F_strict_lower": "398/133"}, + "width_cases": width_cases, + "selected_kappa_unchanged": kappa, + "new_kappa": None, + "sources": pinned, + } + print("PASS_CAP2_ONE_ROLE_DIRECT_BILL") + print(json.dumps(receipt, indent=2, sort_keys=True)) + + +if __name__ == "__main__": + main()