Skip to content
Open
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
101 changes: 101 additions & 0 deletions research/selected-monomial-tape-lift/PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# The f-column lift of the selected caller's monomials as a fixed record list

Scope: the physical half of `native_all_columns` for the selected #5413 caller, at the level
of records. PR #5442 closes the algebraic half (every identity of the caller lifts to every
column width `f`) and leaves open the tape realization of `g^(tensor f)` with spectators and
adapters at the retained tariff. `SPECIALIZATION.md` §2–§3 (the P1 specialization of #4610)
states the realization in writing: any nine-axis monomial has a recipe of at most 171
retained elementary movement/phase records, each a compact-control selected-bit addition or
a per-record phase, acting on all `f` columns with one fixed list of primitive types. This
package executes that recipe for the caller's actual monomials and routes.

## Setting

A field with `f` columns on `n` logical axes has addresses `X = (x_1, ..., x_f)`, `x_j` in
`F_2^n`, next to arbitrary spectator bits. The retained monomial convention
(`prune_native.monomial`) is `m = (G, b, Q, alpha, a)` acting on one column as

```
|x> -> i^(a + q(x)) |G x xor b>, q(x) = sum_i alpha_i x_i + 2 sum_(i<j) Q_ij x_i x_j (mod 4),
```

and its lift (SPECIALIZATION §3) as `|X> -> i^(a f + sum_j q(x_j)) |(G x_1 xor b, ..., G x_f xor b)>`.

Five record types, each acting on all `f` columns at once and on no spectator bit:

| record | action | retained primitive |
|---|---|---|
| `XROW(i,k)` | `x_{j,i} ^= x_{j,k}` for every column `j` | compact-control selected-bit addition, slots `k -> i` (movement-paid) |
| `NOT(i)` | `x_{j,i} ^= 1` for every column `j` | selected-bit translation (movement-paid) |
| `S(i)` | phase `i^(sum_j x_{j,i})` | unit-S phase record |
| `CZ(i,k)` | phase `(-1)^(sum_j x_{j,i} x_{j,k})` | controlled-sign phase record |
| `I` | phase `i^f` | global `i` record, lifted to `i^f` |

A row swap is three `XROW` records. `SWAP_BITS(i,k)` of the plan is a row swap.

## Lemma (record realization, uniform in f)

For every monomial `m` the list `R(m)` = [`alpha_i` copies of `S(i)` for each `i`; `CZ(i,k)` for
each `i<k` with `Q_ik = 1`; the reversed Gaussian-elimination list of `G` with swaps expanded
to three `XROW`; `NOT(i)` for each set bit of `b`; `a` copies of `I`] does not depend on `f`,
contains at most `96 + 9 + 27 + 36 + 3 = 171` records, and executes the lift of `m` exactly on
every address and every `f >= 1`, leaving every spectator bit unchanged.

*Proof.* Each record is the `f`-fold product of the same one-column operation, applied to
the columns independently (`XROW`, `NOT` act column by column; `S`, `CZ`, `I` add a phase that
is a sum over columns, with the global record contributing `f`). So the composition of the
list on `X` is the `f`-fold product of its composition on one column, and the phase is the
sum of the one-column phases plus `a f`. On one column: the phase records applied first on the
input address give `i^(q(x))` (the diagonal `Q` is carried by `alpha`, exactly as in the
convention); Gaussian elimination gives elementary matrices `E_1, ..., E_r` with
`E_r ... E_1 G = I`, hence `G = E_1 ... E_r` (each elementary matrix is an involution), and
applying `E_r` first and `E_1` last maps `x` to `G x`; the translations give `xor b`; the
global records give `i^a`. The bounds are those of SPECIALIZATION §2: at most 72 additions
and 8 swaps (24 records), 9 translations, 27 unit-S, 36 controlled-sign and 3 global
records. No record reads or writes a spectator bit. ∎

Cost. Each `XROW` or `NOT` record is one compact-control selected-bit addition on the ordered
pair of slots (`compact-control-movement.tex`, Proposition), costing `O(V((f log p)^tau + 1))`
on a fixed number of tapes in the domain `f <= p`, `A = O(p)`, `K / log p -> infinity`, with
the front/back control fields reserved as in `compact-control-layout.tex` ("the proposition
applies to every ordered pair of slots"). A phase record computes a fixed degree-two residue
from `O(f)` selected address bits per complete record and applies one of `{1, i, -1, -i}`
(SPECIALIZATION §2); it is absorbed by the record fiber. The domain `f <= p` is the actual
layer's own domain: `f <= e <= floor(b_in^epsilon)` and `p = 6 b_in` (SPECIALIZATION §3). The
tariff per record is inherited from the Proposition, not re-derived here.

## What is executed (`verify.py`)

- The 896 compiled port wrappers of `NORMALIZERS.json` (112 ports x 8 orientations/paths):
the record list is executed on all 512 addresses at `f = 1` (and compared with the exact
Clifford engine's basis action on one wrapper per path), on all 262,144 addresses at `f = 2`
for two wrappers, and on 48 random addresses at `f = 2, 3, 4` for every wrapper, with random
spectator bits. Every wrapper is within the §2 bound; the largest list has 107 records
(69 movement, 38 phase).
- The body's own monomials, which are not port wrappers: all 1,072 `MONOMIAL` operations of
`NEUTRAL-BACKWARD-v16c` (800 whole-job helper normalizers, 240 Z-map block maps, 16 paid C8 axis
routes and 16 mode aliases) and the 8 `output_N` words of the #5402 provider's mode boundaries,
which #5442's mode-output certificate binds (the 8 `input_K` words coincide with alias words).
These are 283 distinct words. Each is read off the exact engine as a monomial `(G, b, Q, alpha, a)`
on 46 basis states and certified to be the same group element (Pauli tableau and image of `|0>`);
its record list is then executed on all 512 addresses at `f = 1` and on 48 random addresses at
`f = 2, 3, 4`. The largest list has 76 records (60 movement), within the §2 bound.
- The central translation `X0` is one `NOT(0)` record. `C0` (cgate on axis 0) and `D`
(Fourier on axes 1..8) are positive-rank Gaussians: in the retained framework they are paid
children of the recursion (`FINITE-PRECOMPILATION.md` §1, "one ordinary positive rank-r f
child on the actual owner's full stream"), not adapters, and no record list is claimed for them.
- The literal `pre_word` and `post_word` of all 119 targets of `WHOLECALLER-PLAN-v1`
(32 main, 72 helper, 15 idle), 16,748 `SWAP_BITS` events in all, are executed as `XROW`
records on 145-axis addresses at `f = 2`; each word realizes the declared `permutation` or
`inverse_permutation` of its target with phase zero and spectators untouched. The 16
central `X` corrections of negative `Q` powers are `NOT(0)` records.

## What is not claimed

The Proposition's proof (the four-update rotation scheme with dirty compact fields, its
overflow repair and the chunk-swap primitive) is not executed; the reservations of the control
fields for the 145-axis layout are taken from `compact-control-layout.tex` as written. No
numerical tariff, no new κ, no change to the selected record. The body monomials, including the
400 helper alias pairs of #5442, are executed separately above (an earlier version said they
were covered by the port-wrapper lists; none of them is a port wrapper). The forward body is not
replayed.
73 changes: 73 additions & 0 deletions research/selected-monomial-tape-lift/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# The selected caller's monomials and J routes as fixed, f-independent record lists

**Scoped positive result; no new κ.** PR #5442 (`allwidth-caller-certificate`) splits
`native_all_columns` for the selected #5413 caller into an algebraic half, which it closes,
and a physical half: executing `g^(tensor f)` and the port adapters on a fixed number of
tapes, for all `f` columns at once with one fixed primitive list, without disturbing
spectators, at the retained tariff. This package executes the record-level part of that
physical half, following the written realization of `SPECIALIZATION.md` §2–§3:

- every one of the **896 port wrappers** is a fixed list of at most 107 records (the §2 bound
is 171), each an `XROW` / `NOT` movement record (one compact-control selected-bit addition
or translation) or a phase record (`S`, `CZ`, global `i`); the list is independent of `f`
and realizes the lift `m^(tensor f)` exactly, spectators untouched;
- the body's **1,088 own monomial words** (283 distinct: 800 whole-job helper normalizers, 240
Z-map block maps, 32 C8 routes and aliases, and the provider's 8 mode `output_N` words that
#5442's mode-output certificate binds) are fixed lists of at most 76 records each, read off
the exact engine as group elements;
- the **central translation** `X0` is one record; `C0` and `D` are positive-rank children of
the recursion, not adapters;
- the **16,748 `SWAP_BITS` events** of the plan's 119 `J` routes (main, helper and idle
targets) are three `XROW` records each and realize the declared 145-axis permutations;
the 16 central `X` corrections are one record each.

The tariff per movement record is the compact-control Proposition
(`notes/compact-control-movement.tex`): `O(V((f log p)^tau + 1))` on fixed tapes for
`f <= p`, `A = O(p)`. That domain is the actual layer's domain (`f <= e <= b_in^epsilon`,
`p = 6 b_in`, SPECIALIZATION §3), so the restriction `f <= p` is not a gap. What remains
inherited is the Proposition's own proof and the control-field reservations of the 145-axis
layout (`compact-control-layout.tex`). [PROOF.md](PROOF.md) has the lemma and its scope.

## Evidence (`verify.py`, standard library, CPython 3.12)

| check | coverage |
|---|---|
| wrappers, `f = 1`, exhaustive | 896 x 512 addresses, random spectators |
| wrappers, engine agreement | 8 wrappers x 512 basis states against `clifford_exact` |
| wrappers, `f = 2`, exhaustive | 2 wrappers x 262,144 addresses |
| wrappers, `f = 2, 3, 4`, sampled | 896 x 48 addresses each |
| body and mode words | 283 distinct words (1,088 uses), engine read-off certified as group elements, `f = 1` exhaustive, `f = 2, 3, 4` sampled |
| `X0` | one `NOT(0)` record, `f = 3` |
| `J` routes | 119 targets x (pre, post) literal words, 145 axes, `f = 2`, 12 addresses each |
| controls (`test_verify.py`) | unlifted global phase fails at `f = 2`; a dropped row addition, a removed swap, a single-column phase record and an asymmetric `Q` are rejected; spectators untouched |

Record totals over the 896 wrappers and the maxima are in RESULT.json.

```sh
python3.12 -B scripts/research_package.py --package research/selected-monomial-tape-lift
```

## Relation to `lockstep-completion-pass`

That package counts the records the compiler and the completion/splitting pass add per unit
instance (normalizer pairs, relocations, child calls, bank scans) without pricing them. This
package gives the record list and count of each normalizer and route of the selected caller.
Together they give the record-level bill of the compiled template; the price per record is the
Proposition's tariff in its domain.

## Open next questions

1. Execute the Proposition itself: a bit-level simulator of the four-update rotation scheme
with dirty compact fields `u, t, b`, the chunk swaps and the overflow repair, at small
`f, K, G`, checking exact XOR at the `f` selected positions and restoration of the fields.
2. Verify the control-field reservations of `compact-control-layout.tex` for the 145-axis
plan layout (front fields before, back field after every active slot pair).
3. Replay the forward body's wrappers (review only; the selected controller runs the backward body).

## Credit

Cao Yifan / intqwq (#4610 and the P1 specialization), Cinna Davis (compact-control notes
and the controller/helper lineage), zxv (#4359 free-word substitution, #5428), Chris R /
Clear1nsight (#5413), Dillon (#5402), Ali Romman (#5383/#5398/#5376), Dugongue and icekylinx
(Clifford engine lineage), and the parallel #5442 census. Prepared by Mark (Matarener) with
substantial Claude Code assistance. Apache-2.0. No independent human or formal-kernel review.
149 changes: 149 additions & 0 deletions research/selected-monomial-tape-lift/RESULT.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"status": "PASS",
"bindings": 12,
"wrappers": {
"count": 896,
"max_records": {
"XROW": 60,
"NOT": 9,
"S": 22,
"CZ": 15,
"I": 3,
"movement_records": 69,
"phase_records": 40,
"total": 107
},
"sum_records": {
"XROW": 19548,
"NOT": 2380,
"S": 8960,
"CZ": 1204,
"I": 1120,
"movement_records": 21928,
"phase_records": 11284,
"total": 33212
},
"bound_s2": 171,
"histogram_total": {
"16": 19,
"19": 133,
"20": 25,
"21": 19,
"22": 156,
"23": 58,
"24": 52,
"27": 6,
"28": 44,
"31": 104,
"36": 7,
"39": 14,
"40": 7,
"43": 14,
"47": 11,
"50": 4,
"51": 14,
"54": 6,
"56": 2,
"58": 15,
"59": 3,
"60": 3,
"61": 2,
"62": 18,
"65": 2,
"67": 8,
"69": 18,
"71": 5,
"72": 5,
"73": 23,
"76": 24,
"78": 9,
"80": 6,
"82": 7,
"85": 15,
"86": 4,
"88": 8,
"91": 5,
"99": 6,
"104": 7,
"107": 8
}
},
"central": {
"X0_records": {
"XROW": 0,
"NOT": 1,
"S": 0,
"CZ": 0,
"I": 0,
"movement_records": 1,
"phase_records": 0,
"total": 1
},
"C0_and_D": "positive-rank children (cgate, fourier), not monomials"
},
"routes": {
"targets": 119,
"swap_bits_events": {
"main_targets": 3776,
"helper_targets": 10116,
"idle_jobs": 2856
},
"xrow_records": {
"main_targets": 11328,
"helper_targets": 30348,
"idle_jobs": 8568
},
"central_X_records": 16,
"conventions": {
"pre:permutation": 81,
"post:inverse_permutation": 81,
"pre:inverse_permutation|permutation": 23,
"post:inverse_permutation|permutation": 23,
"pre:inverse_permutation": 15,
"post:permutation": 15
}
},
"body_words": {
"occurrences": 1088,
"distinct": 283,
"occurrences_by_first_kind": {
"block": 248,
"mode_output_N": 8,
"originalmodecanonicalC8inputalias": 32,
"whole_job": 800
},
"max_records": {
"XROW": 60,
"NOT": 6,
"S": 21,
"CZ": 19,
"I": 3,
"movement_records": 60,
"phase_records": 29,
"total": 76
},
"sum_records_over_occurrences": {
"XROW": 9575,
"NOT": 96,
"S": 16317,
"CZ": 536,
"I": 399,
"movement_records": 9671,
"phase_records": 17252,
"total": 26923
}
},
"checks": {
"f1_exhaustive_body_words": 283,
"f1_exhaustive_wrappers": 896,
"f2_exhaustive_wrappers": 2,
"sampled_f": [
2,
3,
4
],
"engine_agreement_wrappers": 8,
"route_f": 2,
"route_addresses": 12
}
}
72 changes: 72 additions & 0 deletions research/selected-monomial-tape-lift/SOURCES.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"schema_version": 1,
"base_commit": "32890bc5de034ab8fc93ac88ead7279a6a416d04",
"files": [
{
"path": "certificates/selected-result.json",
"usage": "provenance",
"git_blob": "fc3d4ba105e1f097d0d7d051a308281e86ab1446",
"sha256": "66974efdced4083c00025f97d95d83909a226cdf801edb9301c195c6641f6903"
},
{
"path": "docs/research/agent-task-catalog.json",
"usage": "provenance",
"git_blob": "f126dd2e2dad2b669e75d1d0d0bd05c600725602",
"sha256": "f7a48bfa2659b88378282a8eee7d9fe52cdf505594124c4d1686b58510fffd72"
},
{
"path": "notes/compact-control-layout.tex",
"usage": "input",
"git_blob": "16f4d233471a7d189163ae7e7902becadecbba64",
"sha256": "2bc28e50f3eb092195294cafa81213e520f6d42e7935e9905ad8a6199e2a7c87"
},
{
"path": "notes/compact-control-movement.tex",
"usage": "input",
"git_blob": "06b6a9ef24245ac7b724c53a204635415b402357",
"sha256": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6"
},
{
"path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/caller/NEUTRAL-BACKWARD-v16c.json",
"usage": "input",
"git_blob": "04c6c7f36cb1b9fcf0b464bad3d3d83aaae7c864",
"sha256": "cc297ee54c2743615dfe857838d5f40424ccd33fdb08ecfafbc41b1710416d91"
},
{
"path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-coupled-caller-sol-high-20261024/agents/challenge/WHOLECALLER-PLAN-v1.json",
"usage": "input",
"git_blob": "b868fe46ce7ff96a51f7b612758685a23014d31d",
"sha256": "a02e79fb4615f4f987e3b3617c2b42eea2c1d7415cc66fa702a8b0cd28e6387e"
},
{
"path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-provider-audit-sol-high-20261024/agents/budget/inputs/NORMALIZERS.json",
"usage": "input",
"git_blob": "bca92c222c395d3d75c047fbb678f3cd0947c60f",
"sha256": "ae8aad06aa5d1811d725895b3ab5a4f4daa9dcdd88294aa0d5f723e78bb1e0da"
},
{
"path": "research/coupled-helper-neutral-completion/capsule/workspace/swarm-provider-audit-sol-high-20261024/repository/research/native-rank8-helper-provider/PROVIDER.json",
"usage": "input",
"git_blob": "0afd30ed01202eb6ce62462dcf8bc9164f3b0455",
"sha256": "676de7551d3364598f4a7e29ae97cae0e4364348786bbe70435b84294ba7dd65"
},
{
"path": "research/final4610-independent-admission/SPECIALIZATION.md",
"usage": "input",
"git_blob": "7ee84b30892f7354e1c36611f1a5e9b082dc6147",
"sha256": "70430114f744108223bc1d44b98bc25b696c4b408b7b044c2a8bbdfdb434ac5c"
},
{
"path": "research/kappa-function-composition/complex/prune_native.py",
"usage": "input",
"git_blob": "8c3e11b2408fa96eefa3ebe7952d1b11b90b772b",
"sha256": "f2b37c183a10922eabc8e0436b426a08866430e96bd0adc7e178951c7fbb5257"
},
{
"path": "research/t74-native-fast/vendor/native/new/code/borrow/vendor/clifford/clifford_exact.py",
"usage": "input",
"git_blob": "166841a037f069249f6f7f6dedb89248812f59e2",
"sha256": "2982ead07721e83358dc67c6f49c2b4c16a236a6bebdfd72f58221be1f5d0962"
}
]
}
Loading