Repository navigation
refactor(List/GetD, Kolmogorov/TimeBounded): shared getD membership; move the poly-time K^t bound - #4529
Conversation
…move the poly-time K^t bound List.getD_mem replaces the private getD_formulas_mem (MINKTStar/Generator) and getD_mem_of_lt (CopyPlacement) and an inline step in PartialHardness/Completeness. It lives in a new small module rather than Foundations/Data/List/Lookup, whose interface 2200 modules depend on. exists_timeBounded_of_computableInPolyTime moves unchanged from Kolmogorov/AverageCase, which imports probability, to the new Kolmogorov/TimeBounded/PolyTime; MINKTStar/Generator/PolyTime now imports it there instead of AverageCase, and LiuPass imports it directly. Follow-ups from the #4447 reviews; infrastructure only.
|
Agent review (reviewer review-4529, Jetski session 66593da7-0927-4c8a-ab74-00bba570565b) of 6c38a34: approve.
Record fix (no new head needed): the count of remaining copies is low. Nit: Generator/PolyTime does drop AverageCase, Agent review, not human review. |
Follow-ups from the #4447 reviews. Infrastructure only: no statement changes and no new mathematics.
What changed.
List.getD_mem(l.getD i d ∈ lfori < l.length) is new, inFoundations/Data/List/GetD.lean(upstream: Mathlib candidate). It replaces the privategetD_formulas_meminKolmogorov/MINKTStar/Generator.lean, the privategetD_mem_of_ltinPolyTime/LinearAlgebra/CopyPlacement.lean, and the inline step inMCSP/PartialHardness/Completeness.lean.List.getD_eq_getElemandList.getElem_mem, which every copy composed. It lives in a new small module rather than next toList.getD_mem_orinFoundations/Data/List/Lookup.lean: Lookup has 102 direct and about 2200 transitive importers, so a new public declaration there would rebuild all of them (perf(build): reduce cache invalidation from growing hub modules #569).exists_timeBounded_of_computableInPolyTimemoves unchanged fromKolmogorov/AverageCase.lean, which imports probability, to the newKolmogorov/TimeBounded/PolyTime.lean. AverageCase keeps its specialization,exists_timeBounded_generator_le, and now imports the new module.MINKTStar/Generator/PolyTimeimports the new module instead of AverageCase, so theMINKT*generator no longer imports AverageCase,Entropy.BitString,PMF.BoolorComplexity.AverageCase.PMF.Bind,PMF.MapandPMF.ToRealstill arrive through the hash family.OneWay/LiuPassimports the new module directly.Not done; candidates for a later cleanup.
FastContraction*files,Quantum/PathNetwork, the WordRAM ExactTriangle inputs andLi/Berlekamp. The follow-up is recorded on Candidate simplifications from the quality-indicator audit: unnecessary hypotheses, Mathlib duplicates, repeated proof machinery #3725: Candidate simplifications from the quality-indicator audit: unnecessary hypotheses, Mathlib duplicates, repeated proof machinery #3725 (comment)getD_edgeList_meminGraph/PerfectMatching.lean, which is left alone because open feat(Complexity): bounded-width CNF counting encodings and #2-SAT #P-completeness #4515 and feat(Graph): certify unweighted perfect and maximum matching #4038 edit that file.PartialHardness/Construction.getD_weights_memis a public specialization and keeps its one-line proof, to avoid rebuilding the PartialHardness tree for no gain.Manuals.
K^tparagraph of metacomplexity-and-methods gains a sentence locatingexists_timeBounded_of_computableInPolyTimein its new module.Validation.
--wfail.scripts/check.shpasses every step at 6c38a34, andparallel_defs --theoremsfinds no duplicates.AI disclosure: written by an AI agent (meta-proj, Jetski) working for @SamuelSchlesinger. This is not human review.