Skip to content

[Lean] Execute prepared XOR with linear tape resource bounds - #1921

Draft
jamesyc wants to merge 1 commit into
CrocSwap:mainfrom
jamesyc:lean-prepared-pair-xor
Draft

jamesyc wants to merge 1 commit into
CrocSwap:mainfrom
jamesyc:lean-prepared-pair-xor

Conversation

@jamesyc

@jamesyc jamesyc commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Coverage

Explicit author-checked context: upstream main 0b1cccf; kappa = 836330098538459/500000000000000000 = 0.001672660197076918. This generic implementation does not establish or improve the selected exponent.

Four checked modules connect existing input preparation to a paid backward paired-word producer, framed marked XOR, and a five-tape controller with both handoffs charged. Its actual entrance volume V=max(1,len xs)+max(1,len ys)+2 yields first halt at most 18V transitions and at most 73V represented finite-alphabet cells at every prefix, including after halt. These are proved model bounds, not measured wall-clock speedups.

Finite coverage: arbitrary finite Boolean input words, including unequal and empty inputs; paid zero padding and pairing; source/work/output endpoints; local XOR spectators and clean scratch.

Conditional-interface coverage: the caller supplies encoded bit words, initially clean work/output tapes and the fixed tape arrangement. Original word encoding, physical allocation, dirty-state restoration and arbitrary-system framing remain outside this package. Constant controller/register storage is additional.

Full-theorem coverage: no selected multiplier refinement, all-size integer multiplication theorem, recursive payload accounting or uniform bit-time bound is claimed.

Reproduction and reuse

Four new sources, 27 standard-only axiom probes and six full printed types were kernel checked and independently reviewed. MANIFEST.json records their exact hashes and scopes. REPRODUCE.md provides prospective Lean 4.21.0 commands with immutable public prerequisites and hash checks. No extra local CI preflight or relocated rebuild was performed for this PR. No Mathlib is needed by this closure.

Reuse six unchanged files from PR488 at 34eb901 and PR1840 at 3f1b064 without copying them. PR488 supplies input preparation/reversal; PR1840 supplies marked XOR. Three existing deprecation warnings belong to the unchanged input-preparation dependency; the four new roots are diagnostic-free. PR488's historical kappa 330942774629799/500000000000000000 is retained as provenance only.

Bounded interface comparison distinguishes PR488's separate right-blank work copies from the new marked paired input and paid outer controller. Related PR590/612/878 Boolean-register semantics do not supply these tape traversals. The package claims this concrete composition and its resource proofs, not first-ever tape arithmetic or optimality. The separate metadata/dyadic extension is excluded.

James Chang with OpenAI assistance; Apache-2.0. Existing source notices and Lean/core attribution are retained.

Four checked reusable modules with pinned public prerequisites.
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