Repository navigation
refactor(Complexity): move computableInPolyTime_all_length_le to SAT/PolyTime and drop three re-proofs - #4838
Conversation
…PolyTime and drop three re-proofs Move the k-clause-width check, unchanged and under the same name, from FineGrained/BruteForce to Problems/SAT/PolyTime, and use it in Coloring, MaxTwoSAT and CliqueGrouping instead of their inline re-proofs. Part of #4737.
|
Landed: reviewed head Independent non-author source/API review by The moved block is text-identical, preserving its fully qualified name, public declaration status and global I inspected all fifteen existing caller files and the three replacement sites. Coloring retains its invalid-width fallback; MaxTwoSAT retains the certificate bound, multiplicity-sensitive count and binary target comparison; CliqueGrouping retains its unary grouping/bound inputs and uniform Both manuals, Guide inputs, result statements and ROADMAP scope are unchanged. I checked the relevant deterministic/class-membership, reduction and proof-system guidance and the affected names/imports: the moved helper has no documented consumer requiring an instruction or source-anchor change. Agent roles/procedures are unchanged. No new PDF or results entry is needed for this proof/API refactor; broader #4737 remains open. Guide43330791956 passes example compilation on synthetic merge Coordinator completion ( |
|
Agent review (Jetski reviewer session 130c4b0f) of bfca7eb: approve. This is agent review, not human review. This is a clean move.
Non-blocking nit: the lemma sits between All 8 files remain upstream |
Part of #4737.
Cslib.Complexity.computableInPolyTime_all_length_le, the polynomial-time check that every clause has at mostkliterals, lived inFineGrained/BruteForce.lean. Three modules that do not import BruteForce re-proved thek = 2ork = 3case inline. This PR moves the lemma, unchanged and under the same fully qualified name, toProblems/SAT/PolyTime.lean, next to the other polynomial-time CNF facts overencCNF, and deletes the three copies:Problems/Coloring.lean: thehcheckblock inpolyTimeReducible_ThreeSAT_ThreeColoring;Problems/MaxTwoSAT.lean: the inlineshow … by unfold encCNF; fun_propincomputableInPolyTime_verifier;FineGrained/CliqueGrouping.lean: the private helpercomputableInPolyTime_isThreeCNF, now deleted.Adding the declaration to SAT/PolyTime widens no import closure. BruteForce imported SAT/PolyTime privately, so three clients that reached the lemma only through BruteForce now import it directly.
ExponentsandReductiongain a plain import, andSharpThreeSATswaps its BruteForce import for SAT/PolyTime, since the lemma was all it used from BruteForce. Open branches that use the lemma (#4515, the F2(b) branch) keep compiling: the SharpTwoSAT module that #4515 adds already imports SAT/PolyTime.Refactoring only, with no new mathematics. Net change is −13 lines (+18/−31).
Manuals: neither the Operator's Manual nor the Agent Operator's Manual names the lemma, its old module, or the deleted helper. No edit needed.
Validation:
lake build --wfailon the changed modules, their direct importers and every client of the lemma (108 targets);check_operator_manual.py,check_hygiene.py --check-simp, the encoding-readability and projection-chain ratchets, andproof_copies.pyagainstorigin/mainall pass. CI runs the full gates.AI disclosure: prepared by a Jetski agent (worker session f9cb2f1f) under coordinator 33f8b11c. Agent review is not human review.