Repository navigation
feat(logic): satisfiability of clause sets - #1888
Conversation
ClauseSet.Satisfiable (decidable over finite variables), satisfiable_toCNF_iff, sat_*_iff lemmas for combined clause sets, and ClauseSet.relabel with satisfiable_relabel, mirroring CNF.relabel. Replaces the private sat_union_iff in Sparsification/Counting. First PR of cslib-community#1599. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
reviewer-codex-edemaine (non-author worker): reviewing fc349c8, including the complete clause-set API/client/test delta and its satisfiability and relabelling semantics. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine: APPROVE at fc349c8 (independent agent review, not human approval).
Read the complete four-file change, actual ClauseSet/CNF definitions and affected counting proofs. Satisfiable quantifies one assignment for all clauses; finite-variable decidability and the toCNF equivalence match the existing semantics. Relabelling pulls assignments back for any map and extends them for injective maps; clause/literal collisions explain the cardinality inequalities and the negative noninjective example. Keeping the API on the existing finite-set representation avoids the noncomputable toCNF enumeration. The general union lemma replaces the specialized private copy at the appropriate lower module.
The checked examples exercise satisfiable/unsatisfiable sets, an added contradictory clause, injection versus identification, CNF agreement and width. Independent truth-table checks confirm those semantics and empty-set/empty-clause cases. Whitespace and the 3,125-module aggregate pass. No resource or curated-abstract impact.
Author reports strict focused library/importer/test builds and static checks. At inspection all hosted workflows, including Lean CI 41158458757, were action_required; required hosted validation still needs maintainer approval. No reviewer Lean build. Live head rechecked before posting.
The converse of ClauseSet.satisfiable_toCNF_iff, with a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine: APPROVE at 71e23d7 (independent agent review).
Reviewed the complete delta from the prior review, retaining its unchanged coverage. The new CNF-to-clause-set satisfiability equivalence lifts the existing assignment-wise equivalence through the existential quantifier correctly; the negative round-trip example exercises both bridges. Documentation and whitespace checks agree. No curated-abstract impact.
Hosted workflows at this head, including Lean CI, are action_required. No additional local Lean build; the previous review records the author's focused validation. Live head rechecked immediately before posting.
|
Non-author integration coordinator Under the authorized maintainer fork-approval step, I approved existing native run 41159814052 once. GitHub resumed it as attempt 2; all six gates passed at verified synthetic checkout The first started containing main consumer was pinned before retrieval to exact The exact-main public map is available: 4,304 unique pairs, 193,693 bytes, SHA256 Milestone completed for #1599: clause-set satisfiability and relabelling have landed. I re-read its current criteria and linked PRs: covers/API #1913 remains unmerged, and the listed EQ/DISJ/NDISJ/IP bounds are outside this PR. The broader issue remains open. No selected-abstract or rendering impact; the reused reviews are agent reviews, not human approval. |
Change
First PR of #1599. Adds
Complexity/Logics/Propositional/ClauseSet/Satisfiable.lean:ClauseSet.Satisfiable(some assignment satisfies every clause; decidable over a finite variable type) withsatisfiable_toCNF_ifflinking it toCNF.Satisfiable;sat_…_ifflemmas (simpwhere useful) for satisfaction of unions, insertions, singletons, the empty set, images and indexed unions; andClauseSet.relabelwithsat_relabel_iff,satisfiable_relabel(injective maps),relabel_union,mem_relabel,card_relabel_leandcard_le_of_mem_relabel(relabelling does not widen clauses), mirroringCNF.relabel.ClauseSet.sat_union_iffreplaces the privatesat_union_iffinSparsification/Counting.lean(which now imports the new module). The results are routine. Existing notions considered:ClauseSet.Sat,ClauseSet.toCNF,CNF.Satisfiable,CNF.relabel; the new definitions are the clause-set counterparts of the last two.Tests (
ComplexityTests/ClauseSetSatisfiable.lean): satisfiable and unsatisfiable sets decided by evaluation, an added clause that destroys satisfiability, relabelling along an injective map (preserves) and along a map identifying two variables (does not), agreement withCNF.Satisfiable, and the width bound.Validation
Local, on
fc349c870(base40476ad84, dependencies as inmain's manifest):lake build --wfail --iofailof the new module,Sparsification.Countingand its importers (CountingList,CountingTree,CountingUnits), andComplexityTests.ClauseSetSatisfiable;lake exe mk_all --check;lake exe lint-style;python3 scripts/check_hygiene.py. All pass. Not run locally, since they need the whole library built: the fulllake build,lake testover the whole suite,lake lint,checkInitImportsandcheck_changed_files.py; see this PR's CI run. Batteries#linton the new declarations is clean. An independent agent review checked the definitions and statements against Kushilevitz–Nisan and this repository's conventions; its findings were applied before this revision.AI assistance
Written with Claude Code (Claude Opus 5.5) at the request of András Z. Salamon, who reviewed the design and statements. The Lean kernel checks the proofs; an independent AI review compared the statements and API with the mathematics and this repository's conventions, and its findings were applied (agent review, not human review).
🤖 Generated with Claude Code