IMPL-005: Lean 4 mechanisation of R5 protocol + shape verification (SPEC-005 v0.1.0) #7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/7/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mechanises SPEC-005: Lean 4 proofs of R5 (causal protocol + shape) verification, raising SPEC-002/003 contracts to the rigour level of the existing SPEC-001 R1–R3 proofs. Coordinated via
plans/IMPL-005-r5-mechanisation.spl.What landed
Lattice foundations
lean-cbcl/LeanCbcl/Lattice/Result.lean— three-valuedVerificationResultwith bounded-lattice instance (REQ-510 / CON-510).lean-cbcl/LeanCbcl/Lattice/Store.lean—MessageStoreG-Set lattice +lookup_monotone(REQ-511 / CON-511).verify model + headline theorems (
lean-cbcl/LeanCbcl/Verify.lean)verify_monotone— REQ-512 / CON-512 (the v1 retry that this PR's plan-edit unblocked).verify_all_is_meet— REQ-513 / CON-513.verify_eventually_consistent— REQ-514 / CON-514 (the SPEC-005 headline).R5 sub-checks (
lean-cbcl/LeanCbcl/R5.lean)check_acyclicity_iff_no_cycle— REQ-515 part 1 (soundness).check_reachability_iff_all_reachable— REQ-515 part 2 (soundness).check_performative_definedness_iff_all_defined— REQ-515 part 3 (full iff).check_step_uniqueness_iff_no_duplicates— REQ-515 part 4 (full iff).DCFL preservation (
lean-cbcl/LeanCbcl/DCFLPreservation.lean)dcfl_preserved_under_protocol— REQ-516 / REQ-209.dcfl_preserved_under_shape— REQ-516 / REQ-225.Audit + parity + CI
lean-cbcl/AxiomAudit.lean+scripts/check-axioms.sh— NFR-511 / TEST-551 (onlypropext/Classical.choice/Quot.soundpermitted).crates/cbcl-core/tests/lean_parity.rs— TEST-518 / ADR-513 (one proptest per Lean theorem, 30 tests)..github/workflows/lean.ymlextended with parity tests + cbcl-core triggers (TEST-518 / NFR-510).verified-by:annotations reconciled with as-built state (REQ-517).Test plan
Verified locally on a worktree of this branch:
cd lean-cbcl && lake build— 40 jobs greencargo test -p cbcl-core --test lean_parity— 30/30 passedbash scripts/check-axioms.sh— 16 theorems audited, all axioms allowlistedNotes
mathlib-setuptask is recorded as completed but did not land a Mathlib dependency; the description inplans/IMPL-005-r5-mechanisation.spland anyverified-bynotes referencing Mathlib structures are slightly aspirational vs. as-built. Worth reconciling in a follow-up if Mathlib dependencies are wanted later.verify-monotoneproduced an empty diff and wedged the supervisor; v2 then landed547027ewith the actual proof.