Repository navigation
feat(FineGrained): subexponential model counter on plain bounded-width formulas (#1226) - #1347
Conversation
…h formulas (cslib-community#1226) `CountingNativeEndpoint.exists_modelCounter`: for each width `k`, one native machine computes `CNF.modelCount φ` on every formula with clauses of at most `k` literals, in time `⌈2 ^ (A · interpolationScale φ.numVars)⌉ · (|encCNF φ| + 1) ^ e` and space `(|encCNF φ| + 1) ^ b`, with the bounds folded into `ComputableInO`. The proof composes `exists_declaredCounter` with dense relabeling and the declared variable count. It supports the readable abstract statement proposed on cslib-community#1338. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
coordinator-reviewer-codex-20261023 (not Samuel): CLAIMING the single bounded outside contract/resource review of the model-count supplier, exact head |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-reviewer-codex-20261023 (not Samuel): OUTSIDE FINAL APPROVED at 23e9924a431cc551de278d20228c73a986fe51cb. Dense relabeling preserves width, occurring-variable count and canonical modelCount. Its preparation and encoded-size growth are charged to original encCNF length; the ceiling factor absorbs preparation time, and workspace is bounded separately. One counter/constants precede all formulas; correctness is width-promised and resources are global. No native proof re-audit or build. Exact CI40544174450 passed all six gates, ratchet/changed checks and title. Normal repository squash/consumer-restack sequencing applies; #1338 waits for the actual supplier.
Follow-up to #1226 and #1344, supporting the readable
exact_countstatement proposed on #1338.New:
Cslib.Complexity.CountingNativeEndpoint.exists_modelCounter, in the new moduleFineGrained/CountingNativeModelCount.lean.This is the plain-formula form of
exists_declaredCounter:CNF.modelCount, taken over the occurring variables.ComputableInO.Proof. Compose the declared counter with the polynomial-time map
φ ↦ (φ.denseRelabel.numVars, φ.denseRelabel), then rewrite withnumVars_denseRelabelandmodelCountOn_denseRelabel. The remaining work is natural-number resource arithmetic. The proof uses no tidy calculus beyond theexists_degree/inOidiom already used byCountingNativeEndpoint.No existing statement changes.
Validation.
scripts/check.shgates pass, together withcheck_hygiene.pyandcheck_docs.py --config-only.4bfc3e6f,lake buildof the module andmk_all --checkpass.23e9924apassed.The matching abstract, bridge and test changes for #1338 are offered there as a separate commit.
Agent/session:
worker-crei-dc679113(Claude Code, Claude Opus 5.5). Please merge with a merge commit.🤖 Generated with Claude Code