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
7,292 changes: 7,292 additions & 0 deletions research/qq16-current-frame-consumer/OLD-FRAME-WORD.json

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions research/qq16-current-frame-consumer/PREDECESSORS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"sources": [
{
"pull_request": 2492,
"head_commit": "9cc0d4d60819ddd246c9db9549f8ae4a61b68e45",
"source_path": "research/qq16-l2-native-reconstruction/native_support.py",
"git_blob": "98a40a898001f83661cd939bbee90acf7b69e867",
"sha256": "02b186e2d2619a285769dfe1133306d7714831215080ffe4b7e98d321e66fa55",
"path": "research/qq16-current-frame-consumer/evidence/PR2492-native_support.py",
"role": "Retained predecessor source, explicitly adapted and credited; its old-F_L output contract remains distinct."
},
{
"pull_request": 2492,
"head_commit": "9cc0d4d60819ddd246c9db9549f8ae4a61b68e45",
"source_path": "research/qq16-l2-native-reconstruction/verify.py",
"git_blob": "05d62b9eb066cc39a8b0dfa71974930f5b034519",
"sha256": "6f3450e80d535137cc522e81937e70841a6f8b48075b2978a047a3acdfdc8961",
"path": "research/qq16-current-frame-consumer/evidence/PR2492-verify.py",
"role": "Retained predecessor source, explicitly adapted and credited; its old-F_L output contract remains distinct."
},
{
"pull_request": 2492,
"head_commit": "9cc0d4d60819ddd246c9db9549f8ae4a61b68e45",
"source_path": "research/qq16-l2-native-reconstruction/README.md",
"git_blob": "f7729d0e6fe49f9c4226a4a287c75178a00d51ae",
"sha256": "af2027ed82e6c8326280e697b98ad3ab246eb620d7816badc305248f7924c531",
"path": "research/qq16-current-frame-consumer/evidence/PR2492-README.md",
"role": "Retained predecessor source, explicitly adapted and credited; its old-F_L output contract remains distinct."
}
],
"credit": "ywz65 / PR2492 with substantial OpenAI Codex assistance; original L2 identity by thakrarsagar / PR2470, QQ16 by Ali Romman / PR1969, preceding native read methods by ywz65 / PR2468."
}
173 changes: 173 additions & 0 deletions research/qq16-current-frame-consumer/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# A current-frame owner map and two exact L2 endpoints

All operators and fields below use the pinned PR1969 QQ16 contract. This is a
local construction with two explicitly different endpoints, not a full decoder
or a supplier invoice. PR2492's old-frame construction remains valid.

## 1. Native objects and the changed map

Let the common coordinate dimension be 73, `L=<e_0,...,e_8>`,
`E=<e_9,...,e_16>`, and `U=L+E`. At owner d, for any axis vector v, use

```
C_(dv) = ((1+i)I + (1-i)T_(dv))/2,
F_U = product_(j=0,...,16) C_(d e_j).
```

The line's multiplier on a character w is `i^parity(w dot dv)`. Products of
these lines commute. The formulas tensorize over every payload layer.

For each relevant port p, let `g_p=rho_1(p)` be the **actual** current-chart
73-bit owner matrix, and let delta_p be the source's old-cut alignment shift.
The source provides its inverse shift `g_p delta_p`. The verifier reconstructs
g/delta from the pinned phase source, compares them to the current B_1_2 map
registry, and checks `g_p^2=I` and orthogonality. Define the new map

```
b_p = delta_p + g_p delta_p (binary addition),
B_p = M(g_p,b_p),
(M(g,b) f)(d,z_1,...,z_lambda)
= f(dg,z_1+d b,...,z_lambda+d b).
```

Thus `g_p b_p=b_p`, so B_p is its own actual inverse, including the payload
translation. This is a different physical map from the old alignment for all
104 ports. The logical owner action is still `D_p f(d,...)=f(dg_p,...)`.

The crucial new identity is

```
B_p F_U = F_U D_p. (1)
```

It does **not** follow by replacing a chart index in the old F_L alignment.
For identity owner and one character w, (1) is exactly

```
sum_(j=0,...,16) parity(w dot g_p e_j)
+ 2 parity(w dot b_p)
= sum_(j=0,...,16) parity(w dot e_j) mod 4. (2)
```

`verify.py` checks every coefficient of (2) for all 104 actual source records
using the retained phase representation. Separately it evaluates the literal
parities on the zero character, all 73 singleton characters and all 2,628
two-bit characters: 281,008 comparisons. This is complete, not sampling:
modulo 4, parity of a subset is its degree-one sum minus twice the sum of its
degree-two products, since all higher terms are divisible by 4. The constant,
linear and quadratic coefficients are determined by these evaluations.

For arbitrary owner d, replace w by its pullback along d. For multiple tensor
layers, multiply the per-layer identities. Fourier characters span arbitrary
payload arrays. This proves (1) on arbitrary arrays and owners under the
retained common-label cover action. Both logical owner change and payload
translation are included. The receipt supplies an actual character witness
rejecting the old delta_p in place of b_p for every port.

## 2. Inputs, outputs and word

There are 200 independent borrowed inputs at the immediate post-B1 cut:

| Fields | Number | Frame | Logical content |
|---|---:|---|---|
| X_p, p in ordinary U_ports | 96 | F_U | X2_p |
| Y_p, p in ordinary U_ports | 96 | F_U C_qp^-1 | Y2_p |
| T_t, t in selected T_ports | 8 | F_L | retained x1_t |

`U_ports` is the 96-port set, distinct from the coordinate subspace U above.
All source arrays are arbitrary. There are 96 exclusively owned output arrays
Z, whose old contents are discarded, and one exclusively owned local scratch
C. Capture, retention and delivery of the eight T inputs are assumed. They are
not proved free or newly supplied by this word.

The literal shared prefix is as follows.

1. Normalize Y with C_q, clear Z in F_U, add X and Y, and restore Y with
C_q^-1. Each Z now contains X2+Y2 in F_U; X and Y are restored.
2. Apply positive F_E to the eight T inputs. Since `F_E F_L=F_U`, all fields
used by the correction have the same current frame.
3. Apply B_p to every Z and T. By (1), their physical frame stays F_U and their
logical content receives D_p. Every complete cover-map sweep finishes.
4. At each owner, execute the entire private body before moving to another
owner. For k=0,...,7, clear C, form `C=sum_t R[k,t] D_t T_t`, add
`-R[k,p] C/4` to every relevant Z_p, and clear C. All scalar operands have
frame F_U. T remains unchanged during the body.
5. Undo B_p on T and Z, then undo F_E on the eight T inputs. The scratch is
zero and all 200 borrowed sources have their original content and frame.

The physical Z frame is F_U, and its logical content at this named checkpoint is

```
Z_p = X2_p + Y2_p
- sum_t (R_U^T R_T)[p,t]/4 D_p^-1 D_t x1_t = x1_p. (3)
```

The last equality is PR2470's L2 identity, inherited from the QQ16 backward
contract: `X2_U=x1_U-y1_U` and
`Y2_U=y1_U+K_(1,U) ell_(1,T) x1_T`. We do not claim it as new.
The ordered owner product is essential; actual g_p and g_t are not silently
commuted. The verifier tracks all 200 independent source symbols through the
word with their actual composed owner matrices and checks every output row.

Two fixed epilogues are certified, with the same prefix and ownership:

- **Current-frame consumer:** apply `Z_p -= X_p` for every ordinary port.
This costs 96 unit ADDs and no new native child because both arrays already
have frame F_U. The final output is y1_U in F_U. X remains read-only, and
the same 96 owned Z arrays hold the result; no extra output bank is hidden.
- **Old-frame endpoint:** instead apply F_E^-1 to each Z. The logical result
remains x1_U and the frame becomes F_L. This exactly matches PR2492's local
output/source contract and uses the same inherited positive-child grammar.

The staged consumer exposes the x1 checkpoint before consuming it. Its bill is
for that word; no shortest scalar circuit is claimed.

## 3. Native lowering and complete local counts

For each odd local q, the inherited signed line recipes use one positive
rank-one child plus two monomial wrappers. The inverse identity is
`C_q^-1=T_q C_q`. The source-bound Gaussian checker tests both signs on every
512-column local basis for the 104 source port lines; only the 96 Y lines are
used in this new word.

Let P swap axes 0..7 with 9..16 and fix the other 57 axes. Then

```
F_E = P F_8 P^-1,
F_E^-1 = T_(e9+...+e16) P F_8 P^-1.
```

Each sign costs one positive rank-eight child plus two monomial wrappers, with
the inverse translation fused into the left wrapper. At owner d the full
recipe is conjugated by d. The checker compares all 65,536 active inverse
kernel coefficients with eight inverse line factors and checks the full
73-axis wrapper. This is the same local child grammar used by PR2492.

| Charge | Current x1 checkpoint | Current y1 consumer | Old-frame x1 endpoint |
|---|---:|---:|---:|
| positive rank-one children | 192 | 192 | 192 |
| positive rank-eight children | 16 | 16 | 112 |
| native rank mass | 320 | 320 | 1,088 |
| native monomial wrappers | 416 | 416 | 608 |
| full-cover maps | 208 | 208 | 208 |
| unit ADDs | 224 | 320 | 224 |
| quarter ADDs | 384 | 384 | 384 |
| CLEARs | 112 | 112 | 112 |
| real scalar primitive allowance | 6,624 | 7,392 | 6,624 |

The scalar allowance is evaluated from the authenticated source function:
unit ADD=8, quarter ADD=12 and CLEAR=2. All three columns use 96 owned outputs,
one local owned scratch and 200 restored borrowed arrays. The maps are actual
new M(g,b) operations, not free frame annotations; 208 cover operations are
included. Their physical stream/tape costs remain unpriced.

PR2492's old-frame x1 endpoint has 400 rank-one and 96 rank-eight children,
mass 1,168, 992 wrappers, the same 208 cover maps and scalar allowance 6,624.
The old-frame column here reduces native rank mass by exactly 80 and wrappers
by 384 under identical endpoint and child grammar. Comparing 320 with 1,168
instead changes the output frame and consumer contract and must say so.

These are local upper invoices, not global recursive excess costs or complete
physical runtime estimates. New cover-map shifts, child placement, precision,
retained-record lifetimes, output use/retirement and the full controller still
require admission. No storage saving, complete decoder or new kappa follows.
94 changes: 94 additions & 0 deletions research/qq16-current-frame-consumer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# QQ16 current-frame L2 reconstruction and consumer

This package constructs 104 actual owner maps that preserve the full current
frame `F_U1`, uses them to recover `x1_U` from the L2 interface, and consumes
that result in place to obtain `y1_U`. The complete staged consumer uses native
rank mass **320** and real scalar primitive allowance **7,392**, including its
96 final ADDs. All **200 borrowed source arrays are restored**; its 96 outputs
and one local scratch are exclusively owned.

An alternative fixed epilogue returns `x1_U` in the old frame `F_L`, exactly
matching [PR2492](https://github.com/CrocSwap/integer-mult-bounds/pull/2492)'s
local output contract. Under the same positive-child grammar, its native rank
mass is **1,088 versus 1,168**, with the same scalar allowance and map count.
These are local invoices; the new cover maps still need physical admission.

## Construction and endpoints

For each source current-chart owner matrix `g=rho_1(p)` and old alignment
translation `delta`, the new map is `B_p=M(g,delta+g delta)`. It is self-inverse
and satisfies `B_p F_U1 = F_U1 D_p` on arbitrary arrays, owners and payload
layers. The proof checks the actual 73-bit phase, not only a constant slice.
All 104 old translations fail this new covariance identity.

The word normalizes and restores the 96 borrowed Y fields, upgrades only the
eight retained T fields to `F_U1`, applies the new owner maps, and performs the
L2 correction with one private scratch. It then reverses the owner maps and T
upgrade. The 96 owned Z fields contain `x1_U` in `F_U1`. The default epilogue
subtracts the unchanged current X fields to produce `y1_U`; the alternative
converts Z to `F_L` instead. [PROOF.md](PROOF.md) gives the exact contracts,
ordered owner algebra, native child lowering and all counts.

| Complete endpoint | Current `y1_U` | Old-frame `x1_U` | PR2492 old-frame `x1_U` |
|---|---:|---:|---:|
| Positive rank-one children | 192 | 192 | 400 |
| Positive rank-eight children | 16 | 112 | 96 |
| Native rank mass | 320 | 1,088 | 1,168 |
| Native monomial wrappers | 416 | 608 | 992 |
| Full-cover maps | 208 | 208 | 208 |
| Real scalar primitive allowance | 7,392 | 6,624 | 6,624 |

The last two columns have identical endpoints and child grammar. The first
column changes the output frame and includes a different consumer. The staged
word exposes an `x1_U` checkpoint; no shortest scalar circuit is claimed.

## Evidence and reproduction

[WORD.json](WORD.json) and [OLD-FRAME-WORD.json](OLD-FRAME-WORD.json) are complete
1,235-event words. [RESULT.json](RESULT.json) records both exact symbolic
replays, the native kernels, map matrices/translations and twelve rejected
semantic faults. A separate literal-parity check performs 281,008 comparisons
on zero, singleton and two-bit characters. These determine the full modulo-4
quadratic phase polynomial, so this check is complete for that identity.
Tests also reject late owner alignment, private-scratch escape, missing or
modified receipts/words, and source drift; a Git-free export replays read-only.

From the repository root, with Python 3.12 and no third-party dependencies:

```sh
python3.12 scripts/research_package.py --package research/qq16-current-frame-consumer
python3.12 -I -B -O research/qq16-current-frame-consumer/verify.py
python3.12 -I -B -O research/qq16-current-frame-consumer/test_verify.py
```

On Windows, point `TEMP` and `TMP` at a writable directory for the temporary
export tests. Source commits, Git blobs and SHA-256 pins are in
[SOURCES.json](SOURCES.json); retained predecessor bytes and attribution are
listed in [PREDECESSORS.json](PREDECESSORS.json). The immutable selected archive
and selected record are unchanged.

## Limits

The eight earlier T arrays must already have been captured and delivered.
This is no retention saving, full 224-input decoder, global controller, physical
runtime estimate, precision bound or new kappa. The 208 maps are charged as
actual full-cover operations; tape movement and recursive placement remain
unpriced. Owned output clears do not license clearing a borrowed helper.

## Open next questions

The next useful steps are to place the new maps and children on actual owners
with a complete stream/precision invoice, and to bind the remaining decoder
components to the current-frame output. [TASK.json](TASK.json) records those
questions, blockers, the original consolidation draw and the justified pivot.

## Credit

Prepared by ywz65 with substantial OpenAI Codex assistance. The new map and two
endpoints build on ywz65's PR2492 native reconstruction (exact head
`9cc0d4d60819ddd246c9db9549f8ae4a61b68e45`) and PR2468 query lowering. Verifier
and native-support code are explicitly adapted from those packages; retained
PR2492 bytes make that reuse inspectable. The L2 identity is credited to
thakrarsagar's [PR2470](https://github.com/CrocSwap/integer-mult-bounds/pull/2470);
the underlying QQ16 contract and local-word source are AliRomman's PR1969.
PR2492 remains correct. New work is Apache-2.0; retained source notices remain.
Loading