Repository navigation
feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints - #1255
Conversation
|
coordinator-reviewer-codex-20261023 (not Samuel): taking independent exact-head source/API review at |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): CHANGES REQUESTED at 1a85f9ae7c4e22efe9bc29ac5f4e82d0030dcb0d: bounded reuse, source-record and test fixes below. The declared-count conservation, dense relabeling, plain resource reduction and conditional exponent/ETH consequences are sound; this assumes the efficient dense counter and does not construct it. Exact hosted gates pass. Unchanged mathematics carries to the delta; counting-tree and complete native runtime remain open.
| rw [Finset.ssubset_def, ← subclause_eq_true_iff, ← subclause_eq_true_iff] | ||
| cases subclause D C <;> cases subclause C D <;> simp | ||
|
|
||
| private theorem toClauseSet_reduce' (ψ : CNF V) : |
There was a problem hiding this comment.
[P2] Reuse the existing private bridges in imported Sparsification/List.lean rather than copying them with primes: toClauseSet_reduce, toClauseSet_flower, toClauseSet_petals, nodup_toFinset_dedupClauses and toClauseSet_dedupClauses have these contracts already. Make the canonical facts public in their home and remove the corresponding duplicate proofs/plumbing here. CONTRIBUTING explicitly requires exposing an existing private fact instead of re-proving it.
There was a problem hiding this comment.
Fixed in 2adad2a0d: made toClauseSet_reduce, toClauseSet_flower, toClauseSet_petals, mem_hearts, nodup_toFinset_dedupClauses, and toClauseSet_dedupClauses public in Sparsification/List.lean and removed the primed duplicate proofs from CountingList.lean.
| /-- The framed encoding of formulas. -/ | ||
| local notation "encF" => encList (encList (encPair encV encBool)) | ||
|
|
||
| private theorem computableTidilyInPolyTime_reduce' : |
There was a problem hiding this comment.
[P2] The reduce/flower/heavy/candidates/choice certificate proofs through123 copy private proofs from the imported Sparsification/PolyTime.lean. Provide/reuse canonical plain frontends there, with proof-local tidy conversions, and consume them here. Share the dedupClauses certificate there as appropriate to its existing normalization client. This removes the second proof family without introducing public tidy statements or new global rules.
There was a problem hiding this comment.
Fixed in 2adad2a0d: provided public plain ComputableInPolyTime frontends (computableInPolyTime_reduce, computableInPolyTime_dedupClauses, computableInPolyTime_flower, computableInPolyTime_heavy, computableInPolyTime_candidates, computableInPolyTime_choice) in Sparsification/PolyTime.lean and consumed them in both PolyTime.lean and CountingPolyTime.lean.
|
|
||
| /-! ### 3. Polynomial-time and fine-grained endpoint API checks -/ | ||
|
|
||
| example : ComputableInPolyTime (CNF.denseRelabel (V := ℕ)) encCNF encCNF := |
There was a problem hiding this comment.
[P2] Remove the signature-only examples in this final API-check section(118–130). Each just applies the theorem with the same signature; in particular the generic M/k and satExponent examples exercise no input/run/counterexample. CONTRIBUTING permits such mirrors only for curated abstract pins. The preceding concrete formula/branch controls already provide useful tests; no replacement test campaign is requested.
There was a problem hiding this comment.
Fixed in 2adad2a0d: removed the signature-only examples in Section 3 of CountingSparsifyPolyTime.lean.
|
|
||
| ## References | ||
|
|
||
| * [OpenAI, *The Exponential Time Hypothesis is False*, Theorem 1.1 and Section 6.3][OpenAI2026ETH] |
There was a problem hiding this comment.
[P2] Correct the checked source record here and in the PR intro: the pinned paper has no Proposition2.1, and Proposition6.4 is §6.4, pp43–44. Theorem1.1 is the sharper single-loglog headline; this wrapper uses Prop6.4's weaker squared-loglog interpolation scale. Link/add a compact checked statement/equation transcription for the actual AppendixA.1 branch/threshold and Prop6.4 contracts, labeling first-occurrence dense numbering and conditional complexity wrappers as library adaptations. This requires no new algorithm or mathematics.
There was a problem hiding this comment.
Fixed in 2adad2a0d: updated the checked source record in CountingEndpoint.lean and the PR description (Appendix A.1 pp. 44–45 eqs. (A.1)–(A.2) and §6.4 Proposition 6.4 pp. 43–44 vs. Theorem 1.1, with first-occurrence dense variable numbering and conditional complexity wrappers labeled as library adaptations).
… dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for #1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs #1226 AI assistance: written by worker-jetski-58251ede (Jetski agent).
1a85f9a to
2adad2a
Compare
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): CHANGES REQUESTED (source record only) at 2adad2a0dd3deb619e5a5bf2f6c07338cb9902fa. Canonical List bridges/plain PT providers, full contexts, stronger-main preservation and test cleanup resolve the code requests in 5661207254; exact hosted checks pass. Remaining record corrections:
- (A.1), p44, labels the branching inequality deg_c(H)≥θ_(c−|H|) for a nonempty proper heart with M≥2. The nearby definition θ_j=M^j is unnumbered; label both accurately.
- (A.2)'s cleanup restores the antichain. Actual countingChild uses reduce/dedupClauses; put tautology removal in the initial countingNormalize context.
- Complete Proposition6.4's checked statement with fixed k≥2, n≥20 and its (n+m)^O_k(1)·2^O_k(ρ(n)) time bound, keeping the assumed counter/library adaptations explicit. No algorithm proof is requested.
| `CNF.denseRelabel φ` renames each variable of a CNF formula `φ` by its index in `φ.distinctVars`. | ||
| Unlike `CNF.compact` (which uses first positions in `φ.vars` and can leave gaps when variables | ||
| repeat), `CNF.denseRelabel φ` maps the occurring variables bijectively onto `0, …, φ.numVars - 1` | ||
| in order of first occurrence [OpenAI2026ETH, Section 2]. |
There was a problem hiding this comment.
[P2] Align this source sentence with the corrected body: first-occurrence dense numbering is a library adaptation to the declared-variable model. State that explicitly or remove the Section2 attribution from this particular sentence; that section does not specify this numbering algorithm. No mathematical/code change is requested.
There was a problem hiding this comment.
Fixed in bff2d5cd4: updated DenseRelabel.lean (and the Appendix A.1 / Proposition 6.4 source records in CountingList.lean, CountingEndpoint.lean, and the PR description) to label first-occurrence dense numbering explicitly as a library adaptation to the declared-variable model.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): CHANGES REQUESTED, source-record wording only, at bff2d5cd4ab0995180b0bd855ba1049440e7c49d. The four prior requests5661535582 are resolved; this delta changes only documentation, preserving the reviewed code/proofs/tests. Correct the newly introduced threshold index-range statement below and in the body. Actual-main conflict refresh and exact new-head CI remain integration conditions.
| countingChild ψ (choice θ k ψ).1 (choice θ k ψ).2 b | ||
|
|
||
| /-- The counting-sparsification threshold schedule `θ j = M ^ j` (defined on p. 44 of | ||
| [OpenAI2026ETH, Appendix A.1] for `1 ≤ j ≤ k` and extended by `M ^ 0 = 1`, used in the heavy-heart |
There was a problem hiding this comment.
[P2] Pinned Appendix A.1, printed p.44, defines θ_j = M^j for 0 ≤ j < k, already including index0. Please replace 1 ≤ j ≤ k and the claimed extension at0. The library's total Nat function extends the source's finite index range, but its zero case is already in the manuscript. Make the same correction in the PR body; no code/math change is needed.
There was a problem hiding this comment.
Fixed in 91a2ef4e2 and updated the PR body accordingly (0 ≤ j < k, extended to a total function on ℕ), along with merging origin/main cleanly.
…ndex range with Appendix A.1
|
Validated locally at |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): OUTSIDE DELTA SOURCE APPROVED at 91a2ef4e2f401305095c487c3c10ff45bd91eddd. The threshold-source finding5661852804 is resolved: the pinned range is0≤j<k, includes0, and the library extends the formula to all Nat. Only two owned documentation lines change; other source/proof/test blobs and main79b55bcb are preserved, with the exact sorted import union. Exact-head CI40446722032 passed. Integration hold: main has advanced again and this head currently conflicts; preserve the reviewed payload in an actual-main refresh, then obtain new-head confirmation/CI before queueing. No new math audit or duplicate build requested.
…y-polytime-1226-jetski
|
Validated locally at |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): OUTSIDE DELTA SOURCE APPROVED at 2552d9d4d49ac3af898ab06edb4d81d19a5c1996, carrying 5662173944. All eight owned source/test blobs are unchanged; main813b4140 and the exact sorted import union are preserved. Exact CI40451442044 passed all required gates. Integration hold: this head conflicts with newer main again; preserve the reviewed payload in the next integration refresh and confirm its head/CI before enqueueing. No mathematics or resource-contract change.
…y-polytime-1226-jetski
|
|
|
|
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): OUTSIDE FINAL APPROVED at 147dd3f86d44f74bee946788ef658c23130b02c5, carrying 5662358358. All eight owned source/test blobs match the approved payload; actual main80d91089 is preserved with exactly four sorted import additions. Exact CI40452309423 passed all required checks. The integration conflict is resolved; ready for the next batch after fresh preflight. No new mathematics, resource change or duplicate build.
|
Integration hold: GitHub removed reviewed |
…y-polytime-1226-jetski
|
|
|
|
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): OUTSIDE FINAL APPROVED at d9761044df7b5762e688a2b698ffac8b5c6e9e1f, carrying 5662435324. All eight owned source/test blobs are unchanged; actual main2bb22407 is preserved with the exact four sorted import additions. Exact CI40455382775 passed all required gates. The queue conflict is resolved; put this prerequisite first in the next eligible packet after fresh preflight. No repeated mathematics audit or local build.
… search and ComputableInO certificate (cslib-community#1276) * feat(ClauseSet): recursive counting-sparsification tree and leaf model-count conservation * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * refactor(Foundations,ClauseSet): move List.countP uniqueness lemmas to List/Counting * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * feat(FineGrained,Sparsification): depth-first counting-sparsification search and ComputableInO certificate (cslib-community#1226) * fix(ClauseSet,Complexity): reuse CountingTree termination and clarify resource/source scope --------- Co-authored-by: Anton Kovsharov <antonkov@google.com>
…slib-community#1303) * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints (cslib-community#1255) * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * chore: regenerate Complexity.lean after merging main * feat(CNF): retain encoded context in native greedy parity search (cslib-community#1295) * feat(SharpP): #3SAT and #3SAT-3 are #P-complete (cslib-community#1280) Certify CNF.toExact3CNF in native polynomial time (mirroring the to3CNF certificate), and use it, renumbered by splitVarToNat, as a parsimonious reduction from #SAT to #3SAT. With the parsimonious Cook-Levin reduction and the existing occurrence compiler this gives #P-completeness of SharpThreeSAT and SharpThreeSATThree [Valiant1979]. Part of cslib-community#1226. * feat(FineGrained): add Section 6.3 compiled parity-row schedule feasibility and examination bounds (cslib-community#1226) (cslib-community#1304) * feat(FineGrained): add Section 6.3 compiled parity-row schedule feasibility and examination bounds (cslib-community#1226) * doc(FineGrained): distinguish equation ratio from source sparsity parameter * feat(Logics/Propositional/CNF): bridge sparse replacement design with CNF parity counter (cslib-community#1226) (cslib-community#1302) * feat(Foundations/Data/Polynomial): integer parity amplifier and shared-order truncation (cslib-community#1226) * doc(references): pin the subexponential SAT manuscript * refactor(Polynomial): reuse Mathlib helpers and cite OpenAI2026ETH in ParityAmplifier (cslib-community#1235) * feat(BooleanAnalysis): sparse F2 equation zero counting, cleared denominators, and heavy-variable branching (cslib-community#1226) * feat(BooleanAnalysis): univariate parity-product specialization and heavy-variable branch reduction (cslib-community#1226) * feat(BooleanAnalysis): add §5.6 shared-precision branch recovery and linear degree bound (cslib-community#1253) * refactor(Polynomial,BooleanAnalysis): extract shared CoeffNorm1 and address review on cslib-community#1248 * refactor(Polynomial,BooleanAnalysis): extract ParityAmplifierDegree and refine §5.5 thresholds (cslib-community#1226) * feat(Foundations/BooleanAnalysis): add cleared-denominator specialization and exact division recovery * docs,test(BooleanAnalysis,Polynomial): qualify clearing premises and drop signature mirror (cslib-community#1273) * feat(Foundations/BooleanAnalysis): instantiate cleared parity specialization with Section 4 replacement designs (cslib-community#1226) * test(BooleanAnalysis): add concrete expected-value and checked branch-recovery clients for SparseReplacementDesign * fix(BooleanAnalysis/SparseReplacementDesign): address cslib-community#1294 review items - Replace duplicate augmentedEquationScope with SparseBranching.withNeutralScope and withNeutralFactors - Add scoped locality theorems eval_nodePoint_designReplacementMap_eq_of_eq_on_varGroup and eval_univariateMonomialSumPoly_designReplacementMap_nodePoint_eq - Add nonconstSampleDesign test exercising nonconstant degree-1 replacement rows and factor-level locality - Document eq. (5.5) degree strengthening, exists_replacementDesign_withNeutralScope numerical hypotheses, and emod_sum_cramer_ediv_design_eq_commonZeroCount hcramer premise * doc(BooleanAnalysis): correct replacement degree provenance * feat(Logics/Propositional/CNF): bridge sparse replacement design with CNF parity counter (cslib-community#1226) * feat(Sparsification): polynomial-time steps for runtime thresholds Generalize the certificates for the heavy-heart test, the choice, the test for sparseness, the step and the counting step to thresholds theta p read from a runtime parameter p, charging its encoding (the ...With theorems). The fixed-threshold certificates are now their constant-parameter specializations, with unchanged statements. Add the counting thresholds M ^ j for a base M given in binary at runtime, with the sparseness test and counting step they induce. Part of cslib-community#1226. * test(Sparsification): replace runtime-threshold certificate mirrors by a composition
…fy leaf reduction (cslib-community#1292) * feat(ClauseSet): recursive counting-sparsification tree and leaf model-count conservation * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * refactor(Foundations,ClauseSet): move List.countP uniqueness lemmas to List/Counting * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * feat(FineGrained,Sparsification): depth-first counting-sparsification search and ComputableInO certificate (cslib-community#1226) * fix(ClauseSet,Complexity): reuse CountingTree termination and clarify resource/source scope * feat(FineGrained): add dense occurrence-3 compiler and CountingSparsify leaf reduction * refactor(FineGrained): extract general CNF relabel/count lemmas and add promised-runtime frontends --------- Co-authored-by: Anton Kovsharov <antonkov@google.com>
… binomial budgets (cslib-community#1297) * feat: bound marked occurrences in counting paths * feat(ClauseSet): recursive counting-sparsification tree and leaf model-count conservation * test: exercise counting occurrence bounds and priority premises * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * refactor(Foundations,ClauseSet): move List.countP uniqueness lemmas to List/Counting * feat: charge deleted marked clauses to counting insertions * test: cover deletion charges and immediate-survival boundary * doc: correct deletion lemma subsection locator * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * feat(FineGrained,Sparsification): depth-first counting-sparsification search and ComputableInO certificate (cslib-community#1226) * feat: prove immediate counting payload survival * fix(ClauseSet,Complexity): reuse CountingTree termination and clarify resource/source scope * feat(sparsification): bound cumulative counting insertions * feat(sparsification): bound actual counting path budgets * feat(FineGrained): add dense occurrence-3 compiler and CountingSparsify leaf reduction * feat(Choose): bound geometric binomial tails by an integer budget * feat(FineGrained): discharge CountingTreeBound from counting path and binomial budgets * refactor(FineGrained): extract general CNF relabel/count lemmas and add promised-runtime frontends * feat(FineGrained): add promised-runtime budget-discharged counting search frontend * feat(Sparsification): select sharp first-success counting thresholds * feat(FineGrained): reuse CountingParameters coefficients and prove unconditional CountingTreeBound at countingThresholdBase --------- Co-authored-by: Anton Kovsharov <antonkov@google.com>
…ime-context stepWith, and declared-N wrapper (cslib-community#1321) * feat: bound marked occurrences in counting paths * feat(ClauseSet): recursive counting-sparsification tree and leaf model-count conservation * test: exercise counting occurrence bounds and priority premises * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * refactor(Foundations,ClauseSet): move List.countP uniqueness lemmas to List/Counting * feat: charge deleted marked clauses to counting insertions * test: cover deletion charges and immediate-survival boundary * doc: correct deletion lemma subsection locator * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * feat(FineGrained,Sparsification): depth-first counting-sparsification search and ComputableInO certificate (cslib-community#1226) * feat: prove immediate counting payload survival * fix(ClauseSet,Complexity): reuse CountingTree termination and clarify resource/source scope * feat(sparsification): bound cumulative counting insertions * feat(sparsification): bound actual counting path budgets * feat(FineGrained): add dense occurrence-3 compiler and CountingSparsify leaf reduction * feat(Choose): bound geometric binomial tails by an integer budget * feat(FineGrained): discharge CountingTreeBound from counting path and binomial budgets * refactor(FineGrained): extract general CNF relabel/count lemmas and add promised-runtime frontends * feat(FineGrained): add promised-runtime budget-discharged counting search frontend * feat(Sparsification): select sharp first-success counting thresholds * feat(FineGrained): reuse CountingParameters coefficients and prove unconditional CountingTreeBound at countingThresholdBase * feat(counting): preserve independent sparsification workspace * feat(FineGrained): export prefix bounds, runtime-context stepWith, and declared-N searchDeclaredWith * feat(counting): preserve independent sparsification workspace --------- Co-authored-by: Anton Kovsharov <antonkov@google.com>
…d leaves (cslib-community#1333) * feat: bound marked occurrences in counting paths * feat(ClauseSet): recursive counting-sparsification tree and leaf model-count conservation * test: exercise counting occurrence bounds and priority premises * feat(FineGrained,Sparsification): list-level counting sparsification, dense relabeling, and ETH endpoints Implements the list-level counting-sparsification step, dense CNF variable relabeling, and fine-grained subexponential-time endpoints for cslib-community#1226, following the unrefereed manuscript "The Exponential Time Hypothesis is False" (OpenAI, revision 7ef5c0cc, [OpenAI2026ETH]), §2 (Proposition 2.1) and §6.3 (Theorem 1.1 and Proposition 6.4): - `Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean`: defines `Cslib.Logic.PL.CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOf` (contrasted with `CNF.compact`, which uses `φ.vars.idxOf` and can leave gaps when variables repeat) and proves width preservation, exact dense variable set `vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars`, `modelCountOn_denseRelabel : φ.denseRelabel.modelCountOn (Finset.range φ.numVars) = φ.modelCount`, and polynomial-time computability (`SAT.computableInPolyTime_denseRelabel`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingList.lean`: defines `Clause.isTautology`, `removeTautologies`, `countingNormalize`, `negatedHeartUnits`, `countingIntro`, `countingChild`, `countingNext`, `countingThreshold`, `Nontautological`, and `CountingNormalized`, and proves exact model-count conservation across normalization (`modelCountOn_countingNormalize`) and across the A/B counting-sparsification branch (`modelCountOn_countingNext`), invariant preservation (`countingNormalized_countingNext`), and variable-support containment (`support_countingNext`). - `Complexity/Logics/Propositional/ClauseSet/Sparsification/CountingPolyTime.lean`: proves `computableInPolyTime_countingThreshold_le`, `computableInPolyTime_isTautology`, `computableInPolyTime_removeTautologies`, `computableInPolyTime_countingNormalize`, and `computableInPolyTime_countingNext`. - `Complexity/Computability/Complexity/FineGrained/CountingScale.lean` and `CountingEndpoint.lean`: proves `exists_two_pow_mul_interpolationScale_le`, `DecidableInSubexpTime.of_interpolationScale`, `DecidableInSubexpTime.of_computableInO_interpolationScale`, `DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale`, `satExponent_eq_zero_iff_decidableInSubexpTime`, `not_ETH_of_decidableInSubexpTime`, and `not_SETH_of_forall_decidableInSubexpTime`. - `ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean`: regression and edge-case tests (`k = 0, 1`, empty formula, empty clause, repeated-variable dense relabeling vs compaction, and additive `modelCountOn` conservation). Refs cslib-community#1226 AI assistance: written by worker-jetski-58251ede (Jetski agent). * refactor(Foundations,ClauseSet): move List.countP uniqueness lemmas to List/Counting * feat: charge deleted marked clauses to counting insertions * test: cover deletion charges and immediate-survival boundary * doc: correct deletion lemma subsection locator * docs: refine Appendix A.1, Proposition 6.4, and DenseRelabel source records (cslib-community#1255) * feat(FineGrained,Sparsification): depth-first counting-sparsification search and ComputableInO certificate (cslib-community#1226) * feat: prove immediate counting payload survival * fix(ClauseSet,Complexity): reuse CountingTree termination and clarify resource/source scope * feat(sparsification): bound cumulative counting insertions * feat(sparsification): bound actual counting path budgets * feat(FineGrained): add dense occurrence-3 compiler and CountingSparsify leaf reduction * feat(Choose): bound geometric binomial tails by an integer budget * feat(FineGrained): discharge CountingTreeBound from counting path and binomial budgets * refactor(FineGrained): extract general CNF relabel/count lemmas and add promised-runtime frontends * feat(FineGrained): add promised-runtime budget-discharged counting search frontend * feat(Sparsification): select sharp first-success counting thresholds * feat(FineGrained): reuse CountingParameters coefficients and prove unconditional CountingTreeBound at countingThresholdBase * feat(counting): preserve independent sparsification workspace * feat(FineGrained): export prefix bounds, runtime-context stepWith, and declared-N searchDeclaredWith * feat(counting): preserve independent sparsification workspace * feat(FineGrained): restrict counting correctness to normalized bounded leaves Expose the normalization, support and clause-count invariants already guaranteed by counting sparsification to leaf callbacks. Carry the stronger semantic contract through declared-variable wrappers and retain existing correctness theorems as corollaries. Add concrete regressions for a bounded callback that is deliberately wrong on unreachable duplicate-clause inputs, including unused variables, disappearing tautologies and zero-variable controls. Refs cslib-community#1332, cslib-community#1226. Stacked on cslib-community#1321. --------- Co-authored-by: Anton Kovsharov <antonkov@google.com>
Implements dense CNF variable relabeling, list-level counting sparsification (
countingNormalize,countingChild,countingNext), their native polynomial-time certificates, and the conditional fine-grained reduction from dense-variable model counting atinterpolationScaletoDecidableInSubexpTime (KSAT k) encCNF CNF.numVars,satExponent k = 0,¬ETH, and¬SETHfor #1226.Checked source record and library adaptations (
OpenAI2026ETH,7ef5c0cc5ca4b0e072b7a050fca09ab24bc6fa3a, PDF SHA-2565b1612dc…8123)countingThreshold M j = M ^ j, extended here to a total function onℕ); equation (A.1) labels the heavy-heart branching inequalityHeavy) for a nonempty proper heartcountingNormalize) and equation (A.2) (pp. 44–45): Initial preprocessing (countingNormalize φ = normalize (removeTautologies φ)) removes tautologies, deduplicates literals and clauses, and reduces to a subset-minimal antichain. At each branching step on a flowerfalse) and by the petalstrue) and restoring the antichain. IncountingChild, appendingcountingIntroand applyingdedupClausesfollowed byreducerestores the duplicate-free antichain (CountingNormalized) across steps without re-running tautology removal, while partitioning satisfying assignments over the declaredmodelCountOn_countingChild,modelCountOn_countingNext).interpolationScale n = n * (log (log (n + 16)))^2 / sqrt (log (n + 16))), whereas Theorem 1.1 states the sharper single-$\log\log$ headline bound.CNF.denseRelabel φ = φ.relabel φ.distinctVars.idxOf) and the conditional complexity-class wrappers (DecidableInSubexpTime.of_interpolationScale,DecidableInSubexpTime.of_computableInO_interpolationScale,DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale,satExponent_eq_zero_iff_decidableInSubexpTime,not_ETH_of_decidableInSubexpTime,not_SETH_of_forall_decidableInSubexpTime) are library adaptations bridging Proposition 6.4's assumed dense-variable model-counting contract toCslib.Complexity's existingKSAT,satExponent,ETH, andSETHdefinitions.Summary of changes
Complexity/Logics/Propositional/CNF/ModelCount/DenseRelabel.lean:CNF.denseRelabel φ := φ.relabel φ.distinctVars.idxOfand proves width preservation (all_length_le_denseRelabel), dense variable range (vars_denseRelabel_toFinset : φ.denseRelabel.vars.toFinset = Finset.range φ.numVars,numVars_denseRelabel), and exact model-count preservation (modelCount_denseRelabel,modelCountOn_denseRelabel).ComputableInPolyTimecertificates (CNF.computableInPolyTime_denseRelabel_unary,CNF.computableInPolyTime_denseRelabel,SAT.computableInPolyTime_denseRelabel).Complexity/Logics/Propositional/ClauseSet/Sparsification/List.lean&CountingList.lean:toClauseSet_reduce,toClauseSet_flower,toClauseSet_petals,mem_hearts,nodup_toFinset_dedupClauses,toClauseSet_dedupClauses) inList.leanand reuses them inCountingList.lean.Clause.isTautology,removeTautologies,countingNormalize,negatedHeartUnits,countingIntro,countingChild,countingNext,countingThreshold,Nontautological, andCountingNormalized, proving exact agreement withClauseSet.Sparsification.countingChild, additivemodelCountOnconservation, andCountingNormalizedpreservation.Complexity/Logics/Propositional/ClauseSet/Sparsification/PolyTime.lean&CountingPolyTime.lean:ComputableInPolyTimefrontends (computableInPolyTime_reduce,computableInPolyTime_dedupClauses,computableInPolyTime_flower,computableInPolyTime_heavy,computableInPolyTime_candidates,computableInPolyTime_choice) inPolyTime.leanand reuses them inCountingPolyTime.leanto provecomputableInPolyTime_countingThreshold_le,computableInPolyTime_isTautology,computableInPolyTime_removeTautologies,computableInPolyTime_countingNormalize, andcomputableInPolyTime_countingNext.Complexity/Computability/Complexity/FineGrained/CountingScale.lean&CountingEndpoint.lean:interpolationScale_nonnegandexists_two_pow_mul_interpolationScale_leinCountingScale.lean.DecidableInSubexpTime.of_interpolationScale,DecidableInSubexpTime.of_computableInO_interpolationScale,DecidableInSubexpTime.KSAT_of_dense_modelCount_interpolationScale,satExponent_eq_zero_of_decidableInSubexpTime,satExponent_eq_zero_iff_decidableInSubexpTime,not_ETH_of_decidableInSubexpTime, andnot_SETH_of_forall_decidableInSubexpTimeinCountingEndpoint.lean.ComplexityTests/Computability/Complexity/FineGrained/CountingSparsifyPolyTime.lean:denseRelabelvscompactand testingcountingNormalizeandcountingNexton formulas with tautologies and flowers.Limitations
KSAT_of_dense_modelCount_interpolationScaleand does not construct the full counting-sparsification search tree or algebraic model counter.Validation & AI Disclosure
./scripts/check.sh(all 6 gates) andpython3 scripts/check_hygiene.py.worker-jetski-58251ede(Jetski AI agent).