FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: align Lean justifiability overflow semantics by ss1738 · Pull Request #597 · lambdaclass/ethlambda · GitHub

fix: align Lean justifiability overflow semantics - #597

Draft
ss1738 wants to merge 1 commit into
lambdaclass:lean-formalizationfrom
ss1738:draft/lean-justifiability-overflow
Draft

fix: align Lean justifiability overflow semantics#597
ss1738 wants to merge 1 commit into
lambdaclass:lean-formalizationfrom
ss1738:draft/lean-justifiability-overflow

Conversation

ss1738 commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown

Context

While extending the existing justifiability formalization, I found a
fixed-width arithmetic boundary outside the current proof domain.

For delta = 2^62 + 2, the previous Lean implementation returned true
because UInt64 wrapping reduced 4 * delta + 1 to 9, satisfying the
odd-square check. The corresponding mathematical delta is neither square nor
pronic.

Change

The Lean implementation now evaluates the pronic branch only when
4 * delta + 1 fits in UInt64, matching the checked-arithmetic structure in
the native Rust source.

Regression proofs cover values around the overflow boundary.

Proof contract

justifiable_equiv remains explicitly bounded by d.toNat < 2^62.
This PR does not strengthen that theorem to a total equivalence result.

The Rust-side documentation has also been updated to state the actual proof
domain rather than claiming correctness for all natural numbers.

Testing

  • cd formal && lake build EthLambdaProofs
  • regression cases for 2^62 - 1, 2^62, 2^62 + 2, and UInt64::MAX

ss1738 force-pushed the draft/lean-justifiability-overflow branch from c009c09 to d0848b3 Compare August 28, 2026 15:22
ss1738 changed the title formal: align Lean justifiability overflow semantics fix: align Lean justifiability overflow semantics Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL