Skip to content

Implement exact-validity flags and clean reversible rational CLEAR witnesses (no kappa claim) - #7687

Open
SYLforge wants to merge 1 commit into
CrocSwap:mainfrom
SYLforge:research/clean-rational-clear-20261118
Open

SYLforge wants to merge 1 commit into
CrocSwap:mainfrom
SYLforge:research/clean-rational-clear-20261118

Conversation

@SYLforge

Copy link
Copy Markdown

Result and why it is useful

This package turns a rational CLEAR witness into a concrete finite-width reversible gate network, with a stronger acceptance criterion than simply observing zero target bits:

target_output = 0 AND diagnostic = 0  iff  sum(a_i*x_i) = D*t.

With internal ancillas and the diagnostic output initially zero, donors remain unchanged and all internal work bits are uncomputed for every input. Fractional division, signed overflow and target mismatch cannot masquerade as successful erasure. For example, N=1,D=2,t=0 would pass a floor-only zero check, and N=6,D=1,t=-2 at signed width 3 would pass a low-bit check. Both are rejected by retained diagnostic 1. These are local criterion counterexamples, not counterexamples to a reachable project execution.

Concrete source connection

The included unchanged source bytes reconstruct public #7669 at eaef5d1. At event 88937, target 1502/chart 353 has live donors 1072 and 500 in chart 359. Its real output at address 0 is the half-sum of donor 1072's real/imaginary limbs at 0 and 102 minus the corresponding donor 500 limbs. All 512 complex source columns are evaluated with the retained exact native interpreter, and a wrong-phase column control is rejected.

The implementation compiles this eight-input rational row and executes it at 1076-bit signed width. Reusing a published native interpreter is explicit; this is not an independent native compiler or complete full-WORD scientific replay. The source coordinate and all retained bytes are recorded in EXAMPLE-PROVENANCE.json and VENDORED.json.

Proof, tests and cost

PROOF.md gives the all-input numerator bounds, exact restoring-division invariant, signed-range flag and compute/copy/uncompute argument. Standard reversible-computation principles are used, not claimed as new.

The reproducible suite includes:

  • 308 baseline cases, including exhaustive small signed domains;
  • 100 additional randomized contracts and three false-clean/mismatch controls;
  • 100 gate inverse roundtrips from arbitrary initial bitstrings;
  • full 1076-bit runs at the signed maximum and minimum, plus fractional and overflow inputs;
  • source reconstruction, donor liveness/chart checks, complete columns for the selected row and a phase mutation.

The representative 1076-bit row uses 277929 X/CNOT/Toffoli gates and 86525 internal zero ancillas, with 8608 immutable input bits. The table in README distinguishes arithmetic width, total work bits and gate counts. No conversion to project tape cost or bound on all CLEARs is implied.

An independent agent audit of version 1 reported 1686 exhaustive source/target pairs and 100 inverse roundtrips; its receipts are retained unchanged. Version 2 integrates full-width edge regressions into the default run. Independent human review, formal-kernel proof and hosted CI acceptance are not claimed.

Reproduction

With Python 3.10+ and standard library only:

python -I -B verify.py

Expected marker: PASS_CLEAN_REVERSIBLE_WITNESS. No external checkout, network or credentials are required. The run regenerates RESULT.json and the public source-coordinate receipt. Assertions are required; optimized -O mode is explicitly rejected, not silently accepted. Package hashes are integrity receipts, not an additional scientific admission gate.

Credit and remaining obligations

The composition, ideal certificates and earlier native/caller/helper construction belong to the existing project and contributors. SYLforge's #7669 source provenance and license are retained unchanged. Ali Romman's scoped #7671 rounding result and #7680 product-versus-snapshot precision audit informed the separation of arithmetic identity, execution domain and temporary costs. This contribution does not claim their results, nor rediscover the existing ideal CLEAR proof. Prepared with OpenAI Codex assistance.

A complete application still needs the reachable rounded-input relation, full chart/extent binding, a physical tape implementation, reset/backing suppliers and complete cost accounting. No kappa gain, selected assumption discharge, supplier admission or modification of the source PR is claimed. This is reusable implementation evidence for one clearly specified boundary.

Repository integration and submission checks

Only research/clean-rational-clear-witness/ is added (25 files). The existing supplier-boundary-audit task is explicitly refined to this local implementation; completion applies only to that scope. No shared checker, frontier, workflow, or other contribution is changed. Retained third-party source bytes and licenses are unchanged; the new implementation is Apache-2.0 licensed.

From the repository root, run:

python -B scripts/research_package.py --package research/clean-rational-clear-witness

Windows CPython 3.12.14: standalone replay, registered replay, metadata/pins, committed-byte preflight and diff-whitespace checks passed. The remote tree matches the tested local tree exactly.

Independent Linux fresh checkout at e5ba67dfd6237a1a3acf4d67098d3242adee8229, CPython 3.12.14: registered replay produced both PASS_CLEAN_REVERSIBLE_WITNESS and PASS_REGISTERED_RESEARCH_PACKAGE (exit 0). All 24 manifest-covered payloads matched before and after replay; all 25 committed files have mode 100644, and the working tree remained clean. Optimized -O replay was rejected as intended. This was a shallow fresh checkout, not a full historical-source replay.

Latest related-work refresh includes #7681: reusable snapshot homes do not remove logical initialization/retirement services. Historical gate-level precedents such as #3081 and #6092 and standard compute-copy-uncompute methods are not claimed as new. This local clean circuit does not provide a complete reset supplier.

Known unchanged-base CI blocker: at base e54523517d0f03e58352e647c403a5af3e525a57, CurrentCiNavigationTests.test_current_ci_section_matches_selected_record fails because docs/ci-verification.md names frontier6030 while the selected record requires make frontier7000-verify. Neither file is changed here. Hosted CI success is not claimed; a shared planning failure can prevent hosted scientific replay.

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