Repository navigation
refactor(Complexity/FineGrained): share guarded and polyBounded rate bounds across exponent towers - #4793
Conversation
…ctionRates Move ComputableInTimeO/ExpTime/SubexpTime and their FTIME, decision and reduction-transfer lemmas verbatim from CountingExponents into a new FineGrained/FunctionRates module. CountingExponents re-exports it, and Randomized imports FunctionRates and Exponents instead of the #k-SAT module. Part of #4737
…in Bounds Add exponential-times-polynomial envelope lemmas (one_le_two_rpow_mul_pow, two_rpow_mul_pow_le_two_rpow_mul_pow, pow_le_two_rpow_mul_pow, two_rpow_mul_pow_le_natCeil_mul_add, le_two_mul_mul_of_le_mul_add) and the subexponential rescaling step natCast_mul_div_add_one_le to FineGrained/Bounds, and use them for the TimeO/ExpTime/SubexpTime monotonicity, intersection, if-then-else and measure-change transfers in FineGrained, FunctionRates, Exponents, CountingExponents and Randomized. Also folds in the #4747 review nits: drop CountingExponents' unused Nat.Power and ResourceFacts imports, and list FunctionRates among RatesNativeEndpoint's classical modules. Part of #4737.
…ed-rates-bounds # Conflicts: # CslibFrontier/Computability/Complexity/FineGrained/FunctionRates.lean # manual/machines-and-classes/native-counting.md
…with the Bounds envelope lemmas Add two_rpow_mul_pow_le_natCeil_mul_add_of_le and use the envelope lemmas in SingleSubexp (subexp transfer, machine characterisations, mono_measure, ite_polyTime, polyBounded decision, SharpKSAT_length_of_numVars).
…ction, Sparsification, ExhaustiveSearch and Randomized Use two_rpow_mul_pow_le_natCeil_mul_add, two_rpow_le_two_rpow_mul_of_le_mul_add and natCast_mul_div_add_one_le for the remaining inline copies; list two_rpow_le_two_rpow_mul_of_le_mul_add in the Bounds main results.
…bounds across exponent towers Prove ComputableInTimeO.ite_polyTime_of_le and DecidableInTimeO.of_computableInTimeO_polyBounded once for an arbitrary nonnegative exponent x, and derive the ExpTime and single-machine subexponential versions (ite_polyTime, of_*_polyBounded, SharpKSAT_length_of_numVars) from them. Add ite_all_length_le_SharpKSAT for the #k-SAT width guard. Shorten the CountingEndpoint interpolationScale bridges with the Bounds absorption lemma and derive exists_two_pow_mul_interpolationScale_le from exists_two_pow_le_of_isLittleO. Part of #4737.
|
Agent review (Jetski reviewer session cc43f285-7071-419a-a0c4-962f5bb4fec0) of c388f02 (top commit only, on #4782 at 92cc593): approve. This is agent review, not human review. Statements. A declaration diff of 92cc593..c388f02 adds three theorems: General lemmas. The hypotheses are the right ones. Client proofs. I read all eight.
The "not done" reasons hold. Other checks.
Merge. merge-tree of c388 against Non-blocking. After this commit, CI on c388 was still running when I wrote this (ci-checks and guide pending), so I have not yet read the parallel-definition and duplicate-statement notices. I will read them and re-check this verdict after #4782 lands, when the author merges main and marks the PR ready, before queueing. Do not queue before then: this is a draft, stacked on #4782. |
…ed-rates-bounds # Conflicts: # CslibFrontier/Computability/Complexity/FineGrained/CountingExponents.lean # CslibFrontier/Computability/Complexity/FineGrained/Exponents.lean
…finegrained-rates-absorb
…ed-rates-absorb # Conflicts: # CslibFrontier/Computability/Complexity/FineGrained/CountingExponents.lean # CslibFrontier/Computability/Complexity/FineGrained/FunctionRates.lean # CslibFrontier/Computability/Complexity/FineGrained/SingleSubexp.lean
|
Coordination correction: the complete prior review explicitly retains reviewer |
|
Merge check (Jetski reviewer session cc43f285-7071-419a-a0c4-962f5bb4fec0) of edd350b: approve. My approval of the top commit c388f02567 carries to this head. This is agent review, not human review. Delta. #4782 landed as 815facf, and this head merges Validation at this head. ci-checks, guide, title and HTTP cache pass. The notices:
Findings. There are no review threads or other reviews. coordinator-codex-edemaine's 6837246628 handed this final check to this review and raised no finding. My earlier note about Queueing this exact head. |
Proves the guarded-time and polyBounded-decision bounds once, for an arbitrary nonnegative exponent, so the exponential-rate (
FunctionRates/CountingExponents) and single-machine subexponential (SingleSubexp) towers stop carrying parallel copies of the same arithmetic. This is survey items F5 and F2(c) of #4737. It is infrastructure/refactoring only: no statement of an existing declaration changes.Change
FunctionRates: newComputableInTimeO.ite_polyTime_of_le(a polynomial-time guard and fallback, fromO(2 ^ x a · (L+1)^e)toO(2 ^ y a · (L+1)^e')for any nonnegativey ≥ xon the guarded branch) andDecidableInTimeO.of_computableInTimeO_polyBounded.ComputableInExpTime.ite_polyTimeandDecidableInExpTime.of_computableInExpTime_polyBoundedbecome two-line corollaries.SingleSubexp:ComputableInSingleSubexpTime.ite_polyTime,DecidableInSingleSubexpTime.of_computableInSingleSubexpTime_polyBoundedandComputableInSingleSubexpTime.SharpKSAT_length_of_numVarsare derived from the same two lemmas. They no longer go through the∀ δmachine characterization.CountingExponents: newite_all_length_le_SharpKSAT(the#k-SATwidth guard fork ≤ k'), used bySharpKSAT_of_leand by bothSharpKSAT_length_of_numVarsproofs.ComputableInExpTime.SharpKSAT_length_of_numVarsusesite_polyTime_of_lewithy = k·δ·length.CountingEndpoint:DecidableInSubexpTime.of_interpolationScaleis nowexists_two_pow_mul_interpolationScale_leplus the Bounds lemmatwo_rpow_mul_pow_le_natCeil_mul_add_of_le(the same two steps asDecidableInSingleSubexpTime.decidableInSubexpTime), andof_computableInO_interpolationScaleisof_interpolationScaleafterDecidableInTimeO.mono.CountingScale:exists_two_pow_mul_interpolationScale_leis derived fromexists_two_pow_le_of_isLittleOandisLittleO_interpolationScaleinstead of repeating the finite-prefix argument.Net −101 lines in 5 files.
proof_copiesdrops theite_polyTime,polyBoundedandSharpKSAT_length_of_numVarscross-file pairs. The one remaining pair (*_iff_exists_machineinSingleSubexp) is survey F2(b), which is not in this PR.Not done, and why
DecidableInSingleSubexpTime+.decidableInSubexpTime. That route needsmax A₀ 0clamping (A₀may be negative) and would makeCountingEndpointimportSingleSubexp, pullingCountingExponents/FunctionRatesinto its closure. Using the two lemmas that.decidableInSubexpTimeitself uses directly is shorter and adds only the lightBoundsimport.CountingEndpoint.KSAT_of_dense_modelCount_interpolationScalestill has its envelope-power block. There the count's output length is bounded only by its running time, not polynomially inL, so neither new lemma applies. A general lemma for that shape would be about as long as the block.add_le_mul_two_rpow_mul_powis not added. After refactor(Complexity/FineGrained): shared envelope and rescale lemmas in Bounds #4782 the remaining sequential-composition blocks close withpow_le_two_rpow_mul_pow/one_le_two_rpow_mul_powandlinarith, and a combined lemma did not shorten them.SolvesWithErrorInExpTime.KSAT_of_le(Randomized) keeps its reduction to[[]]. Randomized has no polynomial-timeinterlemma, and the width-guard lemma above is aboutSharpKSAT, not membership.Manual impact
Operator's Manual and Agent Operator's Manual: no edit needed. No anchored line, quoted excerpt or documented workflow refers to the changed proofs (
check_operator_manual.py: 0 errors). ROADMAP, the results inventory and upstream markers are unaffected.Validation
buildslot lake build --wfailon the changed modules and their direct clients (Randomized, RatesNativeEndpoint, CountingCSP, CountingNativeEndpoint, CountingScaleBounds, DensityBranchCounting, ReplacementParams, SparseCountingScale, WordRAM) plus testsFineGrainedRatesandCountingSparsifyPolyTime. Also:mk_all --check,lint-style, hygiene--check-simp, both ratchets, source lints,check_operator_manual.py. Hosted CI runs the full validation.#4782 has landed and
mainis merged in (the conflicts were squash-only: those three files are identical onmainand #4782's head). Agent review by cc43f285 approved the top commit c388f02, and the diff againstmainis now exactly those 5 files.AI assistance: Jetski worker session
3a99a381, plan #4737.Part of #4737