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
69 changes: 69 additions & 0 deletions research/qq16-line-normalized-decoder/PREDECESSORS.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"schema_version": 1,
"files": [
{
"local": "vendor/pr2681/verify.py",
"source_path": "research/qq16-zero-retention-comparison/verify.py",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "71f9a010553691e892703e3ec8d5eedf3e48d72b7f6af24b954a5442f4a52ccf",
"git_blob": "99bd60a9139b4d7ef070b69f38a954e64e0f8aa1"
},
{
"local": "vendor/pr2681/WORD.json",
"source_path": "research/qq16-zero-retention-comparison/WORD.json",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "f02e57d238f127c8fd195dc6a4a9dce6db6bee9f6050bd9d5b9c14cf6e1946d0",
"git_blob": "80de97cf168441a888e7d05fc2c3cace919f31ec"
},
{
"local": "vendor/pr2681/RESULT.json",
"source_path": "research/qq16-zero-retention-comparison/RESULT.json",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "e4f3ff28be27f96c341b225a62a2ba84d3907ed3466122d18bcaaf5a60da740e",
"git_blob": "a16a8f9a23cd00c9030f9b03cf0ae52c0ff4b526"
},
{
"local": "vendor/pr2681/SOURCES.json",
"source_path": "research/qq16-zero-retention-comparison/SOURCES.json",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "30a88d8bf33c603836fffdcab3c3dabf663b98f2deda95893685e394c60ea95c",
"git_blob": "1db7201ed145d1ef3707ab24bb599d341439050d"
},
{
"local": "vendor/pr2681/README.md",
"source_path": "research/qq16-zero-retention-comparison/README.md",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "b658e00db095f1097b9ae7ec49d8dd465c1a317cdc84da4251cbdd3e0af597d3",
"git_blob": "c3d4d76b28fa47b86da37cc7428d5da362c7bf9a"
},
{
"local": "vendor/pr2681/PROOF.md",
"source_path": "research/qq16-zero-retention-comparison/PROOF.md",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "471f6360cdac94d9e1054c6c9530ace1822b11942f7e141dfd344864d2357862",
"git_blob": "38cd38aa1d342f3bfe0d6d7f3c388aff0352f370"
},
{
"local": "vendor/pr2681/references/PR2540-PROOF.md",
"source_path": "research/qq16-zero-retention-comparison/references/PR2540-PROOF.md",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "09d587f1d6bc250e90e29fa8751a40f45be79f1a8a56af0b645c144cefaefa46",
"git_blob": "6ae136c8baef4793f4f7ae630720afff6c23a953"
},
{
"local": "vendor/pr2681/references/PR2540-README.md",
"source_path": "research/qq16-zero-retention-comparison/references/PR2540-README.md",
"head_commit": "ea96706295631be10d92ae149b63c3e24acaeabc",
"pull_request": 2681,
"sha256": "07588c3863b8d686497d9c0b263c35c47424fa3b63d43b7c2e5f788bd31a8d3f",
"git_blob": "e91138fb0fabbc0fe0e9fd80ee189ed4366a0f61"
}
]
}
162 changes: 162 additions & 0 deletions research/qq16-line-normalized-decoder/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# A charged line normalization for the zero-retention QQ16 decoder

The predecessor is Arham Tahir's PR2681 at
`ea96706295631be10d92ae149b63c3e24acaeabc`. Its logical inverse, source
reconstruction, full-current observation contract, scalar schedule and
two-chart routing are retained with credit. Full-current invertibility is
already known. This result changes the physical implementation of that word.

## Exact boundary

At the completed B1 cut, the 112 current X fields have chart F17 and the 112
current Y fields have chart F17 C_q^-1. Here F17 is the product of the signed
Fourier line operators on address axes 0 through 16; q is the authenticated
nine-bit normal at the corresponding port. All 224 current fields are borrowed
and never written. The 224 eventual output banks are owned and may contain
arbitrary dirt, which the same paid CLEAR operations remove. At termination
they contain the original 224 logical input arrays, all in F17. No early
values, banks or output availability before B1 are assumed. At most sixteen
owned local scratch arrays are live. Their clearing/disposal contract is the
predecessor's owned-scratch contract, not reversible uncomputation of dirt.

The phase identities below are first stated on the same 73-dimensional
binary coordinate space. For every actual owner coordinate d, substitute
z -> d^T z in each character identity, as in the source's M(g,b) action.
An identity for every character remains an identity after that substitution,
and hence on every owner and every payload tensor factor. No owner coordinate
or payload factor is dropped or sampled.
The checker retains full routed operators on arbitrary arrays; constant
payload samples would not suffice. Logical state is represented separately
from its physical chart. Multiplying a physical array by a line operator
changes its chart and preserves its represented logical value. A cover map
changes the represented logical value by the authenticated address route and
changes the chart by the explicit phase rule below.

## Frame identity

For a list of pairs (v,c), define its Fourier-character phase at z by

phi(z) = sum c * <v,z> mod 4,

where each binary inner product is interpreted as 0 or 1. C_q contributes
<q,z>; a physical XOR translation X_b contributes 2<b,z>. Thus an orthogonal
involutive route g with its specified payload translation b takes a phase
list Phi to

move(Phi,g,b) = [(g v,c) : (v,c) in Phi] + [(b,2)].

The g at each port is reconstructed from the unchanged selected native source
and checked against the actual QQ16 registry, in both stages. This is a
physical payload alignment, not a substitution of a physical shift into the
logical route algebra. The represented logical operator remains g.

Let F16 denote the product of lines on axes 9 through 24. A stage-2 route swaps
the eight local directions orthogonal to q with axes 17 through 24, fixes q,
and leaves axes 9 through 16 unchanged. Consequently the image of the F17
frame has the same underlying orthogonal directions as F16 C_q. Their phase
polynomials may differ by an even linear character. Compute b_p from that
difference, and verify the exact identities

move(F17,g_p,b_p) = F16 C_q,
move(F16 C_q,g_p,g_p b_p) = F17. (1)

Equality here means equality of complete phase polynomials, including the
constant phase (both words have phase one at character zero). It is not
equality only up to phase or equality of spanned binary subspaces.

The constructor checks every one of the 112 actual ports. Independently, it
evaluates the literal character sums on zero, all 73 basis characters and all
2,628 pair sums. These determine these degree-at-most-two polynomials mod 4:
expanding XOR in such a phase has only linear terms mod 4 and even quadratic
terms; every term of higher degree is divisible by 4. This establishes (1)
on every character of the full address space. The same two methods check
the stage-1 maps preserving F17 with their own current-frame shifts. No
claim that the predecessor's F25 shifts work for these new frames is made.

## Literal lowering and restored intermediate frames

Begin with the complete 4,047-event predecessor word, regenerated and compared
with its retained WORD.json before lowering. Make only these physical changes:

1. Delete all 224 input upgrades to F25 and all 224 final downgrades to F17.
Normalization of the copied Y fields by the existing 112 positive C_q calls
is retained. The principal word therefore stays in F17.
2. Implement each stage-1 map with its F17-preserving affine shift.
3. At each stage-2 entry map on W_p, use (g_p,b_p), then a paid C_q^-1. This
gives chart F16. All 112 W fields and the eight active query scratch fields
are in that exact common frame throughout the future-query sweep.
4. After that complete sweep, apply a paid C_q to each W_p and the inverse
affine map (g_p,g_p b_p). This returns every W field to F17. Z fields stay
in F17 throughout; no scalar ADD crosses the different intermediate charts.

Every scalar ADD, CLEAR, private-scope event, logical route and its order are
unchanged. In particular the noncommuting stage-1/stage-2 order is unchanged.
Equation (1) proves that every changed map/line block implements the same
logical route as its source counterpart. Common-chart induction then proves
that every represented logical state at every scalar event is unchanged.
Both complete inverse orders on 224 free input arrays are replayed, including
the intermediate inverse-B1 checkpoint. The final physical chart is F17 for
every output. Borrowed arrays are untouched rather than temporarily changed;
all scratch ownership and disposal events are exactly the credited ones.

## Native positive children and phase

Each signed C_q is lowered using one positive rank-one child and two explicit
monomial wrappers. Choose a binary basis with first vector q. The positive
kernel has numerator 1+i at x and 1-i at x+q, common denominator two. For the
negative sign, an output XOR by q swaps those coefficients. Equivalently
C_q^-1 = X_q C_q; no negative child is declared free.

The checker verifies all 512 basis columns for each of the 112 normals and
both signs, including exact Gaussian coefficients and global phase. The
wrappers act identically on the remaining 64 coordinates, so these are full
73-coordinate operator identities. Every one of the 336 literal child
occurrences is bound to its signed recipe. Cover maps are affine monomial
permutations, with both translations retained. The phase operations are exact
members of the inherited finite Gaussian-dyadic alphabet. Approximate child
precision and physical address/control work require separate admission; an
ideal unitary identity does not establish a rounded whole-caller guarantee.

## Complete local comparison and bounded decision

The transformed word has 3,823 events, 336 positive rank-one children and no
rank-eight children. There are 672 native monomial wrappers, 464 full-cover
maps, 1,808 signed unit ADDs, 896 signed quarter ADDs and 312 CLEARs. The
inherited real scalar allowance is

8*1808 + 12*896 + 2*312 = 25840.

These scalar coefficients and that allowance are unchanged from PR2681.
Both words use 224 eventual output banks, at most sixteen local scratch banks
and zero early retention. The old 448 H8 calls are replaced by 224 H1 calls;
all 112 original line normalizations remain. The profile is a constructive
finite upper bound, not an optimum or a placement/tape invoice.

Against PR2540's same-endpoint 224 H1 + 16 H8 decoder, the numerator of the
child-moment difference at the same parent width is

112 - 16*8^(1-a).

For 0 <= a <= 1/16 this is strictly negative, because
8^15 = 35184372088832 > 33232930569601 = 7^16. Raising positive numbers to
the sixteenth power preserves order; hence 8^(15/16)>7. This includes the
small saving parameters of the selected regime, without asserting a new
selected bound. At a=0 the rank mass is 336 instead of 352.

The comparison also has 192 more monomial wrappers, 256 more cover maps and
8,368 more scalar primitive allowance than PR2540. These are real liabilities,
not zero-cost terms. Whether their physical implementation is favorable is
unknown. The newer output-bank coalescing of PR2651 changes the retained-bank
comparison but still keeps sixteen values across B1; it does not erase these
child and physical-cost distinctions.

Revision-5 decision: retain one local module. The previous recipe's negative
child-cost comparison is not a barrier to zero retention. Do not expand this
construction into a supplier without a named consumer, complete physical
map/wrapper/control prices, legal ownership/lifetimes and rounded precision.
Inherited F0/B1 execution and output consumption also remain paid obligations.
No new kappa, all-size supplier, native hosting or optimality claim follows.

Arham Tahir/PR2681, ywz65/PR2540, the QQ16 authors and retained source/native
lineage keep their attribution. New frame lowering and evidence prepared by
ywz65 with substantial OpenAI Codex assistance. Apache-2.0.
111 changes: 111 additions & 0 deletions research/qq16-line-normalized-decoder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Zero-retention QQ16 decoding with paid line normalizations

This implements PR2681's same logical decoder with **336 positive rank-one
children and no rank-eight children**. Its published two-chart implementation
uses 112 rank-one and 448 rank-eight children. A source-exact change of the
intermediate physical frame replaces those 448 upgrades/downgrades with 224
charged rank-one normalizations. All 224 original logical arrays still return
in F17, all 224 current borrowed arrays remain untouched, and no value is
retained across B1.

The new step is the dynamic frame identity at every one of the 112 actual
ports. The stage-2 route, with an explicitly computed affine translation,
takes F17 to `F16 C_q`, where F16 uses address axes 9 through 24. A paid
`C_q^-1` places the row in the common F16 frame for the query. A paid `C_q`
and inverse affine map restore F17. The complete word and each native child
occurrence are checked; the old scalar schedule is preserved.

Full-current invertibility, the logical inverse and the scalar word are
credited to [Arham Tahir's PR2681](https://github.com/CrocSwap/integer-mult-bounds/pull/2681)
at `ea96706295631be10d92ae149b63c3e24acaeabc`, which answers
[PR2540's comparison question](https://github.com/CrocSwap/integer-mult-bounds/pull/2540).
They are not claimed as new. The retained checker supplies the authenticated
source reconstruction and routed algebra. [PROOF.md](PROOF.md) proves the new
frame identity, complete word refinement and exact child-moment comparison.

| Added local charge | PR2540 | PR2681 | This word |
|---|---:|---:|---:|
| Values retained across B1 | 16 | 0 | 0 |
| Positive rank-one children | 224 | 112 | 336 |
| Positive rank-eight children | 16 | 448 | 0 |
| Native rank mass | 352 | 3696 | 336 |
| Native monomial wrappers | 480 | 1120 | 672 |
| Full-cover maps | 208 | 464 | 464 |
| Real scalar primitive allowance | 17472 | 25840 | 25840 |
| Owned eventual outputs | 224 | 224 | 224 |
| Peak owned local scratch | 16 | 16 | 16 |

Against PR2540, the child-moment difference has numerator
`112 - 16*8^(1-a)`, strictly negative for `0 <= a <= 1/16`. The proof uses
the exact integer inequality `8^15 > 7^16`. **This is a child-cost comparison**:
the extra 192 wrappers, 256 maps and 8,368 scalar allowance remain liabilities.
Physical placement, movement, precision and a complete consumer invoice are
unknown. The newer PR2651 output-bank coalescing retains sixteen early values
without a separate bank; this result uses no early values at all.

## Exact evidence

The 3,823-event [WORD.json](WORD.json) has 336 line children, 464 cover maps,
1,808 unit ADDs, 896 quarter ADDs and 312 CLEARs. All 224 input-array operators
pass both inverse orders; the intermediate inverse-B1 checkpoint, arbitrary
owned dirt, actual scalar frames, borrowed restoration and scratch disposal
are checked. The output operator digest equals the exact retained predecessor.

The new physical evidence checks:

- Full phase-polynomial entry and exit identities at all 112 ports for both
stages, plus 1,210,496 separate literal character equalities determining
those degree-two phase polynomials on the full 73-coordinate space.
- All 114,688 signed rank-one basis columns, including Gaussian coefficients,
global phase, negative-child XOR wrappers and all 336 literal occurrences.
- Eleven semantic controls covering missing/wrong line normalization, wrong
normal, old frame shifts, wrong inverse shifts, failed restoration, owned
dirt, borrowed writes, scratch leaks, an inverse sign and a native wrapper.

```sh
python3.12 -I -O -B research/qq16-line-normalized-decoder/verify.py
python3.12 -B scripts/research_package.py --package research/qq16-line-normalized-decoder
```

The default replay is read-only. `--write` requires both output receipts to be
absent. Sources are authenticated with SHA-256 and Git blobs before compiling
the captured predecessor verifier bytes; no imported `.pyc` is trusted.
The predecessor's unchanged code, word, receipt and notices are retained in
`vendor/pr2681/`, with complete pins in [PREDECESSORS.json](PREDECESSORS.json).
Main scientific inputs are pinned in [SOURCES.json](SOURCES.json). A Git-free
export is supported with those exact files.

## Scope and expansion decision

Milestone: **local module**. This is a changed physical implementation of one
completed finite decoder. The favorable child moment reopens PR2681's local
cost decision; it does not admit a complete supplier. The full inherited
F0/B1 calls, all affine map and wrapper work, storage/ownership, rounded
precision and output consumer remain separate paid obligations. Native line
identities are ideal exact operators in the existing finite Gaussian-dyadic
alphabet; they do not prove a rounded strict-zero or physical tape contract.
No selected frontier, new kappa, optimality, formal-kernel or human-review
claim is made.

The verifier-engineering picker was preserved; TASK.json records the bounded
pivot after nearby acceptance audits were already covered. Canonical main
advanced to `1884c509efc004524786e9b7cfcc4aca572316d5` before this construction;
revision-5 guidance and the selected record were unchanged. The canonical
[advance claim](https://github.com/CrocSwap/integer-mult-bounds/pull/2681#issuecomment-6198194973)
records the source, boundary, comparison and stopping condition. Do not expand
without a pinned consumer and favorable complete physical allowance.

## Open next questions

1. Can an actual caller host the extra affine maps and wrappers, with all
movement, control and precision charges, within the child saving? Pin its
owner and output-consumer contracts before attempting that comparison.
2. What precision suffices for this changed literal word under that caller's
completed-child error contract? Existing bounds for different words do not
transfer merely because their ideal endpoints agree.

Credit Arham Tahir/PR2681, ywz65/PR2540, Ali Romman and the QQ16 contributors,
starship-s/PR2443, thakrarsagar/PR2470, Ross Richardson/PR2480, and the retained
PR2456/2468/2492/2512 source/native lineage. New work by ywz65 with substantial
OpenAI Codex assistance. Apache-2.0. Validation and independent agent review
are recorded in TASK.json; neither is independent human review.
Loading