diff --git a/research/p104-terminal-correction-floor/README.md b/research/p104-terminal-correction-floor/README.md new file mode 100644 index 0000000000..d32e168d4e --- /dev/null +++ b/research/p104-terminal-correction-floor/README.md @@ -0,0 +1,285 @@ +# A terminal-cut floor for the P104 side correction + +**Scoped obstruction, not a new supplier or kappa.** After the complete P104 +native channel has finished, any correction in the canonical common-chart model +below costs at least **104 additional paid ranks**, even if owned clean copies +and their disposal are granted for free. Without allocation/disposal the floor +is **208**. The lower bound concerns arbitrary-length schedules, arbitrary +rational scalar mixing and arbitrary dirty workspace, not a search over a few +words. + +Under the retained paired-chain, one-unpaid-coordinate coverage contract, the +104-rank floor alone makes the completed channel's moment exceed one already +at saving zero. At nine stages, even the optimistic full bill is + +\[ + M(0)\ge\frac{72\cdot832+(56+104)\cdot9}{73\cdot832} + =\frac{1917}{1898}>1. +\] + +Thus this **post-completion route cannot improve the selected supplier within +that coverage contract**, regardless of idle packing. Earlier interleaving, +changed chart operations and changed coverage laws are outside the theorem. + +## Exact object and predecessors + +Rohan Arun's [PR1972](https://github.com/CrocSwap/integer-mult-bounds/pull/1972), +head `fd82d172f46933fd253c2c6de4bd5eaff5429cfd`, supplies the full scalar/frame +word. Chafik Boukhalfa's [PR1991](../p104-native-channel/README.md) supplies its +native realization. Their result is retained, not claimed new: + +- 104 sources, 104 targets and 72 independent arbitrary dirty helpers; +- 4058 events and the local paid profile + `{1:1074,2:58,3:86,4:104,5:48,6:24,7:8,8:8}`; +- rank mass `2368 = 2312` persistent boundary progress `+ 56` private-copy mass; +- terminal logical rows `X_s=x_s`, `Y_t=y_t+(Gx/2)_t`, with every dirty helper + restored; `G[t,s]` is the ordinary Gram matrix of the pinned 104 E8 root lines. + +The cut is **after all 4058 events**, including query cleanup. Every source and +all 72 helpers are at the full nine-dimensional frame `F`. Target `t` is at its +rank-eight hyperplane `H_t=q_t^perp`; all 104 hyperplanes are distinct. The +correction is `S=I-G/2`. Each row has 48 nonzero entries, all off diagonal. + +Concurrent public claims by **1337isnot1337**, +[18931708](https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931708) +and [18931718](https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931718), +now collected in [discussion 2080](https://github.com/CrocSwap/integer-mult-bounds/discussions/2080), +already describe the terminal target-up/add/down construction with 208 rank-one +uses and its direct-target path floor. Neither that construction nor that +restricted floor is new here. Our 208 bound permits arbitrary mixing and moving +other registers; the stronger new question admits disposable copies and proves +the 104 floor and complete coverage obstruction. The earlier +[query-live proposal](https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931651) +was withdrawn by its author for independent query-dirt leakage. Earlier cuts in +general are not excluded by our theorem. Discussion 2080's favorable conditional +profile screen is not used as a coverage proof: the new terminal mass must be +charged in addition to, not in place of, required idle progress. + +## Model: an explicitly favorable relaxation + +Each register has a canonical binary subspace chart `Gamma_W` and an exact +logical row over the independent persistent inputs. Permitted operations are: + +1. arbitrary rational additions between registers in the **same chart**; +2. a nested transport `Gamma_B Gamma_A^-1`, charged `|dim(B)-dim(A)|>0`; +3. fresh owned zero rows, same-chart copying, and disposal of owned rows. + +All persistent logical endpoints and frames must be restored except for the +required target increment `Sx`. Extra arbitrary dirty helpers may be supplied at +`F`, but must be restored there. No informative input may be inserted for free +at a target chart. Free monomials inside a paid recipe do not authorize an +unpriced change of the declared common chart. + +Allocation, copying and disposal in item 3 are deliberately **more permissive +than a demonstrated physical supplier contract**. In particular, preparing and +discarding a full-frame copied address function is not asserted to be an +admitted all-size primitive. Granting these operations can only weaken a lower +bound. The attaining 104-rank word below is an attainment in this relaxation, +not a completed physical P104 supplier. The older channel's private lifetimes +remain unchanged. + +## Proof of the terminal floor + +### 1. Every target chart must be touched by a transport + +Fix `H_t` and suppose no transport has either endpoint there. Initially the +only nonzero row in that chart is + +`z_t = y_t + (Gx/2)_t`. + +Every additional row created there is zero or is copied from a row in that +chart. Additions, copies and disposal therefore leave all rows in the linear +span of `z_t`. This remains true for any finite number of registers and any +finite-length schedule. Arbitrary dirt at other charts cannot enter. + +The final persistent target would have to equal `c*z_t`. Since `y_t` is an +independent input and its final coefficient must be one, `c=1`. But the required +final row is `z_t+(Sx)_t`, and `(Sx)_t` is nonzero. This is a contradiction. +The argument allows arbitrary mixing and does not assume a selected set of +reads, a particular correction factorization, or a bound on program length. + +### 2. One transport cannot pay for two distinct target charts + +Two distinct eight-dimensional subspaces of the same nine-dimensional space +are incomparable. A nested transport therefore has at most one of the 104 +`H_t` as an endpoint. Its rank is at least one. Charge each target chart to one +incident transport; no transport receives two charges. There are at least 104 +paid ranks. + +Without allocation or disposal, register occupancy at each chart is conserved +between the fixed initial and final boundaries. Once a chart is touched, an +arrival must be balanced by a departure. Thus there are at least two incident +transport occurrences at each `H_t`, proving the 208 floor in that smaller +model. This is an occupancy argument, not an assumption that the target itself +must move. + +The executable checks the actual physical hyperplanes and the nonzero side +rows. The arbitrary-length implication above is a written proof; finite +mutation tests are not its substitute. + +## Matching relaxed word and native transport identity + +For each target `t`, sequentially: + +1. Initialize owned `C=0` at `F` and copy one source into it. +2. Use same-chart rational additions to make `C=(Sx)_t` exactly. The coefficient + of the copied source is adjusted by one, so the COPY is counted explicitly. +3. Transport `C: F -> H_t` with one positive rank-one child. +4. Add `C` to `Y_t` and dispose of `C` at `H_t`. + +All sources, all dirty helpers, and every target frame stay fixed. There are +104 owned lifetimes, 5096 scalar additions, 104 copies, 104 initializations, +104 disposals and 104 rank-one transports: **5512 correction events**. The +completed local profile is +`{1:1178,2:58,3:86,4:104,5:48,6:24,7:8,8:8}`, rank mass **2472**. + +The new frame transport is checked as a complete operator, not just by counting +a dimension difference. Let the pinned rank-zero exit adapter be + +`A_t = F9 C_q^-1 Gamma_H^-1`. + +Then + +`Gamma_H F9^-1 = A_t^-1 C_q^-1`. + +For the odd nonzero physical normal `q`, `C_q^-1=X_q C_q`. Choose an invertible +binary matrix `P` with `P e_0=q`. Then `C_q=P C_e0 P^-1`: one positive rank-one +child, surrounded by monomials. The retained independent Gaussian-dyadic +interpreter checks this expression against the literal chart transport for +all 104 targets, including signed Pauli action and a nonzero exact state column +to fix the global phase. It also rechecks the pinned exit adapters and all +14,400 physical root-pairing identities. No Clifford compiler or producer is +imported. + +This verifies the new **operators**. It does not upgrade the relaxed owned-copy +lifecycle into a physical construction. The prior native core is inherited +from PR1991; this package independently replays its scalar/frame word over all +280 arbitrary persistent inputs rather than rerunning all of its native recipes. + +## Completed optimistic bill and why idle mass is not a credit + +We keep the paired-chain skeleton with `s=2p+1` stages, `m=16p+9=8s+1`, and +`W=2p*v=(s-1)v` live data families per replica. These formulas are source-bound +to Dominik Scholz's retained +[`larger-gain` model](../larger-gain/geometry/stage_relaxation.py), lines 34–40. +Substituting `v=104` is an **explicit conditional template choice**, not an +assertion that a P104 global owner construction has been admitted. At `p=4`, +`W=832`, `N=s=9` and `m=73`. + +The coverage premise is one unpaid coordinate per live data family, with all +other coordinates advanced by the local boundary paths or the idle children. +Sagar Thakrar's [PR1012](https://github.com/CrocSwap/integer-mult-bounds/pull/1012) +and Douglas Colkitt's [packing-ceiling package](../complex-local-word-ceiling/README.md) +supply the coverage-law context. We do **not** silently apply the unchanged +selected-word ceiling to a changed word. + +The actual core boundary contribution is + +`104*8 + 104*8 + 72*9 = 2312` per call. + +Its 56 private drop ranks do not advance persistent endpoints. Under the fixed +coverage premise, nine calls leave + +`72*832 - 9*2312 = 39096` + +units of idle coverage to be advanced. These are not free spare paid ranks. +After the strict completed cut, every persistent register starts and ends at +the same frame, so the correction has **zero net persistent frame progress**. +A persistent excursion must return; an owned private drop advances no live +family's endpoint. Hence the added terminal transport mass does not replace +any of those 39096 units. Debiting 104 per call from that old idle amount would +claim coordinate progress that the correction does not provide. The verifier +includes precisely that erroneous invoice as a rejecting control. + +Favorably charge no scalar cost, no new allocation/disposal cost, no extra +precision cost and no hosting penalty. The full lower bill still is + +`9*(2312+56+104) + 39096 = 61344 > 73*832 = 60736`. + +Every recursive child has `0= r/m`, so the zero-saving rank-mass inequality already rules out +`M(a)<1`. This conclusion needs no numerical root or irrational interval. + +Fully paid auxiliary banks do not repair the deficit: a bank contributes `m` +to both paid mass and capacity, as in the retained +[`screen_stages.py`](../larger-gain/stages/screen_stages.py), lines 61–66. With +`B` such banks the bound is `1+608/[73*(832+B)]>1` for every finite `B`. +A bank granted an unpaid coordinate would be a changed coverage contract. + +More generally, if the same retained template is feasible at another odd stage +count, its deficit satisfies + +`D <= 104*(s-1) - (56+104)*s = -56*s-104 < 0`. + +This algebraic extension is conditional on the same coverage assumptions. It +does not certify a global template or hosting at any additional stage count. + +## Reproduce and evidence + +Standard-library CPython 3.12; all external inputs are authenticated before the +retained Gaussian interpreter executes. Source archives and selected evidence +are read-only. The normal command regenerates the complete result in memory and +compares canonical parsed JSON, not gzip headers: + +```sh +uv run --python 3.12 --no-project python -I -O -B research/p104-terminal-correction-floor/verify.py +uv run --python 3.12 --no-project python scripts/research_package.py --package research/p104-terminal-correction-floor +``` + +`--write` explicitly regenerates `RESULT.json`. The receipt records the complete +source hashes, correction program digest, native-circuit digest, paid profiles, +exact budget and eight semantic controls: omitted correction, wrong coefficient, +dirty copy contamination, omitted frame descent, disposal of a persistent +target, unrestored source, wrong native global phase, and double-spent idle +credit. `-O` does not disable the verifier's checks. + +The author-run optimized generation and registered replay both passed. A +separate AI-assisted reviewer read the proof and code and ran the unchanged +registered package successfully, including all eight controls. This is a +separate replay, not an independent human or formal-kernel verification. + +The task card's working example passed `PASS_RESEARCH_BASELINE_BINDINGS_ONLY`: +the selected conditional kappa remains `0.001672660197076918`. This is a source +binding check, not a selected cold replay. Actual package validation is recorded +in `TASK.json` and `RESULT.json`; no hosted CI or formal-kernel run is claimed. + +## Open next questions + +1. **An earlier chronological cut.** Can the side correction reuse a source and + target chart before their native paths finish? This could avoid a separate + terminal excursion. First list the simultaneous charts at one earlier cut + of the pinned witness, then test a fully priced identity. This package does + not supply that schedule. +2. **A changed coverage contract.** Could an actual interface provide more + unpaid coordinates or share the correction with another required operation? + First derive its complete family/call and endpoint coverage law. Simply + deducting terminal cost from old idle coverage is not such a derivation. + +Structured first steps and blockers are in `TASK.json`. An arbitrary native +operator alphabet allowing chart changes outside the stated nested common-chart +model is also outside the lower bound. Precision, physical copy/erase admission, +chronological hosting, all-size lifting and the bit supplier remain untouched. + +## Provenance and credit + +Base `564148b82ae9df72163f22106f15e73efca8aff2`, priority revision 4; +one independent selector seed `cfe3b8f6d8ab3b2c86dececdc8d1d726`, retained in +`SELECTION.json`. Exact Git/SHA256 pins and overlap limits are in `SOURCES.json`. +Submission overlap covered 353 open PRs including drafts and 738 discussion +records with complete pagination, plus targeted live and local source reading. +Canonical main `0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2` changed guidance only; +its updated instructions were read and original scientific pins retained. +This is not a literature-priority or novelty guarantee. + +Credit Rohan Arun / PR1972 for the complete low-rank word; Chafik Boukhalfa / +PR1991 for the native channel and physical label binding; Adam Gall / PR1940 for +the target-order schedule; Josie Elliston / PR1071 for the P104 fixture; Ali +Romman / PR1125 for the earlier path-cover bound and PR1862 for the independent +Gaussian interpreter, retained through PR1931; the PR968/717/446/595/620 geometry +lineage; and Dominik Scholz, Sagar Thakrar / PR1012 and Douglas Colkitt / PR1240 +for the template and coverage context. Predecessor files and notices are unchanged. + +Prepared for Adam Gall with substantial OpenAI Codex assistance in proof, +implementation and exposition. New material is Apache-2.0. No independent human +review, formal proof assistant, admitted supplier or new multiplication exponent +is claimed. diff --git a/research/p104-terminal-correction-floor/RESULT.json b/research/p104-terminal-correction-floor/RESULT.json new file mode 100644 index 0000000000..a788e59bcc --- /dev/null +++ b/research/p104-terminal-correction-floor/RESULT.json @@ -0,0 +1,93 @@ +{ + "all_odd_stage_deficit_polynomial": "104*(s-1)-160*s = -56*s-104", + "arbitrary_input_columns": 280, + "channel_event_counts": { + "add": 2624, + "copy": 8, + "erase": 8, + "transport": 1410, + "zero": 8 + }, + "channel_events": 4058, + "channel_paid_profile": { + "1": 1074, + "2": 58, + "3": 86, + "4": 104, + "5": 48, + "6": 24, + "7": 8, + "8": 8 + }, + "channel_rank_mass": 2368, + "completed_local_profile": { + "1": 1178, + "2": 58, + "3": 86, + "4": 104, + "5": 48, + "6": 24, + "7": 8, + "8": 8 + }, + "controls": { + "dirty_copy_contamination": "arbitrary-input endpoint: Y0", + "discarding_persistent_target": "owned private discard", + "double_spent_idle_credit": "terminal ranks cannot be debited from old idle coverage", + "omitted_frame_descent": "add common chart", + "omitted_target_correction": "arbitrary-input endpoint: Y0", + "source_not_restored": "arbitrary-input endpoint: X0", + "wrong_native_global_phase": "native global phase: exact global phase", + "wrong_side_coefficient": "arbitrary-input endpoint: Y0" + }, + "correction_rank_mass_lower_bound": 104, + "invalid_idle_reuse_moment_zero": "7551/7592", + "isolated_target_hyperplanes": 104, + "native_circuits_canonical_sha256": "2ae08a3bcb87bc5276f0c0c73cdb104d101ac23dc92e6df3a1fef23a78074b2f", + "native_rank_one_drop_identities": 104, + "nine_stage_optimistic_bill": { + "base_live_families": 832, + "boundary_mass_per_call": 2312, + "capacity": 60736, + "copy_mass_per_call": 56, + "deficit_upper_bound": -608, + "dimension": 73, + "fully_paid_banks": 0, + "local_mass_per_call": 2472, + "moment_zero_lower_bound": "1917/1898", + "pairs": 4, + "stages": 9, + "terminal_mass_floor_per_call": 104, + "total_mass_floor": 61344, + "unchanged_idle_mass": 39096 + }, + "no_allocation_rank_mass_lower_bound": 208, + "persistent_boundary_mass": 2312, + "physical_pairing_checks": 14400, + "ports": 104, + "private_copy_mass": 56, + "relaxed_witness_canonical_sha256": "e10ca9c10100f8be669c8e4792ab072eeef4f95f44e58d2238dc0b909787eb5d", + "relaxed_witness_event_counts": { + "add": 5096, + "copy": 104, + "erase": 104, + "transport": 104, + "zero": 104 + }, + "relaxed_witness_events": 5512, + "relaxed_witness_paid_profile": { + "1": 104 + }, + "scope": "Sharp common-chart terminal-cut floor in an owned-copy relaxation; exact finite native drop operators and arbitrary-input rows, not a physically admitted copy/erase supplier. Pricing is conditional on the retained one-unpaid-coordinate paired-chain law and fully paid banks. No earlier-cut exclusion, all-size proof, new kappa, or selected source changes.", + "source_sha256": { + "research/complex-local-word-ceiling/README.md": "b60be039cb0e03e064a27407d0bce9e58908d793da5ee405c876de5aebfa5f81", + "research/larger-gain/geometry/stage_relaxation.py": "3cbb7c80c6b1b7b5a5e1f1287f2ab37304814c7f89c2b3b4a980c943c260d9d8", + "research/larger-gain/stages/screen_stages.py": "406f46288b31add60ee49ad616e721ce0a18e5eb72b7b9a7dd8664466a4dd8db", + "research/p104-native-channel/NATIVE-RECIPES.json.gz": "a1c4d83d3d5fe1338e99b59272e8cf5d43244c33888597da340b2aa7fef5b3e8", + "research/p104-native-channel/PROOF.md": "5d743145d389ffdfaffc66096fa7e32c7155b18f73d74755403151d0435bb94c", + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e", + "research/p104-native-channel/inputs/P104-FIXTURE.json": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4", + "research/p104-native-channel/vendor/native_verify.py": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + }, + "status": "PASS_P104_TERMINAL_CORRECTION_FLOOR" +} diff --git a/research/p104-terminal-correction-floor/SELECTION.json b/research/p104-terminal-correction-floor/SELECTION.json new file mode 100644 index 0000000000..8b9d870694 --- /dev/null +++ b/research/p104-terminal-correction-floor/SELECTION.json @@ -0,0 +1,145 @@ +{ + "seed": "cfe3b8f6d8ab3b2c86dececdc8d1d726", + "track": "complex-mechanisms", + "suggestions": [ + { + "task_id": "complex-rank-shape-decoder", + "scope_key": "cad3ba853d7f324f16fa", + "question": "Can a decoder deliver the local paid mass in fewer, larger-rank children (block frame climbs instead of rank-1 to rank-3 steps)?", + "method": "Bound the best effective child rank achievable for one fixed support alphabet, including copies, frames and restoration.", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/complex-decoder-field-extension-seed44/README.md", + "research/complex-frame-pair-decoders/README.md", + "research/selected-k8-unrestricted-ends/README.md", + "research/eisenstein-reduction-copy-floor/README.md" + ], + "acceptance_gate": "A per-call local profile, with all copied information, frames and restoration counted, whose ceiling exceeds the selected word's by at least 5%; masked or overcomplete supports must change an assumption of the eight-term all-pairs bound.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin. Ideal budget: rank-16 delivery is 2.31x (levers.py).", + "bottleneck_link": "Rank-1 children are about half of recursive cost; the selected word's effective child rank is about 3.9. Larger-rank delivery lowers recursive cost per unit of paid mass.", + "allowed_variations": [ + "One masked, overcomplete or block decoder family with exact labels and supports.", + "A scoped lower bound on effective rank for one alphabet.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Repacking idle remainders of an unchanged word (covered by the packing ceiling).", + "Repeating the eight-term all-pairs search inside its proved scope.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013.", + "Searching below C=40 in the #2017 Eisenstein binary scalar-rectangle or fixed-support block-linear additive pairing model; specify a changed premise instead. This bound does not cover every complex decoder." + ], + "overlap_terms": [ + "rank shape", + "block climb", + "masked decoder", + "overcomplete", + "effective rank" + ], + "scope_rule": "If you change the card's premise, record scope_status=changed and explain why. A package metadata check cannot establish mathematical relevance." + }, + { + "task_id": "p104-side-correction", + "scope_key": "72dfbf0708467ad34793", + "question": "Can the native P104 low-rank channel be completed with a legal, fully charged I-G/2 side correction?", + "method": "Derive a lower bound on the side correction and hosting costs that decides whether this channel can beat the selected budget.", + "starting_points": [ + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.md" + ], + "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.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the P104 open next questions and its fixed local histogram; inspect why appending I-G/2 after source completion is not justified. #1991 supplies the checked native channel, not the missing correction.", + "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": "Choose one exact side-correction cut and bound its allowed cost from a favorable completed moment at a declared target. Stop or hand off if the necessary source/target access cannot be justified or even the optimistic total misses the target.", + "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." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991" + ], + "scope_rule": "If you change the card's premise, record scope_status=changed and explain why. A package metadata check cannot establish mathematical relevance." + }, + { + "task_id": "complex-new-helper-inventory", + "scope_key": "5868e5281a1e63d41a22", + "question": "Can a new local cost interface change the deficit-to-recursive-cost ratio beyond current packing?", + "method": "Propose a changed helper inventory and derive an optimistic exact moment.", + "starting_points": [ + "research/complex-local-word-ceiling/README.md", + "research/heterogeneous-owner-assembly/README.md", + "certificates/selected-result.json", + "research/selected-k8-unrestricted-ends/README.md" + ], + "acceptance_gate": "A new physically realizable contract outside the frozen catalogue whose per-call profile, screened with ceiling.ceiling(), beats the selected word's packing ceiling; a lower cap does not establish identical circuitry or order attainable optima, and is insufficient to pass the stronger-budget target under this model.", + "first_step": { + "command": [ + "python3", + "-B", + "research/complex-local-word-ceiling/verify.py" + ], + "expected": "PASS_COMPLEX_LOCAL_WORD_CEILING", + "inspect": "Read the selected word's per-call local profile, its packing ceiling and the lever table; run levers.py for the ideal budget of the lever you target.", + "scope": "Positive control and planning budget only; this is not a new construction or full cold replay." + }, + "first_experiment": "Before any synthesis, write the candidate per-call local profile (and centre charge / unpaid coordinates if changed) and screen it with ceiling.ceiling(); reject it if even the ideal ceiling does not beat the selected word's by your stated margin.", + "bottleneck_link": "Packing of the selected word is capped at +0.87% (ceiling model); only a lower local excess spend or a changed coverage law raises the cap.", + "allowed_variations": [ + "Narrow to one changed boundary or helper type with explicit counts.", + "If the coverage law, template or guard changes, derive an applicable fully charged replacement bound instead of applying the incumbent ceiling outside its scope." + ], + "scope_change_triggers": [ + "Mixing only providers already inside the pinned catalogue.", + "Only changing helper terminal subspaces and monotone frames within the fixed scalar word, entrances and cleanup contract already covered by #1995/#2013." + ], + "overlap_terms": [ + "helper inventory", + "heterogeneous-owner", + "mutable leaver" + ], + "scope_rule": "If you change the card's premise, record scope_status=changed and explain why. A package metadata check cannot establish mathematical relevance." + } + ], + "base_commit": "564148b82ae9df72163f22106f15e73efca8aff2", + "catalog_assessed_on": "2026-10-14", + "priority_revision": 4, + "priority_log": "docs/research/research-priority-log.md", + "catalog_sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7", + "selected_record_sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32", + "selected": { + "kappa": "836330098538459/500000000000000000", + "review": "docs/research/community-batch1099-review.md", + "source_manifest": "research/community-frontier1094-audit/SELECTED-SOURCE.json", + "reproduce": "make frontier1094-verify" + }, + "status": "SUGGESTIONS_ONLY_NOT_RESERVED", + "next_step": "Check live overlap, refine one question's object and domain, and record a bounded task card. A different seed or scope key is not evidence of novelty." +} diff --git a/research/p104-terminal-correction-floor/SOURCES.json b/research/p104-terminal-correction-floor/SOURCES.json new file mode 100644 index 0000000000..d754eb6d3d --- /dev/null +++ b/research/p104-terminal-correction-floor/SOURCES.json @@ -0,0 +1,121 @@ +{ + "schema_version": 1, + "base_commit": "564148b82ae9df72163f22106f15e73efca8aff2", + "files": [ + { + "path": "certificates/selected-result.json", + "usage": "provenance", + "git_blob": "ae6a99f28aa468649eb66a361e764d769363bf11", + "sha256": "10b9e340fd8e354a37a0c4813c90e5de1dd42044b5f6aca4a3fc5a42b685fa32" + }, + { + "path": "docs/research/agent-task-catalog.json", + "usage": "provenance", + "git_blob": "e8870e5917057d59b730eb14721a778639eca050", + "sha256": "d46eb6d5b3e279428753d770653663fbdf1063e55c255ea073d768f344927ef7" + }, + { + "path": "research/complex-local-word-ceiling/README.md", + "usage": "input", + "git_blob": "f5f742f8196da29d2c3f4dffb3c27685ca9401f6", + "sha256": "b60be039cb0e03e064a27407d0bce9e58908d793da5ee405c876de5aebfa5f81" + }, + { + "path": "research/larger-gain/geometry/stage_relaxation.py", + "usage": "input", + "git_blob": "59240fe6c9bc124f0b3fab623969be0b5f7c2f7c", + "sha256": "3cbb7c80c6b1b7b5a5e1f1287f2ab37304814c7f89c2b3b4a980c943c260d9d8" + }, + { + "path": "research/larger-gain/stages/screen_stages.py", + "usage": "input", + "git_blob": "a3ee742bcf6dc319a1211fbd2359a53114cfbb56", + "sha256": "406f46288b31add60ee49ad616e721ce0a18e5eb72b7b9a7dd8664466a4dd8db" + }, + { + "path": "research/p104-native-channel/NATIVE-RECIPES.json.gz", + "usage": "input", + "git_blob": "ab129678c2df4f0d39b02b88457d02c37de0d9b6", + "sha256": "a1c4d83d3d5fe1338e99b59272e8cf5d43244c33888597da340b2aa7fef5b3e8" + }, + { + "path": "research/p104-native-channel/PROOF.md", + "usage": "input", + "git_blob": "a69311b74f74a2f8e8f411c1451baacd9bacddce", + "sha256": "5d743145d389ffdfaffc66096fa7e32c7155b18f73d74755403151d0435bb94c" + }, + { + "path": "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "usage": "input", + "git_blob": "86beaf424e9f0f800ae3a62797d94ec9386b7706", + "sha256": "0f541bef7f19fdeffd67157684e9f03d785f42c89973632f508fc1a0452b580e" + }, + { + "path": "research/p104-native-channel/inputs/P104-FIXTURE.json", + "usage": "input", + "git_blob": "2e16f99b295bb386fd13bd8fbd57b42ef54143a9", + "sha256": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4" + }, + { + "path": "research/p104-native-channel/vendor/native_verify.py", + "usage": "input", + "git_blob": "2c209dfa9cfade3bc20ac5fc9d876b433a147f8c", + "sha256": "3049471905b47b385c88378a1a3be7a18b8858aadd035b8a6da2f4a03b470f38" + } + ], + "predecessors": [ + { + "pr": 1972, + "head": "fd82d172f46933fd253c2c6de4bd5eaff5429cfd", + "role": "Rohan Arun complete scalar/frame channel" + }, + { + "pr": 1991, + "head": "6e222517e182e98499239bc9a4009f540e1c5520", + "role": "Chafik Boukhalfa native channel in canonical main at the package base" + }, + { + "pr": 1940, + "head": "a9b7dfe2809092a9a4c90784d12bb60061e995e8", + "role": "Adam Gall chronological target-order schedule retained by the channel" + }, + { + "pr": 1012, + "head": "4ceaf380ed41b28dadcc41d2f974f025ac4d8c03", + "role": "Sagar Thakrar coverage-law context; changed P104 pricing remains an explicit same-template premise" + } + ], + "source_roles": { + "native_channel": "PR1991 supplies prior native endpoint recipes and physical label isometry; its scalar/frame source is PR1972. No producer is executed.", + "gaussian_interpreter": "Ali Romman PR1862, retained through PR1931 and Chafik Boukhalfa PR1991; imported only after all input hashes authenticate.", + "template": "Dominik Scholz larger-gain geometry/stage_relaxation.py lines34-40 supplies the paired-chain formulas; screen_stages.py lines61-66 supplies full bank padding. These are historical P112 models; the P104 instantiation here is an explicit conditional pricing premise, not a new global construction." + }, + "overlap": { + "cached_open_prs": 353, + "cached_discussion_records": 738, + "complete_pagination": true, + "checked_utc": "2026-10-14T19:02:09.776911+00:00", + "targeted_live_check_utc": "2026-10-14T18:59:49Z", + "targeted_live_result": "P104 terminal title/body search over open and closed PRs returned merged PR1125, head9f7c0679d64bab954b7161d8586dc626a59b92ee. Its fixed-term delivery carrier theorem permits extra directions and downward moves but does not address post-completion side correction with arbitrary scalar mixing. No absence-based novelty claim.", + "live_claims": [ + { + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931651", + "scope": "Earlier final-query-live proposal; author withdrew it for independent query-dirt leakage. Earlier cuts in general are not excluded by this package." + }, + { + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931718", + "scope": "Literal post-completion target excursions; construction has208 rank-one uses, not claimed new here." + }, + { + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/1167#discussioncomment-18931708", + "scope": "Terminal target promotion construction precursor; credited as an independent concurrent route." + }, + { + "url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/2080", + "author": "1337isnot1337", + "scope": "Canonical terminal target-up/add/down construction and direct-target208 path floor, read in full. Those are credited prior concurrent claims. No retrievable artifact was posted at reading. Its favorable conditional profile screen is not used as a coverage proof; our arbitrary-mixing104 floor and explicit extra noncoverage bill are distinct." + } + ], + "limits": "Cached open PR bodies and discussion messages plus local package metadata, followed by targeted source reading. Not a novelty guarantee; no new discussion was posted." + } +} diff --git a/research/p104-terminal-correction-floor/TASK.json b/research/p104-terminal-correction-floor/TASK.json new file mode 100644 index 0000000000..1985e1d681 --- /dev/null +++ b/research/p104-terminal-correction-floor/TASK.json @@ -0,0 +1,126 @@ +{ + "schema_version": 1, + "task_id": "p104-side-correction", + "priority_revision": 4, + "base_commit": "564148b82ae9df72163f22106f15e73efca8aff2", + "original_card": { + "id": "p104-side-correction", + "question": "Can the native P104 low-rank channel be completed with a legal, fully charged I-G/2 side correction?", + "starting_points": [ + "research/p104-native-channel/README.md", + "research/p104-native-channel/PROOF.md", + "docs/research/community-efficient1000-review.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.", + "first_step": { + "command": [ + "python3", + "-B", + "scripts/research_baseline.py" + ], + "expected": "PASS_RESEARCH_BASELINE_BINDINGS_ONLY", + "inspect": "Read the P104 open next questions and its fixed local histogram; inspect why appending I-G/2 after source completion is not justified. #1991 supplies the checked native channel, not the missing correction.", + "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": "Choose one exact side-correction cut and bound its allowed cost from a favorable completed moment at a declared target. Stop or hand off if the necessary source/target access cannot be justified or even the optimistic total misses the target.", + "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." + ], + "overlap_terms": [ + "P104", + "I-G/2", + "side correction", + "native channel", + "1972", + "1991" + ] + }, + "scope_status": "refined", + "actual_scope": "Prove a sharp terminal-cut paid-rank floor for the P104 I-G/2 correction under canonical common-chart scalar operations and nested transports, allowing arbitrary dirty workspace and owned clean-copy/discard lifetimes; decide the retained nine-stage four-pair coverage budget.", + "scope_change_reason": "Select the emitted lower-bound method at the completed-channel cut. Existing live claims construct a target up/down correction with 208 rank-one uses; this investigates an arbitrary-schedule floor, including the more permissive disposable-copy route, rather than resubmitting that construction.", + "bottleneck_link": "A universal terminal-cut floor under the stated model can rule out completing the native channel after all sources/helpers reach the full frame, forcing earlier interleaving or a changed global coverage contract.", + "budget_minutes": 120, + "stop_rule": "Stop after proving the terminal hyperplane-incidence bound, exhibiting a matching permissive correction with exact native and arbitrary-input checks, and deriving the complete optimistic coverage bill; do not pursue hosting synthesis when the zero-saving moment already exceeds one.", + "outcome": "completed", + "evidence": "CPython3.12 isolated optimized certificate generation passed PASS_P104_TERMINAL_CORRECTION_FLOOR: 280 arbitrary-input columns,104 isolated physical target hyperplanes,104 exact positive-rank-one native drops,14400 pairing checks, sharp relaxed correction104 and persistent-only floor208, exact M(0)>=1917/1898, eight semantic controls rejected. Complete canonical receipt is RESULT.json. No hosted CI, all-size or formal-kernel claim.", + "validation": [ + { + "command": "uv run --python 3.12 --no-project python -I -O -B research/p104-terminal-correction-floor/verify.py --write", + "observed": "PASS_P104_TERMINAL_CORRECTION_FLOOR; eight semantic controls rejected and exact receipt generated." + }, + { + "command": "uv run --python 3.12 --no-project python scripts/research_package.py --package research/p104-terminal-correction-floor", + "observed": "PASS_REGISTERED_RESEARCH_PACKAGE research/p104-terminal-correction-floor outcome=completed; complete canonical regenerated JSON comparison passed." + } + ], + "separate_review": "A separate AI-assisted reviewer read the proof and code and executed the unchanged registered package: PASS with280 arbitrary columns,104 native drop identities,14400 physical pairings,eight rejecting controls and exact1917/1898. This is a separate replay and written-proof review, not an independent human or formal-kernel review.", + "author": "Adam Gall", + "ai_assistance": "Substantial OpenAI Codex assistance in proof development, exact standard-library Python implementation, and exposition. No formal proof assistant or independent human verification claimed.", + "seed": "cfe3b8f6d8ab3b2c86dececdc8d1d726", + "question": "Must each of the 104 distinct completed target hyperplanes be visited by a paid transport to implement its nonzero correction row, even with arbitrary common-chart mixing and owned temporary copies?", + "changed_premise": "Compared with literal target excursions, allow arbitrary schedules, temporary zero/copy/discard registers, and arbitrary rational common-chart mixing; retain the actual completed-channel frames and restore all persistent inputs.", + "domain": { + "cut": "Immediately after all 4058 events of the pinned PR1972 channel; all 104 sources and 72 dirty helpers are in the full rank-nine frame, and each target is in its distinct rank-eight hyperplane.", + "operations": "Rational same-chart additions; owned zero initialization and same-chart copy; owned discard; nonzero nested canonical-frame transports billed by dimension difference. No free informative input or unpriced chart change. Free allocation/copy/discard is a favorable relaxation, not a physically admitted supplier interface.", + "pricing": "Conditional retained four-pair odd-stage template with one unpaid coordinate per live family; 104 ports, W=832, N=9, m=73 at nine stages. Terminal correction has zero persistent net progress, so its paid mass cannot replace the39096 old idle coverage ranks. Fully paid auxiliary banks add m to both rank mass and capacity and cannot repair the deficit." + }, + "method": "Exact E8 root reconstruction; bind actual compressed/physical endpoint frames; row-span isolation proof for an unvisited target chart; incidence charging proof; exact Fraction row replay and independent Gaussian-dyadic transport identities; rational rank-mass moment obstruction.", + "optimistic_complete_bill": "Native profile {1:1074,2:58,3:86,4:104,5:48,6:24,7:8,8:8} has boundary mass2312 and COPY56. Proved correction floor104 yields total mass>=72W+(56+104)N. Favorably free scalar, allocation, hosting overhead and precision. At W832,N9,m73, mass61344 exceeds capacity60736, so M(a)>=M(0)>=1917/1898 for 0<=a<1. For retained odd-stage templates D<=104(s-1)-160s=-56s-104; fully paid banks are deficit-neutral. This is an explicit changed-word coverage premise, not unchanged incumbent-ceiling output.", + "acceptance": "Proof covers arbitrary-length schedules in the stated alphabet; actual target frames are distinct; all 280 persistent inputs replay; native positive-rank witness is checked with phases; omission, coefficient, dirt, frame, phase and invoice controls reject; registered package replay passes.", + "limits": "No earlier cut, unpriced monomial re-framing, changed outer family/call ratio, shared-word cancellation, all-size supplier, precision admission, global hosting construction, or new kappa.", + "sources": [ + { + "pr": 1972, + "head": "fd82d172f46933fd253c2c6de4bd5eaff5429cfd", + "role": "Rohan Arun complete scalar/frame channel" + }, + { + "pr": 1991, + "head": "6e222517e182e98499239bc9a4009f540e1c5520", + "role": "Chafik Boukhalfa native channel in canonical main at the package base" + }, + { + "pr": 1940, + "head": "a9b7dfe2809092a9a4c90784d12bb60061e995e8", + "role": "Adam Gall chronological target-order schedule retained by the channel" + }, + { + "pr": 1012, + "head": "4ceaf380ed41b28dadcc41d2f974f025ac4d8c03", + "role": "Sagar Thakrar coverage-law context; changed P104 pricing remains an explicit same-template premise" + } + ], + "freshness": { + "upstream_commit": "564148b82ae9df72163f22106f15e73efca8aff2", + "priority_revision": 4, + "submission_checked_upstream_commit": "0fdd7d82de03e43c9e5a1000dfbcd380d1b687d2", + "submission_compatibility": "Read the updated AGENTS/autoresearch/priority-log discussion-usability guidance; catalogue, priority revision4, selected record and scientific inputs unchanged. Retain the original564148b scientific base and immutable pins. The PR itself is the retrievable self-contained artifact; no separate discussion post.", + "open_prs_checked_utc": "2026-10-14T19:00:33.696741+00:00", + "discussion_records_checked_utc": "2026-10-14T19:02:09.707625+00:00", + "coverage": "353 open PRs including drafts,738 discussion/comment/reply records, complete cached pagination and no refresh warnings; targeted live P104 terminal/merged-source reading, including full discussion2080 and the credited direct-target208 path floor. No absence-based novelty claim." + }, + "open_questions": [ + { + "question": "Can a side correction be interleaved before the P104 target hyperplanes become isolated at the completed cut?", + "why_it_matters": "A terminal-floor obstruction does not constrain reads that reuse an unfinished native frame path.", + "first_step": "Choose an earlier cut of the pinned channel and list the simultaneously available source/target charts before designing a correction.", + "blocked_by": "No such chronological correction or complete hosted moment is supplied here." + }, + { + "question": "Can a changed coverage interface provide enough unpaid coordinates without negating the gain elsewhere?", + "why_it_matters": "The terminal arithmetic exclusion depends on the retained one-unpaid-coordinate family law.", + "first_step": "Derive the changed family/call ratio and complete endpoint/idle coverage law before applying a moment screen.", + "blocked_by": "No changed all-size recursive interface or global owner realization is known from this package." + } + ] +} diff --git a/research/p104-terminal-correction-floor/VERIFY.json b/research/p104-terminal-correction-floor/VERIFY.json new file mode 100644 index 0000000000..df58d80a16 --- /dev/null +++ b/research/p104-terminal-correction-floor/VERIFY.json @@ -0,0 +1,29 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/p104-native-channel/inputs/LOWRANK-WITNESS.json", + "research/p104-native-channel/inputs/P104-FIXTURE.json", + "research/p104-native-channel/NATIVE-RECIPES.json.gz", + "research/p104-native-channel/vendor/native_verify.py", + "research/p104-native-channel/PROOF.md", + "research/larger-gain/geometry/stage_relaxation.py", + "research/larger-gain/stages/screen_stages.py", + "research/complex-local-word-ceiling/README.md" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-O", + "-B", + "{package}/verify.py" + ], + "timeout_seconds": 300, + "checks": "Source authentication, actual native endpoint isolation, arbitrary-input correction identity,104 positive-rank native transport identities including phases, canonical receipt comparison, and semantic rejection controls." + } + ] +} diff --git a/research/p104-terminal-correction-floor/verify.py b/research/p104-terminal-correction-floor/verify.py new file mode 100755 index 0000000000..91ac9cbcdf --- /dev/null +++ b/research/p104-terminal-correction-floor/verify.py @@ -0,0 +1,367 @@ +#!/usr/bin/env python3 +"""Exact terminal-cut certificate; no producer imports or floating acceptance. + +Prepared for Adam Gall with substantial OpenAI Codex assistance. Apache-2.0. +The arbitrary-length lower bound is proved in README.md; this checks its finite +premises, a sharp witness in the declared relaxation, and the pricing algebra. +""" +import argparse +from collections import Counter +import copy +from fractions import Fraction as Q +from functools import lru_cache +import gzip +import hashlib +import importlib.util +from itertools import combinations, product +import json +from pathlib import Path + +HERE = Path(__file__).resolve().parent +ROOT = HERE.parents[1] +NATIVE = ROOT / "research/p104-native-channel" + + +def require(condition, message): + if not condition: + raise ValueError(message) + + +def canonical(value): + return (json.dumps(value, sort_keys=True, separators=(",", ":")) + "\n").encode() + + +def authenticate(): + pins = json.loads((HERE / "SOURCES.json").read_text()) + checked = {} + for record in pins["files"]: + if record["usage"] != "input": + continue + raw = (ROOT / record["path"]).read_bytes() + digest = hashlib.sha256(raw).hexdigest() + require(digest == record["sha256"], "source authentication: " + record["path"]) + checked[record["path"]] = digest + return checked + + +@lru_cache(None) +def span(frame): + values = {0} + for vector in frame: + require(isinstance(vector, int) and 0 < vector < 512, "binary frame vector") + values |= {value ^ vector for value in tuple(values)} + require(len(values) == 1 << len(frame), "independent binary frame") + return frozenset(values) + + +def roots(): + values = set() + for i, j in combinations(range(8), 2): + for sign in (-1, 1): + row = [0] * 8 + row[i], row[j] = 2, 2 * sign + values.add(tuple(row)) + for signs in product((-1, 1), repeat=7): + if signs.count(-1) % 2 == 0: + values.add((1, *signs)) + require(len(values) == 120, "120 independent E8 lines") + return sorted(values) + + +def inner(left, right): + value = sum(a * b for a, b in zip(left, right)) + require(value % 4 == 0, "integral ordinary Gram entry") + return value // 4 + + +def initial_state(word): + return ({name: {name: Q(1)} for name in word["initial_frames"]}, + {name: span(tuple(frame)) for name, frame in word["initial_frames"].items()}) + + +def run(program, state, frames, persistent): + """Independent framed row induction, preserving every arbitrary dirty input.""" + state = copy.deepcopy(state) + frames = dict(frames) + private = set() + counts = Counter() + paid = Counter() + for event in program: + kind, register = event[:2] + if kind == "zero": + require(register not in state and register not in persistent, "private initialization") + state[register] = {} + frames[register] = span(tuple(event[2])) + private.add(register) + elif kind == "erase": + require(register in private and frames[register] == span(tuple(event[2])), + "owned private discard") + del state[register], frames[register] + private.remove(register) + elif kind == "transport": + _, _, old, new, rank = event + a, b = span(tuple(old)), span(tuple(new)) + require(frames[register] == a, "transport entry frame") + require(a < b or b < a, "strictly nested transport") + require(rank == abs(len(old) - len(new)) and rank > 0, "paid transport rank") + frames[register] = b + paid[rank] += 1 + elif kind == "copy": + _, _, source, frame = event + require(register in private and not state[register], "owned zero copy target") + require(frames[register] == frames[source] == span(tuple(frame)), "copy common chart") + state[register] = dict(state[source]) + else: + require(kind == "add", "known event alphabet") + _, _, source, coefficient, frame = event + require(register != source, "distinct scalar operands") + require(frames[register] == frames[source] == span(tuple(frame)), "add common chart") + coefficient = Q(coefficient) + for name, value in state[source].items(): + updated = state[register].get(name, Q(0)) + coefficient * value + if updated: + state[register][name] = updated + else: + state[register].pop(name, None) + counts[kind] += 1 + require(not private and set(state) == set(frames) == set(persistent), "private lifetime closure") + return state, frames, counts, paid + + +def check_endpoint(state, frames, word, ports, corrected): + for name in word["initial_frames"]: + expected = {name: Q(1)} + if name.startswith("Y"): + target = int(name[1:]) + if corrected: + expected["X" + str(target)] = Q(1) + else: + expected.update({"X" + str(source): Q(inner(ports[target], row), 2) + for source, row in enumerate(ports) if inner(ports[target], row)}) + require(state[name] == expected, "arbitrary-input endpoint: " + name) + require(frames[name] == span(tuple(word["final_frames"][name])), "final frame: " + name) + + +def make_correction(word, ports): + """A relaxed owned-copy upper witness, not an admitted physical supplier.""" + full = word["final_frames"]["X0"] + program, blocks = [], [] + for target, row in enumerate(ports): + coefficients = {source: Q(source == target) - Q(inner(row, other), 2) + for source, other in enumerate(ports)} + coefficients = {source: value for source, value in coefficients.items() if value} + require(len(coefficients) == 48 and target not in coefficients, "48 nonzero side entries") + first = min(coefficients) + frame = word["final_frames"]["Y" + str(target)] + start = len(program) + program.extend([["zero", "C", full], ["copy", "C", "X" + str(first), full]]) + for source, value in coefficients.items(): + # The explicit COPY preserves the inherited owned-copy shape. Its + # coefficient is adjusted by a legal same-chart rational addition. + program.append(["add", "C", "X" + str(source), str(value - (source == first)), full]) + program.extend([["transport", "C", full, frame, 1], + ["add", "Y" + str(target), "C", "1", frame], + ["erase", "C", frame]]) + blocks.append([start, len(program)]) + return program, blocks + + +def native_premises(certificate, word, all_roots, ports, interpreter): + """Bind actual physical labels and independently check every new drop.""" + N = interpreter + iso = certificate["label_isometry"] + pivots = iso["pivot_root_indices"] + require(len(pivots) == len(set(pivots)) == 9, "nine principal coordinates") + compressed = [sum(((inner(row, all_roots[j]) + 1) & 1) << k + for k, j in enumerate(pivots)) for row in all_roots] + gram = tuple(compressed[j] for j in pivots) + require(list(gram) == iso["compressed_gram"], "compressed Gram binding") + dual = N.inverse(gram) + require(list(dual) == iso["compressed_dual_gram"], "dual Gram binding") + dot = lambda a, b: (a & N.mul(dual, b)).bit_count() & 1 + orth = iso["orthonormal_basis_compressed"] + require(len(orth) == 9 and all(dot(a, b) == (i == j) + for i, a in enumerate(orth) for j, b in enumerate(orth)), "label isometry") + convert = lambda value: sum(dot(value, vector) << j for j, vector in enumerate(orth)) + physical = [convert(value) for value in compressed] + require(physical == iso["physical_root_labels"] and len(set(physical)) == 120, + "physical root labels") + for i, a in enumerate(physical): + for j, b in enumerate(physical): + require(((a & b).bit_count() & 1) == ((inner(all_roots[i], all_roots[j]) + 1) & 1), + "physical pairing") + labels = dict(zip(all_roots, physical)) + exits = {record["register"]: record for record in certificate["endpoint_adapters"] + if record["position"] == "exit"} + circuits = [] + target_spaces = [] + for index, row in enumerate(ports): + name = "Y" + str(index) + record = exits[name] + q, frame = record["normal"], tuple(record["frame"]) + require(q == labels[row] and q.bit_count() % 2 == 1, "odd physical target normal") + require(span(frame) == span(tuple(convert(v) for v in word["final_frames"][name])), + "actual target-frame binding") + require(len(frame) == 8 and all((v & q).bit_count() % 2 == 0 for v in frame), + "target hyperplane") + target_spaces.append(span(frame)) + require(record["recipe"]["rank"] == 0, "rank-zero exit adapter") + adapter = N.recipe(record["recipe"]) + N.equal(adapter, N.adjoint(N.frame(frame, 9)) + (("C", q, -1),) + N.fourier(9), + "pinned target exit identity") + # C_q^-1 = X_q C_q. Conjugating C_e0 by the invertible + # binary basis matrix uses exactly one positive rank-one child. + matrix = N.transpose(N.extend((q,), 9)) + circuit = (("P", N.inverse(matrix)), ("C", 1, 1), ("P", matrix), ("X", q)) + circuit += N.adjoint(adapter) + N.equal(circuit, N.adjoint(N.fourier(9)) + N.frame(frame, 9), + "positive rank-one full-to-target drop") + require(sum(gate[0] == "C" for gate in circuit) == 1, "one native positive child") + circuits.append(circuit) + require(len(set(target_spaces)) == 104, "104 distinct physical target hyperplanes") + return circuits, target_spaces + + +def pricing(ports=104, pairs=4, banks=0, correction_mass=104): + require(pairs >= 1 and banks >= 0, "nonnegative paired-chain parameters") + stages = 2 * pairs + 1 + dimension = 16 * pairs + 9 + live = 2 * pairs * ports + base_boundary = 2 * ports * 8 + 72 * 9 + idle = (dimension - 1) * live - stages * base_boundary + require(idle >= 0, "local boundary does not fit retained no-bank windows") + local_mass = base_boundary + 56 + correction_mass + mass = stages * local_mass + idle + dimension * banks + capacity = dimension * (live + banks) + return {"pairs": pairs, "stages": stages, "dimension": dimension, + "base_live_families": live, "fully_paid_banks": banks, + "boundary_mass_per_call": base_boundary, "copy_mass_per_call": 56, + "terminal_mass_floor_per_call": correction_mass, + "unchanged_idle_mass": idle, "local_mass_per_call": local_mass, + "total_mass_floor": mass, "capacity": capacity, + "deficit_upper_bound": capacity - mass, "moment_zero_lower_bound": str(Q(mass, capacity))} + + +def replay(): + hashes = authenticate() # No external code executes before its bytes authenticate. + spec = importlib.util.spec_from_file_location("p104_floor_gaussian", NATIVE / "vendor/native_verify.py") + native = importlib.util.module_from_spec(spec) + spec.loader.exec_module(native) + word = json.loads((NATIVE / "inputs/LOWRANK-WITNESS.json").read_text()) + fixture = json.loads((NATIVE / "inputs/P104-FIXTURE.json").read_text())["section4_explicit_P104"] + certificate = json.loads(gzip.decompress((NATIVE / "NATIVE-RECIPES.json.gz").read_bytes())) + all_roots = roots() + removed = {tuple(row) for row in fixture["F0"] + fixture["C"]} + ports = [row for row in all_roots if row not in removed] + require(len(removed) == 16 and len(ports) == 104, "P104 port set") + state, frames = initial_state(word) + persistent = set(state) + require(len(persistent) == 280, "280 arbitrary persistent input columns") + terminal, terminal_frames, channel_counts, channel_paid = run(word["program"], state, frames, persistent) + check_endpoint(terminal, terminal_frames, word, ports, False) + require(dict(channel_paid) == {1: 1074, 2: 58, 3: 86, 4: 104, 5: 48, 6: 24, 7: 8, 8: 8}, + "native channel profile") + target_names = {"Y" + str(index) for index in range(104)} + require(all(len(terminal_frames[name]) == (256 if name in target_names else 512) + for name in persistent), "actual terminal frame occupancy") + require(len({terminal_frames[name] for name in target_names}) == 104, + "one isolated original row at each target chart") + circuits, spaces = native_premises(certificate, word, all_roots, ports, native) + correction, blocks = make_correction(word, ports) + final, final_frames, extra_counts, extra_paid = run(correction, terminal, terminal_frames, persistent) + check_endpoint(final, final_frames, word, ports, True) + require(dict(extra_paid) == {1: 104}, "sharp relaxed correction profile") + require(sum(rank * count for rank, count in channel_paid.items()) == 2368, "channel mass") + + # Finite premises of the written incidence proof: every correction row is + # nonzero, and no nested transport can have two distinct target charts as + # endpoints. A rank is at least one, so each incident chart can be charged. + require(all(not (a < b or b < a) for a, b in combinations(spaces, 2)), + "target hyperplane antichain") + boundary = sum(len(word["final_frames"][name]) - len(word["initial_frames"][name]) + for name in persistent) + require(boundary == 2312 and 2368 - boundary == 56, "net-progress versus private-copy mass") + require(all(final_frames[name] == terminal_frames[name] for name in persistent), + "terminal correction has zero persistent net progress") + budget = pricing() + require(budget["moment_zero_lower_bound"] == "1917/1898" and budget["deficit_upper_bound"] == -608, + "exact completed nine-stage budget") + require(pricing(banks=1)["deficit_upper_bound"] == -608, "fully paid banks do not repair deficit") + + controls = {} + def rejects(label, action, expected_fragment): + try: + action() + except ValueError as error: + require(expected_fragment in str(error), "control failed for an unintended reason: " + label) + controls[label] = str(error) + else: + raise ValueError("accepted semantic fault: " + label) + + def check_bad(program): + rows, charts, _, _ = run(program, terminal, terminal_frames, persistent) + check_endpoint(rows, charts, word, ports, True) + + start, stop = blocks[0] + rejects("omitted_target_correction", lambda: check_bad(correction[stop:]), "arbitrary-input endpoint") + bad = copy.deepcopy(correction) + bad[2][3] = str(Q(bad[2][3]) + 1) + rejects("wrong_side_coefficient", lambda: check_bad(bad), "arbitrary-input endpoint") + bad = copy.deepcopy(correction) + bad[1][2] = next(name for name in persistent if not name.startswith(("X", "Y"))) + rejects("dirty_copy_contamination", lambda: check_bad(bad), "arbitrary-input endpoint") + bad = copy.deepcopy(correction) + del bad[stop - 3] + rejects("omitted_frame_descent", lambda: check_bad(bad), "add common chart") + bad = copy.deepcopy(correction) + bad[stop - 1][1] = "Y0" + rejects("discarding_persistent_target", lambda: check_bad(bad), "owned private discard") + bad = copy.deepcopy(correction) + full = word["final_frames"]["X0"] + bad.append(["add", "X0", "X1", "1", full]) + rejects("source_not_restored", lambda: check_bad(bad), "arbitrary-input endpoint") + rejects("wrong_native_global_phase", lambda: native.equal(circuits[0] + (("phase", 1),), + circuits[0], "native global phase"), "native global phase") + + wrong_mass = budget["total_mass_floor"] - 104 * budget["stages"] + def validate_invoice(mass): + require(mass == budget["stages"] * budget["local_mass_per_call"] + + budget["unchanged_idle_mass"], "terminal ranks cannot be debited from old idle coverage") + rejects("double_spent_idle_credit", lambda: validate_invoice(wrong_mass), "old idle coverage") + require(Q(wrong_mass, budget["capacity"]) < 1, "invoice fault reverses zero-saving decision") + + return {"status": "PASS_P104_TERMINAL_CORRECTION_FLOOR", "source_sha256": hashes, + "ports": 104, "arbitrary_input_columns": 280, "isolated_target_hyperplanes": 104, + "physical_pairing_checks": 14400, "native_rank_one_drop_identities": len(circuits), + "native_circuits_canonical_sha256": hashlib.sha256(canonical(circuits)).hexdigest(), + "channel_events": len(word["program"]), "channel_event_counts": dict(sorted(channel_counts.items())), + "channel_paid_profile": dict(sorted(channel_paid.items())), "channel_rank_mass": 2368, + "persistent_boundary_mass": boundary, "private_copy_mass": 56, + "correction_rank_mass_lower_bound": 104, "no_allocation_rank_mass_lower_bound": 208, + "relaxed_witness_events": len(correction), "relaxed_witness_event_counts": dict(sorted(extra_counts.items())), + "relaxed_witness_paid_profile": {1: 104}, + "relaxed_witness_canonical_sha256": hashlib.sha256(canonical(correction)).hexdigest(), + "completed_local_profile": dict(sorted((channel_paid + extra_paid).items())), + "nine_stage_optimistic_bill": budget, + "invalid_idle_reuse_moment_zero": str(Q(wrong_mass, budget["capacity"])), + "all_odd_stage_deficit_polynomial": "104*(s-1)-160*s = -56*s-104", + "controls": controls, + "scope": "Sharp common-chart terminal-cut floor in an owned-copy relaxation; exact finite native drop operators and arbitrary-input rows, not a physically admitted copy/erase supplier. Pricing is conditional on the retained one-unpaid-coordinate paired-chain law and fully paid banks. No earlier-cut exclusion, all-size proof, new kappa, or selected source changes."} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--write", action="store_true", help="regenerate the canonical result receipt") + args = parser.parse_args() + result = replay() + encoded = json.dumps(result, sort_keys=True, indent=2) + "\n" + if args.write: + (HERE / "RESULT.json").write_text(encoded) + else: + require(json.loads((HERE / "RESULT.json").read_text()) == json.loads(encoded), + "complete regenerated result comparison") + print(encoded, end="") + + +if __name__ == "__main__": + main()