diff --git a/research/helper-transport-contract/BOUNDARY.md b/research/helper-transport-contract/BOUNDARY.md new file mode 100644 index 0000000000..e1bd7c0834 --- /dev/null +++ b/research/helper-transport-contract/BOUNDARY.md @@ -0,0 +1,135 @@ +# One nominated helper-300 successor interface + +This is a bounded source-bound decision, not a new productive supplier or a global +no-handoff theorem. It checks the backward interval [9044,9137) only, the exact +twenty-field closure already studied, and one additional arbitrary successor S. +The only two nominated birth frames are plane430 and line21. No helper census, +larger window, or synthesis search was run. + +## Common local contract + +Let x_i denote the twenty independent values at the event9044 entry cut. The +retained matrix is T. The proposed continuing outputs equal T with the input +symbol x300 replaced by s; the old output role300 is instead restored to x300, +and the old continuing output300 is assigned to S. This is the explicit +relabel-and-retire interface suggested by the successor pattern. It is a sufficient +handoff boundary, not a claim to characterize every possible changed suffix. + +All other field paths and the eight disjoint interval events stay unchanged. +Allowed operations are coframed rational ADD/nonzero SCALE and monotone climbs; +there are no new warps, descents, extra fields, or changed output charts. + +## Plane430 birth: excluded + +The successor starts at F430=span(273,85). Old H300 follows 0→21→430 and retires; +S follows 430→437. This splits the original path 0→21→430→437 and retains38 H1. + +The exact retained rows are + + output301 = x19 - x40 - x300 - x301 + output299 = (x19 + x40 - x300 - x301)/2. + +Thus the declared successor interface requires coefficient−1 of s in output301 +and coefficient−1/2 in output299. Both outputs end at F419=span(273,51), which +does not contain85. Every coefficient of s can only move to frames containing +its birth space under the allowed operations. Consequently neither demanded +coefficient can be delivered. This endpoint-inclusion argument already holds +with arbitrary scalar refactoring and chronology; the optimistic station graph +also confirms the disconnection. + +This excludes this plane430 boundary. It does not exclude different output +charts, extra native transport, an earlier successor birth, or a changed suffix. + +## Line21 birth: exact local positive control + +If S starts at F21=span(273) and old H300 retires at that same line, the following +literal local construction works: + +1. Keep the original first climb H300:0→21 at event9044. +2. Retire H300 with its cut value x300. +3. Redirect every remaining reference to H300 in this interval to S. In + particular event9045 now subtracts S from field19. + +S follows21→430→437; every other instruction is unchanged. The complete21-input +row identity and all final frames hold exactly, with 38 H1. No other successor +coefficient is blocked. This is the entrance-pure pattern already identified by +PR5472, not a new gadget or an admitted productive split. + +If old H300 is instead required to retire at plane430 while S still starts at +line21, an additional H300:21→430 climb gives the same exact row identity at +39 H1. The local monotone rank mass itself increases by one: no scalar rewrite +can make that duplicated ascent free. Its target benefit must not be booked +without the producer/consumer ledger, and one extra H1 exceeds a single split's +moment allowance near the selected endpoint. + +## Actual producer boundary: cut value is not the original helper + +The independent source slice contains 98 scalar instructions on41 dependency +roles and no warp. It gives + + x300 = h300 + + (L113 - L123 + L128 - L135 - L140 - L145 - L162 + L163 + - L174 - L183 + L190 + L194 - L203 - L205 + L216 - L221)/2, + +where h300 and all L terms are original input coordinates. The32 preload ADDs +at events2343–2374 consume rows that were already mixed; calling these 32 original +input terms would be incorrect. Retiring x300 at line21 returns a mixed +original-input value and does not by itself certify the productive H1 image of +the original h300. This is not an algebraic-dependence objection: the prefix is +invertible, so x300 remains one of the independent cut coordinates. A change to +that coordinate basis can be valid, but its effect on the original target and +full caller must be certified. + +The separately propagated original-h300 column has exact event9044 support: + +| Role | Coefficient | Entry frame | +|---:|---:|---:| +|18|−1/2|20| +|40|−1/2|42| +|288|1/2|103| +|289|−1/2|103| +|290|−1/2|56| +|291|1/2|56| +|297|1/2|20| +|299|1/2|42| +|300|1|0| +|301|−1/2|0| +|303|1/2|0| +|505|−1/4|0| + +No warp touches this nonzero column before the cut. Role505 is outside the +twenty-field local closure and still lies at frame0. Hence a literal global +input-transposed cut state would require coefficient−1/4 of the successor in +that frame0 role. A successor born at line21 cannot supply this under monotone +transport. Keeping the original prefix and merely renaming the nominated local +suffix does not repair the producer boundary. This is an explicit obstruction +to that claimed interface, not to every modified prefix/suffix construction. + +The next interface must supply an original-target and caller intertwining +certificate that accounts for the full coordinate change, including the external +role, together with its paid ledger. The obstruction above is limited to the +unchanged-prefix, literal input-transposition contract; it does not rule out a +zero-frame entrance basis shear or another modified producer. A feasible entrance +change alone does not settle the exit restoration and caller obligations. The +local positive control alone earns no new target credit. + +## Evidence + +check_split_boundary.py is standard-library code, imports no discovery or other +worker functions, defaults repository root to two parents above its package, +and accepts --repo and --json. Its --json output contains the exact source pins, +matrix-defined target rows, modified frame paths, literal line21 program, +preload/spread source events, entry-row backward slice, and original-input column. + +Normal and optimized runs produce identical JSON. The checker admits only the +local scalar/climb language, proves that the eight untouched source events use +disjoint roles, and requires them to remain byte-for-byte unchanged and in order. +Six active controls reject a missing successor coefficient, a retained old-helper +consumer subtraction, a false retirement frame, a missing first paid climb, a +free duplicated ascent, and an unsupported warp on the original helper. + +Credit PR5472 at ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30 for the successor pattern, +its prior entrance-pure screen, and the gadget. Retain the selected native word, +provider, controller and compiler lineage. Prepared by apoursh with substantial +OpenAI Codex assistance. No native all-width, compiler, full-caller or new kappa +claim is made. diff --git a/research/helper-transport-contract/BUDGET.md b/research/helper-transport-contract/BUDGET.md new file mode 100644 index 0000000000..2ac2368d63 --- /dev/null +++ b/research/helper-transport-contract/BUDGET.md @@ -0,0 +1,287 @@ +# Exact budget decision for a changed transport or helper boundary + +Prepared for apoursh with substantial OpenAI Codex assistance. Apache-2.0. +This is a local arithmetic and operator-contract audit, not a new supplier or a +new bound. No source tape or selected record was modified. + +## Decision + +A paid auxiliary transport cannot be financed by the entire optimistic +twenty-field regrouping allowance if it adds even one positive-rank recursive +job **per LOCAL**. The isolated value-preserving repair of the native line warp +costs H2; even one such repair shared across all eighteen LOCALs costs more than +all eighteen optimistic regrouping allowances combined. + +A materially different route is the productive successor hand-off in +[GamingPuzzled's PR5472](https://github.com/CrocSwap/integer-mult-bounds/pull/5472), +pinned here to `ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30`. Splitting a rank-nine +target into rank four and rank five earns a positive moment credit with no +change in paid work. Its author supplies a checked small gadget; this package does not independently +replay or admit that gadget. Its real-supplier crossing and consumer boundary remain unconstructed. +One new H1 per hand-off would outweigh its credit. + +The surviving constructive question is therefore a changed native word that +reuses already-paid climbs to create the required contact and preserves the +consumer obligations. The calculations below exclude specific paid repairs; +they do not prove that all changed words, gauges or interfaces are impossible. + +## 1. The exponent actually used by the selected supplier + +Pinned selected main is `32890bc5de034ab8fc93ac88ead7279a6a416d04`. +The selected final saving and tested raw moment saving are different: + +\[ +\kappa=\frac{605457647}{200000000000},\qquad +s=\frac{605457649}{200000000000},\qquad +t=1-s=\frac{199394542351}{200000000000}. +\] + +Every price below is \(f(r)=r^t\). It does not substitute \(\kappa\) for \(s\). +The selected funding engine sets `gap=(s-k)/7`, prices with `t=1-s`, and records +the uniform complex saving as `k+6*gap`; that latter value is +`4238203541/1400000000000`. + +Exact sources: + +- [`fund_uniform_endpoint.py`, lines39–49 and91–94](https://github.com/CrocSwap/integer-mult-bounds/blob/32890bc5de034ab8fc93ac88ead7279a6a416d04/research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/invoice/fund_uniform_endpoint.py#L39): the exponent and parameter ladder. +- [`funding.json`](https://github.com/CrocSwap/integer-mult-bounds/blob/32890bc5de034ab8fc93ac88ead7279a6a416d04/research/coupled-helper-neutral-completion/reports/expected/funding.json): exact `tested`, `kappa`, and `gap`. +- [`NEUTRAL-PROOF-v16c.md`](https://github.com/CrocSwap/integer-mult-bounds/blob/32890bc5de034ab8fc93ac88ead7279a6a416d04/research/coupled-helper-neutral-completion/reports/proofs/NEUTRAL-PROOF-v16c.md#exact-complete-caller-choice-all18backward): all eighteen runtime LOCALs use the backward packet. + +Semantic provenance SHA256 values, distinct from the four runtime inputs: + +| Source | SHA256 | +|---|---| +| `fund_uniform_endpoint.py` | `e445e7da76e9d8e5dbad2c5fc0bd8aa17e3f5c6d0bfcf56f778c3960426909a1` | +| `NEUTRAL-PROOF-v16c.md` | `dca94625cd0d49de6b81e4a7dd4108b8b6f711e90496d9116806242d30b35737` | +| [`research/kappa-rebuild/complex/native_extensions.py`](https://github.com/CrocSwap/integer-mult-bounds/blob/32890bc5de034ab8fc93ac88ead7279a6a416d04/research/kappa-rebuild/complex/native_extensions.py#L84) | `50ad007d9c386393657e86c99a96ae0a63a8fbc52872579b185002cc626e88e3` | + +The last source defines the frame interpreter's inert markers, scalar coframe +checks, climb/warp updates and paid-rank convention. + +The script reuses the selected source's directed-rational `exact_moments.py` +without modifying it. Credit for that arithmetic and selected caller remains +with Clear1nsight and the retained provider/controller/native predecessors. + +## 2. The maximum allowance with retained twenty-field endpoints + +The source interval is backward `[9044,9137)`, restricted to the dependency +closure of fields19,300,301. The script derives its twenty fields and85 selected +events from the actual source, checks the frames through the prefix, and extracts +the endpoint invoice. Its paid invoice is 38 H1. The endpoint +rank increments are thirteen line-to-cube increments of 2, three line-to-plane +increments of 1, one zero-to-cube increment of 3, and three zero-to-plane +increments of 2. Thus the most optimistic direct-endpoint invoice is + +\[ +P_{\mathrm{ideal}}=3H_1+16H_2+H_3. +\] + +For \(0C+L. +\] + +For the retained-endpoint regrouping question, \(A\leq B_{20}\). Every additional +positive-integer-rank job costs at least 1. Losing an entire positive-rank target +also costs at least 1. Neither can be financed locally by \(B_{20}\), even before +charging other work. Unknown restoration and consumer debits cannot be set to +zero. + +Charging one event per LOCAL differs from charging one global event. All prices +below have certified outward rational enclosures in `verify_budget.py`; the +decimals are abbreviated for reading. + +| Quantity | Moment | +|---|---:| +| Twenty-field optimistic saving \(B_{20}\) | 0.07703787664069600 | +| Eighteen such savings | 1.38668177953252805 | +| One H1 | 1 | +| One H2 | 1.99580768739754101 | +| One H3 | 2.99003912499864780 | +| One isolated H7 exit coefficient | 6.95888540202818528 | +| One productive9→4+5 split | 0.01861244404255384 | +| Eighteen such splits | 0.33502399276596921 | +| Conditional9→1+8 split, not admitted credit | 0.009463658975626097 | +| Eighteen such conditional first-line splits | 0.170345861561269763 | +| \(B_{20}\) plus one split per LOCAL | 0.09565032068324985 | +| All eighteen copies of that optimistic combined allowance | 1.72170577229849726 | + +Consequences: + +- One added H1 per LOCAL loses even against the combined ideal saving plus one + target split per LOCAL. +- The eighteen-call ideal saving could pay one once-global H1 as an arithmetic + matter. This is neither a shared transport construction nor evidence that the + unattainable ideal saving can be realized. +- One H2 charged only once globally already exceeds all eighteen ideal savings, + even after also granting one productive9→4+5 split per LOCAL. +- More target splits or other independently proved savings change the budget. + For example,54 such splits can in principle pay one H1;18 cannot. No statement + here excludes a broader mechanism with a different complete invoice. + +Even a one-unit downgrade of a target of integer rank at most 145 costs at least +\(t145^{t-1}>0.982064895964294826\), by the mean-value theorem. That exceeds the +local allowance. This is a scoped convenience bound for the selected rank +range, not a rule for arbitrary ranks or a reason to ignore compensating credit. + +## 4. Independent assessment of the isolated native-warp proposal + +The native worker provides exact full-tableau and absolute-phase tests on +dimension2 and on the selected dimension9 lines273 and324. In its convention, +with canonical frame maps \(T_U,T_V\), a legal zero-recursive-rank warp is + +\[ +W=T_V K T_U^{-1}, +\] + +where \(K\) is a nontrivial logical permutation. Value-preserving transport is +instead \(T_VT_U^{-1}\). A correction +\(C=T_VK^{-1}T_V^{-1}\) satisfies \(CW=T_VT_U^{-1}\); for the two tested distinct +lines, the compiler gives rank2 for both the correction and the value-preserving +transport. Thus **one H2 plus its monomial adapters** is a sufficient isolated +one-way repair. A return trip could add cost, but is not needed for the losing +budget conclusion. + +The scalar-transfer reason is independent of the compiler calculation: warping +only a source, applying ADD, and undoing the source transfers \(Kx\), not \(x\). +Undoing the source does not undo the data already added to the destination. +Putting the same logical gauge on both participants makes scalar ADD commute +with that common gauge. A common invertible binary map preserves intersections +and dimensions; by itself it does not create a meeting of previously unequal +frames. More complicated rewrites involving other fields remain outside this +isolated statement. + +This is not semantic impossibility of transport: the exact paid repair exists. +It is a budget exclusion for financing that repair from this specific local +regrouping allowance. Rank-zero operations still have ordinary movement/scalar +cost, which a future complete caller must fund. + +## 5. Different interface: productive successor hand-off + +The pinned PR5472 mechanism lets an arbitrary independent successor start at a +middle frame. When the conduit and its carried port value meet at that frame, +scalar cancellation leaves the old helper pure and transfers the conduit to +the successor. All above-frame consumers must have had an earlier opportunity +to subtract the successor's still-pure input. Only then may later operations be +renamed without changing paid climbs. + +For a9→4+5 hand-off the signed target change is +\(\Delta T=H_4+H_5-H_9\), and the paid change is zero. Its gain is + +\[ +G_{4,5}=4^t+5^t-9^t=0.0186124440425538449\ldots>0. +\] + +Strict concavity makes4+5 the largest credit among single positive-integer +splits of 9. The new local cut control that retires a helper at its first line +would instead suggest the smaller conditional credit +\(1+8^t-9^t=0.009463658975626097\ldots\). Restoring an arbitrary cut coordinate +does not establish this target: the selected helper's cut value is mixed with +original input columns, and the physical entrance/exit basis and all consumers +still need to be handled. The checker labels this credit as unadmitted. A +retirement at the next plane with the successor born at the first line duplicates +one H1; even the larger4+5 credit cannot pay that charge. + +The native check examines a specified same-label formal exit shear: each of the +sixteen named Y outputs ends in a rank-eight frame containing line21, +so its specified value-preserving coefficient into the retired line has Fourier +rank7. These are not claimed to be the mandatory coefficients of the true inverse +through the main transform, which remains unconstructed. Pricing just one such +coefficient as a retained Clifford transport costs +\(7^t=6.958885402028185276\ldots\), already far above both the conditional1+8 +credit and that credit plus \(B_{20}\). This does not claim sixteen H7 charges, +a lower bound for every joint decoder, or a failure of input rebasing itself. +The missing object is a sufficiently cheap complete exit/consumer realization. + +This changes productive ownership and is therefore materially different from +moving an owned scratch field. If the successor is owned zero rather than a +fresh arbitrary productive input, its H5 credit is unavailable. Retiring the +old target at rank4 then surrenders +\(9^t-4^t=4.957085643947558602\ldots\), before any new paid work. + +The small PR5472 gadget validates a5→3+2 pattern, not the full selected9→4+5 +supplier. Its own screens find no suitable crossing in the retained word. The +native worker's two-field gauge argument also blocks manufacturing such an +isolated clean cancellation by independently warping the conduit and port: +purity of \(P(h+a)-qQa\) for arbitrary \(a\) requires \(P=qQ\). It does not rule +out a new word that creates the contact using existing paid climbs. + +Therefore the next constructive contract should demand: one explicit new +contact; an arbitrary productive successor with its entrance/exit frames; +every affected consumer's pre-subtraction; unchanged complete paid histogram; +the new complete target histogram; and exact endpoint rows and native phases. +The owned relations, controller, caller and strict compiler must then be +re-derived before claiming an improved selected bound. This session does not +build or admit that word. + +## Reproduction and remaining questions + +Run the small source-pinned calculation with: + +```sh +python3 -B verify_budget.py --repo /absolute/path/to/integer-mult-bounds-transport --json +python3 -B -O verify_budget.py --repo /absolute/path/to/integer-mult-bounds-transport +``` + +Both passed with Python3.12.14; the earlier arithmetic-only version was also +checked with Python3.13. The script checks the exact supplier-source hashes +and uses explicit exception checks, so optimized execution keeps all checks. +It imports only the attributed arithmetic engine, not a full caller replay. +An independent rational Taylor-series guard proves coarse logarithm brackets +without importing that engine's log or power functions. Combined with +\(1-x\leq e^{-x}\leq1-x+x^2/2\), it separately certifies the per-LOCAL H1 loss, +the once-global H2 loss against all eighteen combined allowances, and the fact +that a once-global H1 is not excluded by the ideal aggregate allowance. +Four semantic mutations run through the parameter or signed-invoice pipeline: +substituting selected κ for tested saving, charging the once-global H1 per LOCAL, +mistaking a paid split for a target split, and crediting an owned successor as +productive. Every mutation is rejected. The exact runtime inputs are the +funding record, attributed rational arithmetic module, canonical source word, +and selected backward provider word; their hashes are recorded in `the checker’s `--json` output`. + +Open next questions: + +1. Can one changed native word place a conduit and its carried port at a genuine + intermediate frame using the existing paid climbs? The first useful artifact + is exact endpoint rows and a full signed invoice, not a larger census. +2. If one transport is claimed to be shared across LOCALs, what actual common + boundary implements it, and how many independent input fields does it carry? + Pricing one shared field does not authorize packing eighteen unrelated ones + into the same rank charge. +3. If productive credit pays for transport, does the source expose an independent + arbitrary input and the required Gaussian output for every credited target? + A rank-zero scratch register or a coupled relation is not that certificate. diff --git a/research/helper-transport-contract/NATIVE.md b/research/helper-transport-contract/NATIVE.md new file mode 100644 index 0000000000..35ded644bb --- /dev/null +++ b/research/helper-transport-contract/NATIVE.md @@ -0,0 +1,273 @@ +# Native transport discriminant and isolated handoff obstruction + +This is a bounded semantic and cost test, not a changed selected word. It uses +the inherited native Clifford contract. OpenAI Codex assisted the analysis; +Apache-2.0. The successor-handoff motivation is GamingPuzzled's PR5472 at +`ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30`; its toy construction is not re-tested +or claimed here. + +## Exact native contract + +Write `T_U` for the actual Clifford representative of frame `U`. The physical +operator for unchanged logical data moving from `U` to `V` is +`T_V T_U^-1`. Its Fourier rank is + +`d(U,V) = dim(U) + dim(V) - 2 dim(U ∩ V)`. + +For a native invertible binary map `G` with `GU=V`, the physical warp is +`W = T_V K_G T_U^-1`. It has Fourier rank zero, but changes the logical data +by the exact noncommuting operator `K_G`. Its backward counterpart uses the +retained dual orientation. A `phase` marker in the word is not a phase +correction: exact phase belongs to the operator recipe. Rank-zero operators +still have movement/scalar costs under the retained physical tariff. + +Sources: `notes/general-clifford-frames.tex`, +`research/transported-warp-frames/PROOF.md`, +`research/kappa-round3-warp-20261022/PROOF.md`, +`research/kappa-causal-continuation/buffer-borrowing/verify_buffers.py`, and +`research/kappa-rebuild/complex/rebuild_native.py`. + +## Minimal discriminating examples + +`verify.py` authenticates the selected provider, canonical frames, and retained +exact Gaussian-dyadic Clifford compiler. It constructs two coordinate +permutations, whose native quadratic phase is zero: + +* In two dimensions, exchange axes 0 and 1, carrying line `<1>` to `<2>`. +* In the actual nine-dimensional source, exchange axes 0/2 and 4/6, carrying + frame21 `<273>` to frame57 `<324>`. The source provider enters helper300's + line273 at event9044, and helper295 leaves line324 at event9105. The proposed + permutation is a new test operator, not an existing registered source warp. + +Both fixtures check exact Pauli action and absolute phase. The small fixture +also checks every literal input column. The physical warp has rank zero, while +the unchanged-data transport has rank two. The exact correction + +`R = T_V K_G^-1 T_V^-1` + +has rank two and satisfies `RW = T_V T_U^-1`. Thus one rank-two recursive job, +with two exact monomial adapters, suffices for this one-way repair. No return +trip is included or needed for the lower-bound comparison. The warp itself +has one monomial recipe. Ordinary adapter movement and scalar work are additional +nonnegative costs. The recursive debit alone already rejects this repair against +the stated allowance; no zero ordinary-cost assumption or new uniform physical +implementation is used to reach that decision. + +A warp on the source before `y += x`, followed by its inverse on the source, +leaves `y += K_G x`, not `y += x`. A literal input column detects this defect. +A phase-only mutation is also rejected despite preserving the tableau and +Fourier rank. Normal and optimized Python produce identical reports. + +## Why free warps do not supply the missing handoff contact + +Consider one conduit holding `h + a` at frame `U`, and a port holding `a` at +frame `V`, for independent arbitrary inputs `h,a`. Suppose rank-zero physical +adapters `D_h,D_x` bring both to one frame `F`, followed by scalar cancellation. +Their logical operators are + +`P = T_F^-1 D_h T_U`, `Q = T_F^-1 D_x T_V`. + +Purity of `P(h+a) - q Q a` for every `a` forces `P=qQ`. Therefore + +`T_V T_U^-1 = q^-1 D_x^-1 D_h` + +is monomial, which forces `d(U,V)=0`, or `U=V`. This argument allows a changed +pure helper output gauge `Ph`, arbitrary nonzero scalar `q`, and finite +compositions of free monomial adapters. It does not assume the helper must +return as `h` in its old chart. For native `K_G` warps specifically, the same +point is that proportional exact logical operators induce the same binary +map, and an invertible common map cannot make distinct frames equal. + +Consequently an isolated free-warp patch cannot turn the existing disjoint +port/conduit flags into PR5472's clean cancellation contact. A one-leg exact +identity repair between distinct equal-rank lines costs at least one H2, as +the examples attain. More general isolated positive-rank repairs cost at least +one H1. The budget check prices these obligations against the full allowance; +neither adapter movement nor changed producer/consumer obligations are zeroed. + +This does **not** exclude a new native word that reallocates existing paid +climbs, uses additional jointly changed rows, or changes productive boundary +interfaces with a complete owner/controller proof. In particular, it does not +repeat the fixed-window floor or prove a global handoff impossibility. + +The concrete remaining construction requirement is a clean middle contact +funded by already-paid work, with the successor's arbitrary-input +pre-subtractions available at that frame, followed by new exact helper +operators, owned relations, caller admission and strict compiler accounting. +No such selected-source replacement was constructed in this bounded test. + + +--- + +# Line21 successor, entrance rebasing and multiport cancellation + +This note separates a legitimate changed-interface proposal from an unproved +target credit. It is not a larger-window search. Exact source pins are those +in `verify.py`; PR5472 at `ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30` supplies +the successor-handoff motivation. OpenAI Codex assistance; Apache-2.0. + +## What the proposed split would earn + +Helper300 starts at frame0 and ends at full frame1. Its selected backward +paid climbs are at events9044,9104,9135,13289,14793,14800,16155, with ranks +`1,1,1,3,1,1,1`: altogether `6 H1 + H3`, rank mass 9. + +A valid retirement just after the first climb at frame21 `F=<273>` would +give one independent rank-one target. A fresh arbitrary successor beginning +at F and inheriting every later climb would give a rank-eight target at the +full exit. The ideal change is therefore **H9 → H1 + H8**, with the old helper +paying H1 and the successor paying `5 H1 + H3`. The scalar edits, successor +ownership, consumer pre-subtractions, changed targets and caller admission +remain obligations. This is a conditional ledger, not an admitted split. + +## The source coordinate at the cut + +The selected backward prefix before event9044 equals the inherited backward +prefix. Exact reverse substitution gives + +``` +x300 = h300 + (Y113 − Y123 + Y128 − Y135 − Y140 − Y145 + − Y162 + Y163 − Y174 − Y183 + Y190 + Y194 + − Y203 − Y205 + Y216 − Y221)/2. +x19 = x19_initial. +``` + +For comparison only, the inherited forward prefix at the same index has +`x300 = h300 + h293/2 − h298 + h505/4`, and x19 is again pure. The two +orientations must not be confused. The backward helper has already absorbed +main-input terms at events2343–2374; its column subsequently reaches other +helpers in the zero-frame assembly around events7072–7153. + +The prefix is invertible. Thus x300 is an independent coordinate of the full +transformed tuple, despite this mixture. There is no inference “mixed implies +dependent.” The issue is which input coordinates the productive-job and +caller contracts identify, and which physical basis changes are admitted. + +In particular, all 17 fields in the displayed backward shear begin at frame0. +The entrance change `E: h300 ← h300 + R(Y)` is a legal invertible scalar shear. +The corresponding forward shear on h300,h293,h298,h505 is also coframed at +entrance. An entrance basis change is therefore a real escape to investigate, +not an invalid proposal merely because the prefix row is mixed. + +## Minimal full-column cut contract + +Let p_r be every original prefix row at the proposed handoff, in the original +independent input variables. Add an independent successor input s0 at F, and +let τ exchange the variables h300_initial and s0. A sufficient exact cut +contract for simply renaming the later helper300 role to the successor is: + +* the retired old helper contains exactly h300_initial at F; +* the successor contains τ(p_300) at F; +* every other active row r contains τ(p_r), with its required frame unchanged. + +The renamed suffix then produces τ of the original endpoint. Original main +outputs and other restored helpers have no final h300 dependence, so they +are unchanged; the successor is restored on its own independent input. Exact +native endpoint operators then give the two independent targets of ranks1,8. + +This contract tracks **every outside holder of the old helper-input column**. +If p_300=h0+R, retirement must remove R and the successor must acquire it. +For another row whose coefficient of h0 is C_r, the required replacement +changes that row by C_r(s0−h0). Those changes can sometimes be made by early +pre-subtractions, but the successor starts at F, so a source contact at frame0 +cannot simply read it. The local window beginning9044 does not certify these +earlier source and later restoration obligations. This is an algebraic cut +interface, not a claim that a particular larger interval is minimal or viable. + +More general cut intertwiners are possible. With a declared invertible input +basis E_in and an explicitly realized output decoder E_out, the candidate +physical word W must satisfy + +`E_out W E_in = D_new` + +on all independent inputs, where D_new is the desired main operator together +with independent productive targets H1,H8 and the other retained jobs. A free +input shear does not itself certify E_out. Its admissible frames, exact +operators, charges, owned relations and effect on the selected caller must be +proved. The existing selected caller does not automatically establish this +new factorization. + +## The specified same-label formal exit shear is not free + +Consider only a literal proposal: use the explicit zero-frame entrance shear +and apply a formal exit shear with the same 16 Y labels and coefficients, +with helper300 retired at line21. This is **not** a derived inverse of the +selected word. If its main Y output is H Y, a true decoder may require +R H^-1 rather than R, with different coefficients and support. Reversing the +sign convention for this formal shear does not change the following ranks. + +All16 selected-backward Y inputs in R have final rank-eight frames containing +line273. Their final frame IDs are, in the displayed input order: + +`143,153,158,165,170,175,192,193,204,213,220,224,233,235,246,251`. + +In this specified same-label formal shear, the physical cross coefficient +from Y_j's output to the retired helper is a nonzero scalar times +`T_F T_final(j)^-1`. Its Fourier rank is + +`1 + 8 − 2·1 = 7`. + +`verify.py` derives the prefix row, checks every entrance frame, checks every +output containment and all 16 exact Clifford B-block ranks, and lowers one +concrete coefficient including absolute phase. The minimum and maximum rank +are both 7. Thus this specified formal shear is not a rank-zero output wrapper. +These 16 coefficients are not claimed to be mandatory terms of the true E_out. + +Realizing even one of these coefficients as a retained single Clifford +transport incurs an H7 job plus its adapters; source restoration may add more. +This is deliberately **not** a sum of sixteen H7 charges, and is not a lower +bound for every joint decoder. Reusing earlier paid work or constructing a +different multi-row decoder remains a different mechanism with its own +invoice. The budget audit compares even this optimistic isolated debit with +the line21 split credit. + +The selected frame history also confirms that **all 112** Y output fields +112–223 end in rank-eight frames. A nonzero plain-scalar coefficient from +any such field to line21 therefore has Fourier rank7 when its hyperplane +contains line273, and rank9 otherwise. There are 52 rank-seven and60 rank-nine +cases. This is a conditional coefficient-class statement: it applies if a +decoder is expressed using such plain-scalar Y-output coefficients. It neither +derives the actual decoder nor gives a lower bound for every joint decoder. + +## Exact multiport criterion and the limit of the isolated no-go + +Suppose the conduit contains `H h + Σ_i A_i a_i`, where h and the a_i are +independent, and available port j contains `Σ_i B_ji a_i`. After legal logical +transport operators P on the conduit and Q_j on each port, scalar cancellation +with coefficients c_j produces a pure helper exactly when + +`P A_i = Σ_j c_j Q_j B_ji` for every independent input i. + +Its remaining helper operator is PH, which must also satisfy the proposed +productive-interface contract. If the ports themselves contain h, their h +coefficients must be included in the resulting helper operator and checked for +invertibility and target admission. Exact gauges and global phases matter. + +For separate one-input ports `B_i a_i`, this reduces to +`P A_i = c_i Q_i B_i`. The earlier isolated obstruction follows only in the +special case `A_i=B_i` (invertible) with that input cancelled through one port: +then P and Q_i are proportional, so free monomial adapters cannot coframe two +different initial frames. A sum of operator coefficients or unequal A_i,B_i +does not imply that proportionality. + +A concrete algebraic escape uses the exact involutive coordinate swap K from +the two-dimensional fixture. Let U=<1>, V=<2>. If a redesigned conduit already +contains `h+K a` at U while the port contains a at V, warping the conduit by K +is free, lands at V, and gives `K h+a`; subtracting the port leaves pure Kh. +Here `P A=K K=I=Q B`, although P and Q differ. This does not contradict the +isolated h+a argument. The **preparation** of h+K a, all later consumer +coefficients, helper boundaries and final cleanup must be realized in the +actual source word; they are not free assumptions. The selected source load +at line21 carries the unchanged port coefficient I, not this new K. + +For the uniform native family, these coefficient identities must hold at every +positive column multiplicity. Multiplicative identities such as K²=I lift; +a finite nine-coordinate equality of operator sums alone does not license +distributing tensor powers over addition. This is another required admission +condition for a coordinated redesigned operator word. + +The true exit decoder remains unconstructed. Its coefficients, support and +additional main-output corrections must be derived through the complete +selected transformation, then implemented and priced. The verified cost of +the specified same-label formal shear must not be silently substituted for +that missing calculation. diff --git a/research/helper-transport-contract/README.md b/research/helper-transport-contract/README.md new file mode 100644 index 0000000000..c40ee1569a --- /dev/null +++ b/research/helper-transport-contract/README.md @@ -0,0 +1,131 @@ +# Native transport and the helper-300 successor boundary + +**A scoped construction and cost decision; no improved κ.** A successor born at +helper 300's first line frame gives an exact 21-input local replacement with the +same **38 H1** invoice. It restores the independent value at the local cut, +however, and does not yet establish a productive split of the original helper. +We identify the missing input/output boundary equation and test two ways of +supplying it. Neither gives a funded selected-source replacement. + +This is the explicitly assigned continuation after the eight- and twenty-field +fixed-boundary floors. It changes the transport or productive-input premise, +rather than enlarging the old monotone census. Scientific sources come from main +`32890bc5de034ab8fc93ac88ead7279a6a416d04`, priority revision 7; the selected +conditional κ remains `605457647/200000000000`. + +## Results + +- **Native transport:** an exact rank-zero warp between the source lines + `<273>` and `<324>` changes the logical operator. Preserving the value instead + needs a rank-two transform. An explicit one-way correction attains **one H2** + plus two monomial adapters, with full tableau and absolute phase checked. + A two-input argument rules out creating an isolated clean cancellation + contact using only free monomial adapters on distinct frames. +- **Plane-frame successor:** the declared helper-300 handoff at frame 430 is + impossible under monotone scalar transport. Its arbitrary input must reach + outputs 299 and 301 at frame 419, which does not contain its birth plane. +- **Line-frame successor:** birth and retirement at frame 21 admit a literal + local construction at **38 H1**. Retiring the old helper at plane 430 instead + duplicates a paid ascent and costs **39 H1**. The checker verifies every + coefficient of the 21-input endpoint identity. +- **Actual source boundary:** the cut value is the original helper plus 16 + original main-input terms. The original helper input also has nonzero + coefficients in 11 other roles, including external role 505 at frame zero. + Thus a local rename does not establish the required full-source endpoint. + Input rebasing is a legitimate possibility. A specified same-label exit shear + has sixteen rank-seven coefficients; it is neither free nor a certificate of + the actual inverse through the main transform. The admitted output decoder + and caller remain unconstructed. +- **Exact budget:** the maximal retained-endpoint regrouping allowance is + `0.07703787664069600…` per LOCAL. Even granting the largest single rank-nine + productive split adds only `0.01861244404255384…`. One extra H1 per LOCAL + loses. One H2 charged only once globally exceeds all eighteen combined + allowances. A once-global H1 is **not** excluded by this optimistic arithmetic. + +The line-frame construction is an instance of the entrance-pure successor pattern +already identified in [GamingPuzzled's PR5472](https://github.com/CrocSwap/integer-mult-bounds/pull/5472), +head `ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30`. Its novelty is not claimed here. +Our contribution is the named source interface, exact native repair, and complete +conditional cost comparison. That pending PR's gadget and whole-word screens +are neither copied nor rerun as evidence for this package. + +## Proof and reproduction + +Read [NATIVE.md](NATIVE.md) for the operator obstruction and exact correction, +[BOUNDARY.md](BOUNDARY.md) for the nominated local identity and source coupling, +and [BUDGET.md](BUDGET.md) for the signed invoice and directed rational bounds. +The pricing exponent is `t = 1 - 605457649/200000000000`, using the selected +supplier's tested saving rather than substituting its final κ. + +From the repository root with Python 3.12 and no third-party dependencies: + +```sh +python3.12 -B scripts/research_package.py --package research/helper-transport-contract +``` + +The three separately authored checks are also portable to a source export: + +```sh +python3.12 -I -B research/helper-transport-contract/verify.py --repo . +python3.12 -I -B research/helper-transport-contract/check_split_boundary.py --repo . +python3.12 -I -B research/helper-transport-contract/verify_budget.py --repo . +``` + +Repeat with `-O` for the optimized controls. Source pins are checked before +imports; all new proof checks use explicit exceptions. The registered runner +isolates Python's bytecode cache. Direct replay should likewise use a clean +export or an empty `-X pycache_prefix` directory. Imported historical compiler +assertions are not a substitute for the explicit rank, tableau, phase and +endpoint comparisons in these checks. + +These checks do not replay the complete native provider, physical compiler, +owned relations or selected caller. There is no new full multiplication theorem, +general Clifford floor, or impossibility result for coordinated changed words. +Neither a mixed cut value nor a failed isolated decoder excludes a different +input/output basis with a proved admission contract. + +On CPython 3.12.14 / macOS arm64, all six registered commands pass. Normal and +optimized JSON outputs also agree in a read-only source export with Git absent +from PATH. All exported payloads remain byte-identical. Three changed-provider +controls fail at source authentication, and an altered compiler is rejected +before import. The scientific checks include six boundary mutations, four +accounting mutations, and phase/wrong-repair controls in both native fixtures. +Committed-byte, source-history and official export-integrity checks pass. + +## Open next questions + +1. **Can a coordinated producer and decoder realize the line-frame split using + existing paid work?** First supply exact entrance and exit maps satisfying + `E_out W_new E_in = D_new` for the complete independent target operator, + including the external role 505 and every arbitrary successor column. + A local rename alone does not supply those maps. An extra paid job needs + compensating savings beyond a single productive split. +2. **Can one transport genuinely be shared across the eighteen LOCALs?** The + optimistic allowance can pay one global H1 arithmetically. First identify the + actual common boundary and independent information carried; a single-field + price does not certify transport of eighteen unrelated fields. + +The bounded session stops at these discriminating results. A further construction +round needs one explicit passing source/cost contract; a larger fixed-word census +or a new unpriced consumer is not the next step. Structured questions and the +expansion decision are in [TASK.json](TASK.json). Coordination is in +[Discussion5470](https://github.com/CrocSwap/integer-mult-bounds/discussions/5470). + +## Attribution + +Prepared by **apoursh** with substantial OpenAI Codex assistance from a coordinator +and separate native, source-interface and arithmetic workers. Worker separation +is not independent human review or formal-kernel verification. Apache-2.0. + +Retain Cao Yifan's native helper provider (PR4610), Dillon Amburgey's coupled +completion (PR5402), Ali Romman's cached-centre relations, Chris R/Clear1nsight's +selected caller and exact moment arithmetic (PR5413), zxv's literal native +interpreter, GamingPuzzled's reorder and successor work (PR5465/5472), and the +retained native/compiler lineage. The exact Clifford compiler is the unchanged +`vendor531` lineage retained through Cinna Davis's PR2226, Rohan Arun's native +realization and Tekalign's T74 runner; its notices and license are included among +the declared export inputs. + +The [eight-field PR5471](https://github.com/CrocSwap/integer-mult-bounds/pull/5471) +and [twenty-field artifact](https://github.com/apoursh/integer-mult-bounds/tree/2f586ad5253a0a8065bf444f33f728b93129b0ed/research/helper300-twenty-field-floor) +motivate this follow-up. Neither pending package is a scientific replay dependency. diff --git a/research/helper-transport-contract/SOURCES.json b/research/helper-transport-contract/SOURCES.json new file mode 100644 index 0000000000..7c43a65f18 --- /dev/null +++ b/research/helper-transport-contract/SOURCES.json @@ -0,0 +1,114 @@ +{ + "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": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/invoice/exact_moments.py", + "usage": "input", + "git_blob": "bf31af785122dea7cbceacbfa64c21e567e4fca7", + "sha256": "cf7439c9eb4095224126dd5eefc9f1c5dfe1968d6e8eca5b87d4a3897841182d" + }, + { + "path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-provider-audit-sol-high-20261024/repository/research/native-rank8-helper-provider/WORD.json.gz", + "usage": "input", + "git_blob": "f3111b47e89496da8ca0ee45b2e4b258c0634d8e", + "sha256": "7dc356001ed597ad6fc9fd3e0bc6ff7e3ec3a580a579a956827aa17fccfdd2dc" + }, + { + "path": "research/coupled-helper-neutral-completion/reports/expected/funding.json", + "usage": "input", + "git_blob": "ffc2de2792f51111f73500be3a2e4e8f6bf55a57", + "sha256": "70ab7d13548962097ad83ad393b8482f52e827b8996869011ce6d071146bd3eb" + }, + { + "path": "research/kappa-causal-continuation/buffer-borrowing/verify_buffers.py", + "usage": "input", + "git_blob": "5a55034ec9e6185d981e16c28e1e2e455069e2cb", + "sha256": "106b4d5e052427230df452f0c901d5390a0583782960b80a8af94d9a984022c7" + }, + { + "path": "research/kappa-rebuild/complex/native_extensions.py", + "usage": "input", + "git_blob": "7f84894efc309546a903d314c7ac1473e7f594a8", + "sha256": "50ad007d9c386393657e86c99a96ae0a63a8fbc52872579b185002cc626e88e3" + }, + { + "path": "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz", + "usage": "input", + "git_blob": "46d929df83817b85a5387bcdb9745e0627d6366e", + "sha256": "7679daa4ec6a40f56fc7f0202379a6f454310e94945aba4f48beaaaafb838d05" + }, + { + "path": "research/t74-native-fast/vendor/native/new/code/borrow/vendor/clifford/clifford_exact.py", + "usage": "input", + "git_blob": "166841a037f069249f6f7f6dedb89248812f59e2", + "sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" + }, + { + "path": "research/t74-native-fast/LICENSE", + "usage": "input", + "git_blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64", + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" + }, + { + "path": "research/t74-native-fast/NATIVE-LINEAGE-NOTICE", + "usage": "input", + "git_blob": "380e979f0e84e00a22bd890615d87cc4684ad740", + "sha256": "ee0c73ca35877aad0e0b6adc560a3881cb82276dba4cf2d4fc58cd19e57cc420" + }, + { + "path": "research/t74-native-fast/vendor/native/new/code/borrow/NOTICE-PR2226.md", + "usage": "input", + "git_blob": "a14b299ef55c5581166988aa78baba329cebde04", + "sha256": "6b6730303818f6edc2a253eb4d05471eee58f28b5815fb250c32ae376f774c8a" + }, + { + "path": "notes/general-clifford-frames.tex", + "usage": "provenance", + "git_blob": "0367eeb005298601f28a673861d6f71bf1d0ebbb", + "sha256": "c9bb9655b594583c6b4bab8cb485233f1d1e588f83858cf1e4c3530cee8fed54" + }, + { + "path": "research/transported-warp-frames/PROOF.md", + "usage": "provenance", + "git_blob": "3cabeba04baee08afa53afc5a87b1fdc00cbe16e", + "sha256": "cd227d0cc0e34c7b4b6a850a042f0f99099f1fe9b25e0519982e8f5973603f2d" + }, + { + "path": "research/kappa-round3-warp-20261022/PROOF.md", + "usage": "provenance", + "git_blob": "97f1d19ad423fe5540cc2986fb51af24a251d57c", + "sha256": "19178996b776a33f94c8df905b2ef07cc3069e4b6004180f8ec58e140f0c7f7c" + }, + { + "path": "research/kappa-rebuild/complex/rebuild_native.py", + "usage": "provenance", + "git_blob": "78a7b1b0e6e43a1347fb361f45c6e0eaff8dd27b", + "sha256": "f94c527cc02215de49350d477618188c4c0da48bc8fb05b4e37b24c482cad7d5" + }, + { + "path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/invoice/fund_uniform_endpoint.py", + "usage": "provenance", + "git_blob": "444398e7bebee418b5bc9b52ef8702fa95d6bcd5", + "sha256": "e445e7da76e9d8e5dbad2c5fc0bd8aa17e3f5c6d0bfcf56f778c3960426909a1" + }, + { + "path": "research/coupled-helper-neutral-completion/reports/proofs/NEUTRAL-PROOF-v16c.md", + "usage": "provenance", + "git_blob": "f29713683c3f12b934aceeedd15a631132cf67ee", + "sha256": "dca94625cd0d49de6b81e4a7dd4108b8b6f711e90496d9116806242d30b35737" + } + ] +} diff --git a/research/helper-transport-contract/TASK.json b/research/helper-transport-contract/TASK.json new file mode 100644 index 0000000000..80e704bd02 --- /dev/null +++ b/research/helper-transport-contract/TASK.json @@ -0,0 +1,107 @@ +{ + "schema_version": 1, + "task_id": "complex-rank-shape-decoder", + "priority_revision": 7, + "base_commit": "32890bc5de034ab8fc93ac88ead7279a6a416d04", + "original_card": { + "id": "complex-rank-shape-decoder", + "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)?", + "starting_points": [ + "docs/research/research-family-status.md", + "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" + ], + "methods": [ + "Find one exact small decoding identity whose frame path climbs in blocks, and price its complete per-call profile.", + "Bound the best effective child rank achievable for one fixed support alphabet, including copies, frames and restoration." + ], + "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. 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", + "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.", + "Continuing a partial cost improvement while leaving the same unpriced consumer, restoration or central-readout obligation unresolved; refresh the family expansion decision first. Local product-retiming evidence has a narrow scope and is not a ban on changed graphs or contracts." + ], + "overlap_terms": [ + "rank shape", + "block climb", + "masked decoder", + "overcomplete", + "effective rank" + ] + }, + "scope_status": "changed", + "actual_scope": "Exact native repair, signed transport allowance, and two nominated helper300 successor boundaries after the fixed twenty-field floor.", + "scope_change_reason": "Explicit user-assigned next stage after two fixed-boundary floors. Change native transport or productive-input ownership; do not extend the monotone census or claim the original card's supplier acceptance gate.", + "bottleneck_link": "A productive successor could improve the target moment without extra paid work, but only with source restoration and caller admission. The exact transport cost decides whether this escape can be financed.", + "budget_minutes": 60, + "stop_rule": "One bounded operator/budget/interface decision. Stop at a complete funded construction, a scoped rejection, or an explicit missing boundary equation; no whole-word synthesis or selected-caller replay without a passing candidate.", + "outcome": "partial", + "evidence": "Three separately authored checkers: exact native tableau/phase fixtures and repair ranks; complete21-input local rename and source boundary extraction; source-derived invoices with directed rational and separate elementary bounds. Native and budget proofs are cross-reviewed. No new selected word or kappa claim.", + "author": "apoursh", + "ai_assistance": "Substantial OpenAI Codex assistance from coordinator, native-operator worker, source-interface worker and separate mathematical/arithmetic auditor. This is not independent human review or formal-kernel verification.", + "open_questions": [ + { + "question": "Can a coordinated producer and decoder realize the line21 productive split without added paid work?", + "why_it_matters": "The literal local cut-variable identity has38H1 but does not prove original-helper target admission.", + "first_step": "Exhibit E_out W_new E_in = D_new for all original and successor inputs, including external role505, and supply complete paid/target/native/ownership accounting.", + "blocked_by": "No source-compatible free exit decoder or changed caller is constructed; one extra local paid job exceeds the conditional split allowance." + }, + { + "question": "Can one actual transport be shared across all eighteen LOCALs?", + "why_it_matters": "The ideal total regrouping allowance can arithmetically fund one once-global H1, although one globalH2 already loses even with eighteen target splits.", + "first_step": "Specify the common boundary, multiplicity, independent information dimension and exact shared operator before changing the invoice.", + "blocked_by": "No sharing construction is supplied; single-field pricing cannot silently transport eighteen unrelated fields." + } + ], + "coordination_url": "https://github.com/CrocSwap/integer-mult-bounds/discussions/5470", + "expansion_decision": { + "initial_record": "Local transport/TASK.md written before substantial work; canonical Discussion5470 updated with the bounded continuation.", + "alternatives_compared": [ + "paid auxiliary value-preserving transport", + "free native logical warp plus exact restoration", + "arbitrary productive successor at a named helper300 boundary" + ], + "initial_ledger": "Retained38H1; optimistic endpoint3H1+16H2+H3. All transport, producer, consumer, restoration and target changes unknown until specified, never implicitly zero.", + "discriminator": "One per-LOCAL extraH1 loses even granting the ideal20 allowance and the maximal single9->4+5 target credit. One once-globalH2 also loses against all18combined allowances.", + "result": "Line21 local identity succeeds; plane430 nominated boundary fails. The local coordinate remains independent under the invertible prefix, but original-target and caller intertwining are unproved. Isolated native warp repair and straightforward rebasing exit transport are too costly.", + "decision": "Retain scoped construction/cost evidence and release the claim. Require a coordinated source/decoder map with a passing complete invoice before another construction round; no larger old-model census." + }, + "predecessors": [ + { + "pr": 5472, + "head": "ce96fe9747ea0643bd8c30d448c1ba8e2b30ac30", + "usage": "GamingPuzzled successor pattern and entrance-pure case; motivation/attribution only, no imported pending code or replay dependency." + }, + { + "pr": 5471, + "head": "77d29520c4f90a65787873d6becc205796630c23", + "usage": "Eight-field predecessor motivation only." + }, + { + "head": "2f586ad5253a0a8065bf444f33f728b93129b0ed", + "usage": "Twenty-field predecessor motivation only; source invoices and boundaries are re-derived from selected main." + } + ] +} diff --git a/research/helper-transport-contract/VERIFY.json b/research/helper-transport-contract/VERIFY.json new file mode 100644 index 0000000000..7a0a3cd500 --- /dev/null +++ b/research/helper-transport-contract/VERIFY.json @@ -0,0 +1,95 @@ +{ + "schema_version": 1, + "status": "ready", + "python": "3.12", + "requirements": [], + "inputs": [ + "research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/invoice/exact_moments.py", + "research/coupled-helper-neutral-completion/capsule/workspace/swarm-provider-audit-sol-high-20261024/repository/research/native-rank8-helper-provider/WORD.json.gz", + "research/coupled-helper-neutral-completion/reports/expected/funding.json", + "research/kappa-causal-continuation/buffer-borrowing/verify_buffers.py", + "research/kappa-rebuild/complex/native_extensions.py", + "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz", + "research/t74-native-fast/LICENSE", + "research/t74-native-fast/NATIVE-LINEAGE-NOTICE", + "research/t74-native-fast/vendor/native/new/code/borrow/NOTICE-PR2226.md", + "research/t74-native-fast/vendor/native/new/code/borrow/vendor/clifford/clifford_exact.py" + ], + "commands": [ + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Source-bound exact native operators, full tableau/absolute phase, free-warp transfer counterexample, one-way repair and exit transport ranks." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/verify.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Source-bound exact native operators, full tableau/absolute phase, free-warp transfer counterexample, one-way repair and exit transport ranks." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/check_split_boundary.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Complete21-input local endpoint identity, plane430 reachability exclusion, line21 positive control, paid invoices, original-input row/column and semantic mutations." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/check_split_boundary.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Complete21-input local endpoint identity, plane430 reachability exclusion, line21 positive control, paid invoices, original-input row/column and semantic mutations." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "{package}/verify_budget.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Source-derived endpoints and invoices, selected tested exponent, directed rational pricing, separate elementary guard and semantic accounting mutations." + }, + { + "argv": [ + "{python}", + "-I", + "-B", + "-O", + "{package}/verify_budget.py", + "--repo", + "." + ], + "timeout_seconds": 120, + "checks": "Source-derived endpoints and invoices, selected tested exponent, directed rational pricing, separate elementary guard and semantic accounting mutations." + } + ] +} diff --git a/research/helper-transport-contract/check_split_boundary.py b/research/helper-transport-contract/check_split_boundary.py new file mode 100644 index 0000000000..56310ca6da --- /dev/null +++ b/research/helper-transport-contract/check_split_boundary.py @@ -0,0 +1,547 @@ +"""One nominated 21-field boundary, not a search over helpers or windows.""" + +import argparse +from collections import Counter +from copy import deepcopy +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +import json +from pathlib import Path + + +W = ( + "research/coupled-helper-neutral-completion/capsule/workspace/" + "swarm-provider-audit-sol-high-20261024/repository/research/" + "native-rank8-helper-provider/WORD.json.gz" +) +C = "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz" +PINS = { + W: "7dc356001ed597ad6fc9fd3e0bc6ff7e3ec3a580a579a956827aa17fccfdd2dc", + C: "7679daa4ec6a40f56fc7f0202379a6f454310e94945aba4f48beaaaafb838d05", +} +FIELDS = [18, 19, 39, 40, *range(288, 304)] + + +def need(ok, message): + if not ok: + raise ValueError(message) + + +def span(vs): + answer = {0} + for v in vs: + answer |= {x ^ v for x in answer} + return frozenset(answer) + + +def clean(row): + return {k: v for k, v in row.items() if v} + + +def row_add(rows, t, s, q): + for j, v in rows[s].items(): + rows[t][j] = rows[t].get(j, Q(0)) + q * v + rows[t] = clean(rows[t]) + + +def local_event_roles(event): + """Admit only the scalar/climb language used by this bounded contract.""" + need(isinstance(event, list) and event, "candidate event shape") + if event[0] == "climb": + need( + len(event) == 6 and event[1] == "warp_retimed", + "candidate climb representation", + ) + roles = [event[2]] + elif event[0] == "scalar": + need(len(event) == 3, "candidate scalar representation") + op = event[1] + need(isinstance(op, list) and op, "candidate scalar opcode") + if op[0] == "add": + need(len(op) == 5, "candidate ADD representation") + references = op[1:3] + elif op[0] == "scale": + need(len(op) == 4, "candidate SCALE representation") + references = op[1:2] + else: + raise ValueError("unsupported candidate scalar opcode: " + str(op[0])) + for ref in references: + need( + isinstance(ref, list) and len(ref) == 2 and ref[0] == "L", + "candidate scalar requires local-field references", + ) + roles = [ref[1] for ref in references] + else: + raise ValueError("unsupported candidate event: " + str(event[0])) + need( + all(type(role) is int or role == "S" for role in roles), + "candidate field identifier", + ) + return set(roles) + + +def entry_row(word, stop): + # Reverse slice only the nominated output row, then replay its dependency + # instructions; no global row census and no imported native interpreter. + required = {300} + selected = [] + for i in range(stop - 1, -1, -1): + event = word[i] + if ( + event[0] == "scalar" + and event[1][1][0] == "L" + and event[1][1][1] in required + ): + selected.append(i) + if event[1][0] == "add": + required.add(event[1][2][1]) + elif event[0] == "warp" and event[1][1] in required: + raise ValueError("nominated entry row has an operator warp") + rows = {i: {i: Q(1)} for i in required} + for i in reversed(selected): + op = word[i][1] + t = op[1][1] + if op[0] == "add": + row_add(rows, t, op[2][1], Q(op[3], op[4])) + elif op[0] == "scale": + rows[t] = clean({j: Q(op[2], op[3]) * v for j, v in rows[t].items()}) + else: + raise ValueError("unexpected entry-slice operation") + return rows[300], sorted(selected), sorted(required) + + +def original_column(word, canonical, stop): + column = [Q(i == 300) for i in range(len(canonical["start"]))] + frames = canonical["start"].copy() + for i, event in enumerate(word[:stop]): + if event[0] == "scalar": + op = event[1] + t = op[1][1] + if op[0] == "add": + column[t] += Q(op[3], op[4]) * column[op[2][1]] + elif op[0] == "scale": + column[t] *= Q(op[2], op[3]) + else: + raise ValueError("noninvertible prefix column event") + elif event[0] == "climb": + frames[event[2]] = event[4] + elif event[0] == "warp": + need( + not column[event[1][1]], + "original-h300 column touched by nontrivial warp", + ) + frames[event[1][1]] = event[4] + return [ + { + "role": i, + "coefficient": str(v), + "frame": frames[i], + "frame_basis": canonical["frames"][frames[i]], + } + for i, v in enumerate(column) + if v + ] + + +def execute_candidate(events, initial, final, expected, spaces, disjoint_events): + current = dict(initial) + rows = {f: {f: Q(1)} for f in initial} + paid = Counter() + skipped = [] + for event in events: + roles = local_event_roles(event) + if roles.isdisjoint(rows): + skipped.append(event) + continue + need(roles <= rows.keys(), "candidate event crosses field closure") + if event[0] == "climb": + _, _, f, before, after, rank = event + need( + current[f] == before and spaces[before] < spaces[after], + "candidate climb contact", + ) + need( + rank + == len(spaces[after]).bit_length() + - len(spaces[before]).bit_length(), + "candidate paid rank", + ) + current[f] = after + paid[rank] += 1 + else: + op = event[1] + t = op[1][1] + need(current[t] == event[2], "candidate receiver frame") + if op[0] == "add": + s = op[2][1] + need(current[s] == event[2], "candidate sender frame") + row_add(rows, t, s, Q(op[3], op[4])) + else: + q = Q(op[2], op[3]) + need(q, "candidate nonzero scale") + rows[t] = clean({j: q * v for j, v in rows[t].items()}) + # Every skipped event must be one of the eight pinned, disjoint events in + # its original order. A new disjoint event is not an admitted free action. + need(skipped == disjoint_events, "candidate unchanged disjoint events") + need(current == final, "candidate retirement/output frames") + need(rows == expected, "candidate exact arbitrary-input endpoint") + return paid + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument( + "--repo", type=Path, default=Path(__file__).resolve().parents[2] + ) + parser.add_argument("--json", action="store_true") + args = parser.parse_args() + docs = {} + for path, digest in PINS.items(): + raw = (args.repo / path).read_bytes() + need(sha256(raw).hexdigest() == digest, "source hash") + docs[path] = json.loads(gzip.decompress(raw)) + need(docs[W]["direction"] == "backward", "direction") + need( + docs[W]["source_sha256"] + == sha256(gzip.decompress((args.repo / C).read_bytes())).hexdigest(), + "source payload binding", + ) + canonical = docs[C]["canonical"] + word = docs[W]["word"] + spaces = [span(basis) for basis in canonical["frames"]] + current = canonical["start"].copy() + for event in word[:9044]: + if event[0] == "climb": + need(current[event[2]] == event[3], "prefix climb") + current[event[2]] = event[4] + elif event[0] == "warp": + need(current[event[1][1]] == event[3], "prefix warp") + current[event[1][1]] = event[4] + + rows = {f: {g: Q(f == g) for g in FIELDS} for f in FIELDS} + entry_frames = {f: current[f] for f in FIELDS} + paths = {f: [current[f]] for f in FIELDS} + paid = Counter() + disjoint_events = [] + disjoint_indices = [] + for index, event in enumerate(word[9044:9137], 9044): + roles = local_event_roles(event) + if roles.isdisjoint(rows): + disjoint_events.append(event) + disjoint_indices.append(index) + continue + need(roles <= rows.keys(), "source event crosses field closure") + if event[0] == "climb": + _, _, f, before, after, rank = event + need(current[f] == before, "local climb") + need(spaces[before] < spaces[after], "monotone path") + current[f] = after + paths[f].append(after) + paid[rank] += 1 + else: + op = event[1] + f = op[1][1] + need(current[f] == event[2], "receiver frame") + if op[0] == "add": + g = op[2][1] + need(current[g] == event[2], "sender frame") + q = Q(op[3], op[4]) + rows[f] = {j: x + q * rows[g][j] for j, x in rows[f].items()} + else: + q = Q(op[2], op[3]) + need(q != 0, "scale invertibility") + rows[f] = {j: q * x for j, x in rows[f].items()} + need( + disjoint_indices == [9068, 9069, 9070, 9071, 9080, 9081, 9082, 9083] + and set().union(*(local_event_roles(e) for e in disjoint_events)) + == {54, 55, 101, 102}, + "retained eight disjoint source events", + ) + need( + paths[300] == [0, 21, 430, 437] and paid == {1: 38}, + "retained nominated path and invoice", + ) + # The nominated relabel-and-retire interface substitutes S for cut input x300 + # in every continuing row; old H300 is returned as its independent cut value. + target = { + str(f): {str(j): str(q) for j, q in row.items() if q and j != 300} + for f, row in rows.items() + if f != 300 + } + for f, row in rows.items(): + if f != 300 and row[300]: + target[str(f)]["S"] = str(row[300]) + target["S"] = { + ("S" if j == 300 else str(j)): str(q) + for j, q in rows[300].items() + if q + } + target["300"] = {"300": "1"} + modified = {str(f): path.copy() for f, path in paths.items()} + modified["300"] = [0, 21, 430] + modified["S"] = [430, 437] + candidate_paid = Counter( + len(canonical["frames"][v]) - len(canonical["frames"][u]) + for path in modified.values() + for u, v in zip(path, path[1:]) + ) + need(candidate_paid == paid, "same paid invoice") + bad = [] + for f, row in target.items(): + coefficient = Q(row.get("S", "0")) + final = modified[f][-1] + if coefficient and not spaces[430] <= spaces[final]: + bad.append( + { + "output": f, + "successor_coefficient": str(coefficient), + "exit_frame": final, + "exit_basis": canonical["frames"][final], + "missing_successor_direction": min(spaces[430] - spaces[final]), + } + ) + need( + {item["output"] for item in bad} == {"299", "301"}, + "exact two blocked successors", + ) + need( + rows[301][300] == -1 and rows[299][300] == Q(-1, 2), + "source witness coefficients", + ) + # Optimistic graph test: shared-space stations, all chronological restrictions removed. + edges = { + (spaces[u], spaces[v]) + for path in modified.values() + for u, v in zip(path, path[1:]) + } + seen = {spaces[430]} + while True: + next_seen = seen | {v for u, v in edges if u in seen} + if next_seen == seen: + break + seen = next_seen + need( + all(spaces[item["exit_frame"]] not in seen for item in bad), + "reachability obstruction", + ) + # Moving the birth to the old line removes this endpoint obstruction. + # The literal local construction below verifies feasibility; original-target + # and caller admission remain separate obligations. + need( + all(spaces[21] <= spaces[item["exit_frame"]] for item in bad), + "line-birth contrast", + ) + preloads = [ + [i, event] + for i, event in enumerate(word[:9044]) + if event[0] == "scalar" + and event[1][0] == "add" + and event[1][1] == ["L", 300] + ] + spread = [ + [i, event] + for i, event in enumerate(word[:9044]) + if event[0] == "scalar" + and event[1][0] == "add" + and event[1][2] == ["L", 300] + ] + need(len(preloads) == 32 and len(spread) == 7, "precondition and spread inventory") + # Named line21 escape: retire old H300 immediately after its first climb, + # then replace every subsequent reference to H300 by S born at line21. + line_program = deepcopy(word[9044:9137]) + for event in line_program[1:]: + if event[0] == "climb" and event[2] == 300: + event[2] = "S" + elif event[0] == "scalar": + for ref in event[1]: + if isinstance(ref, list) and ref == ["L", 300]: + ref[1] = "S" + typed_target = { + ("S" if f == "S" else int(f)): { + ("S" if j == "S" else int(j)): Q(q) for j, q in row.items() + } + for f, row in target.items() + } + line_initial = {**entry_frames, "S": 21} + line_final = {**{f: current[f] for f in FIELDS}, 300: 21, "S": 437} + line_paid = execute_candidate( + line_program, line_initial, line_final, typed_target, spaces, disjoint_events + ) + need(line_paid == {1: 38}, "line21 unchanged invoice") + # Retiring old H300 at430 instead duplicates the21->430 ascent. The same + # exact row identity remains attainable, now at39 H1. + duplicate_program = deepcopy(line_program) + duplicate_program.insert(1, ["climb", "warp_retimed", 300, 21, 430, 1]) + duplicate_final = {**line_final, 300: 430} + duplicate_paid = execute_candidate( + duplicate_program, + line_initial, + duplicate_final, + typed_target, + spaces, + disjoint_events, + ) + need(duplicate_paid == {1: 39}, "duplicated ascent invoice") + actual_row, slice_events, slice_fields = entry_row(word, 9044) + expected_row = { + 300: Q(1), 113: Q(1, 2), 174: Q(-1, 2), 123: Q(-1, 2), + 163: Q(1, 2), 128: Q(1, 2), 221: Q(-1, 2), 135: Q(-1, 2), + 140: Q(-1, 2), 145: Q(-1, 2), 162: Q(-1, 2), 216: Q(1, 2), + 190: Q(1, 2), 203: Q(-1, 2), 183: Q(-1, 2), 194: Q(1, 2), + 205: Q(-1, 2), + } + need( + actual_row == expected_row + and len(slice_events) == 98 + and len(slice_fields) == 41, + "actual original-input entry row", + ) + support = original_column(word, canonical, 9044) + expected_support = { + 18: Q(-1, 2), 40: Q(-1, 2), 288: Q(1, 2), 289: Q(-1, 2), + 290: Q(-1, 2), 291: Q(1, 2), 297: Q(1, 2), 299: Q(1, 2), + 300: Q(1), 301: Q(-1, 2), 303: Q(1, 2), 505: Q(-1, 4), + } + need( + {item["role"]: Q(item["coefficient"]) for item in support} + == expected_support, + "original h300 coefficient support", + ) + external = next(item for item in support if item["role"] == 505) + need( + external["frame"] == 0 + and 505 not in FIELDS + and not spaces[21] <= spaces[0], + "outside-field line-birth obstruction", + ) + controls = [] + + def rejected(name, fn): + try: + fn() + except ValueError as exc: + controls.append({"name": name, "rejected": True, "reason": str(exc)}) + else: + raise ValueError("accepted semantic mutation: " + name) + + wrong_target = deepcopy(typed_target) + wrong_target[301].pop("S") + rejected( + "drop required successor coefficient at output301", + lambda: execute_candidate( + line_program, line_initial, line_final, wrong_target, spaces, disjoint_events + ), + ) + leak = deepcopy(line_program) + leak[1][1][2] = ["L", 300] + rejected( + "leave original h300 in first consumer subtraction", + lambda: execute_candidate( + leak, line_initial, line_final, typed_target, spaces, disjoint_events + ), + ) + rejected( + "claim plane430 retirement for unmodified line21 program", + lambda: execute_candidate( + line_program, + line_initial, + duplicate_final, + typed_target, + spaces, + disjoint_events, + ), + ) + rejected( + "omit original helper paid first climb", + lambda: execute_candidate( + line_program[1:], + line_initial, + line_final, + typed_target, + spaces, + disjoint_events, + ), + ) + rejected( + "claim duplicated ascent has38 H1", + lambda: need(duplicate_paid == {1: 38}, "actual invoice is39 H1"), + ) + unsupported_warp = deepcopy(line_program) + unsupported_warp.insert(1, ["warp", ["L", 300], 59, 21, 21]) + rejected( + "insert unsupported warp on original helper", + lambda: execute_candidate( + unsupported_warp, + line_initial, + line_final, + typed_target, + spaces, + disjoint_events, + ), + ) + result = { + "status": "PASS_NOMINATED_HELPER300_SPLIT_BOUNDARIES", + "interval": [9044, 9137], + "source_pins": PINS, + "fields": FIELDS, + "new_field": "S", + "successor_birth_frame": 430, + "successor_birth_basis": canonical["frames"][430], + "fixed_target_rows": target, + "modified_paths": modified, + "paid_profile": dict(candidate_paid), + "blocked_outputs": bad, + "retained_disjoint_event_indices": disjoint_indices, + "prefix_helper300_preloads": preloads, + "prefix_helper300_spread": spread, + "line21_positive_control": { + "old_helper_retirement": 21, + "successor_birth": 21, + "successor_exit": 437, + "paid_profile": dict(line_paid), + "program": line_program, + "meaning": ( + "Exact local cut-variable relabeling; the entrance-pure pattern already " + "identified by PR5472. Not original-helper target admission." + ), + }, + "line21_with_plane430_retirement": { + "paid_profile": dict(duplicate_paid), + "extra_ascent": [300, 21, 430, 1], + }, + "actual_original_input_entry_row": { + str(i): str(q) for i, q in actual_row.items() + }, + "entry_row_slice_indices": slice_events, + "entry_row_slice_roles": slice_fields, + "original_h300_column_at_cut": support, + "external_zero_frame_obstruction": external, + "semantic_controls": controls, + "scope": ( + "Only the explicit 21-field relabel-and-retire contract at event9137. " + "Not a whole-word obstruction, not every successor handoff, and not a proof " + "that retiring cut variable x300 earns original helper target credit." + ), + "argument": ( + "Every coefficient of S stays in frames containing its birth subspace. " + "The required nonzero S coefficients at outputs299 and301 in frame419 " + "cannot be created by any coframed scalar program and monotone ascents." + ), + "contrast": ( + "Birth at frame21 removes this endpoint obstruction, but is a changed " + "earlier producer interface with its own paid/target bill." + ), + } + if args.json: + print(json.dumps(result, indent=2, sort_keys=True)) + else: + print( + result["status"] + + " plane430=excluded line21=38H1 duplicate_ascent=39H1 controls=" + + str(len(controls)) + ) + + +if __name__ == "__main__": + main() diff --git a/research/helper-transport-contract/verify.py b/research/helper-transport-contract/verify.py new file mode 100644 index 0000000000..8cc32984a4 --- /dev/null +++ b/research/helper-transport-contract/verify.py @@ -0,0 +1,354 @@ +#!/usr/bin/env python3 +"""Exact native warp and specified formal exit-shear discriminants. + +This is a bounded operator test, not a source-word replacement or kappa claim. +The exact Clifford compiler is the attributed repository implementation. +OpenAI Codex assisted this audit; Apache-2.0. +""" +import argparse +from collections import Counter +from fractions import Fraction as Q +import gzip +from hashlib import sha256 +import importlib.util +import json +from pathlib import Path +import sys + +sys.dont_write_bytecode = True + +COMPILER = "research/t74-native-fast/vendor/native/new/code/borrow/vendor/clifford/clifford_exact.py" +COMPILER_SHA = "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962" +CANONICAL = "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz" +PROVIDER = ( + "research/coupled-helper-neutral-completion/capsule/workspace/" + "swarm-provider-audit-sol-high-20261024/repository/research/" + "native-rank8-helper-provider/WORD.json.gz" +) +PINS = { + COMPILER: COMPILER_SHA, + CANONICAL: "7679daa4ec6a40f56fc7f0202379a6f454310e94945aba4f48beaaaafb838d05", + PROVIDER: "7dc356001ed597ad6fc9fd3e0bc6ff7e3ec3a580a579a956827aa17fccfdd2dc", +} + + +def need(ok, why): + if not ok: + raise ValueError(why) + + +def load(root): + for name, pin in PINS.items(): + need(sha256((root / name).read_bytes()).hexdigest() == pin, "source pin: " + name) + payload = gzip.decompress((root / CANONICAL).read_bytes()) + source_word = json.loads(payload) + canonical = source_word["canonical"] + provider = json.loads(gzip.decompress((root / PROVIDER).read_bytes())) + need(provider["source_sha256"] == sha256(payload).hexdigest(), "canonical payload link") + need(provider["direction"] == "backward", "selected provider direction") + need(provider["word"][:9044] == source_word["programs"]["backward"][:9044], + "selected prefix equals inherited backward prefix") + need(canonical["frames"][21] == [273] and canonical["frames"][57] == [324], + "actual source fixture frame bases") + need(provider["word"][9044] == ["climb", "warp_retimed", 300, 0, 21, 1], + "selected helper300 enters line273") + need(provider["word"][9105] == ["climb", "warp_retimed", 295, 57, 430, 1], + "selected helper295 leaves line324") + spec = importlib.util.spec_from_file_location("transport_exact_clifford", root / COMPILER) + ce = importlib.util.module_from_spec(spec) + sys.modules[spec.name] = ce + spec.loader.exec_module(ce) + return ce, canonical, provider["word"] + + +def equal(a, b): + # Full Pauli action fixes a Clifford operator up to phase. One exactly + # normalized nonzero state fixes the remaining absolute phase. + return a.tab == b.tab and a.zero_state() == b.zero_state() + + +def lower(ce, op): + recipe, decoded = ce.lower_child(op) + need(equal(op, decoded), "exact lowering: tableau and absolute phase") + need(recipe["rank"] == ce.rank([x for x, z, p in op.tab[op.n:]]), + "binary B-block rank") + return recipe + + +def run_fixture(ce, n, u, v, swaps): + columns = [1 << i for i in range(n)] + for a, b in swaps: + columns[a], columns[b] = columns[b], columns[a] + rows = ce.transpose(columns, n) + need(ce.mv(rows, u) == v, "binary map carries source line to target line") + need(ce.inv(rows, n) == rows, "fixture coordinate permutation is involutive") + # An orthogonal permutation has Q=I+G^-T G^-1=0. Its native K_G lift + # is exactly this permutation, without an omitted quadratic phase. + operator = ce.perm(n, rows) + source_frame = ce.canonical_frame(n, [u]) + target_frame = ce.canonical_frame(n, [v]) + warp = source_frame.adjoint().then(operator).then(target_frame) + unchanged = source_frame.adjoint().then(target_frame) + correction = target_frame.adjoint().then(operator.adjoint()).then(target_frame) + warp_recipe = lower(ce, warp) + identity_recipe = lower(ce, unchanged) + repair_recipe = lower(ce, correction) + need(warp_recipe["rank"] == 0, "legal native warp has zero recursive rank") + need(identity_recipe["rank"] == repair_recipe["rank"] == 2, + "distinct-line identity transport and correction have rank two") + need(equal(warp.then(correction), unchanged), "warp plus repair is exact") + need(not equal(warp, unchanged), "warp does not retain logical value") + need(not equal(warp.then(operator.adjoint()), unchanged), + "inverse logical warp in the wrong physical gauge is not a repair") + need(equal(operator.then(operator.adjoint()), ce.ident(n)), "exact operator inverse") + witness = next(j for j in range(1 << n) if ce.mv(rows, j) != j) + need(operator.zero_state(witness) != ce.ident(n).zero_state(witness), + "warp-ADD-inverse-warp has the wrong transferred coefficient") + if n == 2: + need(all(warp.then(correction).zero_state(j) == unchanged.zero_state(j) + for j in range(1 << n)), "all four minimal input columns") + phased = ce.Op(n, operator.tab, operator.circuit + [("phase", 1)]) + need(phased.tab == operator.tab and not equal(phased, operator), + "phase-only mutation rejected despite identical tableau") + need(ce.rank([x for x, z, p in phased.tab[n:]]) == 0, + "phase mutation retains rank zero") + return { + "dimension": n, + "source_line": [u], + "target_line": [v], + "binary_columns": columns, + "native_warp": warp_recipe, + "logical_identity_transport": identity_recipe, + "post_warp_identity_correction": repair_recipe, + "warp_then_correction_exact": True, + "logical_transfer_witness": { + "input_basis": witness, + "wrong_transferred_basis": ce.mv(rows, witness), + "required_transferred_basis": witness, + "coefficient": [1, 0], + }, + "global_phase_only_mutation_rejected": True, + "ungauged_inverse_repair_mutation_rejected": True, + "all_minimal_input_columns_checked": 4 if n == 2 else None, + "recursive_invoice": {"free_warp": {}, "value_preserving_repair": {2: 1}}, + "physical_adapter_allowance": ( + "Warp: one exact monomial recipe. Rank-two repair: two monomial " + "adapters. Rank zero does not mean zero movement/scalar cost." + ), + } + + +def prefix_row(program, field, stop): + """Reverse-substitute one row; retain exact free warp words.""" + need(not any(event[0] == "center" for event in program[:stop]), + "targeted prefix has no center operators") + terms = {(("L", field), ()): Q(1)} + + def add(key, value): + value += terms.get(key, Q(0)) + if value: + terms[key] = value + else: + terms.pop(key, None) + + for event in reversed(program[:stop]): + if event[0] == "scalar": + op = event[1] + target = tuple(op[1]) + old = [(key, value) for key, value in terms.items() if key[0] == target] + if op[0] == "add": + for (_, word), value in old: + add((tuple(op[2]), word), value * Q(op[3], op[4])) + elif op[0] == "scale": + for key, value in old: + terms[key] = value * Q(op[2], op[3]) + elif op[0] in ("copy", "clear"): + for (_, word), value in old: + del terms[target, word] + if op[0] == "copy": + add((tuple(op[2]), word), value) + else: + raise ValueError("unknown scalar opcode") + elif event[0] == "warp": + target = tuple(event[1]) + symbol = (1 if event[2] > 0 else -1) * (abs(event[2]) + 10**6) + old = [(key, value) for key, value in terms.items() if key[0] == target] + for key, value in old: + del terms[key] + for (_, word), value in old: + new_word = word[:-1] if word and word[-1] == -symbol else word + (symbol,) + add((target, new_word), value) + else: + need(event[0] in ("climb", "phase", "adapter", "residual_adapter"), + "known coordinate-preserving prefix event") + return terms + + +def final_frames(canonical, program): + """Check frame chronology only; do not certify logical zero-retag values.""" + current = {("L", i): frame for i, frame in enumerate(canonical["start"])} + current[("C", 0)] = None + for event in program: + kind = event[0] + if kind == "climb": + _, _, field, old, new, _ = event + role = ("L", field) + elif kind == "warp": + _, field, _, old, new = event + role = tuple(field) + elif kind == "center": + _, field, old, new, _ = event + role = ("C", field) + elif kind == "zero_retag": + _, field, old, new = event + role = ("L", field) + elif kind == "scalar": + operation, frame = event[1:] + target = tuple(operation[1]) + if operation[0] in ("copy", "clear"): + current[target] = frame + else: + need(current[target] == frame, "scalar target frame history") + if operation[0] in ("add", "copy"): + need(current[tuple(operation[2])] == frame, "scalar source frame history") + continue + else: + need(kind in ("phase", "adapter", "residual_adapter"), "known frame-history marker") + continue + need(current[role] == old, "chronological source frame") + current[role] = new + need([current[("L", i)] for i in range(len(canonical["start"]))] == canonical["final"], + "actual selected-provider final frames agree on all original roles") + return current + + +def rebase_exit_test(ce, canonical, program): + actual_frames = final_frames(canonical, program) + row = prefix_row(program, 300, 9044) + coefficients = { + 113: 1, 123: -1, 128: 1, 135: -1, 140: -1, 145: -1, + 162: -1, 163: 1, 174: -1, 183: -1, 190: 1, 194: 1, + 203: -1, 205: -1, 216: 1, 221: -1, + } + expected = {(("L", i), ()): Q(sign, 2) for i, sign in coefficients.items()} + expected[(("L", 300), ())] = Q(1) + need(row == expected, "exact selected-backward cutoff row") + need(prefix_row(program, 19, 9044) == {(("L", 19), ()): Q(1)}, "pure x19 cutoff row") + need(all(canonical["start"][i] == 0 for i in [300, *coefficients]), + "entrance rebasing is a legal common-frame scalar shear") + need(canonical["final"][300] == 1, "original helper300 has rank-nine target") + target = ce.canonical_frame(9, canonical["frames"][21]) + exits = [] + for field, sign in coefficients.items(): + frame = actual_frames[("L", field)] + basis = canonical["frames"][frame] + points = {0} + for vector in basis: + points |= {x ^ vector for x in tuple(points)} + need(len(basis) == 8 and 273 in points, "Y exit hyperplane contains retired line") + coefficient = ce.canonical_frame(9, basis).adjoint().then(target) + rank = ce.rank([x for x, z, p in coefficient.tab[9:]]) + distance = 1 + len(basis) - 2 + need(rank == distance == 7, "same-label formal exit coefficient has rank seven") + exits.append({ + "field": field, "prefix_coefficient": str(Q(sign, 2)), + "final_frame": frame, "final_basis": basis, + "contains_line273": True, "formal_exit_shear_coefficient_rank": rank, + }) + # Lower one concrete coefficient including phase; all sixteen ranks above + # are independently compared with exact subspace distances. + first = canonical["frames"][exits[0]["final_frame"]] + need(lower(ce, ce.canonical_frame(9, first).adjoint().then(target))["rank"] == 7, + "concrete rank-seven coefficient lowering") + climbs = [[i, e] for i, e in enumerate(program) if e[0] == "climb" and e[2] == 300] + profile = Counter(e[-1] for i, e in climbs) + need(profile == {1: 6, 3: 1}, "complete helper300 paid profile") + all_y_dimensions = Counter() + plain_scalar_ranks = Counter() + for field in range(112, 224): + basis = canonical["frames"][actual_frames[("L", field)]] + points = {0} + for vector in basis: + points |= {x ^ vector for x in tuple(points)} + all_y_dimensions[len(basis)] += 1 + plain_scalar_ranks[1 + len(basis) - 2 * int(273 in points)] += 1 + need(all_y_dimensions == {8: 112}, "all actual selected Y exits are rank eight") + need(plain_scalar_ranks == {7: 52, 9: 60}, "conditional plain-scalar cross-frame ranks") + return { + "cut_before_event": 9044, + "helper300_prefix_row": [ + {"input": list(role), "operator_word": list(word), "coefficient": str(value)} + for (role, word), value in sorted(row.items()) + ], + "entrance_basis_shear_is_invertible_and_coframed": True, + "actual_selected_final_frame_history_checked_on_original_roles": len(canonical["start"]), + "targeted_prefix_has_no_center_operators": True, + "original_productive_target": 9, + "proposed_line21_targets": [1, 8], + "unchanged_helper_paid_profile_if_handoff_legal": dict(profile), + "helper300_paid_events": climbs, + "specified_same_label_formal_exit_shear": exits, + "minimum_and_maximum_cross_coefficient_rank": [7, 7], + "one_concrete_cross_coefficient_lowered_with_absolute_phase": True, + "specified_same_label_exit_shear_is_not_rank_zero": True, + "all_sixteen_formal_exit_shear_coefficients_are_non_monomial": True, + "plain_scalar_Y_exit_coefficient_class": { + "fields": [112, 223], + "indexing": "inclusive", + "actual_terminal_dimensions": dict(all_y_dimensions), + "rank_histogram_by_exact_frame_distance": dict(plain_scalar_ranks), + "minimum_nonzero_cross_coefficient_rank": 7, + "scope": ( + "A nonzero plain-scalar Y-output coefficient mapped to retired " + "line21 has rank at least seven. This neither derives the true " + "decoder coefficients nor bounds arbitrary joint decoder circuits." + ), + }, + "scope": ( + "Specified same-label formal exit shear only. No claim that mixed input " + "coordinates are dependent, no sum of sixteen H7 charges, and no " + "lower bound on every coordinated joint decoder. If the selected main " + "output is H Y, a true inverse wrapper may require R H^-1 rather than " + "these sixteen same-label R coefficients. The true decoder is unconstructed." + ), + } + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--repo", type=Path, default=Path(__file__).resolve().parents[2]) + parser.add_argument("--output", type=Path) + parser.add_argument("--json", action="store_true") + args = parser.parse_args() + ce, canonical, program = load(args.repo) + report = { + "status": "PASS_NATIVE_WARP_DISCRIMINANT_NO_SOURCE_REPLACEMENT", + "source_inputs": [{"path": path, "sha256": pin} for path, pin in PINS.items()], + "selected_source_binding": { + "direction": "backward", "frame21": [273], "frame57": [324], + "helper300_line_entry_event": 9044, "helper295_line_exit_event": 9105, + "new_permutation_is_existing_registered_warp": False, + }, + "fixtures": [ + run_fixture(ce, 2, 1, 2, [(0, 1)]), + run_fixture(ce, 9, 273, 324, [(0, 2), (4, 6)]), + ], + "entrance_rebasing_exit_test": rebase_exit_test(ce, canonical, program), + "no_new_kappa_claimed": True, + "scope": ( + "Two exact warp examples and a specified same-label formal exit shear. " + "No global impossibility claim, new native word, productive-target " + "admission or caller replay." + ), + } + serialized = json.dumps(report, sort_keys=True, indent=2) + "\n" + if args.output: + args.output.write_text(serialized, encoding="utf-8") + elif args.json: + print(serialized, end="") + else: + print(report["status"] + " warp_rank=0 repair_rank=2 formal_exit_rank=7") + + +if __name__ == "__main__": + main() diff --git a/research/helper-transport-contract/verify_budget.py b/research/helper-transport-contract/verify_budget.py new file mode 100644 index 0000000000..62100de471 --- /dev/null +++ b/research/helper-transport-contract/verify_budget.py @@ -0,0 +1,296 @@ +#!/usr/bin/env python3 +"""Small, source-pinned transport budget calculation; no supplier admission claim. + +Prepared for apoursh with substantial OpenAI Codex assistance. Apache-2.0. +Directed-rational power arithmetic is reused from Clear1nsight's pinned selected +supplier, with its attribution and source untouched. +""" +import argparse +from collections import Counter +from fractions import Fraction as Q +import gzip +import hashlib +import importlib.util +import json +from pathlib import Path +import sys + +sys.dont_write_bytecode = True +BASE = "32890bc5de034ab8fc93ac88ead7279a6a416d04" +FUNDING = "research/coupled-helper-neutral-completion/reports/expected/funding.json" +ENGINE = ("research/coupled-helper-neutral-completion/capsule/workspace/" + "swarm-coupled-caller-sol-high-20261024/agents/invoice/exact_moments.py") +CANONICAL = "research/kappa-round3-warp-20261022/ACTUAL-WORD.json.gz" +PROVIDER = ("research/coupled-helper-neutral-completion/capsule/workspace/" + "swarm-provider-audit-sol-high-20261024/repository/research/" + "native-rank8-helper-provider/WORD.json.gz") +EXPECTED = { + FUNDING: "70ab7d13548962097ad83ad393b8482f52e827b8996869011ce6d071146bd3eb", + ENGINE: "cf7439c9eb4095224126dd5eefc9f1c5dfe1968d6e8eca5b87d4a3897841182d", + CANONICAL: "7679daa4ec6a40f56fc7f0202379a6f454310e94945aba4f48beaaaafb838d05", + PROVIDER: "7dc356001ed597ad6fc9fd3e0bc6ff7e3ec3a580a579a956827aa17fccfdd2dc", +} + + +def need(condition, message): + if not condition: + raise ValueError(message) + + +def parameters(funding): + kappa, s, gap = Q(funding["kappa"]), Q(funding["tested"]), Q(funding["gap"]) + need(s == Q(605457649, 200000000000), "unexpected tested saving") + need(s - kappa == 7 * gap, "supplier exponent ladder differs") + return kappa, s, gap + + +def source_invoices(repo): + payload = gzip.decompress((repo / CANONICAL).read_bytes()) + canonical = json.loads(payload)["canonical"] + provider = json.loads(gzip.decompress((repo / PROVIDER).read_bytes())) + need(provider["source_sha256"] == hashlib.sha256(payload).hexdigest(), + "provider source binding") + need(provider["direction"] == "backward", "selected backward provider") + word = provider["word"] + closure = {19, 300, 301} + changed = True + while changed: + changed = False + for event in word[9044:9137]: + if event[0] == "scalar" and event[1][0] == "add": + refs = event[1][1:3] + need(all(ref[0] == "L" for ref in refs), "persistent closure roles") + fields = {ref[1] for ref in refs} + if fields & closure and not fields <= closure: + closure.update(fields) + changed = True + frames = list(canonical["start"]) + bases = canonical["frames"] + entry = None + touched, paid = set(), Counter() + included = 0 + for index, event in enumerate(word[:9137]): + if index == 9044: + entry = list(frames) + kind = event[0] + if kind in ["phase", "adapter", "residual_adapter"]: + # These are inert markers in native_extensions.literal_replay. + need(index < 9044, "no inert marker in selected block") + continue + if kind == "climb": + _, _, field, old, new, rank = event + need(frames[field] == old, "source climb frame") + need(len(bases[new]) - len(bases[old]) == rank > 0, + "source climb dimension and charge") + frames[field] = new + involved = [field] + if index >= 9044 and field in closure: + paid[rank] += 1 + elif kind == "warp": + need(index < 9044, "no warp in selected block") + _, ref, _, old, new = event + need(ref[0] == "L" and frames[ref[1]] == old, "source warp frame") + frames[ref[1]] = new + involved = [ref[1]] + elif kind == "scalar": + operation, frame = event[1:] + need(operation[0] in ["add", "scale"], "source scalar opcode") + refs = operation[1:3] if operation[0] == "add" else operation[1:2] + need(all(ref[0] == "L" and frames[ref[1]] == frame for ref in refs), + "source scalar coframe") + involved = [ref[1] for ref in refs] + else: + raise ValueError(f"unexpected prefix opcode: {kind}") + if index >= 9044 and set(involved) & closure: + need(set(involved) <= closure, "dependency-closed interval") + touched.update(involved) + included += 1 + need(len(touched) == 20, "twenty-field boundary") + endpoints = [{"field": f, "entry_frame": entry[f], "exit_frame": frames[f], + "rank_increase": len(bases[frames[f]]) - len(bases[entry[f]])} + for f in sorted(touched)] + ideal = Counter(e["rank_increase"] for e in endpoints) + need(min(ideal) > 0 and paid == {1: 38} and ideal == {1: 3, 2: 16, 3: 1}, + "source-derived invoices differ from the scoped claim") + need(included == 85, "selected event count") + return dict(paid), dict(ideal), endpoints, included + + +def add(a, b): + return a[0] + b[0], a[1] + b[1] + + +def subtract(a, b): + return a[0] - b[1], a[1] - b[0] + + +def times(n, a): + need(n >= 0, "nonnegative interval multiplier") + return n * a[0], n * a[1] + + +def outward_18(interval): + """Readable exact endpoints with denominator 10**18, rounded outward.""" + d = 10 ** 18 + low, high = interval + return [str(Q(low.numerator * d // low.denominator, d)), + str(Q(-((-high.numerator * d) // high.denominator), d))] + + +def independent_budget_checks(s): + """Coarse rational proof, independent of the imported logarithm/power code. + + Taylor's exponential series has positive terms. After term30, the first + omitted term divided by 1-q/32 bounds the tail for 0<=q<3. + """ + def exp_interval(q): + need(0 <= q < 3, "independent exponential range") + total = term = Q(1) + for j in range(1, 31): + term *= q / j + total += term + return total, total + (term * q / 31) / (1 - q / 32) + + # These checks prove the logarithm brackets without importing log or exp. + brackets = [(2, Q(69, 100), Q(7, 10)), + (3, Q(109, 100), Q(11, 10)), + (5, Q(8, 5), Q(17, 10))] + for n, lo, hi in brackets: + need(exp_interval(lo)[1] < n < exp_interval(hi)[0], + f"independent logarithm bracket: {n}") + # 1-x <= exp(-x) <= 1-x+x*x/2 for x>=0. + b_upper = Q(257, 10) * s + b_lower = Q(507, 20) * s - Q(1931, 200) * s * s + g_upper = Q(157, 25) * s + Q(2229, 200) * s * s + h2_lower = 2 * (1 - Q(7, 10) * s) + independent = { + "per_local_B20_plus_one_split_below_H1": b_upper + g_upper < 1, + "once_global_H2_exceeds_18_combined_allowances": + 18 * (b_upper + g_upper) < h2_lower, + "once_global_H1_not_excluded_by_18_B20": 18 * b_lower > 1, + } + need(all(independent.values()), "independent elementary budget guard") + return {"checks": independent, + "B20_lower": str(b_lower), "B20_upper": str(b_upper), + "split_upper": str(g_upper), "H2_lower": str(h2_lower)} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--repo", required=True, type=Path) + parser.add_argument("--json", action="store_true") + args = parser.parse_args() + for relative, expected in EXPECTED.items(): + actual = hashlib.sha256((args.repo / relative).read_bytes()).hexdigest() + need(actual == expected, f"source hash differs: {relative}") + funding = json.loads((args.repo / FUNDING).read_text()) + kappa, s, gap = parameters(funding) + paid_profile, ideal_profile, endpoints, included = source_invoices(args.repo) + t = 1 - s + spec = importlib.util.spec_from_file_location("pinned_exact_moments", args.repo / ENGINE) + arithmetic = importlib.util.module_from_spec(spec) + spec.loader.exec_module(arithmetic) + p = {rank: arithmetic.power(rank, t) for rank in [1, 2, 3, 4, 5, 7, 8, 9, 145]} + original = arithmetic.moment(paid_profile, t) + ideal = arithmetic.moment(ideal_profile, t) + b = subtract(original, ideal) + g = subtract(add(p[4], p[5]), p[9]) + first_line_split = subtract(add(p[1], p[8]), p[9]) + both = add(b, g) + target_debit = subtract(p[9], p[4]) + results = { + "twenty_field_ideal_saving": b, + "eighteen_times_ideal_saving": times(18, b), + "one_9_to_4_plus_5_target_split": g, + "conditional_9_to_1_plus_8_target_split_not_admitted": first_line_split, + "eighteen_conditional_9_to_1_plus_8_splits_not_admitted": times(18, first_line_split), + "eighteen_target_splits": times(18, g), + "combined_per_local": both, + "combined_eighteen_locals": times(18, both), + "one_H2_repair": p[2], + "one_H3": p[3], + "one_H7_isolated_exit_coefficient": p[7], + "debit_if_rank9_target_retires_at_rank4_without_productive_successor": target_debit, + "one_rank_target_downgrade_lower_bound_up_to_145": + times(t, arithmetic.power(145, -s)), + } + checks = { + "B20_less_than_one_H1": b[1] < 1, + "B20_plus_split_less_than_one_H1": both[1] < 1, + "eighteen_splits_less_than_one_H1": 18 * g[1] < 1, + "eighteen_B20_can_cover_one_H1_only_as_optimistic_budget": 18 * b[0] > 1, + "eighteen_B20_plus_splits_less_than_one_H2": 18 * both[1] < p[2][0], + "surrendered_positive_integer_rank_target_exceeds_B20": b[1] < 1, + "rank9_to4_target_debit_exceeds_B20": target_debit[0] > b[1], + "elementary_upper_bound": b[1] < Q(257, 10) * s < Q(78, 1000), + "balanced_split_bounds_conditional_first_line_split": first_line_split[1] < g[0], + "one_H7_exceeds_B20_plus_conditional_first_line_split": + p[7][0] > b[1] + first_line_split[1], + } + need(all(checks.values()), "budget inequality failed") + independent = independent_budget_checks(s) + controls = [] + + def require_rejected(name, operation): + try: + operation() + except ValueError: + controls.append(name) + return + raise ValueError(f"mutation was not rejected: {name}") + + require_rejected("substitute_selected_kappa_for_tested_saving", + lambda: parameters({**funding, "tested": funding["kappa"]})) + + def signed_moment(profile): + out = (Q(0), Q(0)) + for rank, count in profile.items(): + need(type(rank) is int and rank > 0 and type(count) is int, + "signed invoice integers") + term = times(abs(count), arithmetic.power(rank, t)) + out = add(out, term) if count >= 0 else subtract(out, term) + return out + + def require_positive_change(paid_change, target_change): + gain = subtract(signed_moment(target_change), signed_moment(paid_change)) + need(gain[0] > 0, "signed complete invoice does not improve") + return gain + + # Aggregate ideal regrouping minus one once-global H1 can pass the budget. + require_positive_change({1: -35 * 18 + 1, 2: 16 * 18, 3: 18}, {}) + # Misreading the same repair as one H1 per LOCAL must fail that pipeline. + require_rejected("once_global_H1_miscounted_as_one_per_LOCAL", + lambda: require_positive_change({1: -35 * 18 + 18, + 2: 16 * 18, 3: 18}, {})) + require_positive_change({}, {4: 1, 5: 1, 9: -1}) + require_rejected("paid_9_to_4_plus_5_split_misread_as_target_gain", + lambda: require_positive_change({4: 1, 5: 1, 9: -1}, {})) + require_rejected("successor_owned_zero_but_productive_credit_assumed", + lambda: require_positive_change({}, {4: 1, 9: -1})) + report = { + "status": "PASS_TRANSPORT_BUDGET", + "source_base": BASE, + "source_hashes": EXPECTED, + "selected_kappa": str(kappa), + "tested_saving": str(s), + "moment_exponent": str(t), + "uniform_complex_saving": str(kappa + 6 * gap), + "source_block": {"range": [9044, 9137], "paid": paid_profile, + "closure_seed": [19, 300, 301], "included_events": included, + "optimistic_endpoint_paid": ideal_profile, "endpoints": endpoints}, + "outward_rational_enclosures": {name: outward_18(v) for name, v in results.items()}, + "checks": checks, + "independent_elementary_guard": independent, + "semantic_mutation_controls_rejected": controls, + "scope": "Conditional recursive invoice screen, not a legal construction or funded kappa.", + } + if args.json: + print(json.dumps(report, indent=2, sort_keys=True)) + else: + print(report["status"]) + for name, v in results.items(): + print(f"{name}: {outward_18(v)}") + + +if __name__ == "__main__": + main()