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
10 changes: 10 additions & 0 deletions research/p104-tensor-word-audit/CERTIFICATE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"schema_version": 1,
"ports": 104,
"pivot_ports": 8,
"invoices": {
"boundary": {"add": 319488, "half": 43264, "double": 43264},
"coded_pair": {"add": 26240, "half": 3328, "double": 3328},
"reference_pair": {"add": 241280, "half": 41600, "double": 41600}
}
}
186 changes: 186 additions & 0 deletions research/p104-tensor-word-audit/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
# Source-bound audit of the actual P104 tensor words

## Scope, sources and operator order

Chris R / Clear1nsight's PR3979, scientific head
`a8a1d744811cd7d1f9c43ec7ccbae85ef9695b61`, supplies the construction, words,
counts and comparison audited here. Canonical main is
`20ecf2891d80b5acf18d980b2164fb44ea7faa90`. The new result is a compositional
exact check at the actual 104 ports and all 21,632 data coordinates. It is not
a new code, a criticism of the predecessor's written derivation, or a full
multiplication/native audit. The unchanged exported sources retain their
authorship and earlier P104/native/caller credit.

All arithmetic below is coordinatewise over the Gaussian dyadic ring
`R=Z[i,1/2]`, under the predecessor's common-FULL-chart scalar contract.
Temporarily modified donors must return. No physical chart transport or owner
reassignment is inferred. Number data by
`index(bank,i,j)=(bank*104+i)*104+j`. The first eight axis coordinates are the
original pivot ports `(0,1,3,6,22,31,93,103)`; the remaining ports retain
canonical lexicographic order. Operators act on column vectors, the rightmost
operator executes first, and `K_r=K tensor I`, `K_c=I tensor K`. Axis zero
varies i at fixed j; axis one varies j at fixed i.

The canonical P104 fixture is authenticated by SHA256
`516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4`.
The primary checker obtains the frozen source's actual words and B2=2B; the
independent checker reconstructs roots from a different full ternary/sign
enumeration and never imports a primary or predecessor executable. Both bind
all 768 B2 entries to SHA256
`88e9a726e8c8aec055bfd7cd024883b5c8ecbda0cd6471e591a08c43a108a535`,
using ASCII `json.dumps(b2,separators=(',',':'))` without a newline. This is the
explicit bridge between literal-word checking and the independently rebuilt
geometry, rather than agreement only on dimensions or support counts.

## Every literal event has an exact local meaning

The authenticated source builders generate four complete words: encoder,
decoder, coded Gram pair and specified uncoded reference Gram pair. No
predecessor evaluator, result routine or receipt supplies their semantics.
For every event the primary checker verifies opcode, arity, integer indices
and signed-unit ADD coefficient. Its localization checks that both donors and
recipients lie in the declared bank/fiber. Every word is consumed to its end;
truncation, extra events and a move to another fiber cannot be ignored.

On the 104 independent local coordinates, an exact sparse Fraction interpreter
certifies the four sweep maps `U,U^-1,U^t,U^-t`. On 208 independent two-bank
local coordinates it certifies the lower/upper M shears and lower/upper A
shears, including complete source return. These are eight distinct local maps.
Every other fiber's full localized event sequence is checked equal to its
certified pattern. Within a fixed sweep, different fibers have disjoint
supports, so these local maps compose to their stated global tensor factors.

The coverage is 416 encoder fibers, 416 decoder fibers, 16 coded-pair fibers
and 208 reference-pair fibers: **1,056 actual fiber instances**. The four
words together contain **763,392 literal events**, all checked. This is the
sum of one copy of each of the four audited words, not the length of a single
two-pair experiment. Pattern reuse avoids redoing identical arithmetic; it
does not replace inspection of any event or restrict input values.

Each event index is below `2*104^2`. Therefore the words extend by logical
identity on every additional independently arbitrary helper coordinate,
including the named 72-per-fiber auxiliary banks. This is stronger than
checking only zero dirt or two sentinels, but is solely a logical index fact.
It does not execute their physical completion, native return or ownership.

## Global algebra on all coordinates

Let P select the first eight coordinates. The independent reconstruction
checks the actual Gram matrix A, all B entries, and

```
U = [I B;0 I], U^-1 = [I -B;0 I],
A = U^t P U, M = U U^t, N = M^-1 = U^-t U^-1.
```

The encoder sweeps execute `U_c^-t` before `U_r` on X and `U_c` before
`U_r^-t` on Y. Thus their global map and the certified decoder are

```
L = U_r U_c^-t,
C = diag(L,L^-t), C^-1 = diag(L^-1,L^t).
```

There is no cross-bank slot permutation. The uncoded lower stage and subsequent
upper stage are

```
S = [I 0; A_r I], R = [I -A_c;0 I].
```

Their chronological pair is RS. The two-bank coded fibers implement

```
S_hat = C S C^-1 = [I 0; P_r M_c I],
R_hat = C R C^-1 = [I -M_r P_c;0 I].
```

For example, the lower coefficient factors as
`(U^-t A U^-1) tensor (U U^t)=P tensor M`. The upper coefficient is
`M tensor P`. These factors retain the displayed order; replacing M by
`U^t U` is generally incorrect. The independent checker proves both C
inverse identities, both Gram conjugations, and the full endpoints

```
C^-1 (R_hat S_hat) C = RS,
C^-1 (R_hat S_hat)^2 C = (RS)^2.
```

The same C is used on both sides of the internal boundary. These equalities
hold on every independent real/imaginary component of both banks, including
the Gram kernel. They are not tests of a sampled dense input.

### Exact contraction without a huge dense matrix

Each bank-to-bank block is stored as a finite sum `T=sum_k c_k A_k tensor B_k`
of real dyadic 104-by-104 factors. Matrix products preserve this form. Its
exact Frobenius square is

```
||T||_F^2 = sum_(k,l) c_k c_l
<A_k,A_l>_F <B_k,B_l>_F.
```

This follows by expanding each entry and separating the two tensor indices.
All factor entries are integers divided by powers of two; the implementation
performs integer multiplication and common-denominator addition. There is no
floating point, tolerance or probabilistic contraction. Since T is real,
this sum is zero exactly when every entry of T is zero. Checking all four
two-bank residual blocks therefore proves equality on all **21,632 data
coordinates**, while avoiding their 467,943,424-entry dense operator.
The independent checker verifies eight global block identities in this way.
Its zero contractions combine with the literal-fiber audit above; neither
checker alone is claimed to certify the entire evidence chain.

## Counts, comparison and the omitted identity requirement

Counting every generated event gives the predecessor's invoices:

| Word | Unit ADD/SUB | Halves | Doubles |
| --- | ---: | ---: | ---: |
| Entry plus exit | 319488 | 43264 | 43264 |
| Coded uncorrected Gram pair | 26240 | 3328 | 3328 |
| Specified uncoded Gram pair | 241280 | 41600 | 41600 |

For k repeated identical **uncorrected Gram pairs**, the charged addition
comparison is `319488+26240k` against `241280k`; each scaling category is
`43264+3328k` against `41600k`. At k=1 the code loses 104448 additions and
4992 operations in each scaling category. At k=2 it saves 110592 additions
and 33280 in each scaling category. Since the respective inequalities are
`215040k>319488` and `38272k>43264`, two is the first positive integer winning
all three columns. This compares precisely these existing words, not optimal
uncoded algorithms, runtime, or an identified physical repeated consumer.

The required identity shears are different. Their coded coefficients are
`N_r M_c` and `M_r N_c`; the Gram words contain only `P_r M_c` and `M_r P_c`.
The independent checker verifies the identity conjugations and

```
N-P = U^-t (I-A) U^-1, A^2=13A.
```

Over Q, `(I-A)^-1=I-A/12`. Hence N-P has rank 104 and, since M is invertible,
each omitted tensor side has rank **10816**. This is an algebraic-rank fact,
not a dyadic primitive, native-child tariff or cost lower bound. A nonzero
kernel payload `(-Bz,z)` is retained by U even though its pivot query vanishes;
the omitted identity side acts nontrivially on it. The original PR already
owns these completion warnings and rank claims.

Positive exact residual norms additionally separate reversed U/transpose
order, reversed Gram-stage order and omitted lower/upper identity completion.
The original modulo-13 spectral-normalization result is outside this audit.

## Remaining obligations and stopping rule

This closes a bounded all-coordinate software/algebra audit of the pinned
scalar words. Physical chart conjugation, actual adjacent/repeated consumers,
identity-side implementation, copied-center endpoint correction/wrappers,
dirty-helper completion, owners/routing/holding/control/tapes, signed-floor
precision and all-size/native admission remain unresolved or inherited. Scalar
ADD/scale counts are not native rank units. No new physical bill, passing
supplier inequality, kappa change, human acceptance or proof-kernel certificate
is claimed. Stop dependent construction until a named consumer and favorable
complete allowance are supplied.

Prepared by ToikY with substantial OpenAI Codex assistance, including separate
AI implementation/review contexts. Apache-2.0; all predecessor credit is retained.
102 changes: 102 additions & 0 deletions research/p104-tensor-word-audit/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# P104 tensor-code literal-word audit

This independently checks the actual scalar programs in [Chris R / Clear1nsight's
PR3979](https://github.com/CrocSwap/integer-mult-bounds/pull/3979) at frozen head
`a8a1d744811cd7d1f9c43ec7ccbae85ef9695b61`. Every one of **763,392 literal
operations** is covered by **1,056 fiber instances, disjoint within each sweep**, reduced to eight
exact local linear maps. A separately implemented exact tensor calculation checks
eight global identities, comprising 32 bank blocks, on all **21,632 data
coordinates**. No coordinate sampling or floating tolerance is used.

The contribution is source-bound implementation coverage. The tensor code,
algebraic conjugation and protocol savings belong to PR3979. Its written proof
already addresses arbitrary inputs; this audit adds exhaustive actual-instance
word coverage beyond its small-grid basis tests and actual dense fixtures. It
does not supply a new code, physical repeated caller, admitted supplier or κ.

## Evidence and reproduction

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

```sh
python3.12 -B scripts/research_package.py --package research/p104-tensor-word-audit
```

The three registered commands are `verify.py`, `independent.py` and
`test_verify.py`. Direct replay also works from a Git-free committed package
export containing the declared canonical P104 fixture. A package-directory copy
alone omits that external input. `SOURCES.json` pins its exact bytes and the
three package-local predecessor exports; neither an unmerged predecessor commit
nor network access is needed for replay.

`verify.py` authenticates the frozen constructor before calling its word builders
and geometry constructor. Those builders are the object under review. It never
calls the predecessor evaluator, invoice or result routine. The checker consumes
every event, validates its global data index, bank, axis, sign and chronology,
and evaluates one full basis map for each distinct 104- or 208-coordinate fiber.
Every other fiber is checked for exact program equality after its own physical
index localization; a cached pattern cannot hide an altered later fiber.

`independent.py` imports neither primary nor predecessor code. It reconstructs
the roots and all 768 signed-half coefficients by a different enumeration. Both
checkers bind this complete ordered coefficient array to the same canonical
digest. It proves the global block identities by exact factored Kronecker
products and Frobenius-square contractions; zero means every matrix entry is
zero. Four deliberately wrong global expressions have strictly positive norms.
See [PROOF.md](PROOF.md) for the composition argument and conventions.

`test_verify.py` runs 12 semantic word mutations and seven actual CLI damaged
source/invoice cases under both normal and optimized Python: 38 rejections,
plus four separate independent-checker fixture rejections. It also replays the
actual 104-port primary checker normally and optimized from an inode-disjoint,
read-only Git-free closure and verifies unchanged source bytes. These are
software checks and a scoped exact algebra certificate; no human or proof-kernel
review is implied.

## Recomputed original invoice

| Named word | Unit ADD | Half | Restoring double |
| --- | ---: | ---: | ---: |
| Encoder plus decoder | 319,488 | 43,264 | 43,264 |
| One coded Gram pair | 26,240 | 3,328 | 3,328 |
| One specified reference Gram pair | 241,280 | 41,600 | 41,600 |

The claimed two-pair saving is confirmed: 110,592 ADDs and 33,280 halves and
doubles each, with entry and exit paid. One pair loses 104,448 ADDs. These
are PR3979's results against its specified reference, with no optimality claim.
The correct identity-shear coefficients remain `N tensor M` and `M tensor N`,
where `M=UU^t`, `N=M^-1`; the omitted side maps each have rational rank 10,816.
Algebraic rank does not price native calls. Helpers are untouched by the literal
data indices, which proves logical identity extension only.

## Open next questions

1. **Actual repeated consumer and shared charts.** Pin one chronological physical
producer/consumer pair and write every data/helper owner and ordered chart
conjugate. This determines whether a shared code can be used at all. No such
physical pair is constructed here; scalar conjugacy does not discharge it.
2. **Complete paid identity caller.** After that interface is fixed, compile the
required `N-P` side maps and code boundaries and price every native transport,
helper, routing and finite-width precision charge. First test the complete
favorable family gate; the isolated repeated-Gram saving cannot justify
construction expansion. All-size and multiplication-theorem admission remain
separate obligations.

## Attribution and scope

Chris R / Clear1nsight owns PR3979's tensor construction, scalar word builders,
original proof, invoice and side-map analysis. Its source files are retained
byte-for-byte in `source/`. PR3961 supplies the preceding representation mismatch;
PR3882/3940/3943/3954 retain the caller lineage. ToikY's PR3956 adapter comparison
and PR3966 phase gauge are context, not dependencies of this certificate.
The retained source credits Rohan Arun/PR1972, Chafik Boukhalfa/PR1991, Adam
Gall/PR1940, Josie Elliston and the E8 predecessors, Sagar Thakrar/PR1012,
Douglas Colkitt, Dominik Scholz and the native/compiler/coverage/terminal-floor
contributors named in the preserved source. Their claims outside this scope
were not replayed here.

New audit, packaging and tests: ToikY with substantial OpenAI Codex assistance,
including separate AI math and test contexts. Apache-2.0. Only this scoped package
is added; canonical main, frozen predecessors and the selected frontier are
unchanged. `TASK.json` records handoff-first selection, overlap coverage and the
change from the catalogue card's original chronological-correction question.
54 changes: 54 additions & 0 deletions research/p104-tensor-word-audit/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"schema_version": 1,
"base_commit": "20ecf2891d80b5acf18d980b2164fb44ea7faa90",
"files": [
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "67f085acd86acd7d4e03922d9cf4b26bca66fed5",
"sha256": "47b42433f5a85809a3aadd29c2c339da2c6ed728e4f7762df6b88bccb7874cf0"
},
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "b1fea0c94436b236cc2b7d41a7be032811b94c81",
"sha256": "bb2eaa58647b353f88d0aec2eafb9d30df1be53589231b23e12ceef3e4bad129"
},
{
"path": "research/p104-native-channel/inputs/P104-FIXTURE.json",
"usage": "input",
"git_blob": "2e16f99b295bb386fd13bd8fbd57b42ef54143a9",
"sha256": "516c06f6ec3cb84be588c546108de897650288576dd5fbf5fe44b9c5546ad8a4"
}
],
"source_exports": [
{
"path": "research/p104-tensor-word-audit/source/README.md",
"origin_repository": "Clear1nsight/integer-mult-bounds",
"origin_commit": "a8a1d744811cd7d1f9c43ec7ccbae85ef9695b61",
"origin_path": "research/p104-tensor-code/README.md",
"git_blob": "be374d54df5d481bdf8d83671c0a3843149dec11",
"sha256": "7c57cda30963c1fc37a96b92182912b3942e4e2447ba599db9f7af2359414d9c",
"usage": "package-local exact source export; primary hardcoded hash authentication; word/geometry builders only are objects under review"
},
{
"path": "research/p104-tensor-word-audit/source/PROOF.md",
"origin_repository": "Clear1nsight/integer-mult-bounds",
"origin_commit": "a8a1d744811cd7d1f9c43ec7ccbae85ef9695b61",
"origin_path": "research/p104-tensor-code/PROOF.md",
"git_blob": "b570c8bdf5acec263c63562ddb5e384ff3616c3f",
"sha256": "259ba7b0926dd6db4e7c45ff7ccb10659dee06aef0a573547236c994ad304756",
"usage": "package-local exact source export; primary hardcoded hash authentication; word/geometry builders only are objects under review"
},
{
"path": "research/p104-tensor-word-audit/source/verify.py",
"origin_repository": "Clear1nsight/integer-mult-bounds",
"origin_commit": "a8a1d744811cd7d1f9c43ec7ccbae85ef9695b61",
"origin_path": "research/p104-tensor-code/verify.py",
"git_blob": "7b8194642450100fafefde2e3bbb6d4a3daa7194",
"sha256": "27bae82fe247fe49b8fc3b5efbd429e2c8c0ee8f56cc4ace748cbb681a5abacc",
"usage": "package-local exact source export; primary hardcoded hash authentication; word/geometry builders only are objects under review"
}
],
"source_export_contract": "The pending foreign commit is not a Git-history dependency. All three exact exports are retained in this package and authenticated by the primary checker before import. Its evaluator, invoice and result routines are never called. Independent checker imports no primary/predecessor code and separately reconstructs the canonical live fixture; both bind the complete ordered B2 array. Generic history checks cover canonical files, not foreign origin availability or scientific acceptance."
}
Loading