Repository navigation
refactor(Complexity/Parameterized): generic FPTHard behind WHard/WPHard; move strictVerifier to Classes/NP - #4761
Conversation
…ier to Classes/NP - New `Parameterized/Hardness.lean`: `FPTHard 𝒞`, hardness for a parameterized class under fpt-reductions, with `fptReducible`, `mono` and `subset_FPT`. `WHard t` and `WPHard` become abbreviations `FPTHard (@W t)` and `FPTHard @WP`, so their four duplicated transfer and FPT lemmas are deleted; clients reach the generic lemmas through dot notation unchanged. - `strictVerifier` and its API move from `Fagin/StrictVerifier.lean` to `Classes/NP/StrictVerifier.lean`, next to the NP verifiers. The unused tidy-hypothesis CookLevin copies of its halting argument (`CookLevin.strictVerifier_eq_true_of_tableau_satisfiable`, `CookLevin.exists_tableau_satisfiable_iff_of_strictVerifier`) are deleted. Part of #4737. Jetski worker session 1c3a6893.
|
Agent review (Jetski reviewer session b0a2721e-b109-4df0-b889-ff48fb783bb3) of 777ca29: approve. This is agent review, not human review. FPTHard. The body of strictVerifier move. The old file is deleted with no shim. The only importer, Manuals. The Non-blocking, for one small follow-up after #4670 lands (it touches the
|
Change. Two small API placements from the #4737 survey.
FPTHard.WHard tandWPHardhad the same body ("every problem of the class fpt-reduces toB"), and each carried its own copy of the transfer lemma and thesubset_FPTlemma. The newParameterized/Hardness.leanstates the notion once, asFPTHard 𝒞, the parameterized counterpart ofPolyTimeHard. It comes withFPTHard.fptReducible,FPTHard.monoandFPTHard.subset_FPT.WHard tis now the abbreviationFPTHard (@W t), andWPHardisFPTHard @WP.WHard.fptReducible,WHard.subset_FPT,WPHard.fptReducibleandWPHard.subset_FPT.WPHard.wHardis nowhB.mono ….Clique_wHard.fptReducible …andClique_wHard.subset_FPT …(inWHierarchy/Clique.lean, owned by refactor(Complexity/Problems): migrate Karp trio and coverings to structures (#4385) #4670) reach the generic lemmas through dot notation and compile unchanged, as do the tests.wHard_iffandwPHard_iffare unchanged.strictVerifierplacement.strictVerifierand its API move fromFagin/StrictVerifier.leantoClasses/NP/StrictVerifier.lean, next to the NP verifiers. The tidy-hypothesis Cook–Levin copies of its halting argument had no users and are deleted:CookLevin.strictVerifier_eq_true_of_tableau_satisfiableandCookLevin.exists_tableau_satisfiable_iff_of_strictVerifier. The new module no longer importsCookLevin.CorrectnessorTidy.Run.Net: +188/−201 over 8 files. This is a refactor, not mathematical progress.
The survey also suggested bundling the OR-compression hypotheses into an
IsORCompressionstructure. That item is dropped:compl_mem_NPPoly_of_orCompressionneeds(enc a).length = n, while the coNP and PH consequences need≤ n, so a single structure would either weaken the first theorem or not fit the second.Manual impact. Operator's Manual:
parameterized-complexity.mdnow introducesFPTHardand namesFPTHard.subset_FPT/FPTHard.fptReduciblein place of the deletedWHard.*lemmas. Agent Operator's Manual: no edit needed; it names none of these declarations.ROADMAP.md,results/andCslibFrontierResults/don't reference them either.Validation. At
777ca29109, based onb91d5151fd:lake build --wfail --iofailon the changed modules and every direct importer:Parameterized.{Hardness, WHierarchy, WHierarchy.XP, WHierarchy.Clique, WHierarchy.Clique.Graph, WHierarchy.IndependentSet},Classes.NP.StrictVerifier,Fagin.{Converse, Ordered, SAT, Ordered.Verifier},ImmermanVardi, NL ⊆ FO(TC) converse,CslibFrontierResults.Entries, and the testsFagin,OrderedFaginVerifier,WHierarchy,WHierarchyCliqueandWHierarchyXP.lake exe mk_all --check.scripts/check_operator_manual.py.scripts/proof_copies.py --base origin/main.Hosted CI runs the full validation. The PR is independent of #4757; the two touch adjacent but separate import lines of
Fagin/Converse.lean.AI assistance. Jetski worker session
1c3a6893, plan #4737.Part of #4737