lean-cbcl review cleanup + R5 linear-fuel regression guards #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/9/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?
Summary
Addresses the 8 actionable findings from the lean-cbcl review (
lean-cbcl/review-fixes.spl) plus a follow-up runtime regression guard for the R5 fuel-bound change.Code
@[simp]literal lemmas; scope the heartbeat bump (800000 → 400000) to the two theorems that need it viaset_option ... in, instead of a file-levelmaxHeartbeats.maxHeartbeatsbumps (proofs go through under the default 200000).parseDialectClausestotal viatermination_by clauses.length; no morepartial def.pipeline_success_eq_msghelper to deduplicatepipeline_success_implies_valid(~54% LOC reduction). Helper proof usessimp only+split at hto enumerate post-validation match leaves; closes each withcases h; rfl(success leaf) orcases hvianoConfusion(validationError leaf).|names|² + 1to linear|names| + 1for bothcheckAcyclicityandcheckReachability; update relatedh_fuelproofs (now justrw [h_keys]; exact Nat.le_refl _) and docstrings. The new bound is exactly whatdfsNoCycle_top_level_acyclic/dfsReaches_complete_top_levelrequire — sound, not slack.baseProtocolfixture (mirroring Rust'slinear_protocol()test helper incrates/cbcl-core/src/protocol.rs) pluscheckAcyclicity_base/checkReachability_basenative_decideregression guards alongside R1'scheckNoCycles_base. Pins runtime behaviour so any future fuel regression or DFS termination bug fails at compile time.ContentHash.instNonemptyaxiom and its allowlist entries (the audited theorems didn't transitively depend on it; documented in the AxiomAudit header for future re-introduction if needed).Hygiene
**/.DS_Storeto.gitignore.lean-cbcl/proof-gaps.spl(all tasks completed in the merged IMPL-005 PR).lean-cbcl/review-fixes.spldocumenting this work.Verification
lake buildclean — 40/40 jobs, exit 0.scripts/check-axioms.sh—OK: 16 theorem(s) audited; all axioms allowlisted.Exit 0. The new_baseregression guards are intentionally not added to the audit (same pattern as R1'scheckNoCycles_base); they're concrete-instance runtime checks, not CON-515 contract obligations, and would otherwise leakLean.ofReduceBool/Lean.trustCompilerinto the allowlist.Test plan
lake buildis green on a fresh clone (clean + rebuild).scripts/check-axioms.shexits 0.pipeline_success_eq_msghelper proof for soundness.checkAcyclicity_base/checkReachability_baseevaluate instantly vianative_decide).