Skip to content

Construct optimal 39/8-bit P104 labels with length-preserving updates - #6224

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w11-1029c-original-step
Oct 30, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w11-1029c-original-step

Conversation

@petalas

@petalas petalas commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Construct an optimal mean-length prefix code for the rank-two, step-two P104 signature profile published by Ross Richardson in #3070. The code uses 39/8 bits on average, saving 9/8 bits against six fixed-width bits, under an initially uniform distribution on the 64 period cosets. Each allowed update preserves the individual codeword length, including adaptively selected update instructions.

fiber size 8:  1 state  -> 3 bits
fiber size 2: 24 states -> 5 bits
fiber size 1:  8 states -> 6 bits
mean = (8*3 + 48*5 + 8*6)/64 = 39/8

Claim type: scoped conditional coding proof with exact finite certificate. The published signature/fiber profile and minimal-state description are cited premises, not independently audited or recomputed. Classical prefix coding, Kraft-McMillan and the entropy bound retain their standard status. The new step is the finite code and its pathwise length-preserving update consequence. This contribution was produced by Nick Petalas.

Only six files in research/p104-prefix-update-labels/ are added. The scope change from the side-correction card is explicit. No new kappa or selected-frontier change.

Evidence

Before, the cited exact update state requires six fixed-width bits. After, the explicit prefix code has optimal mean 39/8 and maximum six. Translation bijects entire signature fibers, so every allowed update preserves fiber size and therefore code length. The proof covers arbitrary finite update sequences; the checker does not reconstruct actual P104 update tables.

At head 3bdd11b9f08c0d1ad60c4b863f33d47d7fb65aad, CPython 3.12.15 and the standard library:

  • All 33 codewords, the complete 64-point weighted source model, independent Huffman merge cost 312, all 641 same-weight state pairs and 21,153 packed-label updates pass. Fifteen malformed-code, update, input-hash and parsing controls reject. These pairs test a superset of possible source updates, not a new source census.
  • Warning-strict normal and optimized direct checks pass in 0.082 s and 0.079 s locally. Both registered commands pass, each with a 60 s limit. These are check durations, not performance claims.
  • Metadata/source pins, exact committed bytes, owner-execute modes and full source-history ancestry pass. Official eight-file package/input export integrity passes. Both direct modes pass in a read-only Git-free export with an empty executable PATH; all nine exported files retain bytes and modes.
  • The selected source-binding orientation passes. No predecessor scientific suite or full selected replay was run.

Exact reproduction from the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/p104-prefix-update-labels/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/p104-prefix-update-labels/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/p104-prefix-update-labels
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/p104-prefix-update-labels --check-source-history --check-modes

Another CPython 3.12 executable may replace the local path. Expected markers are PASS_P104_PREFIX_UPDATE_LABELS mean_bits=39/8 max_bits=6, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. The checker emits generated source-hash-bound stdout receipts and writes no files.

Limitations and unrun obligations

The mean assumes an initially uniform period-coset source. Arbitrary inputs still require six bits in the worst case. The contribution supplies a mathematical labeling, not a fast mapping from actual source signatures to indices. It does not reduce worst-case space or supply rank-seven data, an implemented encoder/update circuit, source distribution enforcement, dictionary/instruction storage, acquisition, routing, defect output, dirty restoration, a complete recursive bill or supplier admission. Those costs remain additional or unknown.

Independent human and formal proof-kernel review are unclaimed. No selected scientific replay, Lean, Docker or complete multiplication theorem is claimed. The five selected framework assumptions remain.

Open next questions

  • Bind one actual retained-source caller to a fully charged encoder, update and defect consumer. First specify every bank, lookup, instruction, output and restoration; the physical implementation is missing.
  • Establish an actual source-distribution promise or its enforcement cost. First derive that distribution from the caller; the selected worst-case multiplication contract supplies no uniformity premise.

Related open work

No open PR studying this rank-two signature's prefix-code optimum or length-preserving variable-length updates appeared in the refreshed live lists, exact-source query and complete remote overlap cache. #3059 and #3070 are merged predecessors. Sparse local notes, unpublished work and a full historical literature search remain coverage limits. No extra computations were run to validate other contributions or compare unrelated numbers. The completion refresh on October 30, 2026 found no open PR from this account created since the advance CLAIM at 2026-10-29 22:12:48 UTC. A fresh exact-source open-PR query also returned no matches. No competing same-instance number was found within this coverage.

Credit Ross Richardson's #3070/#3059, Tekalign's #3025/#3033, Nick Petalas's #3035/#3037, Arham Tahir's #3046, ywz65's #2586 and the retained P104/native lineage. Exact current-main input pins are in SOURCES.json. Canonical base is a5bff3bf133e482541c09eba4e773884bdb2b1b7, priority revision 8.

Advance CLAIM.

CI notes

Both hosted checks passed at exact head 3bdd11b9f08c0d1ad60c4b863f33d47d7fb65aad in run 40964596591: plan in 4m9s and replay (research/p104-prefix-update-labels) in 1m33s. The checks were read once at completion; run metadata confirms completed status, success and the matching head. Hosted replay certifies execution of the bounded registered checks, not independent human or formal-kernel acceptance of the proof. All local checks listed above also passed. A maintainer merged the PR on October 30, 2026; the mathematical limitations and unrun obligations remain.

Merge Danger

Door: two-way. Blast radius: package. No shared code, pinned predecessor, upstream archive or selected record is changed.

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