Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions research/p104-residual-consumer/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Actual cleanup factorisation, return floor, and conditional budget

## 1. Boundary and coefficient domain

Work over the Gaussian dyadic ring `D=Z[i,1/2]`, on arbitrary finite free D-modules. Arrays may have arbitrary independent dirty initial values. The original source-bound native word is inherited with its exact canonical-chart interpretation and owned live-copy semantics. No new private erasure is introduced.

Let `A=R^t R/8`, with R the retained doubled-root matrix. The PR3882 pivot frame gives `A=[[I,B],[B^t,B^t B]]` in J,N order. Write `v=y+Ax`, `w=x+y`, and `q=x_J+B x_N`. PR3882's endpoint consists of w on `X_N,Y_J`, q on `X_J`, and v_N on `Y_N`. The w arrays occupy their indexed target hyperplanes, whereas q and v_N occupy FULL. Its explicit inverse is

```
x_N = w_N - v_N + B^t q,
x_J = q - B x_N,
y = w-x.
```

Thus every encoded `(w,q,v_N)` over D is a permissible algebraic input to a continuation. This is not an arbitrary-integer physical signed-floor admission statement.

## 2. A factorisation of the actual cleanup, not a hypothetical reader

At zero-based cut 3642, all original frame transports are finished. The final 416 events are exactly `Q_k += D[k,i] X_i` in FULL, with 52 coefficients per row, each +/-2. Both source-bound checkers extract these events rather than assuming that every root-code observer is a caller. In column order J, the actual matrix `T=D[:,J]` is

```
2 2 2 -2 0 0 0 0
0 0 2 2 2 -2 0 0
0 0 0 0 2 -2 -2 2
2 2 2 2 0 0 0 0
2 2 -2 -2 0 0 0 0
0 -2 0 -2 2 0 -2 0
-2 2 -2 2 0 0 0 0
0 -2 2 0 -2 0 0 -2
```

Exact multiplication checks `D[:,N]=T B`, hence `Dx=Tq`. The actual prefix is replayed on all 280 independent inputs. It has `X=x`, `Y=v`, `Q=h_Q-Dx`, and all 64 G/D helpers equal to their original inputs. Its cut frames equal the original final frames, and every private lifetime has ended. These source-bound statements, not a guessed chronology, justify the splice.

Execute the unchanged PR3882 tail at this cut. Its reads and writes are confined to X and Y. They produce `(w,q,v_N)` without altering the possibly source-dependent Q inputs. Now add `Tq` to Q. Since the q donors and Q recipients are FULL, these additions need no extra chart conversion. They restore `Q=h_Q` exactly. Every other endpoint is unchanged, so all 72 arbitrary dirty helpers are restored simultaneously.

There are 32 weighted additions, each with coefficient +/-2. Implement each as two unit signed ADDs while leaving its donor unchanged. The 64 unit ADDs use no extra bank, scaling, or temporary source mutation. Lowering the original 416 +/-2 updates in the same way costs 832 unit ADDs. The difference is 768 array ADDs, or `768*2*512=786432` real component ADDs. This comparison fixes the lowering convention and is not an optimality assertion over other arithmetic alphabets.

For any additional linear source read `Lx`, the same coordinates are sufficient on their own exactly when `L_N=L_J B`. Sufficiency is substitution. Necessity follows by choosing `x_N=t`, `x_J=-Bt`, so q=0, and comparing with zero. This is an elementary interface criterion, not a claim that every such reader exists in the repository. The actual D above satisfies it. The full old-source identity does not.

## 3. Explicit source-preserving return adapter

The named legacy completed-call contract asks for `X_i=x_i` in FULL and `Y_i=w_i` in each H_i, while restoring every helper. Starting from the new encoded exit, execute

1. Lift the 96 X_N arrays from H_n to FULL.
2. Subtract `B^t q` from Y_N, giving y_N.
3. For each n, subtract Y_n from X_n and then add the new X_n to Y_n. These values become x_n and w_n respectively.
4. Subtract `B x_N` from X_J, giving x_J.
5. Descend Y_N from FULL to H_n.

Y_J already contains w_J and is untouched. Helpers are untouched. No bank is assumed clean. The two half-coefficient passes use 384 unit ADDs each, after halving and subsequently doubling their 8 or 96 donors once each. The middle two additions cost 192 unit ADDs. The adapter therefore has 960 unit ADDs, 104 halves, 104 doubles, and 192 rank-one transports, for 1360 formal events. All arithmetic is in FULL. The source-bound geometry verifies every H_n is an eight-dimensional subspace and all 104 H_i are distinct.

This is an exact formal-frame construction. Phase-correct native lowering, physical precision, and the owner/control/return implementation have not been rerun or supplied. The dimension-gap invoice is not a measured physical running time.

## 4. Sharp 192 return floor in the fixed-occupancy model

The lower bound permits arbitrary finite equal-chart D-linear mixing and arbitrary dirty helper banks initially and finally at FULL. Transports are nested chart changes charged by positive dimension gap. The required initial and final bank occupancy at each H_i is one. There is no allocation, disposal, free informative input, or uncharged cross-chart transfer. The requested old-source outputs must be FULL, all w_i must remain available at their H_i, and dirty helpers must return. These are deliberate hypotheses, not a universal native model.

For n in N, use the encoded input with w_n=u and every other w, q, v_N, and dirty input zero. By section 1 this is a valid algebraic input. Initially its only nonzero value is at H_n. The final requirement includes x_n=u at FULL. If no transport leaves H_n, equal-chart linear operations cannot communicate this input to FULL. Hence at least one transport must depart H_n. Fixed occupancy then requires at least one arrival at H_n as well.

Distinct eight-dimensional hyperplanes in dimension nine are incomparable. A nested transport can therefore have at most one H_n as an endpoint. Summing the 96 two-incidence requirements yields at least 192 transport occurrences, each charged at least one. Section 3 attains this number, proving sharpness in the stated model. This proof uses the prior terminal-floor package's occupancy method; the new information-export family and boundary are different.

The verifier checks the 96 separating inputs and, in source-bound mode, the actual distinct hyperplanes. These finite checks corroborate the hypotheses. The arbitrary-length conclusion is the written information/occupancy argument above. New persistent outputs, allocation/disposal, cross-chart operations, weaker source returns, and physically restricted correlated input domains are outside this theorem.

## 5. Fully charged necessary paired-chain screen

This is an explicitly conditional template calculation, not an assertion that the changed word already has an admissible inverse-transpose, paired owner embedding, or opposite orientation. Suppose all `s=2p+1`, p>=1, stage calls use the same local profile. Set `m=8s+1` and `W=104(s-1)` per replica, following the retained larger-gain paired-chain formula with 104 ports. Each original family has one unpaid coordinate; b auxiliary banks are fully paid. All positive child ranks obey `r<=m`.

For the encoded exit, grant the optimistic per-call credit

```
P = 104*8 + 104*8 + 72*9 = 2312.
```

It equals the total final-minus-initial frame dimension for both endpoint assignments. Explicitly, encoded X contributes `8*9+96*8`, encoded Y contributes `8*8+96*9`, helpers contribute `72*9`, and initial X dimensions subtract 104. This is a generous credit grant, not proof that source-consuming paths can realise all of it in the selected owner law. Counting terminal excursions again as persistent progress is not allowed.

Let C be the local native rank mass, 2576 without the legacy return and 2768 with it. The remaining required paid coverage is at least

```
max(0,(m-1)W-sP) + mb.
```

All other omitted cost terms are nonnegative. Thus total paid mass minus capacity is at least

```
sC + max(0,(m-1)W-sP) + mb - m(W+b)
>= s(C-P) - W
= s(C-P-104) + 104.
```

The final expressions are `160s+104` and `352s+104`, both strictly positive. Since `(r/m)^(1-a)>=r/m` for `0<=a<1` and `0<r<=m`, the same positive mass deficit obstructs moment contraction for every such a. Fully paid b cancels in the numerator and cannot repair the deficit for any finite b. No floating-point root or sampled all-p inference is used.

For s=9, m=73, W=832, the lower paid masses are 62280 and 64008 versus capacity60736, giving deficits1544 and3272. At s=3 the displayed linear bound is weaker than the actual positive-part bill; the verifier records both without equating them. Any proposed net rank savings or genuine additional progress, after new costs, must first exceed the appropriate deficit. This is necessary only, and does not prove positive-saving feasibility.

Different profiles in different orientations, a realised changed coverage law, coupled schedules, or a replacement circuit can fall outside the screen. In particular, no new global P104 impossibility theorem or selected-frontier update follows. The exact scalar cleanup success does not remove a native child, so it cannot by itself change this budget decision.
87 changes: 87 additions & 0 deletions research/p104-residual-consumer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# An actual P104 residual consumer and its return cost

**Partial source-bound construction and conditional budget decision. No new kappa.** This package follows PR [#3882](https://github.com/CrocSwap/integer-mult-bounds/pull/3882), but does not repeat its tail, eight-replacement theorem, or original channel construction as new work. It identifies an actual consumer of the eight encoded `q` fields, rather than inventing an unused readout.

The consumer is the frozen native word's final query cleanup, zero-based events 3642 through 4057. Its 416 updates `Q += D x` factor exactly through `q = x_J + B x_N`. Moving the existing correction tail immediately before that cleanup and replacing the original reads by `Q += T q` preserves the complete 280-field endpoint, including all 72 arbitrary dirty helpers. There are 32 nonzero coefficients in T instead of 416 in D. Under the specified read-only-donor lowering, this replaces 832 unit Gaussian ADDs by 64, saving 768 array ADDs, or 786,432 real component ADDs for 512 complex words per array. This is not an optimal scalar circuit claim.

The second result prices the old source-preserving return contract. An explicit adapter returns every `X_i=x_i` in FULL and every corrected `Y_i=x_i+y_i` in its target hyperplane. It costs 192 formal rank-one transports, 960 unit array ADDs, 104 exact halves, and 104 restoring doubles. A chart-occupancy argument proves that 192 is sharp in the stated nested-transport, fixed-occupancy model. It adapts the retained terminal-floor proof method, with a different starting boundary and 96 necessary information exports.

The recursive rank profile does not improve. A conditional paired-chain screen, explicitly granting this same profile and full net endpoint credit to every stage, still rejects all odd stage counts and every finite number of fully paid auxiliary banks. The decision remains **NARROW**. Keep the useful scalar consumer and exact return adapter; do not treat scalar savings as a new recursive supplier.

## Sources and the actual chronological join

Canonical main is `20ecf2891d80b5acf18d980b2164fb44ea7faa90`, priority revision 6. PR3882 is pinned at `9d56eeedbed5e3e9bbbc8c189d66f14cf15b6067`. Its geometry and result are retained byte for byte under `inputs/`, with original origins and a source-retention ancestor in SOURCES.json. The actual 4,058-event word and full geometry are authenticated from the unchanged main files. No predecessor executable is imported.

Use the predecessor pivot indices `J=[0,1,3,6,22,31,93,103]`, with N their 96-port complement. With `A=G/2` and `B=A[J,N]`, the exact root geometry gives

```
A = [[I, B], [B^t, B^t B]], q = x_J + B x_N.
```

All 384 nonzero B entries are signed halves. At the actual cut before event 3642, X holds x in FULL, Y holds `v=y+A x` in its final hyperplanes, and `Q=h_Q-Dx` in FULL. The other 64 dirty helpers are already restored. Every private lifetime is closed. The actual suffix gives `D=T[I B]`; its 32-entry matrix T is printed in PROOF.md and the frozen RESULT.json.

Execute the PR3882 tail at that cut. It neither reads nor writes Q. It leaves the corrected sums w on `X_N,Y_J`, q on `X_J` in FULL, and v_N on `Y_N` in FULL. The 64 unit cleanup ADDs then read only X_J and target only Q. They restore Q to its arbitrary original dirt while leaving the other outputs unchanged. This closes an actual missing consumer implication. It does not restore the original X bank or make residual erasure legal.

The inherited prefix has 3,642 events. The new suffix has 1,728 literal events, including the unchanged 1,664-event tail, so the joined representation has 5,370 events. Counting each signed-double cleanup as one weighted ADD instead gives 5,338 events. The two conventions are kept distinct. The 208 new frame conversions are still formal uses of the inherited hyperplane/FULL pairs, not a newly replayed native implementation.

## Cost and coverage decision

| Quantity | Encoded exit and actual cleanup | With old source-preserving return |
| --- | ---: | ---: |
| Combined local native rank mass | 2,576 | 2,768 |
| Additional return-adapter rank mass | 0 | 192 |
| Optimistically creditable net frame progress per call | 2,312 | 2,312 |
| Local rank mass above that progress | 264 | 456 |
| Nine-stage paid-mass lower bound | 62,280 | 64,008 |
| Nine-stage capacity | 60,736 | 60,736 |
| Nine-stage deficit | 1,544 | 3,272 |

These are native-rank and conditional coverage quantities. They do not include a scalar-to-recursive tariff conversion. The scalar cleanup has no additional native calls, banks, divisions, source writes, or frame changes. Consequently it leaves the PR3882 profile `(1282,58,86,104,48,24,8,8)` unchanged. The return adapter increases it to `(1474,58,86,104,48,24,8,8)`.

The budget uses `s=2p+1`, `m=8s+1`, and `W=104(s-1)` per replica, with one unpaid coordinate per original family. Grant all s calls the same local profile and net credit above; a compatible dual orientation is not constructed. Grant zero other scalar, control, precision, or hosting cost. For b fully paid auxiliary banks and `0<=a<1`, the resulting necessary screens are

```
M(a) >= 1 + (160s+104)/(m(W+b)) > 1,
M_return(a) >= 1 + (352s+104)/(m(W+b)) > 1.
```

This is a proof for that explicitly hypothetical equal-profile template. It does not establish an actual owner embedding, cover arbitrary cheaper opposite orientations, or reject every changed consumer. The old bare width-nine `46/45` screen and PR3620's different 358-bank dual threshold are not substituted for this calculation. At nine stages, even reaching strict contraction at saving zero requires total net savings plus genuine extra credit, after added charges, exceeding 1,544 or 3,272 respectively. Passing that necessary test would still not prove a positive-saving supplier.

## Verification and evidence status

From a complete checkout, with Python 3.12 and the standard library,

```sh
python3.12 -B scripts/research_package.py --package research/p104-residual-consumer
python3.12 -B scripts/check_research_commit.py --package research/p104-residual-consumer --check-source-history
```

The registered commands run the primary checker normally and under `-O`, the separately implemented integer-matrix checker, and 16 semantic/control test groups. Default verification is read-only. Each source-bound checker executes the actual 3,642-event prefix, authenticates the literal cleanup matrix, and checks the new full 280-column endpoint. The primary checks exact binary nesting and all original cut frames. The second checker uses dense scaled integers, different root enumeration, and a different block schedule. Both compare the entire endpoint against the exact predecessor digest. The primary additionally tests every one of the 96 information-export witnesses for the written return floor.

The portable algebra-only commands are deliberately weaker,

```sh
python3 -I -O -B research/p104-residual-consumer/verify.py --algebra-only
python3 -I -O -B research/p104-residual-consumer/independent.py --algebra-only
python3 -I -O -B research/p104-residual-consumer/test_verify.py
```

Those commands passed locally on CPython 3.13.5. They do not authenticate the complete native source or actual prefix. Subsequent source-bound hosted results belong in the PR handoff with exact head and run identifiers. The frozen canonical result digest is `cdf6210cb348566f7647722f05c695d268b220909fb12997d12255817985f43f`; normal replay never regenerates it. `--write-result` is an explicit authoring operation.

Controls reject missing, early, sign-flipped, and duplicated cleanup, wrong donors, missing restoring doubles, wrong output locations, and missing return transports. Actual isolated CLI copies reject typed-result corruption, changed geometry bytes, and missing main sources. Tests remain active under `-O`. They corroborate, rather than replace, the arbitrary-length written occupancy proof and all-stage conditional budget proof.

No native phase/compiler replay, physical signed-floor execution, complete physical width bound, selected cold replay, all-size theorem, independent human acceptance, or proof-kernel verification is claimed. The inherited prefix retains its owned live-copy discard semantics; it is not relabelled as a reversible zero erasure. Formal chart execution and an actual physical recursive supplier remain separate claims.

## Credit and overlap

Credit Rohan Arun / PR1972 and Chafik Boukhalfa / PR1991 for the channel, Adam Gall / PR1940 for its schedule, and the retained geometry/native lineage. PR3882 supplies the correction tail and residual coordinates. The retained `p104-terminal-correction-floor` package, prepared for Adam Gall with OpenAI assistance, supplies the occupancy proof method and the prior source-preserving complete-coverage warning. Dominik Scholz's larger-gain model, Sagar Thakrar / PR1012, and Douglas Colkitt supply the paired-chain and coverage context. Their bounds and constructions are not claimed as new.

PR3609 is related in-place pivot work on a different dual entrance. PR3620 and Sagar Thakrar's PR3782 concern different profiles. PR3810 has a different fixed-cover/preconditioner contract. New PR3894 constructs a direct source-preserving end-cut correction; PR3907 reviews a monotone lifetime bound, and PR3915 checks one flag coefficient. None is used as a theorem dependency for this splice. The recorded bounded overlap is not an exhaustive novelty certificate.

Prepared by Clear1nsight with substantial OpenAI assistance in mathematics, implementation, verification, and documentation. The two implementations share this assisted session and the same frozen sources, and are not independent human review. New work is Apache-2.0. Predecessor bytes, attribution, and notices are retained.

## Open next questions

A next consumer must exploit more than this scalar cleanup saving. First name its actual required outputs and opposite orientation, derive the changed full coverage law, and determine which native operations or net boundary obligations disappear. Stop when even a favourable complete lower bill remains above capacity. Neither decoded source recovery nor residual disposal is free.

A bounded native audit is possible without supplier expansion. First bind one changed-role hyperplane/FULL map and its physical entrance to the literal signed-floor implementation, with phase and arbitrary dirt. The present package does not establish that admission. A larger construction should proceed only after an affordable consumer and full cost allowance are demonstrated.
Loading