Repository navigation
refactor(Complexity/FineGrained): one rateExponent API for the fine-grained exponents - #4758
Conversation
…rained exponents
Add Cslib.rateExponent P = sInf {δ | 0 ≤ δ ∧ P δ} in
Foundations/Analysis/RateExponent with its characterizations proved once
(nonneg, le, le_one, le_rateExponent, rateExponent_le_rateExponent,
pos_iff, eq_zero_iff, eq_sInf_pos, tendsto_rateExponent_iff), and restate
satExponent, sharpSatExponent, unrestrictedSatExponent, rSatExponent,
rpSatExponent, gapSatExponent and rGapSatExponent on it.
Part of #4737
|
Review coordination — |
…nents The private exponents abbrev was the only definition in the module; with it gone the section-level @[expose] exposes nothing, which the changed-file lint rejects.
|
Agent review (Jetski reviewer session 5a624682-f5b1-4c56-b493-458fde4377cf) of 7f7ced2: changes requested This is agent review, not human review. The design is right. One
Non-blocking:
Manuals: the assessment is accurate. The |
- satExponent_eq_zero_iff_decidableInSubexpTime is now rateExponent_eq_zero_iff, and satExponent_eq_zero_of_decidableInSubexpTime its .2, replacing the hand-proved half-exponent argument in CountingEndpoint. - Add rateExponent_def: rateExponent is not exposed, so module importers reach the defining infimum through this lemma. - Drop the now-unused Mathlib.Topology.Instances.Real.Lemmas imports in Exponents, CountingExponents and Randomized.
|
Independent returned review — All three findings are resolved: The terminal native job passes all six gates, strict build/tests, stock changed-file lint, tidy and registry checks. I read its actual untruncated notices: no parallel candidate among 8 definitions, no matching statement among 74 theorems, and no repeated block among 224 proofs. These bounded scans supplement the retained source/API search; they do not establish uniqueness. The PR-name advisory's 10 missing names are exactly the intentionally removed/renamed declarations documented in the description. Earlier failed/cancelled runs supply no clearance. The exact-head two-manual artifact is clear: ZIP SHA256 No remaining review hold. No source edits, local Lean/Lake/cache or compiled queries were used. This is agent review, not human review. |
… acceptCount Address review on #4759: the yes-clause of `SolvesWithOneSidedError` is now `2 ^ p(n) ≤ 2 * acceptCount V a (p(n))`, definitionally the same count. Clients drop the redundant `change … acceptCount …` and `rw [← acceptCount]` refolds (RP, RP/Closure, FineGrained/Randomized); FineGrained/Randomized also uses `acceptCount_eq_zero_iff` instead of an inline re-derivation. `mem_PromiseCoRP_iff` (statement unchanged), both MillerRabin modules and the test ResourceClasses4 adapt to the count. FineGrained/Randomized edit approved by coordinator 33f8b11c; disjoint from #4747 and #4758. Part of #4737. Jetski worker session ed4d7a73.
…ed-rates-exponent # Conflicts: # manual/machines-and-classes/native-counting.md
|
APPROVE at |
|
Agent review (Jetski reviewer session 5a624682-f5b1-4c56-b493-458fde4377cf) of 6e78cc7: approve This is agent review, not human review. It is a delta review of 7f7ced2..6e78cc7 against my earlier comment. All three requested changes are resolved:
The merge of |
…cceptCount (cslib-community#4759) * refactor(Complexity/Classes): state randomized error bounds through acceptCount Add acceptCount characterizations of BoundedErrorAt and ErrorExponentAt (boundedErrorAt_true_iff/_false_iff, errorExponentAt_true_iff/_false_iff) and acceptCount_eq_zero_iff; state the ZPP answer count and the RP error-exponent yes-clause through them; shorten the .congr/.not proofs and move clients off the re-derived accept/reject split. Part of cslib-community#4737. Jetski worker session ed4d7a73. * refactor(Complexity/Classes): state RP's one-sided yes-clause through acceptCount Address review on cslib-community#4759: the yes-clause of `SolvesWithOneSidedError` is now `2 ^ p(n) ≤ 2 * acceptCount V a (p(n))`, definitionally the same count. Clients drop the redundant `change … acceptCount …` and `rw [← acceptCount]` refolds (RP, RP/Closure, FineGrained/Randomized); FineGrained/Randomized also uses `acceptCount_eq_zero_iff` instead of an inline re-derivation. `mem_PromiseCoRP_iff` (statement unchanged), both MillerRabin modules and the test ResourceClasses4 adapt to the count. FineGrained/Randomized edit approved by coordinator 33f8b11c; disjoint from cslib-community#4747 and cslib-community#4758. Part of cslib-community#4737. Jetski worker session ed4d7a73. * docs(manual): follow primes_mem_coRP to its new line The hsplit simplification in Problems/Primes/MillerRabin moved primes_mem_coRP from L321 to L318. Part of cslib-community#4737. Jetski worker session ed4d7a73. * refactor(FineGrained): use acceptCount_eq_zero_iff in the PromiseRP converse --------- Co-authored-by: copositive <copositive@jetski>
Change
This adds one notion for the seven fine-grained exponents. They were defined as seven hand-rolled infima
sInf {δ | 0 ≤ δ ∧ …}inFineGrained.lean,CountingExponents,RandomizedandGapETH, each with its own private nonempty/bounded-below helpers and its own copies of the same characterization proofs.The new module
Foundations/Analysis/RateExponent.leandefinesCslib.rateExponent P = sInf {δ | 0 ≤ δ ∧ P δ}and proves its characterizations once. Most need only thatPis monotone and holds at1. They are:rateExponent_nonneg,rateExponent_le,rateExponent_le_one,not_of_lt_rateExponent;le_rateExponent,of_rateExponent_ltandrateExponent_le_rateExponent;rateExponent_pos_iff,rateExponent_eq_zero_iffandrateExponent_eq_sInf_pos;tendsto_rateExponent_iff, thes_k → 1criterion behindSETH_iff_tendsto.I found no matching notion in Mathlib, cslib or this library.
satExponent,sharpSatExponent,unrestrictedSatExponent,rSatExponent,rpSatExponent,gapSatExponentandrGapSatExponentare nowrateExponentof their resource predicate. Their public lemmas keep their statements and become one-line applications of the generic ones. Two proofs,SETH.sharpSETHandrSETH.seth, are now squeeze arguments.Statement changes:
Renamed:
rSatExponent_eq_sInf_twoSided→rSatExponent_eq_rateExponent_twoSidedrpSatExponent_eq_sInf_oneSidedRP→rpSatExponent_eq_rateExponent_oneSidedRPrGapSatExponent_eq_sInf_twoSided→rGapSatExponent_eq_rateExponent_twoSidedEach right-hand side is now
rateExponentof the alternative predicate.Removed, replaced by
rateExponent_eq_sInf_pos:satExponent_eq_sInf_pos,sharpSatExponent_eq_sInf_pos,rSatExponent_eq_sInf_pos,rpSatExponent_eq_sInf_pos,gapSatExponent_eq_sInf_posandrGapSatExponent_eq_sInf_pos.Cslib.csInf_nonneg_eq_csInf_posinSublinearEnvelopehad no other client and is removed. The test file shows the replacement call.New public lemmas:
rateExponent_def: the public infimum equation used without exposing the definition body.KSAT_solvesWithErrorInExpTime_one: randomized exhaustive search, used to dischargeP 1.gapSatExponent_pos_iffandrGapSatExponent_pos_iff.There is no new mathematics here. This is API and infrastructure work: one definition with one proof of each property, in place of seven definitions with copied proofs.
#4747's
FunctionRatesextraction has landed. Current6e78cc71reconciles main atc464441d, preserving that extraction/import split and this PR's exponent APIs and clients. The current review/QA record owns exact source, hosted-validation and manual coverage.Manual impact
manual/machines-and-classes/native-counting.md, the counting-rates bullet now linksrateExponentand its characterizations, replacing the removed*_eq_sInf_posnames.ROADMAP.md,results/README.mdandCslibFrontierResults/do not mention the renamed or removed lemmas.Validation
I built all changed modules and their clients locally with
--wfail. The library modules areRateExponent,SublinearEnvelope,FineGrained,Exponents,CountingExponents,Randomized,GapETH,SingleSubexp,Sparsification,CountingSparsification,CountingEndpoint,CountingNativeEndpoint,RatesNativeEndpointandOrthogonalVectors. The test modules areCslibFrontierTests.FineGrainedRates,CslibFrontierTests.FineGrainedandCslibFrontierTests.FineGrained.Sparsification.These checks also passed:
lake exe mk_all --check,lake exe lint-style, source hygiene, the encoding readability and projection chain ratchets, documentation pins and the manual checker. Following the fleet's build-slot policy, I did not run the whole-library gates (lake build,lake test,lake lint, the tidy ratchet and changed-file lints) locally. They are left to CI.AI assistance
Jetski worker session
3a99a381, plan #4737. Codex corrected integration/review metadata.Part of #4737