Repository navigation
refactor(Complexity/Reduction): topic modules for polyTimeReducible_of_mem_P and oracle substitution; ≤₁ variants via ManyOneReducibleBy - #4752
Merged
Conversation
…racle substitution to topic modules
Move polyTimeReducible_of_mem_P from the Berman-Hartmanis conjecture module
to Reduction/Nontrivial.lean, and oracle substitution (P^{O1} ⊆ P^{O2} when
O1 ∈ P^{O2}) from Reduction/Turing.lean to Classes/Oracle/Substitution.lean.
Add _iff_manyOneReducibleBy bridges for the restricted one-one
reducibilities in Reduction/Isomorphism.lean and derive their refl, trans,
compl and projections from the ManyOneReducibleBy API.
Part of #4737. Jetski worker session a924892d.
Collaborator
Author
|
Agent review (Jetski reviewer session 39f68e58) of d5e4481: approve. This is agent review, not human review.
|
This was referenced Nov 12, 2026
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.
Change
This refactors the Complexity reduction modules (lane
reductionsof #4737). It adds no new result, and no statement changes.polyTimeReducible_of_mem_Pmoves to its own module,Reduction/Nontrivial.lean. The lemma says that every problem inPreduces to every problem with a member and a nonmember. It lived in the Berman–Hartmanis conjecture module, soClasses/Ladner/Density.leanhad to import the Cook–Levin and SAT padding machinery to use it. The new module imports onlyReduction, and Density now imports it. I kept the name: the hypothesis isA ∈ P encA, so dot notation would not apply to aPolyTimeReducible.of_mem_Peither.Classes/Oracle/Substitution.lean. These areComputableInPolyTimeWithOracle.of_mem_PWithOracle,PWithOracle_subset_of_mem_PWithOracleandNPWithOracle_subset_of_mem_PWithOracle(O₁ ∈ P^{O₂}givesP^{O₁} ⊆ P^{O₂}andNP^{O₁} ⊆ NP^{O₂}), plus their private simulation step. They are statements about oracle classes, and they lived inReduction/Turing.lean. The new module does not importClasses/Oracle/Lowness.lean.Turing.leanimports it publicly and uses it forPolyTimeTuringReducible.mem_PWithOracleand.trans, so its importers see the same declarations. The moved block is verbatim. The module docstring points to the many-one special casePolyTimeReducible.PWithOracle_subsetinClasses/Oracle/Monotone.lean. That module proves its case independently and covers non-Boolean outputs, so I left it alone. Turing.lean's now-unusedPolynomial.Automationimport is dropped.Reduction/Isomorphism.leanget_iff_manyOneReducibleBybridges, asPolyTimeOneOneReduciblealready has. The variants are invertible, length-increasing, and invertible length-increasing. Each bridge isIff.rfl. The bridges record that each variant is definitionally aManyOneReducibleByinstance, and they let clients state and rewrite with that API; no proof in this PR uses them. Independently, the variants'refl,trans,compland five forgetful projections now applyManyOneReducibleBy.refl/trans/compl/monodirectly through that definitional equality, instead of handobtain/refineproofs. Only the facts specific to each variant remain in these proofs: left inverses compose byhleft₂.comp hleft₁, and length increase is transitive.Net lines: +298 / −208. Most of that is the move (about 145 lines of substitution and 11 of the lemma) plus the two new module docstrings.
Isomorphism.leanis +54 / −43, and that includes the three bridge statements.Manual impact
Pat a pinned revision and describes them by meaning. It does not name the moved declarations or their modules, and the declarations keep their names and statements. The isomorphism table there names only the predicates, which are unchanged.ROADMAP.md,results/README.mdandCslibFrontierResults/do not name the moved declarations.Validation
At d5e4481 (base
3d814ebfa5;mainhas not touched these files since):scripts/check.sh --quickfell back to the full check, because the import aggregate changed. Every gate passed:lake build,lake test,lake lint,lint-style,mk_all --check,checkInitImports, source hygiene, the encoding and projection ratchets, documentation pins, the tidy statement ratchet, result registry references and changed-file lints.scripts/parallel_defs.py --theoremsreports no duplicate statement among the 22 theorems examined.scripts/proof_copies.pyreports no repeated proof block.Part of #4737
AI assistance
Jetski worker session
a924892d, plan #4737. There has been no independent review yet.