Skip to content

Prove exact nearest-even shear history from binary code weight - #5912

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1022aa-rounded-shear-history
Oct 27, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w8-1022aa-rounded-shear-history

Conversation

@petalas

@petalas petalas commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Scoped mathematical proof with exact finite corroboration. For a fixed rational matrix A, retained integer source x and whole-sum nearest-even output z=R(y+A*x), the minimum fixed history is exactly tau(A) bits:

tau(A) = max_x number of half-integer coordinates of A*x
A=B/2  => tau(A) = maximum Hamming weight in im(B mod 2)

Every nonempty fixed-source fiber has exactly 2^t(x) preimages. An explicit bit encoder/decoder attains the lower bound. The unaugmented map is a bijection exactly when every reduced entry denominator is odd. Rank one can require arbitrarily many bits; two 3-by-2 rank-two matrices need exactly two and three bits respectively.

This contribution was produced by Nick Petalas. Credit Ali Romman #5838 for the actual-rounder correlation question and ywz65 #2555 for the prior scalar whole-sum tie collision and increment-rounding boundary. Their scientific verifiers were not replayed as the contribution. Exact question-source head/blob/SHA256 and historical provenance are in SOURCES.json. Classical rounding, binary codes, Bezout and the pigeonhole principle retain their credit.

Evidence

Before, #2555 identifies a scalar collision and #5838 distinguishes adversarial completed defects from physical rounding correlations. After, the written proof classifies every rational shear's exact history requirement and supplies a matching reconstruction, including signed data.

Local CPython 3.12.15 normal and isolated optimized warning-strict commands pass in 2.108s and 2.003s, each below its 120-second timeout:

  • 682 binary matrices, 5,003 source cases and 37,294 literal destination cases.
  • 668 rational fixtures, 12,891 source cases and 50,128 literal destination cases. Equal reduced coefficients may occur in multiple fixtures.
  • 38,759 signed history round trips and 13 malformed-input/history/image rejections.
  • Independent exact distance/parity rounding oracle, rank-one eight-element fiber, signed ties and increment/whole-sum controls.

Registered replay and metadata/pins pass. Committed bytes, modes and source-history preflight pass at 8c6aa0f. Official committed export/integrity and a read-only Git-free optimized replay with empty PATH pass; all six exported files, including the export manifest, retain their bytes. Receipts are generated on stdout and bind all five package files.

From the repository root:

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

Any CPython 3.12 executable can replace the local interpreter path. No third-party dependency is required. Expected markers are PASS_NEAREST_EVEN_SHEAR_HISTORY, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES.

Advance CLAIM. Canonical main was refreshed before submission and remains de5ec2e, priority revision 8. The joint-query-controller card is explicitly changed to this local arithmetic/cleanup side result.

Limitations

The theorem assumes arbitrary independent integer-grid destinations, retained source, fixed rational coefficients and whole-sum nearest-even rounding without overflow or saturation. Its universal scope rests on the written proof; enumeration corroborates bounded domains. The encoding is an information result, with no physical history lifetime, instruction count or zero-return workspace bound.

Physical/native child construction, history uncomputation, full P104 words, compiler/tapes, selected cold replay, outer arithmetic, Lean and a complete multiplication theorem are unrun and unclaimed. No kappa or selected-frontier change is made. The five selected framework assumptions remain. Independent human and formal proof-kernel review are unclaimed.

Open next questions

Can one actual completed P104 child retain and uncompute its required tie history within the complete physical bill? First freeze that child's rounding sites, entrance lattice and returned outputs, derive its fibers, then price a history lifecycle. A completed physical child and restoration machine remain missing.

Related open work

  • #5838 proves an adverse completed-defect guard and leaves stronger physical rounding correlations open. This result instead classifies the exact fibers of one deterministic rounded arithmetic interface; it computes none of that PR's error constants.
  • #5833 supplies ideal norm/price words and leaves rounded-primitive costs open. The present theorem does not execute those words or compare their amplification or scalar prices; it isolates a possible history obligation before physical adoption.

The final related-work refresh inspected all nine other account PRs opened since the CLAIM. Two also concern rational shear arithmetic, under different interfaces:

  • #5913 counts retained states at a serialized low-digit carry-production cut with no source reread. This PR retains the full source and counts the information lost by whole-sum nearest-even rounding. No same-instance history value is computed by both results.
  • #5915 counts nonzero carry events on canonical low inputs. This PR counts rounding fibers and their minimum distinguishing history; it makes no carry-density comparison.

No matching history quantity or numerical disagreement was found. No extra mathematical computations were run to validate the other submissions.

CI notes

At exact head 8c6aa0f49bce1a96b15d636d6854ae5f158b2091, run 40506300760 has plan failed; replay skipped. The only failed step is Onboarding helper tests. All ten failure/error entries are in unchanged tests/test_research_current_assignment.py, ending FAILED (failures=8, errors=2, skipped=22).

The two errors are KeyError: 'follow_up_steps' and KeyError: 'catalog_first_step'. The eight assertion failures comprise 0 != 16, five missing-reference/helper cases reporting ValueError not raised, and two sparse-omission list mismatches. These are the shared main de5ec2e7a onboarding failures. All ten failure/error headers, their exception/assertion messages and the final summary match PR #5915's plan log, which was read directly.

Hosted replay has not certified this package; only the local scientific and publication checks above have run. Maintainers will address the shared test failure. No package, shared implementation or test file was changed in response.

Merge Danger

Door: two-way

Blast Radius: research

Five new files in one opt-in package. No shared checker, predecessor source or selected record 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.

2 participants