Skip to content

Research audit: quartic precision for balanced dirty cyclic inverses (no new kappa) - #877

Merged
Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
bitplane:research/pass06-audit-seed63
Oct 13, 2026
Merged

Mister-Meeseeks merged 2 commits into
CrocSwap:mainfrom
bitplane:research/pass06-audit-seed63

Conversation

@bitplane

Copy link
Copy Markdown
Contributor

PR628's balanced dirty-array inverse uses a valid but conservative O(p+d+r^5) precision bound, charging growth across every leaf call. This mathematical audit gives a sufficient O(p+d+r^4) word-size bound for the unchanged dispatcher and rounded leaves, preserving arbitrary initial dirt, exact restoration, call count and storage. No new κ.

The improvement comes from complete recursive children restoring their workspace. Their ideal prefixes and inverse prefixes have norms at most B=(1+K)^E(n), where

E(1)=1
E(n)=n+max(floor(n/2)+E(ceil(n/2)), ceil(n/2)+E(floor(n/2))) <= 4n-3.

Every ideal interval then has norm at most B^2. For N complete leaf calls with error a*u*(||source||+1), variation of constants gives execution error at most 2*N*B^2*a*u*(B*D+1), provided N*B^2*a*u<=1/2. The proof handles nonlinear rounded increments and arbitrary initial data; it does not assume rounded children are linear or their output is independent of dirt.

Using PR628's inherited root-gap and coefficient/phase preparation bounds gives the quartic sufficient guard. All leaf validation, three passes, inverse work, source access, borrowed storage, scalar arithmetic, phase access and routing remain paid. The neighboring-layout bill becomes soft-O((L*r^2+r^3)*(p+d+r^4)) under the inherited preparation/arithmetic assumptions. Finer incoming grid precision must also be retained.

At radix 64, p=128, d=20, the certified fractional-bit budget is 73,245,212, versus 516,978,511 after already crediting PR663's exact leaf count in the old proof. The same 63 factors still use 4,000 leaves and six dirty arrays. These are conservative proof budgets, not minimum precision or measured performance. The old bound is tighter at small radices; the README records both.

Reproduce and evidence

python3 -B -I research/dirty-prefix-precision/verify.py
python3 -B -I research/dirty-prefix-precision/test_precision.py

Expected:

PASS_DIRTY_PREFIX_PRECISION budgets=1740 prefix_traces=18 rounded_generic=48 rounded_kernels=40 controls=10 kappa=unchanged
  • All n=1..10,000 resource bounds checked; 128 signed words / 191,342 instructions agree with the frozen dispatcher.
  • 18 dense integer traces check 11,142 prefix and inverse-prefix boundaries. Separate rational Gauss-Jordan inverses check 66 selected prefixes; 5,104 contiguous subwords are reconstructed directly and agree with their prefix products.
  • 1,740 integer budgets cover every prime-power radix from 3 through 512, five target precisions and three magnitude bounds.
  • 48 generic and 40 actual kernel executions use the unchanged rounded leaves. All ten pinned kernels are certified. Exact dense comparisons bound every nonzero rounding error; every borrowed array is restored, and every inverse word cancels exactly. All 6,304 observed leaf boundaries satisfy the magnitude bound. Kernel execution plus coefficient perturbation is at most 2^-128.
  • Ten mathematical controls, four focused tests including nonlinear perturbations, and six disposable-package controls passed. A deliberately incorrect inverse-prefix engine is rejected by the separate Gauss-Jordan path.
  • Python 3.12.3 and 3.14.4 passed, including isolated optimized execution and a read-only standalone copy with spaces in its path. make selected-record-check, syntax, local documentation links and staged whitespace passed.

Only 23 new files under research/dirty-prefix-precision/ are added. The full repository suite, selected supplier cold replay, Lean and hosted CI are not claimed passed by these local results.

Scope, source pins and attribution

Base: f567884aeb8851b6e794af1184119a3bfbe1e631. Audited PR628 head: 0768f97d06c623b8211e651543c66135796b62bf. Twelve predecessor files are retained byte-for-byte with SHA256/Git object pins and original notice/source attribution. Seed 63, alternatives, local claim and overlap refresh through #876 are recorded. No coordination issue was available.

Credit Chafik Boukhalfa / chafreaky for PR628's leaves, composition and inherited preparation; 0xkilgore for PR663's exact binary count/restoration audit; androolloyd for PR673's echo and phase-alias work; and the original PR621/kernel lineage retained in the vendor notice. The tested contract requires immutable phases distinct from all mutable arrays; the known alias defect in frozen PR628 is not claimed fixed here.

Related #689/#730/#744 address other tree/count classes, #714 uses a clean root checkpoint, and #846 concerns arbitrary strides. Chafik's concurrent #862 obtains cubic precision under an owned widened-word / reserved-zero-bit contract, whereas this result retains arbitrary dirty arrays. None of these pending packages is imported.

The universal conclusion rests on the written prefix/perturbation proof and inherited leaf/preparation hypotheses. Finite replays are supporting evidence. This supplies no common-label or Clifford word, reversible-bit implementation, owner layout, full-transform recurrence or multiplication reduction. Selected #799 and upstream/ are unchanged. No optimal precision, new supplier or literature-priority claim is made.

Prepared for Gareth Davidson (@bitplane) with substantial OpenAI Codex assistance, Apache-2.0. One AI agent wrote the new proof and implementations; separate arithmetic paths do not constitute independent human review or formal verification of the full multiplication theorem.

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