Coupling invariant frame rules (#1990 part 3/3)#2008
Open
Th0rgal wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
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
Compiler/Proofs/Frames.lean:Coupling(withInv : RuntimeState → Abs → Prop),SegmentSim, and the generalizedSegmentSimWithFields.Coupling.Supported), composition/weakening (SegmentSim.seq,SegmentSim.weaken,Coupling.supported_and), footprint/frame preservation (SegmentSim.frame,SegmentSim.frame_writeFootprint,SegmentSim.and_frame), and loop lifting (Coupling.iterFrom,SegmentSimWithFields.execForEachLoop_sim,SegmentSim.forEach).PrintAxioms.lean(zero new axioms).Stacked on #2007 (part 2/3) → #2005 (part 1/3). Completes the #1990 surface; downstream consumer is Morpho Blue
Proofs/Disciplines.leanlocal-axiom discharge.Test plan
lake build Verity Contracts Compiler PrintAxioms→ "Build completed successfully."generate_print_axioms.py+refresh_verification_artifacts.sh→[refresh] PASSmake check→ "All checks passed."Note
Low Risk
Proof-only additions in compiler frames; no runtime, auth, or data-path changes; registered without new axioms.
Overview
Adds a coupling-invariant layer on top of the existing frame/write-footprint machinery in
Compiler/Proofs/Frames.lean, so correctness proofs can relate concreteRuntimeStateto abstract models throughCoupling(Inv : RuntimeState → Abs → Prop) and segment simulation (SegmentSim/SegmentSimWithFields).New proof infrastructure includes
Coupling.Supported(invariant transport when agreed resources match),Coupling.and/supported_and, abstract loop iteration viaCoupling.iterFrom, append lemmas forexecStmtList, and compositional rules:id,seq,weaken,frame/frame_writeFootprint,and_frame, plusforEach/execForEachLoop_simfor lifting loop bodies. ThinSegmentSimwrappers specialize the field-aware version to empty fields.PrintAxioms.leanlists the 21 new theorems (theorem count 5212 → 5233); no new axioms.Reviewed by Cursor Bugbot for commit 67b4767. Bugbot is set up for automated code reviews on this repo. Configure here.