Repository navigation
V-CNF2: one Lean theorem from cnf-check + LRAT to no default-Φ layout - #129
Merged
Merged
Conversation
Bring in OptCheck, Dimacs, the L2 library and the mirror-trust work before the V-CNF2 commit; conflicts in RedstoneFormal.lean, Audit.lean, lakefile.toml and exact/mod.rs keep both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Intent: turn the argued glue of V-CNF (section 4 of cnf_grounding_check.md) into one Lean theorem chain, so a cnf-check verdict plus an LRAT refutation says something about Phi layouts instead of about an unverified imperative loop. - CnfCheckLib: the checker is rewritten functionally (foldl over families, cardFold/tagAtMost, acceptKey/finalVerdict). Behaviour is the same on the 7 dumps. Report.ok now also requires a strict final match, a well-founded meaning table, dead tuples staying dead and no literal 0. needLit rejects literal 0. - CnfCompose (new): meaning assignment asg, resolve_sound, the family-loop invariant, check_sound, and no_valuation_of_lrat (check ok + LRAT.check ok => no valuation satisfies the regrounded families). - CnfPhi (new): the valuation nuOf of a layout and the vocabulary restriction Vocab. decl_hold and early_hold prove that every family that reads no Feeds relation holds for a PhiSol layout within the budget. late_live drops dead tuples safely. no_phi_layout_of_lrat(_wf) is the end-to-end statement in the LRAT-certificate shape. - Remaining assumptions: LateHold (the Feeds-reading families), Vocab, and the compiled checker. - cnf-check prints Inst.wf and includes it in its exit verdict. - Audit guards are added for the new theorems. - Measured: all 7 dumps are still ALL ACCEPTED at the same times, and 8 of 8 sign-flip mutants are rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # formal/RedstoneFormal.lean # formal/RedstoneFormal/Audit.lean # formal/lakefile.toml # src/transform/place_and_route/local_placer/exact/mod.rs
Intent: keeping both sides of the mod.rs conflict declared the module twice. Co-Authored-By: Claude Opus 5.5 <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.
Follow-up to #125. The CNF grounding check is now one Lean theorem chain.
CnfCompose.lean: provescheck_sound(throughresolve_soundandfamilies_sound) andno_valuation_of_lrat. The checker was rewritten functionally; its behaviour is unchanged.CnfPhi.lean:decl_holdandearly_holdshow thatPhiSollayouts satisfy the declaration families and the early families.no_phi_layout_of_lrat_wfis the end-to-end theorem: cnf-check ok, plusInst.wf, plusLRAT.checkgive no default-modePhiSollayout within budget b.LateHold: the three Feeds-reading rule families hold for the layout.Vocab: signal classes and the mirror lex-leader.dimacsCnfmatchesparseDimacs(argued).Report.oknow requires a strict final match, a well-founded meaning table and that dead tuples stay dead.Docs:
docs/cnf_grounding_check.md§4 and §7. No sorry or native_decide; 11 Audit guards.🤖 Generated with Claude Code