Add static-python spec verifying core Raft consensus invariants - #21
Open
adsharma wants to merge 1 commit into
Open
Add static-python spec verifying core Raft consensus invariants#21adsharma wants to merge 1 commit into
adsharma wants to merge 1 commit into
Conversation
…Lean Transpile-and-verify spec of the safety-critical Raft decision logic using the static-python subset (CHECKER.pre/post/invariant, @lemma/@by). Proofs checked by py2many --lean + lake build (exit 0 == all pre/post/invariants/lemmas proved): - ConsensusState class invariant (non-negative term/commit/last-log, commitIndex <= lastLogIndex) re-discharged by omega on every mutation - Election restriction (Voter.on_vote_request): is_up_to_date / grant_vote - Quorum intersection: general omega lemmas quorums_overlap and strict_majority_exceeds_half - Log Matching guard (Follower.on_append_entries): log_matching_ok / logs_match - Commit-advance rule (Leader.on_response_received): can_commit / commit_advance_rule - clamp_commit (Follower._update_commit_index) - 6 concrete native_decide behavioral lemmas Adds static/README.md with reproduction steps and gotchas.
adsharma
force-pushed
the
verify/raft-core-lean
branch
from
August 6, 2026 21:41
6123c7b to
e359e25
Compare
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.
Related: py2many/py2many#825
Transpile-and-verify spec of the safety-critical Raft decision logic using the static-python subset (CHECKER.pre/post/invariant, @lemma/@by). Proofs checked by py2many --lean + lake build (exit 0 == all pre/post/invariants/lemmas proved):
Adds docs/theorem_prover.md with reproduction steps and gotchas.