Skip to content
Closed
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
39 changes: 39 additions & 0 deletions .github/workflows/five-stage-gen4-collective-kernels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Verify the gen4 word with 695 collective kernel entries and the 880-gate descent retiming

on:
push:
paths:
- 'research/five-stage-gen4-collective-kernels/**'
- '.github/workflows/five-stage-gen4-collective-kernels.yml'
pull_request:
paths:
- 'research/five-stage-gen4-collective-kernels/**'
- '.github/workflows/five-stage-gen4-collective-kernels.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
immutable-replay:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.13']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
with:
python-version: ${{ matrix.python-version }}
- name: Install the pinned arithmetic dependency
run: python -m pip install --disable-pip-version-check -r research/five-stage-gen4-collective-kernels/requirements.txt
- name: Replay every mandatory stage (virtual, raw, bit, scalar, primes, banks, complex, math, finite)
run: python -B research/five-stage-gen4-collective-kernels/verify.py --output "$RUNNER_TEMP/gen4-collective-kernels-verification"
- name: Regenerate the pinned bit word from the generator and both physical-layer producers
run: python -B research/five-stage-gen4-collective-kernels/gen4bit/producer/regenerate.py --work "$RUNNER_TEMP/gen4-regeneration"
- name: Require committed files to remain unchanged
run: git diff --exit-code
37 changes: 37 additions & 0 deletions research/five-stage-gen4-collective-kernels/BANK-PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Five-stage stage-private completed banks

This is a finite bank-allocation extension of the PR197/PR200 completed-bank construction to PR234's five-stage bit geometry, retained from eumemic's source527 package and applied here to the gen4 independent helper census. It does not claim a new all-size compiler theorem or replace the scalar admission.

For one complete local invocation, the source-bound physical telescope has no data/helper cross blocks. On an independent helper with genuine entrance projector sigma its endpoint is the exact partial swap D_(I24-sigma), supported in the active local window. This holds on arbitrary correlated dirty contents. The complemented inverse invocation has the same residual: its reversed endpoints are 0 and I24-sigma. Source-owned gauges are visible-data paths and are excluded from the independent helper census.

In stage i, PR234 routes the helper at local class d to physical class g=d*tau_i. Relative to g, the residual is P_i=tau_i*diag(I24-sigma,0,...,0)*tau_i, supported only in H_i. We give each stage a disjoint collection of banks. Every bank is filled by disjoint coordinate blocks of total dimension120. For the actual gauge chart B whose columns are residual columns followed by gauge columns, set

N_b=(b+1)*Pi_b*embed_i(B^-1).

For an ungauged role B=I24. Pi_b is the explicit coordinate permutation sending the first residual coordinates in H_i to the assigned bank interval. Thus N_b*P_i*N_b^-1 is exactly that coordinate projector. The scalar leaves conjugation unchanged. The checker reconstructs every actual chart, checks both inverse identities, the G-orthogonality of its two summands, its residual action and its elementary factorization. Therefore this is a projector identity for the actual bases, not a rank substitution.

The bank route is g -> g*N_b^-1, hence d*tau_i*N_b^-1 in the original local invocation. If the bank class is h, its residual is h*N_b*P_i*N_b^-1*h^-1. Every occurrence visits every bank class once because right multiplication is a bijection on the complete GL cover. If two roles in one local invocation are assigned the same bank family, their distinct N_b give distinct bank classes. Distinctness is literal: choose a coordinate j outside H_i. The embedded inverse fixes e_j; N_b*e_j=(b+1)e_(Pi_b(j)). The resulting columns differ for all b, at every eligible prime q>2^80 and every local ring Z/q^w. All scalars are between 1 and 40 and remain distinct units. The proof uses the full GL cover, not a projective quotient.

Complete the entire cover sweep for each stage and replica in fixed order before its boundary phase. The complete local source endpoint separates every bank from the data and other banks, so each subsequent invocation may receive arbitrary dirty bank contents. For each bank, its block projectors are disjoint and sum to I120. The literal partial swaps therefore compose to D_I120 on every address column. The common inherited ancestor chart is the same for each block and cancels between blocks. The checker verifies all240 address columns, the reverse schedule, and failures from omitting or repeating a block. No new independence assumption on dirt is used.

The five bank collections remain separate, and each is touched only in its own stage. This gives every physical bank its full required endpoint once. The data stage routes, bridge maps, idle children and final exchanges remain PR234's. Consequently there are no independent exterior rank5a children. Their removal follows from the completed bank endpoint; no internal, data, compensation or copied-center child is removed.

For gen4 the actual residual families are 3:266 (rank-21 entrances), 4:2200 (rank-20 entrances) and 24:13944 (ungauged roles). Sixty physical replicas fill each stage with these exact 120-dimensional patterns:

| Blocks | Banks per stage |
| --- | ---: |
| 40 of dimension 3 | 399 |
| 30 of dimension 4 | 4400 |
| 5 of dimension 24 | 167328 |

There are 172127 banks per stage, 860635 total banks and 422400 data families. Literal stock is 1283035. Its per-replica normalized value is 256607/12. The checker enumerates each of 4923000 actual role/replica/stage assignments exactly once, verifies the actual role's chart rank, and hashes the complete allocation.

Every actual chart (370 distinct entrance bases) uses at most 186 factors. At most 119 coordinate transpositions and 120 scalar-coordinate factors give 425 normalizer factors. A conservative added out-and-back selector bill, in addition to all retained PR234 route and scalar bills, is

2*5*60*((1283035-1)+16410*120*425)=502915820400 < 2^40.

The literal stock, not the rational per-replica stock, must be used for physical role routing and finite storage. All60 scalar replicas execute, and all recursive child counts are multiplied by60 in a literal realization. Any smaller integer normalization used only in the moment arithmetic must be distinguished from the literal replica count. Serial execution may share an external copied-center work stream only after erasure. The fixed bank selector bill is explicitly charged before the inherited positive ordinary-leaf gap absorbs it. After completion removal the maximum child is50 of120, so a single level halves; the histogram remains a one-level profile.

This witness leaves the full scalar/integer/sign audits, frame ledgers, exact global lowering, prime guard, complete fallback profile and 47 outer inequalities to the integrator (verify.py). Its input charts/census are the independently admitted gen4 helper. Existing compiler, common weighted chart, restored selectors, complete-stream routing and all-size analytic hypotheses remain conditional as in the cited sources.

Prepared with OpenAI Codex assistance (source527 package, eumemic); gen4 numbers rebound with Claude assistance. Apache-2.0; inherited source attribution remains unchanged.
78 changes: 78 additions & 0 deletions research/five-stage-gen4-collective-kernels/KERNEL-PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Response-kernel entries on the gen4 word (per-entry cuts, rank-e entrances)

This package is #276's `research/five-stage-gen4-banks` with #279's concave-descent retiming stage (rohanarun,
`descent_transform.py` + `descent-selection.json`, 880 source-pair mix gates, unchanged) followed by one added
transcript stage, `kernel_transform.py`, between the descent and the five-stage lowering. The kernel selection is
bound to the descent word (input hashes); its pairs' cuts are bound by content. The descent gates act on source
registers only, the kernel pairs on 848 dirty helpers, so the two levers commute on disjoint registers. It applies PR254/#268's response-kernel helper pairs to
the gen4 bit word, which had none of the source527 lineage's entrance levers.

## Construction

Let a and b be two plain dirty helpers (initial frame ZERO, not gauges, not reuse-pair members) whose complete
F2 responses into the targets are identical (twins), and let F_a, F_b be their first frames, the frames of their
first use other than an initial compensation read. Choose a line E = <u> with u in F_a and F_b and
9|u|^2 - (sum u)^2 != 0 (nondegenerate for G = 9I - J). On gen4 every plain helper's initial reads precede its first
other use, so each pair has its own cut c(a,b): the later of the two helpers' last initial reads (reads at frame
ZERO; the helpers are also read late, at their current frames, and those reads are untouched). The rewrite:

* removes every initial read of the pivot a (its response is now supplied through the donor);
* enters a at E (initial frame E instead of ZERO);
* pays b += a at E right after the cut (`kernel_setup`) and b -= a at the full frame at the end (`kernel_restore`).

Over F2 the suffix after the cut is unchanged and the donor's accumulated correction cancels the missing pivot
reads, as in #268's KERNEL-PROOF; no estimate is used: `kernel_transform.replay` runs every formal column (19,930
source, target and dirty columns) forward and inverse on the emitted word, and rejects the omission of either new
gate category. The required frame path of every stream is rebuilt from scalar/COPY events independently of the
emitted MOVEs, both reflected (annihilator) ledgers are checked, every used frame is nondegenerate, data input/output
and dirty output frames and the 24 copied-centre lifetimes are unchanged. Per pair the paid rank mass falls by one
(the pivot enters at rank 1), two scalar ADDs are paid and the pivot's initial reads (on average 22) disappear.

## Selection and tiling

`kernel-selection.json` freezes 424 pairs (848 helpers), found by `discovery/census.py` and ordered by the concave
gain phi(r) = r ln(120/r) of the first-move ranks; all 424 have negative gain (first-frame dims (2,2), (3,3), (3,5))
and the ledger model of `discovery/pick_k.py` is maximal at K = 424. Every pair is bound by content: the helpers,
the cut read [target, helper, coefficient], the entrance line and the input hashes of the descent-retimed word (the descent selection itself binds to the parity-fused word, hash 60830cb2...).

The 424 pivots have residual rank 23. `bank_template.py` tiles their 60*424 slots with 6,360 banks (23^4, 4^7)
per stage, whose 44,520 rank-4 blocks come out of the (4^30) banks (4,400 -> 2,916); the (24^5) banks drop to
162,240. Every bank is exactly 120 wide and fully filled: 171,915 banks per stage (was 172,127), literal stock
1,281,975 (was 1,283,035), 4,923,000 assignments enumerated as before. Rank-23 charts are built by the unchanged
chart code (512 charts, at most 576 elementary factors; normalizer bound 815; selector calls 963,707,984,400 < 2^40).

## Pinned values

Every #276 literal that this rewrite changes is re-pinned in `expected/kernel-pins.json` and asserted through
`pins.pin` (a missing or different value fails): `kernel_pairs`, `kernel_local_delta`, `kernel_helper_rank_mass`,
`entrance_rank_histogram` {1:424, 20:2200, 21:266}, `entrance_count` 2890, `five_stage_calls`,
`five_stage_rank_mass`, `gauge_dimension_histogram`, `charts`, `max_chart_factors`, `removed_completion_histogram`,
`priced_five_stage_calls`, `priced_five_stage_rank_mass`, `normalizer_factor_bound`,
`conservative_extra_selector_calls`, `intentional_family_collisions` (family-only coincidences of a rank-23 and a
rank-4 slot in one mixed bank; all (family, route) addresses are distinct), `scalar_events`,
`scalar_coefficient_counts`, `scalar_event_sha256`, `forward_max_row_l1`, `inverse_max_row_l1`,
`literal_unit_additions`, `bundled_unique_bases`, `literal_stock`, `banks_total`, `kappa`. The gauge-entrance
subtraction in bank_check/math_check/finite_check uses #268's form (subtract, delete when zero) because rank-1
entrances share the five-stage bucket 5 with ordinary rank-5 children. No check is dropped.

## Result

kappa = 724733001963261/10^18 = 7.247330019632610e-4 with the 695 entries of this package (the first version, 424 e=1 pairs only, gave 7.239437286151320e-4 composed with #279's 7.23571590007464e-4 and 7.232412442944060e-4 without it), bit side binding.
Same retained interfaces as #276; no Lean, no benchmark.


## Rank-e entrances and multi-donor families (this package)

`kernel_transform.py` now admits entries {pivot p, donors D, entrance E of rank e >= 1}: twin pairs (|D| = 1) and
collective families (|D| = 2, 3; pivot response = XOR of the donors' responses, checked on the literal prefix). The
entry cut is the later of the members' last frame-ZERO reads, bound by content; the pivot enters at E (residual rank
24 - e), every donor pays d += p at E after the cut and d -= p at the full frame; a donor may serve several entries
along a nested entrance chain (the emitted MOVEs are checked nested). Correctness is still the F2 replay of all 19,930
columns forward and inverse with both omission controls. Bank tiling (`bank_template.build_patterns`, #283's rule):
for each residual width r with k_r pivots, 15 k_r banks (r^4, 4^(30-r)) of width 120, whose rank-4 blocks come out
of the (4^30) banks; the pivot residual census is pinned (`pivot_residual_census`, `bank_families`, `literal_stock`).
`code/geometry527.py` checks one actual entrance basis of every new rank (projector, 5-window completion, residual
decomposition) exactly as for the rank-20/21 entrances. Every new entrance basis gets a prime witness
(`prime_check`); all selected bases factor completely over the primes <= 31.

This package: 416 e=1 + 24 e=16 twin pairs and 255 multi-donor families (208 quads, 47 tris; 59 donors shared along nested chains) of the gen4coll selA census: 695 entries, total entrance rank 2028, residual widths 6..23. kappa = 724733001963261/1000000000000000000 = 7.247330019632610e-4.
Loading