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
233 changes: 233 additions & 0 deletions research/p104-literal-repair-rank/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
# Complete information rank at the literal P104 correction boundary

All ranks are over a characteristic-zero field containing `i`, for example
`Q(i)`. One array has dimension `d` over this field. The physical formulas
are ideal exact operators. No rounded implementation is inferred.

## 1. Credited boundary, new question

Chris R / Clear1nsight's PR3954 supplies the physical encoding and old
correction; unpaidmoon's PR4133 separates their dimension-free commutators.
We retain those operators, including the literal slot exchange:

```
J = I-H, H^2=H, T invertible, K=T^-1, HT=TH,
P = [ I 0; K I ], L = [ D HT; 0 I ],
Pi = [ J H; H J ], A = Pi L.
```

Both banks have dimension `n`. Neither `DT=TD` nor commutation between
different address blocks of T is assumed. The stated compatibility maps
act as identity on every borrowed helper. This is their mathematical
boundary extension, not an implementation of a helper's earlier native path.

The old operation on an encoded input gives `P A x`; the intended encoded
operation gives `A P x`. The existing first-bank defect is `-H K a`, of
rank `h=rank(H)`. The question here is the **complete two-bank** defect,
then the exact amount of linear information needed by an additive repair.

## 2. General rank and kernel

The credited block multiplication gives

```
E = P A - A P = [ -HK 0 ]
[ KJ(D-I)-H KH ].
```

Let `j=n-h`, and let `B0` be the endomorphism `J(D-I)J` restricted to
`im(J)`. Put `r=rank(B0)`. Then

```
ker(E) = { (a,b) : Ha=Hb=0 and J(D-I)J a=0 },
rank(E) = 2h+r. (1)
```

To prove this, the top equation `HK a=0` gives `Ha=0`, since K is
invertible and commutes with H. Apply H to the bottom equation: its first
term vanishes because `HKJ=0`, and `Ha=0` leaves `KHb=0`. Hence `Hb=0`.
The remaining bottom equation is exactly `KJ(D-I)Ja=0`, equivalent to
`B0 a=0`. Conversely these three conditions make both blocks zero.
The kernel dimension is `(j-r)+j`; subtracting it from `2n` proves (1).
Invertibility of D is unnecessary for this defect statement.

For a one-port check, take `H=T=I` and `D=-I`. Then
`A=[0 1;-1 1]`, `E=[-1 0;-1 1]` and the eventual repair is
`R=[3 -1;1 0]`. The first-bank error has rank one, while E and R-I
have rank two. This is the smallest instance of the two-bank distinction.

This also explains a boundary on the specialization below. If the pivot
block differs from identity by rank one, the complete defect rank increases
by one. A zero first-bank response on a pivot input alone is insufficient.

## 3. Actual P104 specialization

Use the ordered ports J followed by N, with original pivot indices
`(0,1,3,6,22,31,93,103)`, `|J|=8`, `|N|=96`. Here J denotes both the
pivot set and its projection, according to context. PR3954's scalar block is

```
D = [ I8 B ], H = diag(0_8,I_96),
[ B^t B^t B-I96 ]
D^-1 = [ -11 I8 B ], BB^t = 12 I8.
[ B^t -I96 ]
```

The checker reconstructs the roots and Gram matrix from the pinned P104
fixture and verifies these premises. Thus `J(D-I)J=0`. For arbitrary
invertible physical T preserving J/N, including the port-dependent native
charts, (1) gives

```
rank(E) = 192d,
ker(E) = { (a_J,0_N,b_J,0_N) }, dim ker(E)=16d. (2)
```

The 72 unchanged helper arrays add `72d` to the kernel and zero to the
rank: the complete 280-array boundary has kernel dimension `88d`.

A concrete minor makes the lower bound especially transparent. Project
the two output banks onto their N ports and restrict the inputs to their
two N banks. The resulting `192d` square matrix is

```
[ -K_N 0 ]
[ -I K_N ]. (3)
```

It is invertible. The 16 pivot input arrays are annihilated, establishing
the matching upper bound without any numerical rank tolerance. The lower
pivot output still contains `K_J B a_N`; it is not omitted from the replay.

The kernel in (2) uses the input *before* A. It must not be confused with
the coordinates already stored in the literal encoded banks. For an
encoded input `z=A x`, unchanged P is correct exactly when

```
z_first,N=0, z_second,N=B^t z_first,J.
```

The second pivot bank and all borrowed helpers are arbitrary. This follows
by applying A to (2). The same conditions hold after P, because its added
term on the N bank is zero on this subspace.

Removing Pi gives the ordered commutator `[-H 0; K(D-I) H]`.
For this D its kernel instead has `a_N=0` and `b_N=-K_N B^t a_J`,
with both pivot inputs free. It has the same rank 192d but a different
kernel. Thus a successful rank comparison alone cannot bind the literal
slot convention; the checker also compares every endpoint coefficient.

## 4. Changed consumer: arbitrary linear summaries

Now allow a much more permissive repair than a uniform bank multiplier.
After the old operation, let `s=P A x`. Require the repaired state to be
`A P x`, with every physical bank and helper returned at this boundary.
Since D is invertible, the unique full-state linear repair is

```
R = A P A^-1 P^-1,
R-I = -E A^-1 P^-1, rank(R-I)=192d. (4)
```

The changed consumer receives an input-independent linear summary `U s`
in `k` arrays, and its *entire additive increment* is a linear function
`V U s`. The unchanged s is retained as the identity passthrough. Thus its
contract is `R(s)=s+VUs`. Rank submultiplicativity and (4) imply

```
192d = rank(R-I) <= rank(U) <= kd, so k >= 192. (5)
```

This bound even grants free formation and communication of U and ignores
scratch restoration costs. Requiring a real arbitrary-dirty implementation
cannot weaken it. It is a lower bound on the total linear information
factoring the increment, **not on simultaneous scratch storage**, native
child rank, scalar operations or native calls. Streaming with repeated
reads, a changed producer, changed output equivalence, or nonlinear coding
needs its own model. There is no claim that an arbitrary in-place algorithm
needs 192 live scratch arrays.

The information bound is sharp algebraically. Write the two current banks
as `(r,w)`, and form exactly two 96-array summaries

```
v = r_N, e = w_N-B^t r_J,
u = (K_N+T_N)v-e.
```

Then the complete repair is

```
r'_J = r_J,
r'_N = r_N + K_N u,
w'_J = w_J - K_J B u,
w'_N = w_N + u-K_N v, (6)
helpers' = helpers.
```

Indeed, set `(a,b)=A^-1 P^-1(r,w)`. Direct inversion using the displayed
D^-1 gives `a_N=u` and `b_N=v`. The complete defect on these coordinates
is `(-K_N u, K_J B u, -u+K_N v)` on the respective nonzero output blocks.
Subtracting it proves (6). Operator order is retained throughout; in
particular `K_J B` is not changed to `B K_N`. Both summaries can range
independently over all 192 arrays (set `r_J=0`), and the increment map in
(6) is injective on them, consistent with (5).

Equations (4)--(6) are a factorization of a uniquely forced map, not an
affordable physical implementation. A borrowed summary register starts
with independent dirt eta: replacing `Us` by `Us+eta` adds `V eta`.
Here V is injective, so nonzero eta necessarily contaminates the endpoint.
Any dirty echo or cleanup must cancel that contribution and be priced.
The 72 existing helpers are untouched in (6), but they do not automatically
provide 192 clean summaries. No clean-scratch hypothesis is hidden in the
claim of arbitrary dirty *existing-helper* restoration.

## 5. Complete finite scope

The retained physical port label p has chart
`T_p=((1+i)I+(1-i)X_p)/2`. In the character basis its eigenvalue is
`i^(ell.p)` and K's is `i^(-ell.p)`. For a fixed nonzero row-fiber label q
in the 81-bit tensor address, the chart labels are `p tensor q`. Contraction
of a tensor character with q maps onto every `ell in F2^9`, each with
`2^72` preimages. To see surjectivity, choose a coordinate where q is one
and place ell in that column, with all other columns zero.

The checker therefore covers all distinct address-character blocks of one
full physical row fiber by the 512 nine-bit ell values, without materializing
`2^81` addresses. For each value it literally composes `P A` and `A P` on
all 208 data and 72 dirty basis inputs and applies (6) to the former. Basis
values are scaled by four to keep this exact finite calculation in Gaussian
integers; no rounding occurs. The written linear proof covers arbitrary
payloads, all address dimensions and arbitrary invertible T satisfying the
stated premise. It is not an inference from finitely many sampled payloads.

`algebra.py` imports no main checker. Dense rational multiplication and
Gaussian elimination test (1) for all 512 binary 3-by-3 D matrices and
all four coordinate projections H. A two-dimensional address fixture has
noncommuting T blocks and `DT != TD`; the literal defect and the full repair
both have rank eight. Altering one pivot entry raises the rank to nine.
Dropping `HT=TH` invalidates the simplified literal formula; dropping
idempotence invalidates the slot involution. These are corroborating finite
checks of the written proof, not independent human or formal-kernel review.

## 6. Cost decision

The complete boundary obligations are explicit:

| Obligation | Status |
| --- | --- |
| Literal action on both banks, including pivot outputs | Proved by (1)--(6); exact finite replay |
| Identity on 72 independently dirty existing helpers | Proved for this boundary extension and replayed |
| Minimum information for the linear-summary increment | Exactly 192 arrays in the relaxed algebraic model |
| Summary formation, a chronological producer and legal chart access | Unknown physical implementation |
| New scratch initialization, dirty compensation and eventual restoration | Unknown physical implementation |
| Native chart conversions, owners, scalar passes, routing, storage, precision | Additional unpriced obligations |
| Complete supplier moment and all-size admission | Not supplied |

The inherited PR3954 scaffold already fails its favorable rank-mass gate
by 44,096 before extra boundary costs; that predecessor rejection is not
new evidence here. We make no recursive invoice edit, so the signed-invoice
preflight has no new pair of complete invoices to compare. In particular,
192 information arrays cannot be entered as 192 native tariff units.
Stop after the information obligation. A future changed producer/consumer
must supply a new favorable complete bill before construction expansion.
157 changes: 157 additions & 0 deletions research/p104-literal-repair-rank/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# P104 literal correction needs 192 arrays of repair information

The full error from applying the old correction to PR3954's literal encoded
P104 banks has rank **192d**, where one array has complex dimension d. Its
data kernel has dimension **16d**. Extending both maps by identity on all
72 arbitrary dirty helpers leaves rank 192d and gives kernel dimension 88d.

This strengthens the previously stated **first-bank** rank 96d to the full
two-bank boundary. It also answers a changed consumer question: any additive
repair whose entire increment factors through k array-sized linear summaries
needs **k >= 192**, even when those summaries are granted for free. An
explicit algebraic factorization attains 192. This is a scoped proof and
source-bound finite audit, not a native-call count, scratch-space lower bound,
complete physical correction, supplier or new kappa.

## Boundary and result

Retain the predecessor notation

```
P=[I 0; T^-1 I], L=[D HT; 0 I], Pi=[I-H H; H I-H], A=Pi L.
```

The wrong order gives `PAx`; the required order is `APx`. With `H^2=H`,
`HT=TH`, and invertible T, the complete defect E has the exact formula

```
rank(PA-AP) = 2 rank(H) + rank((I-H)(D-I)(I-H)).
```

The last rank is restricted to the complementary subspace, equivalently
computed in the whole space with zeros elsewhere. For the actual P104
pivot block `D_JJ=I_8`, it vanishes. The two N-bank input/output submatrix
is invertible:

```
[ -T_N^-1 0 ]
[ -I T_N^-1 ].
```

Every pivot input column is zero in E. The 16-dimensional data kernel is
therefore exact, not just a dimension count from the first output bank.
In pre-encoding coordinates it consists of inputs supported on the pivot
ports in both banks. In already encoded coordinates the equivalent condition
is `first_N=0, second_N=B^t first_J`; these are different coordinates.

The unique repair after the wrong operation is `R=APA^-1P^-1`. Thus
`rank(R-I)=192d`. If `R(s)=s+VUs`, the summary Us must have dimension at
least 192d. [PROOF.md](PROOF.md) supplies the kernel proof, a sharp explicit
summary factorization, dirty-state implications and the complete obligation
ledger. No commutation of D with T is assumed.

## Exact evidence

The new checker imports no predecessor executable. It reconstructs the 120
doubled E8 representatives, removes the two pinned frames, orders the 104
ports, reconstructs B and D, and binds the retained physical labels to every
Gram pairing. It checks all **512 phase patterns**, executing both operation
orders on **280 basis inputs each: 143,360 columns**. It checks the full
defect, its explicit invertible minor, the complete kernel, the postprocessor
and every dirty return. This covers all distinct character blocks of a fixed
nonzero physical row fiber; the proof explains the tensor contraction.

[RESULT.json](RESULT.json) stores every pattern's exact-column digest and
the complete typed receipt. Digests summarize already compared coefficients;
they do not replace operator comparisons. Default replay is read-only.

A separate dense rational checker, [algebra.py](algebra.py), tests all 2,048
combinations of a binary 3-by-3 D and a coordinate projection H. Its larger
address-block fixture uses noncommuting chart blocks and checks the full
repair directly. Changing one pivot entry raises its rank from eight to nine.
Dropping the H/T commutation or projection hypothesis fails the appropriate
identity.

Seven further semantic controls reject a missing second-bank defect, a
first-bank-only repair, a rank-preserving sign error, the same-rank ordered
encoding in place of the literal slots, leaked or erased helper dirt, and
an uncancelled dirty summary. A dense Gaussian fixture includes nonzero
independent helper contents; every one of the 192 summary-dirt basis
directions has a nonzero output response. These are separate implementations in one
AI-assisted session; no independent human or proof-kernel review is claimed.

## Reproduce

Python 3.12, standard library only, from the repository root:

```sh
python3 -B scripts/research_package.py --package research/p104-literal-repair-rank --check-only
python3 -B scripts/research_package.py --package research/p104-literal-repair-rank
```

The registered replay runs the main check normally and under `-O`, followed
by the separate algebra check. Direct commands also work in a source-complete
Git-free export:

```sh
python3 -I -W error -B research/p104-literal-repair-rank/verify.py
python3 -I -O -W error -B research/p104-literal-repair-rank/algebra.py
```

The main marker is
`PASS_P104_LITERAL_REPAIR_RANK rank=192 data_kernel=16 dirty_helpers=72 characters=512 columns=143360 summary_arrays=192 controls=7 no_new_kappa`.
`verify.py --emit` prints a newly derived receipt without modifying files.
Source SHA256 and Git blob IDs are checked before and after the main replay.

## Decision and limits

Task `p104-side-correction`, scope **refined**, priority revision 7; base
`32890bc5de034ab8fc93ac88ead7279a6a416d04`. The question follows the literal
slot finding in [discussion #1166](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19057044)
and its original [adjacent-pair handoff](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19034066).
The claim is in [discussion #1166](https://github.com/CrocSwap/integer-mult-bounds/discussions/1166#discussioncomment-19173713).
The changed consumer admits arbitrary linear summaries instead of only a
uniform scalar repair. Predecessor block identities and the old first-bank
defect retain their credit; the complete rank, kernel and sharp summary
contract are the addition.

**Narrow and stop.** The existing 44,096-excess scaffold remains rejected.
We neither convert information rank into a recursive tariff nor propose a
changed paid profile. Summary production, new scratch restoration, actual
chart availability, native phase lowering, owners, physical scalar/movement
costs, precision, the complete moment and all-size admission remain open.
The 72-helper identity extension does not execute their earlier native
completion. No full original-word or selected cold replay, Lean or Docker
run is part of this audit. The selected record remains unchanged.

## Open next questions

Can a concrete caller use the two summaries in PROOF.md's equation (6)
without paying for a full decode? First name the physical chart, owner,
available value and dirty state for `r_N` and `w_N-B^t r_J`, then derive the
complete acquisition, output and restoration bill. This determines whether
the algebraic factorization is physically useful. An actual prepared caller
and a newly favorable full budget are blockers; the unchanged failed
scaffold does not justify a further implementation search. Repeating the
rank calculation or adding phase patterns cannot resolve those obligations.

## Credit

Chris R / Clear1nsight's PR3954, head
`f1e2839819959cd0534d008be91ed5b79ec55a6a`, supplies the physical encoding,
slot swap, correction, pivot block and failed scaffold, following
PR3882/3940/3943. Unpaidmoon's PR4133, head
`88666f1dee93fbd85b31fd5d6f91a219e111b5f4`, supplies the general literal
commutator and uniform-scalar obstruction. PR4370 concerns the different
helper-completion gate; PR4339 corrects the different fiber-tag orientation.
Neither is claimed as new coverage here.

Retain Rohan Arun / PR1972, Chafik Boukhalfa / PR1991, Adam Gall / PR1940,
Josie Elliston / PR1071, and the E8, native, Clifford and caller contributors
credited by the pinned sources. The previous commdata2338 P104 acquisition,
matching, native transport and precision contributions have different scopes.
Rank-nullity and linear factorization are standard tools; only their stated
complete-boundary application and checking are new here.

Prepared for commdata2338 (@commdata2338), with substantial OpenAI Codex assistance.
New work is Apache-2.0. No independent human review is claimed.
Loading