Add U256 subtraction correctness proofs (17/17 u256)#6
Open
MarcIlunga wants to merge 1 commit intomainfrom
Open
Add U256 subtraction correctness proofs (17/17 u256)#6MarcIlunga wants to merge 1 commit intomainfrom
MarcIlunga wants to merge 1 commit intomainfrom
Conversation
…tness proofs Completes the U256 subtraction family (17/17 u256 procedures now proven). - sub_with_borrow_be: 770-line chunked proof for the 53-instruction big-endian subtraction with borrow propagation. Follows the same pattern as add_with_carry_be. Includes borrow chain identity, digit extraction, and per-limb correctness lemmas. - overflowing_sub: Composes u256_le_to_be_pair, sub_with_borrow_be, and u256_le_to_be with stack rearrangement. - wrapping_sub: Same as overflowing_sub but drops the borrow flag. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
u256::sub_with_borrow_be,u256::overflowing_sub, andu256::wrapping_subsub_with_borrow_beis a 770-line chunked proof (53 instructions, 8-limb borrow chain), following the same pattern asadd_with_carry_beTest plan
timeout 300s lake build MidenLean.Proofs.U256.SubWithBorrowBepassestimeout 300s lake build MidenLean.Proofs.U256.OverflowingSubpassestimeout 300s lake build MidenLean.Proofs.U256.WrappingSubpasseslake build MidenLeanfull build passes with 0 sorry🤖 Generated with Claude Code