Skip to content

Independently check #4541's packed IO codec: separate codec from the spec, all bit orders, caps, shared tape, mutations (no new κ) - #4553

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
pinterbanget:check-4541-io
Oct 22, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
pinterbanget:check-4541-io

Conversation

@pinterbanget

Copy link
Copy Markdown
Contributor

Summary

This adds research/pr4541-packed-io-check/, an independent check of the packed IO codec in Dugongue's #4541 (head 46ca24a8, §4 and PACKED-IO.md). The O(n/(log n)^κ) corollary depends on this codec to avoid a Θ(n) bit-per-word IO term. Together with #4552 (§1–§3), it completes my coverage of #4541's construction. All checked claims are confirmed. No new κ.

The codec was written from the vendored spec text (blob 675e520c, SHA256-pinned). Nothing is imported from #4541's packed_codec.py.

Checks

For (r, c) ∈ {1,2,4,8}×{2} ∪ {1,2,4}×{4}, with 131,620 decoder rows built in full and 3,372 cases compared with direct binary:

  • Tables. E, Er and the decoder (length, value, valid) keys and entries all fit in cr bits.
  • Input expansion. LSB-first and MSB-first expansion, including the partial top digit Er[x] ≫ c(r−ℓ), gives the exact coded stream followed by genuine blanks.
  • Reservoir. It holds fewer than 2r cells, with at most one flush per append.
  • Output. The coded prefix is decoded under caps m ∈ {n, n+1, n+r, n+3} with dirty cells after the terminator, giving exactly ⌈m/r⌉ LSB digits of the right integer.
    • A full cap does not read the terminator.
    • Leading zeros are kept.
    • An invalid cell before the blank rejects.
    • A zero cap emits nothing.
  • Shared tape. A continuous reservoir across a delimiter is exact. Separately padded concatenation inserts blanks in all 37 runs where n₁ ≢ 0 (mod r), confirming Packed Word RAM transfer: conditional O(n / log^κ n) multiplication (no new TM κ) #4541's warning.
  • Controls. 25 of 25 decoder mutations are detected. 7 spec statements are bound verbatim.
python3.12 -B scripts/research_package.py --package research/pr4541-packed-io-check
  PASS_REGISTERED_RESEARCH_PACKAGE research/pr4541-packed-io-check outcome=completed   (~1 s, stdlib only)

Limitations:

  • The 100-per-digit and 160-per-digit operation constants are model envelopes and are not re-derived here.
  • The corollary's TM antecedent is still inherited.
  • These are finite tests that corroborate the written invariants.

Head: cf88c6f65b668c3e848f8ac9f7818152cf7b9860. Base: canonical main f626db5c.

Credit: Dugongue (#4541). Prepared by Ryanson Jonathan with substantial Claude Code (Claude Opus 5.5) assistance.

🤖 Generated with Claude Code

…rom the spec, all bit orders, caps, shared tape, mutations (no new κ)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Mister-Meeseeks
Mister-Meeseeks merged commit 1f87c35 into CrocSwap:main Oct 22, 2026
1 of 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