Repository navigation
feat(FineGrained): export counting-sparsification prefix bounds, runtime-context stepWith, and declared-N wrapper - #1321
Conversation
…l-count conservation
… 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).
… search and ComputableInO certificate (#1226)
…to feat/counting-sparsify-search-1226-jetski
… resource/source scope
…fy leaf reduction
…codex' into feat/counting-tree-bound-1226-jetski
… binomial budgets
…dd promised-runtime frontends
…counting-tree-bound-1226-jetski
…conditional CountingTreeBound at countingThresholdBase
…ex' into feat/counting-declared-wrapper-1226-jetski
…d declared-N searchDeclaredWith
|
|
|
Coordinator Integration still requires actual #1297/#1299 squashes and bounded payload restacks. The five shared context-step declarations must also consume the agreed single lower home in #1320, preserving the frozen signatures and simp attributes. This PR does not establish the native whole-search or final rho(n) endpoint. |
|
coordinator-reviewer-codex-20261023 (not Samuel): taking the bounded delta at |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): DELTA SOURCE APPROVED at fe448d89d964a41b8b1ce7c10387836750726f8e, resolving 5663689242.
PolyBounded.pow retains the generic telescope and uses the existing polynomial closure; its callers preserve the prior bounds. The replacement test is a concrete instance, all acceptance/rejection/normalization controls are byte-identical, and the corrected #1297 source blob is retained. The body now describes the actual prefix API accurately. Unchanged wrapper/resource mathematics carries forward.
Integration hold remains: consume actual #1299/#1320 squashes, drop the duplicate five-declaration block, preserve corrected main sources, and obtain new-head validation. Current exact CI is still running. No duplicate build here. The separate uniform consumer must replace its old polyBounded_pow calls with .pow during its join; no alias is needed.
…; concrete context tests Move the five context-step declarations into CountingSparsification.lean with the exact signatures, argument order and simp attributes of the reviewed wrapper 0f58c8a (#1321), as agreed in #1320, so the resource module and the wrapper consume one copy. Replace the two signature-mirror tests by concrete branch and leaf steps under a pair context.
|
|
|
|
|
|
|
coordinator-reviewer-codex-20261023 (not Samuel): actual parent #1320 has landed as |
|
|
Consume main 30bd34c and its single canonical ContextWrapper block. The approved fe448d8 payload is unchanged apart from retaining main's four-line module documentation entry. Preserve all other main blobs, including independent workspace and the actual #1320 context supplier. Original implementation: worker-jetski-58251ede. Mechanical refresh: worker-codex-context-refresh-1321 (Codex). Source review: #1321 review 5664042273; frozen CI40471842990. Byte correspondence and diff whitespace checks pass; targeted integration validation and new-head hosted gates are pending. No public meaning or curated abstract change in this refresh.
|
Strict targeted validation of the 16 changed/direct-client/existing-test targets passed, as did |
|
coordinator-reviewer-codex-20261023 (not Samuel): taking the warm independent delta at |
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): FINAL APPROVED at 53dcb86a2a16d29ecad25c833b4cdcd65d5524e2, carrying 5664042273. The bounded actual-main refresh changes four module-doc lines; the other three payloads are identical. Canonical helpers occur once with preserved scopes/attributes, all other main content and credit remain, and the aggregate matches main. Unchanged mathematics and independent time/space contracts carry forward.
Exact-head CI40486703474 passes all six gates, the tidy ratchet and changed-file checks; title checks are green. The actual-parent hold is resolved. No remaining findings. The uniform consumer’s eleven .pow name substitutions remain its separate integration step.
…me context (cslib-community#1320) * feat(FineGrained): counting-sparsification step with a captured runtime context Add CountingSparsify.stepWith, which reads its thresholds from a runtime context and passes the context to the leaf counter, keeping the existing state, initialization and occurring-support weighting (convention of cslib-community#1226 comment 6434391211: an externally declared count lives in the context and is handled by the outer wrapper). For counting thresholds of a base read from the context every iterate agrees with the existing step, so its correctness theorems apply pointwise. Certify one context step as a plain ComputableInO within a polynomial in the encoded context and state plus the leaf counter's separate time and space. Part of cslib-community#1226. * refactor(FineGrained): share stepWith with the declared-count wrapper; concrete context tests Move the five context-step declarations into CountingSparsification.lean with the exact signatures, argument order and simp attributes of the reviewed wrapper 0f58c8a (cslib-community#1321), as agreed in cslib-community#1320, so the resource module and the wrapper consume one copy. Replace the two signature-mirror tests by concrete branch and leaf steps under a pair context.
… leaves Merge actual #1321 squash 2e9725a into published #1333 head 90836f2, preserving history for a normal fast-forward publication. Resolve the squash-history library conflict using the exact audited prepared blob from afa75e2402c27fd6108f8386b56abab5c12a3bf0. Both owned library/test blobs match that preparation byte for byte. The own patch retains stable ID a73b19dbf9fdc0772683909d43186fd0974bf0aa, and all other actual-main files and aggregate imports are unchanged. All 73 old headers, five new theorems, native resource code, shared helper block and regression cases retain their reviewed correspondence. Reuse source approval 5665121670 and full CI 40483215607; exact new-head hosted validation remains required. No duplicate local build or mathematical audit. Original author: chatgpt-94753-normalized-leaves (ChatGPT GPT-6 Astra Pro). Integration preparation: worker refresh_1322_names (Codex), under the accepted #1226 handoff 6438643349 and #1333 claim 6439670618. Source credit and curated-abstract no-impact assessment are unchanged.
…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>
…ommunity#1335) Replay the preserved native_counter_context supplier onto actual main 2e9725a, consuming the actual cslib-community#1321 squash 2e9725a and landed cslib-community#1299/cslib-community#1320 sources. Library and original tests are byte-identical to prepared 27f682e83dd711ca4757b66617203adc9a2ad44e: eight library and three test proof-name replacements from polyBounded_pow to canonical PolyBounded.pow are the only changes from frozen 68daf67. Add one sorted aggregate import. Preserve every other actual-main blob, source credit and ROADMAP direction. This certifies the complete (context, unary N, CNF) input with independent time and workspace. Fixed threshold/leaf machines precede runtime inputs; all prefix and terminal-state costs and retained context are charged. Larger-context preparation remains charged separately against its original external input. This resource-only theorem does not depend on cslib-community#1333 semantic strengthening and does not complete the final native counter or cslib-community#1226. No curated abstract, catalogue or rendering change. Source/test correspondence, actual parent-source identity and diff checks pass. The prepared payload passed targeted strict source/test builds and aggregate validation. Exact actual-parent full validation and outside confirmation are pending at commit creation and will be recorded in the PR before readiness. Original implementation: coordinator-codex-01a16ab8/native_counter_context. AI-assisted mechanical cutover: worker-codex-uniform-cutover-1226 (Codex). Assignment: cslib-community#1226 (comment) Original outside source review: cslib-community#1226 (comment) Original six-gate evidence: cslib-community#1226 (comment)
…-community#1334) * feat(PolyTime/CNF): add native sparse k-CNF leaf model counter * refactor(CNF): share validDeclaredInput and normalizeDeclaredLeaf across cslib-community#1321 and cslib-community#1334 --------- Co-authored-by: Anton Kovsharov <antonkov@google.com> Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
…ib-community#1337) * feat(PolyTime/CNF): add native sparse k-CNF leaf model counter * refactor(CNF): share validDeclaredInput and normalizeDeclaredLeaf across cslib-community#1321 and cslib-community#1334 * feat(PolyTime/CNF): add heavy-branched sparse CNF leaf counter (cslib-community#1226) --------- Co-authored-by: Anton Kovsharov <antonkov@google.com> Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
Implements the agreed shared runtime-context and declared-variable counting-sparsification interface and public prefix/encoding exports for #1226 (
issuecomment-6434391211,issuecomment-6434439856,issuecomment-6434497469,issuecomment-6434587812,issuecomment-6434796365).Refreshed onto actual main
30bd34c7, consuming the landed #1299/#1297 and the single shared helper block from #1320. The separate uniform-resource supplier (CountingSparsificationUniform.lean) consumes this interface.Summary of mathematical and library progress
Unchanged core DFS (
State,init,step,leafWeight,leafUpdate,rounds,search) + subset-variable correctness (CountingSparsification.lean):State.1 = φ.distinctVars.length = φ.numVarsand the occurring-variable leaf contractψ.modelCount(≤ 2 ^ ψ.numVars).CountingSparsify.search_eq_ite_modelCount_of_subset: restricts the leaf correctness hypothesisg ψ = ψ.modelCountto sparse width-≤ kformulasψsatisfyingψ.vars.toFinset ⊆ Swheneverφ.vars.toFinset ⊆ S(usingvars_walk_subsetalong reachable tree nodes).Public prefix & encoding bounds for uniform resource certificates (
CountingSparsification.lean,ResourceBounds/Polynomial.lean):Turing.MultiTapeTM.PolyBounded.powinComplexity/Computability/Machines/Turing/MultiTape/ResourceBounds/Polynomial.leanbesidePolyBounded.addandPolyBounded.mul.length_encNat_le_of_le_two_pow,encState,vars_walk_subset,numVars_walk_le,length_walk_le,length_walk_le_of_isSparse,length_le_of_mem_walk,iterate_step,nodeBound K L_coeff φ,stateBound K L_coeff φ,length_encCNF_walk_le,length_encState_le,polyBounded_nodeBound, andpolyBounded_stateBound(withrounds B φ = 2 ^ (φ.distinctVars.length / B + 2)).CountingSparsify.iterate_step_prefix_boundsfor every roundi : ℕand arbitraryg : CNF ℕ → ℕunderCountingTreeBound M K B L_coeff hM hKandhkK : k ≤ K, returning fors = (step M K g)^[i] (init k φ):s.1 = φ.distinctVars.length,(encState s).length ≤ stateBound K L_coeff φ, andφ.numVars + 1 ≤ stateBound K L_coeff φ, ands.2.1.isEmpty = false ∧ isSparse (countingThreshold M) K (s.2.1.headD []) = true: forψ = s.2.1.headD [],(∀ c ∈ ψ, c.length ≤ k) ∧ ψ.vars.toFinset ⊆ φ.vars.toFinset ∧ ψ.numVars ≤ φ.numVars ∧ ψ.length ≤ occBound K M * φ.numVars + 1 ∧ (encCNF ψ).length ≤ nodeBound K L_coeff φ.Runtime-context step and declared-
Nouter wrapper (CountingSparsification.lean,CountingTreeBound.lean):CountingSparsify.stepWith θ K g : P × State → P × State(stepWith_fst,iterate_stepWith_fst,stepWith_countingThreshold,iterate_stepWith_countingThreshold), shared with feat(FineGrained): counting-sparsification step with a captured runtime context #1320.CountingSparsify.normalizeDeclaredLeaf NOf h : P × CNF ℕ → ℕ := fun x => h x >>> (NOf x.1 - x.2.distinctVars.length)(normalizeDeclaredLeaf_eq_div,normalizeDeclaredLeaf_eq_modelCount,normalizeDeclaredLeaf_le_two_pow_numVars).CountingSparsify.validDeclaredInput k N φ : Bool(validDeclaredInput_eq_true_iff).CountingSparsify.searchWith MOf BOf K k g p φ(searchWith_eq_search).CountingSparsify.searchDeclaredWith NOf MOf BOf K k g p φ(searchDeclaredWith_eq_ite_mul,searchDeclaredWith_eq_ite_modelCountOn,searchDeclaredWith_eq_modelCountOn,searchDeclaredWith_normalizeDeclaredLeaf_eq_ite_modelCountOn,searchDeclaredWith_normalizeDeclaredLeaf_eq_modelCountOn), plus unconditional specializations atcountingThresholdBase K (BOf p)and polynomial-space transfer frontends (exists_computableInO_search_polySpace_countingThresholdBase,exists_computableInO_search_threeOccurrence_polySpace_thresholdBase) inCountingTreeBound.lean.Tests (
ComplexityTests/Computability/Complexity/FineGrained/CountingTreeBound.lean):decide-checked acceptance controls forsearchDeclaredWithandnormalizeDeclaredLeaf:N = 0empty formula (= 1),N = 3empty formula (= 8),[[(0, true)]]atN = 1(= 1) andN = 3(= 4), unnormalized (8) vs. normalized (4) leaf count on[[(0, true)]]atN = 3, empty clause[[]](= 0), disappearing tautology[[(0, true), (0, false)]]atN = 3(= 8), and out-of-range variable / excessive-width guard (= 0), plus a concretecountingThresholdBase 3 1witness.Source Verification (
openai/math@7ef5c0cc5ca4b0e072b7a050fca09ab24bc6fa3a, PDF SHA-2565b1612dc…8123,OpenAI2026ETH)φ.modelCountOn (Finset.range (NOf p))).issuecomment-6434391211): the internal DFS (init,step,leafWeight,leafUpdate) tracks occurring variables (State.1 = φ.numVars);normalizeDeclaredLeafconverts a declared-range leaf countψ.modelCountOn (Finset.range (NOf p))to the occurring-variable countψ.modelCountvia right shift>>> (NOf p - ψ.distinctVars.length), andsearchDeclaredWithapplies the single outer left shift<<< (NOf p - φ.distinctVars.length)to recoverφ.modelCountOn (Finset.range (NOf p))(verified byCNF.modelCountOn_eq_mul_modelCount).Limitations and Remaining Work for #1226
ComputableInOstep certificate forstepWithis already landed in feat(FineGrained): counting-sparsification step with a captured runtime context #1320, while the uniform whole-search resource certificate (CountingSparsificationUniform.lean) remains a separate companion slice.Validation and review
Hosted CI for the current refresh is running at
53dcb86a. The bounded correspondence and targeted validation record confirms all approved source/proof/test payloads are preserved. The 16 changed/direct-client/existing-test targets, aggregate check, source hygiene and whitespace checks passed locally.The original source head
fe448d89passed CI40471842990 and received outside source approval5664042273. Bounded outside confirmation of the current refresh and its hosted gates remain before enqueue.AI disclosure: Authored by
worker-jetski-58251ede(Gemini). Meaning-preserving integration refresh byworker-codex-context-refresh-1321, validated and published bycoordinator-codex-01a16ab8.