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-gen5b-banks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Verify the gen5b bit word with descent, target squares and the PR233 complex word

on:
push:
paths:
- 'research/five-stage-gen5b-banks/**'
- '.github/workflows/five-stage-gen5b-banks.yml'
pull_request:
paths:
- 'research/five-stage-gen5b-banks/**'
- '.github/workflows/five-stage-gen5b-banks.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-gen5b-banks/requirements.txt
- name: Replay every mandatory stage (virtual, raw, bit, scalar, primes, banks, complex, math, finite)
run: python -B research/five-stage-gen5b-banks/verify.py --output "$RUNNER_TEMP/gen5-collective-kernels-verification"
- name: Regenerate the pinned bit word from the generator and both physical-layer producers
run: python -B research/five-stage-gen5b-banks/gen5bit/producer/regenerate.py --work "$RUNNER_TEMP/gen5b-regeneration"
- name: Require committed files to remain unchanged
run: git diff --exit-code
39 changes: 39 additions & 0 deletions research/five-stage-gen5b-banks/BANK-PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 gen5 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 gen5 the actual residual families are 3:354 (rank-21 entrances), 4:2182 (rank-20), 6:16 (rank-18), 7:2 (rank-17) and 24:13332 (ungauged roles). The total residual width is even, so sixty physical replicas fill each stage exactly with these 120-dimensional patterns (the rank-17 blocks share mixed banks with rank-20 blocks, as source527's 11/4 banks did):

| Blocks | Banks per stage |
| --- | ---: |
| 12 of dimension 7 and 9 of dimension 4 | 10 |
| 30 of dimension 4 | 4361 |
| 40 of dimension 3 | 531 |
| 20 of dimension 6 | 48 |
| 5 of dimension 24 | 159984 |

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

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

2*5*60*((1247070-1)+15886*120*662)=757938545400 < 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 gen5 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); gen5 numbers rebound with Claude assistance. Apache-2.0; inherited source attribution remains unchanged.
201 changes: 201 additions & 0 deletions research/five-stage-gen5b-banks/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Loading