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
35 changes: 35 additions & 0 deletions .github/workflows/five-stage-banks-493.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Verify five-stage banks with the 493-source helper
on:
pull_request:
paths:
- 'research/five-stage-banks-493/**'
- '.github/workflows/five-stage-banks-493.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
full:
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: CrocSwap/integer-mult-bounds
ref: af3fe331ca60c936229e060681ffccbc1c208678
path: .dependencies/pr234
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: eumemic/integer-mult-bounds
ref: 13311491eb74a3a9a443ba4e318c68c263f064f0
path: .dependencies/pr210
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.13'
- run: python -m pip install sympy==1.14.0
- run: python -B research/five-stage-banks-493/verify.py --pr210-root .dependencies/pr210 --pr234-root .dependencies/pr234 --full
- run: git diff --exit-code
29 changes: 29 additions & 0 deletions .github/workflows/five-stage-banks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Verify five-stage banks
on:
pull_request:
paths:
- 'research/five-stage-banks/**'
- '.github/workflows/five-stage-banks.yml'
workflow_dispatch:
permissions:
contents: read
jobs:
full:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
repository: CrocSwap/integer-mult-bounds
ref: af3fe331ca60c936229e060681ffccbc1c208678
path: .dependencies/pr234
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
with:
python-version: '3.13'
- run: python -m pip install sympy==1.14.0
- run: python -B research/five-stage-banks/verify.py --pr234-root .dependencies/pr234 --full
- run: git diff --exit-code
14 changes: 14 additions & 0 deletions research/five-stage-banks-493/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Five-stage completed banks with PR210's 493-source helper. Apache-2.0.
Prepared by Rohan Arun (rohanarun) with Anthropic Claude assistance.

Reused, with credit:
- eumemic, PR210 at 13311491eb74a3a9a443ba4e318c68c263f064f0 (with Dugongue's PR216 cuts, sennemmi's PR230 frames
and our PR211 frames; OpenAI Codex assistance): the 493-source helper word, its preparation (extra/, targetagg/,
rank/, echelon/) and its complete F2/integer replay with 17 controls, executed unchanged.
- hcg890, PR234 at af3fe331ca60c936229e060681ffccbc1c208678 (ChatGPT assistance) and Jacob Sussman: the five-stage
cover, its physical telescope, global lowering, exact geometry, prime validator, finite bill, moment engine,
bootstrap and outer-47 assembly, and the five-stage complex supplier. telescope493.py adapts PR234's telescope
to PR210's newer replay; helper493.py rebinds PR234's helper-specific constants to fresh values.
- Evan McKinney, PR197: completed-bank packing and the colouring helpers (banks.py byte-identical).
- Rohan Arun, PR205/PR237: completed banks on PR200 and on PR234's five-stage cover.
- Chafik Boukhalfa (PR200), Avi Eisenberg (PR193) and every contributor credited by those packages.
48 changes: 48 additions & 0 deletions research/five-stage-banks-493/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Five-stage completed banks with PR210's newest 493-source helper

Under the retained multiplication interfaces, this finite witness certifies

$$
T(n)=O\left(n(\log n)^{1-\kappa}\right),\qquad
\kappa=\frac{28376976266399}{40000000000000000}=0.000709424406659975 .
$$

That is **+0.119%** over PR237 (0.000708582410781108, five-stage banks on PR234's 471-source helper) and **+0.813%** over PR234 (0.000703701743496697).

| Construction | Helper | Bit coarse | κ |
|---|---|---:|---:|
| PR234 | PR210 df95878 (471 sources), paid exteriors | 7.041973e-4 | 0.000703701743496697 |
| PR237 | same, width-120 banks | 7.090849e-4 | 0.000708582410781108 |
| **This** | **PR210 1331149 (493 sources, target aggregation/rank/echelon, PR230 frames), width-120 banks** | **7.099280e-4** | **0.000709424406659975** |

The bit side binds; PR234's five-stage complex supplier (7.47455e-4) is unchanged.

## What is new

PR234 builds its five-stage cover from PR210's older helper (`df95878`, 471 borrowed sources). PR210 has since added 22 more source entrances, 82 equal-response target aggregation groups, 7 integer rank-compression groups, 4 signed echelon target transforms and PR230's frame refinements (head `1331149`, 16,621 physical registers instead of 16,643). This package runs that newer helper through PR234's five-stage pipeline and then applies PR237's completed width-120 banks.

- **Helper (PR210's own code, unchanged).** The package assembles PR210's research package with PR234's pinned PR200 base inputs, derives the 34 terminal records exactly as PR234 does, prepares the helper with PR210's `targetagg/setup.py`, and runs PR210's replay: all 20,141 F2 columns, the literal majorant (24-bit digits), both defining-integer signs, and all 17 corruption controls.
- **Physical telescope.** PR234's frame-tag telescope, adapted to PR210's newer replay (22 tagged event kinds, including aggregation, rank and echelon setup/read/restore). 2,569,922 tagged events; an independent literal projection and its inverse reproduce the all-column F2 endpoint and the event digest.
- **Five-stage lowering and geometry.** PR234's global lowering and exact h24/m120 geometry, with only the helper-specific constants (register count, event count, call count, rank mass) rebound to the fresh values. The five-stage profile is m = 120, W = 23,661, 494,909 calls, rank mass 2,834,920, deficit 4,400.
- **Primes.** All 26,464 used bases have nonzero cleared Gram determinants whose factors outside {2,3,5,7} leave a residual below 2^80.
- **Finite bill.** PR234's formulas with fresh values; the payload-prefix lift needs 101 bits (PR234: 98), still a fixed finite constant.
- **Banks.** Same 231 entrance charts as PR237. 12 copies give 176,915 banks of width 120 (360×(8·11+8·4), 108×(10·12), 39×(20·6), 4,304×(30·4), 172,104×(5·24)) with a proper 60-colouring of 997,260 incidences. W = 12·4v + 176,915 = 261,395; deficit 52,800; largest child 50.
- **Arithmetic.** PR234's interval moment engine certifies coarse saving 709928047185833/10^18; three finite ordinary levels and PR234's outer-47 assembly give κ; the next 10^-18 grid point fails.

## Verify

```sh
git fetch https://github.com/CrocSwap/integer-mult-bounds pull/210/head pull/234/head
git worktree add --detach ../pr210 13311491eb74a3a9a443ba4e318c68c263f064f0
git worktree add --detach ../pr234 af3fe331ca60c936229e060681ffccbc1c208678
python3 -m pip install sympy==1.14.0
python3 -B research/five-stage-banks-493/verify.py --pr210-root ../pr210 --pr234-root ../pr234 --full
```

About 10 minutes: PR234's own fresh verifier (for the complex supplier, ~3.5 min), PR210's complete helper replay with controls (~3 min), telescope, lowering, geometry, primes, banks and arithmetic. It compares the result with `certificate.json`.

## Scope

Conditional, exactly as PR234/PR237: the five-stage physical program and complex symbolic theorems, weighted q-local compiler, complete-stream movement, copied-centre and restored-row interfaces, ordinary leaves, prime supply, precision/recovery and the all-size reduction remain retained hypotheses. PR234's helper-specific checks are reused with recomputed constants rather than re-derived. Not an unconditional multiplication theorem or a speedup claim.

Prepared by Rohan Arun with Anthropic Claude assistance. Apache-2.0.
53 changes: 53 additions & 0 deletions research/five-stage-banks-493/SOURCE.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"pr210": {
"commit": "13311491eb74a3a9a443ba4e318c68c263f064f0",
"repository": "CrocSwap/integer-mult-bounds refs/pull/210/head",
"files": {
"research/coordinated-crossover-pr200/frames/opframe-bases.json": "9a2bba5c72aebc9ee4f21e59b10ce810b2da98a1fa1748fbc44c50a080e584ff",
"research/coordinated-crossover-pr200/joint/joint_word.py": "de37cbed753fc6f13a7e5dc25c8346279cfee5f1868df8c12a5fcb6ca8f631c0",
"research/coordinated-crossover-pr200/joint/pairs.json": "da54b863601b5cbc21d27fc5cd623bf805f974a3e47b81ed29a85aa5bad0fa05",
"research/coordinated-crossover-pr200/joint/joint-selection.json": "13f6420d6c341c22235c9d136d5f7c32896974bb165a893fecd7e583b790d133",
"research/coordinated-crossover-pr200/borrow/selection.json": "6932749407e14b199651f0a7deff02c6de74e2c1be0a1300263f1e164927fb8b",
"research/coordinated-crossover-pr200/gaugeb/selection.json": "b0f9f0e67f94a3c21069f393ea27f9483d315bff2f53f77270163065a6345d1c",
"research/coordinated-crossover-pr200/newg/replay.py": "0cbec81a11e758156e9303f63dc8c617601da69523073fdf2a77394d76acf56a",
"research/coordinated-crossover-pr200/newg/selection.json": "d94ef4e0b8ca98a7385b364cf245816a7cad08f850a60ce8b67aab4c3a89f3f4",
"research/coordinated-crossover-pr200/newg/schedule.json": "ab39d61fff7a2cfcb13e2c10d65f2c603e76a91013d197260d6c7b645ccb27a1",
"research/coordinated-crossover-pr200/extra/setup.py": "a7789d13eda75e78108cee84206692c913f63aafdb9e3e633fddd14640e4678a",
"research/coordinated-crossover-pr200/extra/selection.json": "791f6ddeb19add7026ba37461256c13efe3d35bba0bccf1cb9787a01fc16f0f2",
"research/coordinated-crossover-pr200/targetagg/setup.py": "fd7adf0b12d0769e06438b2ee4322bfcb180d8f73a1104a3eb805ab88c5cc393",
"research/coordinated-crossover-pr200/targetagg/word.py": "293a0babfac7e92ffccfe1cb69971b26a49fe56f67872b1060c3fe49d759a463",
"research/coordinated-crossover-pr200/targetagg/selection.json": "b7a4d5eb2a6d2f7df867f9be5af7da1d1aa99cfbd5214195967b0ff60642d77a",
"research/coordinated-crossover-pr200/rank/selection.json": "5c97c6413f1eb56c7b8f9ba9e839329d212fae7ac3a08c29e9efdee42f5048a0",
"research/coordinated-crossover-pr200/echelon/selection.json": "8e6ce5e257aa7656898ab46bc3421df4a619497b1e9f5956d2c546b3014050a7"
}
},
"pr234": {
"commit": "af3fe331ca60c936229e060681ffccbc1c208678",
"repository": "CrocSwap/integer-mult-bounds refs/pull/234/head",
"files": {
"research/five-stage-source-bound-v8/expected-math.json": "44426de51a4d096e1987f43faf8e754d1b29abc8b8b5c4c9d81b15db4f73b0bc",
"research/five-stage-source-bound-v8/verify.py": "827c559d949df4ec462691a42067355ebd6d6baff55c48410d5f36247f0ca9a9",
"research/five-stage-source-bound-v8/MANIFEST.json": "fc691fdf74a7b06c9290d6e91e6d63dc1c7e20c6556519dcf9b7f53fa02350de",
"research/five-stage-source-bound-v8/code/five_stage_bit_cost_20261009.py": "9d465c716c6b910ff66e1453e3bf0057608a787b5f5361be93781f42cb3370f7",
"research/five-stage-source-bound-v8/code/paired_cube_assembly.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c",
"research/five-stage-source-bound-v8/code/five_stage_bit_global_lowering_20261009.py": "2f4fd25eebbfdfbf37e2375e23b4827fda62776dff3b3b64e971dd215b2664bc",
"research/five-stage-source-bound-v8/code/five_stage_bit_global_lowering_geometry_20261009.py": "4a619e5d40c05295ef83183ee0d11bee12d0053bab2596ec9cfcd7fea4936157",
"research/five-stage-source-bound-v8/code/prime_witnesses.py": "98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab",
"research/five-stage-source-bound-v8/loader/source_loader.py": "e5e19ee6d6899fce8273d0f06a49caf7cd8bfe940a2a9a103dbc9d3a62b6b291",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/NOTICE": "c9850418622aea8d1382a230306c940947b5da818f4854b4b272ed60cf239f6c",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/bit/base_word.py": "9fe3a81b7561d2b09c086f63fac4626e88a32369ef8bc5579c94878de1218a89",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/bit/word.py": "85822e9cca5b1b2335c3704a3df2f3c6ef01e42d8328daacb33701d30cee80ab",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/references/pr168-v4/research/paired-cube-bit/check_paired_cube_bit.py": "4d7c86cd999a1519e0dfb6dcf33a8f26e442a353c3665a0f06881216a260fbf3",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/frames_p12.json.gz": "ad8e2705652b68476713d7647a8592505e222f2b3ccd1728dedce153aac6d462",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/graph_p12.json": "31a09a55920e64c8bfbac8b845dc01754c112aa6e207812e2fd1f4939d8f64cb",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/kchron_p12.json": "0fab548e84cf5ca7c04e8bd19b5810850463f36e0f92180efe73aeff17105e39",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/profile_p12.json": "c44ef8640cbcbcc9bac3a30e13373bd79efddde55d7cea514354ca2cdb60d66d",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/sinks.json": "c00ff70c564829d4b97740f92796fc6ce14fbcd5ca519663828650552b80249d",
"research/five-stage-source-bound-v8/loader/source_inputs/base_bit/research/paired-cube-diagonal-bit-168/selected/bit/word_p12.json.gz": "1cb7e8ed45cf542e304fddc4b12247dbb248a0dc84dedbd832f336b2d172793a",
"research/five-stage-source-bound-v8/loader/source_inputs/pr210/research/coordinated-crossover-pr200/joint/pairs.json": "da54b863601b5cbc21d27fc5cd623bf805f974a3e47b81ed29a85aa5bad0fa05",
"research/five-stage-source-bound-v8/loader/source_inputs/pr210/research/coordinated-crossover-pr200/joint/joint-selection.json": "13f6420d6c341c22235c9d136d5f7c32896974bb165a893fecd7e583b790d133",
"research/five-stage-source-bound-v8/loader/source_inputs/pr210/research/coordinated-crossover-pr200/gaugeb/selection.json": "b0f9f0e67f94a3c21069f393ea27f9483d315bff2f53f77270163065a6345d1c"
}
}
}
94 changes: 94 additions & 0 deletions research/five-stage-banks-493/arithmetic5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
"""(493-helper copy) Exact paid moments, three finite ordinary levels and PR234's outer-47 assembly for the banked five-stage bit
supplier. Uses PR234's own pinned moment, bootstrap and assembly code unchanged.
Prepared by Rohan Arun with Anthropic Claude assistance. Apache-2.0.
"""
from fractions import Fraction as Q
from pathlib import Path
import importlib.util

PKG = 'research/five-stage-source-bound-v8'
PR234_KAPPA = Q(703701743496697, 10 ** 18)
PR230_KAPPA = Q(694787513005285, 10 ** 18)
PR237_KAPPA = Q(177145602695277, 250000000000000000) # PR237: banks on PR234's 471-source five-stage helper


def load(name, path):
s = importlib.util.spec_from_file_location(name, path); m = importlib.util.module_from_spec(s); s.loader.exec_module(m)
return m


def build(P234, pr234_math, physical):
"""pr234_math: PR234's freshly computed mathematics (bit_profile, complex_profile, assembly parameters)."""
math = load('pr234_moments', P234 / PKG / 'code/five_stage_bit_cost_20261009.py')
outer = load('pr234_outer47', P234 / PKG / 'code/paired_cube_assembly.py')
bp = pr234_math['bit_profile']; cp = pr234_math['complex_profile']
assert (bp['m'], bp['deficit'], bp['maxchild']) == (120, 4400, 100)
H = {int(k): n for k, n in bp['histogram'].items()}
removed = {int(k): n for k, n in physical['removed_exteriors'].items()}
for r, n in removed.items():
assert H[r] >= n; H[r] -= n
c = physical['copies']; m = 120
H = {r: c * n for r, n in H.items() if n}
W = physical['W']; mass = sum(r * n for r, n in H.items()); deficit = m * W - mass
assert deficit == c * bp['deficit'], 'banking preserves the telescoping deficit'
assert max(H) < m // 2
# Coarse paid saving on the 10^-18 grid, PR234's interval engine with the inherited bad-class envelope.
root = Q(math.certify(H, m, W, True)['lower']); den = 10 ** 18
lo = Q(int(root * den), den)
while math.moment(H, m, W, lo, True)[1] >= 1: lo -= Q(1, den)
hi = lo + Q(1, den)
while math.moment(H, m, W, hi, True)[0] <= 1: lo = hi; hi = lo + Q(1, den)
assert math.moment(H, m, W, lo, True)[1] < 1 < math.moment(H, m, W, hi, True)[0]
coarse = lo
unbanked = {int(k): n for k, n in bp['histogram'].items()}
old_coarse = Q(pr234_math['contract']['assembly']['bit_coarse']) if 'contract' in pr234_math else None
if old_coarse is not None:
assert math.moment(H, m, W, old_coarse, True)[1] < math.moment(unbanked, m, bp['W'], old_coarse, True)[0], \
'banking strictly improves the paid moment at PR234 coarse saving'
chain = [Q(384599, 10 ** 10)]
for _ in range(3):
a = (1 - coarse) * coarse + coarse * chain[-1]
assert chain[-1] < a < coarse < 1 - a
chain.append(a)
bit = chain[-1]
b = Q(pr234_math['assembly']['parameters']['a_complex'])
cm = math.moment({int(k): n for k, n in cp['histogram'].items()}, 110, cp['W'], b, False)
assert cm[1] < 1
eta = Q(1, 10 ** 12); beta = Q(1, 10 ** 9)
assert bit < (1 - beta) * b
bridge = dict(proof='PROOF.md', representation='Exact powers with source-bound finite overcharges',
semantic=dict(G=dict(base=2, exponent=30000), E=dict(base=2, exponent=100000),
B_upper=dict(base=2, exponent=100001), C0=dict(base=2, exponent=210000), C1=1,
strict_literal_gap=1, induction_gap_lower=1),
rows=dict(coefficient=20161, degree=10 ** 6, suffix_slope=4 * 10 ** 6,
degree_gap=Q(10 ** 6) - Q(51 * 20161, 25)))
q = bit * (1 - 2 * eta); minimum = (1 - eta) * q / (1 + q); ticks = minimum * den
kappa = Q(ticks.numerator // ticks.denominator, den)
if kappa == minimum: kappa -= Q(1, den)
result = outer.assembly(bit, b, bridge, kappa, eta=eta, beta=beta)
assert len(result['strict_constraints']) == 47 and len(result['margins']) == 7
assert all(x > 0 for x in result['strict_constraints'].values())
try: outer.assembly(bit, b, bridge, kappa + Q(1, den), eta=eta, beta=beta)
except AssertionError: pass
else: raise AssertionError('adjacent kappa grid point admitted')
assert kappa > PR237_KAPPA > PR234_KAPPA > PR230_KAPPA
controls = []
try: profile_check({**H, 1: H[1] + 1}, m, W, c * bp['deficit'])
except AssertionError: controls.append('changed rank mass rejected')
else: raise AssertionError('corrupt rank mass accepted')
try: math.moment({**H, m: 1}, m, W, coarse, True)
except AssertionError: controls.append('full-width child rejected')
else: raise AssertionError('full-width child accepted')
return dict(scope='Conditional finite supplier composition; PR234 physical, scalar, prime and analytic dependencies inherited',
bit_profile=dict(m=m, W=W, copies=c, histogram={str(r): n for r, n in sorted(H.items())},
calls=sum(H.values()), rank_mass=mass, deficit=deficit, maxchild=max(H)),
bit_coarse_saving=coarse, pr234_bit_coarse_saving=old_coarse, ordinary_chain=chain, bit=bit,
complex_saving=b, complex_moment_interval=cm, assembly=result, kappa=kappa,
comparison_pr234_kappa=PR234_KAPPA, relative_gain_over_pr234=kappa / PR234_KAPPA - 1,
comparison_pr230_kappa=PR230_KAPPA, comparison_pr237_kappa=PR237_KAPPA,
relative_gain_over_pr237=kappa / PR237_KAPPA - 1, controls=controls)


def profile_check(H, m, W, deficit):
assert m * W - sum(r * n for r, n in H.items()) == deficit
return True
Loading