Skip to content

Write the #4174 reservoir placement as six ordinary width-H calls with a 6x interchange bill; cites #4942 for the branch threshold (no new κ) - #4944

Merged
Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
JoyboyBrian:research/crt-reservoir-interchange-bill
Oct 23, 2026
Merged

Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
JoyboyBrian:research/crt-reservoir-interchange-bill

Conversation

@JoyboyBrian

@JoyboyBrian JoyboyBrian commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Result

Scoped counting proof, conditional on BIT.md's ordinary interchange as stated. No new κ. The selected exponent stays 60403/20000000.

This answers open question 1 of pending #4938. Does one ordinary H-bit interchange of research/unconditional-batched-crt/CRT.md §3–§4 fit its bill O(V H^{1-a} + V) at the actual #4174 width H = r_max G? CRT.md's callee is BIT.md's machine. It exchanges two complete equal e-bit fields with arbitrary spectators in O(V e^(1-a2)), and its §4 wrapper falls back to elementary q-digit swaps (q = 2^89 - 1) at small widths.

Relation to #4942. James Reed's pending PR #4942 already evaluates BIT.md §4's wrapper branch at the reservoir width. It is elementary exactly for q-ary E <= 311308 (binary h < 27706412), with D = 19 and k = 155654. It gives E = 121 at H = 10752 and E = 173 at H = 15360, and proves that every larger width is recursive. Parts (iii)–(iv) below are an independent recomputation that agrees with #4942, which is their predecessor; no novelty is claimed for the threshold. The new content here is parts (i)–(ii): the write-up of the placement as ordinary calls, and the count of placement and restoration calls with the resulting 6x bill. Also new are the padding ranges (v) and a D-independent elementary bound.

For every layout the #4174 constructor accepts, research/crt-reservoir-interchange-bill/PROOF.md proves the following:

  • (i) One Plan.placement (three sources to front u, front t, back b) is three ordinary calls of width exactly H, in any order. Restoration is the same three calls. That is six calls per batch, and every dirty record is restored.
  • (ii) Given BIT.md's theorem, these cost at most 6 C_BIT V H^{1-a} + 6 c_own V. This is CRT.md's bill with multiplicity 6.
  • (iii) (Locate the ordinary interchange's recursive threshold at the reservoir width (no new κ) #4942, recomputed) The wrapper runs at radix width E = floor(H/89) + 1. It is elementary for every H < 27,706,412 and body at H = 27,706,412 (E = 311309, D = 19, k = 155654). Since H <= L/100, every layout with L < 2,770,641,200 runs all six calls, and all twelve §4 shuttles, on the elementary branch.
  • (iv) (agrees with Locate the ordinary interchange's recursive threshold at the reservoir width (no new κ) #4942) On that range E <= H^{1-a}, so the elementary stage alone meets the bill, with constant C_0 q^2. Also H^a < 2^{1/20}, so the a2 saving is numerically absent.
  • (v) The literal call pads the volume by (q^E/2^H)^2. This is in (2^33, 2^34) at the minimal layout and in (2^73, 2^74) at production.

Minimal layout: p = 1310720, ell = 21, d = 2^16, widths 20, so H = 10752. Then E = 121, w = 2, D = 1, k = 8193 and 2k >= E, so the branch is elementary. Production layout: p = 9240576, ell = 24, H = 15360. Then E = 173, D = 2, k = 16385, also elementary. These values agree with #4942. As an extra check of this package, any D >= 1 keeps H <= 1,458,353 elementary, so both layout results hold under any reading of D.

Answer: yes, the bill fits with multiplicity 6. At these widths the elementary fallback meets it, not the body word. The constant includes a real padding factor of up to 2^34 (minimal) or 2^74 (production) per call.

Not proved:

Task and overlap

Card uniform-transfer-audit, scope refined to the ordinary-callee bill of the #4174 placement. It continues the reservoir remainder of open question 2 in #4377 and #4650. Base: canonical main cef4b52f2a59009865bf8eabde1be3f159063703, priority revision 7. Main was rechecked unchanged before submission.

Overlap: scripts/find_overlap.py (interchange/callee/placement/elementary terms; complete local inventory, 313 open PRs, 4015 discussion records) and open CRT PRs #4187, #4192, #4938. #4174 counts six width-H exchanges per batch and leaves the callee open.

Crossed claims. James Reed's CLAIM for #4942 (comment 19136868) was posted one minute before this package's CLAIM. Both answer #4938's open question 1. #4942 delivers the wrapper-branch evaluation and lists the three-field placement as not covered. James Reed's overlap note confirms that the placement write-up and call count were still open on that side. This PR therefore cites #4942 for (iii)–(iv) and contributes (i)–(ii) and (v).

The branch is based on main, not on #4938. #4938 is cited as a pending predecessor.

Test plan

All of these pass:

python3 scripts/research_package.py --package research/crt-reservoir-interchange-bill --check-only   # PASS_PACKAGE_METADATA_AND_PINS
python3.12 -B scripts/research_package.py --package research/crt-reservoir-interchange-bill          # normal and -O, PASS_REGISTERED_RESEARCH_PACKAGE
python3.12 -O -B research/crt-reservoir-interchange-bill/verify.py                                    # PASS
python3.12 -I -W error -B research/crt-reservoir-interchange-bill/verify.py                           # PASS
python3.12 -B scripts/check_research_commit.py --package research/crt-reservoir-interchange-bill --check-source-history  # PASS_RESEARCH_COMMIT_BYTES
python3.12 -W error -B -m unittest discover -s tests -p 'test_research_onboarding.py'               # 26 tests OK

verify.py takes about 8 s. It authenticates its four input pins and quoted phrases, and executes the authenticated #4174 allocator bytes. It checks:

  • 12 exchange orders on dirty Placement fixtures.
  • All 131,072 minimal plans (786,432 calls) and all 104,864 production plans.
  • The exact bounds 1 - 2/q < |GL_64(F_q)|/q^4096 < 1 and the j(D) table.
  • The wrapper branch at every E <= 311309.
  • The radix lemma, E <= H^{1-a} and both padding ranges.

Its branch checks independently recompute #4942's values. The plan census, the six-call fixtures and the padding ranges are this package's own checks. It also runs 13 rejection controls. Separately, 10 source mutations of sharp claims were tested (E_MIN, H_MIN, the j table, the radix formula, the branch label, the call counts, the padding range, a dropped restoration call and the caller threshold). Each makes the verifier fail.

Open next questions

  1. Does a direct binary exchange of H single-bit swaps meet the same bill on fixed tapes without the (q^E/2^H)^2 padding? First step: one bit swap as a single fixed-tape pass with a bounded buffer.
  2. What is BIT.md's stage-0 constant C_0 for one elementary q-digit swap? At every CRT layout with L < 2.77e9 it is the whole callee constant. It is blocked because BIT.md does not detail the elementary algorithm.

Credit

Prepared by JoyboyBrian with substantial Anthropic Claude (Claude Code, Opus 5.5) assistance. Apache-2.0. No independent human review or formal-kernel acceptance is claimed.

🤖 Generated with Claude Code

@JoyboyBrian JoyboyBrian changed the title Price the #4174 reservoir exchange as six ordinary H-bit calls, all on BIT's elementary branch below H = 27706412 (no new κ) Write the #4174 reservoir placement as six ordinary width-H calls with a 6x interchange bill; cites #4942 for the branch threshold (no new κ) Oct 23, 2026
@Mister-Meeseeks
Mister-Meeseeks merged commit 3fd7d44 into CrocSwap:main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants