Skip to content

Prove optimal sparse-union headers: 44 to 19 bits (no κ) - #6626

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w7-1102k-scoped-obstruction
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w7-1102k-scoped-obstruction

Conversation

@petalas

@petalas petalas commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prove the minimum fixed width of the complete legal coordinate/tag header domain in Mihir Srivastava's PR4583, and attain it with a new mixed-radix codec. Claim type: scoped written construction and sharp information bound, with exact finite corroboration. This contribution was produced by Nick Petalas.

legal sentinel block: L^g states
legal axis-i block:   |E_i| L^(g-1) states
joint index:         N = L^(g-1) (L + sum_i |E_i|)
minimum width:       2 + ceil(log2 N), including marker 01

At L=16, g=4 and E_i={0,15}, the new representation uses 19 bits for all 98,304 legal states. The separate-field format uses 44. In general the saving is at least gh+g+b bits, for h=ceil(log2 L), b=ceil(log2(g+1)). Every coordinate, flag, ordinal, count and tag remains recoverable under the same shared context.

Credit Mihir Srivastava / mihir-s-05, PR4583, for the metadata contract and separate-field format; Cinna Davis / PR4100, Jeremy Kothe / PR1731, Vlado Vojdanovski / PR1673, Ryanson Jonathan / PR4327 and PR4590, unpaidmoon / PR4376, rtyu193-rgb and LeverRank for the retained lineage. Enumerative coding, mixed-radix indexing and pigeonhole lower bounds are classical. The new result is their exact application to this interface and the attaining codec. No predecessor scientific verifier was replayed or audited.

Evidence

  • Before: the cited contract stores separate fields in 2+2gh+g+2b bits. After: the new codec attains the matching fixed-width information lower bound.
  • Local warning-strict normal and optimized checks pass with identical generated receipts: 1,196 contexts, 57,744 complete legal states, 105,120 retags/line keys, 22,022 rejected unused codes, sixty larger round trips and 27 explicit invalid-input controls.
  • Both registered commands passed, timed locally at 1.735 and 1.721 seconds for the direct checks. Each has a 120-second timeout.
  • Two mathematical code mutations and one actual source-file corruption are rejected. Source pins, committed bytes, executable modes and source ancestry pass at 198ffb1.
  • Official export integrity passes. Read-only, Git-free normal and optimized replay with an empty PATH passes; all ten exported files including the inventory remain unchanged.

From the worktree root, reproduce with the local interpreter path or another CPython 3.12 installation:

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

Expected markers are PASS_UNION_STATE_HEADER, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. Direct checks print generated receipts bound to the seven package files and both source inputs, and write nothing. The all-size claim rests on PROOF.md.

Limitations

This optimizes individual fixed-width representation with a shared context and fixed marker. It does not price boundary rank/select access, context storage, large-integer temporaries or decoding travel. Retagging can rewrite the whole index; the old tag-local update guarantee is not retained. It is not an arbitrary-dirty reversible retagging implementation or an error-detecting code. The implementation has explicit finite capacities; the written construction covers all finite contexts.

No physical caller, faster reader, complete emitter, tape-time saving, new kappa, selected-frontier update or complete multiplication theorem is claimed. All five selected assumptions remain. The selected cold replay, Lean, Docker, independent human review and proof-kernel review are unrun or unclaimed.

Open next questions

Can one actual union invocation pay for this representation? Bind one carving description to rank/select access and charge every header read, rewrite, temporary and context-delivery step through one complete round. Those missing physical costs block an operational saving.

Related open work

No open PR studying this union-header width was found in the complete 572-open-PR overlap snapshot, the fresh latest-100 list and targeted live searches. PR4583 and PR4590 are merged predecessors; the latter checks the old format rather than constructing this representation. Sparse local notes, arbitrary historical diffs and unpublished work remain overlap limits. The advance CLAIM records the scope and provenance.

The completion refresh inspected all 15 other account open PRs created since the advance CLAIM, within a complete returned list of 176 account open PRs. None studies this union-header minimum or computes its same-instance state count. No additional scientific computations checked another contribution.

  • PR6629 compresses routing-ROM switch records under a different representation contract. It does not compute this union-header width; no numerical agreement or disagreement is asserted.

CI notes

Both hosted checks passed at head 198ffb11a8bb82c71d7dafb6a5cb137728b01362 in run 41650179489: plan and replay (research/union-state-header). The completed checks were read once. Separate run metadata confirms this exact head, completed status and successful conclusion.

Hosted replay executes both registered warning-strict normal and optimized finite checks and metadata validation. Local registered replay, committed bytes/modes/source history, mutation controls, official export integrity and both read-only Git-free modes also passed. The universal claim remains the written scoped proof; independent human and proof-kernel acceptance are unclaimed. Delivered scope matches the advance CLAIM.

Merge Danger

Door: two-way. The change adds one isolated package and leaves predecessor sources unchanged.

Blast Radius: isolated. No selected construction, shared runner or production caller changes.

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.

1 participant