Native sparse k-CNF leaf model counter and occurring-support normalization #
Implements the deterministic sparse k-CNF model-counting algorithm of Section 6.3 (equation
(6.4), printed p. 43) of OpenAI, The Exponential Time Hypothesis is False on
native multi-tape Turing machines, parameterized over a sparse π½β polynomial-system counter:
- Encoded procedures:
Cslib.Logic.PL.CNF.validDeclaredInput,hasEmptyClause, andentersSparseFastPathareComputableInPolyTimeguards;compiledRowCounter,sparseCNFFastPath,sparseCNFDeclaredCounter,Cslib.Logic.PL.CNF.normalizeDeclaredLeaf, andsparseCNFLeafCounterare certified bysparseCNFDeclaredCertificate,normalizeDeclaredLeafCertificate, andsparseCNFLeafCertificate. - Unencoded specifications:
IsCompiledSparseSystem,sparseCNFTimeBound, andValidPolyTimeBoundstate structural equation invariants and split runtime hypotheses. - Total fallbacks:
sparseCNFDeclaredCounterreturns0whenvalidDeclaredInput = false,[] β Ο, orN β₯ Nβ β§ Ο.length > B * N;2 ^ NonΟ = []; andcountCNFExhaustive (N, Ο)(defaulting variablesβ₯ Ntofalse) whenN < Nβ.normalizeDeclaredLeafshifts right byN - Ο.distinctVars.lengthto recoverΟ.modelCountwithinβ€ 2 ^ Ο.numVars.
Main definitions #
hasEmptyClause,entersSparseFastPath,IsCompiledSparseSystem,compiledRowCountersparseCNFFastPath,sparseCNFDeclaredCounter,sparseCNFLeafCountersparseCNFTimeBound,ValidPolyTimeBoundsparseCNFDeclaredCertificate,normalizeDeclaredLeafCertificate,sparseCNFLeafCertificate
Main results #
isCompiledSparseSystem_compileParitySystemBounded,commonZeroCount_compileParitySystemBounded_eq_numPassingsparseCNFDeclaredCounter_le_two_pow,sparseCNFDeclaredCounter_eq_modelCountOn,sparseCNFDeclaredCounter_exhaustive_eq_modelCountOnsparseCNFLeafCounter_le_two_pow_numVars,sparseCNFLeafCounter_eq_modelCount,sparseCNFLeafCounter_exhaustive_eq_modelCountpolyBounded_sparseCNFDeclaredCertificate_space,exists_sparseCNFDeclaredCertificate_bounds,computableInO_sparseCNFDeclaredCounter,computableInO_normalizeDeclaredLeaf,polyBounded_sparseCNFLeafCertificate_space,exists_sparseCNFLeafCertificate_bounds,computableInO_sparseCNFLeafCounter
References #
- OpenAI, The Exponential Time Hypothesis is False, Β§6.3, eq. (6.4), p. 43.
1. Guards, Compiled-System Invariant, and Core Definitions #
Boolean check for whether Ο contains an empty clause [].
Instances For
Guard characterizing inputs (N, B, Ο) entering the Section 6.3 parity-test fast path.
Instances For
Deterministic Section 6.3 fast path: initial Tanner rows via initialTestsRows, 3 * N rounds
of greedyParityRows, and one final compiledRowCounter call capped at 2 ^ N.
Instances For
Section 6.3 declared-range sparse k-CNF model counter.
Returns 0 if invalid, 2 ^ N on [], 0 if [] β Ο, countCNFExhaustive (N, Ο) if N < Nβ,
sparseCNFFastPath k N B polyCounter Ο if Ο.length β€ B * N, and 0 otherwise.
Instances For
Normalized Section 6.3 sparse k-CNF leaf provider.
Returns Ο.modelCount on valid sparse or below-threshold inputs, as well as empty formulas and
formulas containing an empty clause. The supplied polyCounter must be exact on the compiled sparse
systems required by sparseCNFLeafCounter_eq_modelCount.
Instances For
2. Structural & Semantic Proofs for Guards, Compilation, and Greedy Search #
Every compileParitySystemBounded k Ο rows on a width-β€ k formula with variables < N,
rows.length β€ maxEqs, and row Hamming weights β€ W satisfies IsCompiledSparseSystem.
Semantic bridge to equationToFinset and CNF.parityRowSystem: on a width-β€ k formula
Ο with variables < N (1 β€ N), commonZeroCount on compileParitySystemBounded k Ο rows
equals both numPassing and commonZeroCount on (relabel ... Ο).parityRowSystem.
Unconditional upper bound: sparseCNFDeclaredCounter never exceeds 2 ^ NOf x.1.
Exactness of sparseCNFDeclaredCounter (Β§6.3, Lemmas 6.1β6.2).
Instantiation of sparseCNFDeclaredCounter with countSystemExhaustive computes
Ο.modelCountOn (Finset.range (NOf p)) unconditionally on every valid sparse formula.
3. Normalized Leaf Provider (sparseCNFLeafCounter) #
Unconditional leaf-accumulator bound: sparseCNFLeafCounter never exceeds 2 ^ Ο.numVars
on any input (p, Ο), regardless of polyCounter.
Exactness of sparseCNFLeafCounter: returns Ο.modelCount on every valid width-β€ k
sparse leaf Ο with variables in Finset.range (NOf p).
Instantiation of sparseCNFLeafCounter with countSystemExhaustive computes Ο.modelCount.
4. Native Machine Certificates and Split Time / Polynomial-Space Bounds #
Split Section 6.3 runtime upper bound: poly L outside entersSparseFastPath, and initial
Tanner search plus (3 * N + 1) * ((2 * m) ^ P + 1) candidate system evaluations inside.
Instances For
Hypothesis bounding cPoly.time (NOf x.1, sys) β€ R x on every compiled sparse system of at
most 6 * NOf x.1 equations and polynomial encoded length produced on the Section 6.3 fast path.
Instances For
Native resource certificate for sparseCNFDeclaredCounter.
Instances For
Polynomial workspace of sparseCNFDeclaredCertificate.
Explicit certificate-level workspace and split-time bounds for
sparseCNFDeclaredCertificate.
Split ComputableInO time and polynomial-workspace bound for sparseCNFDeclaredCounter.
Right-Shift Normalization Certificate #
Native resource certificate for normalizeDeclaredLeaf NOf h, composing cLeaf with
ComputableInPolyTime.binary_shiftRight on NOf x.1 - x.2.distinctVars.length.
Instances For
Polynomial workspace preservation for normalizeDeclaredLeafCertificate.
Explicit certificate-level workspace and additive polynomial-time overhead bounds for
normalizeDeclaredLeafCertificate.
Split ComputableInO time and polynomial-workspace bound for normalizeDeclaredLeaf.
Native resource certificate for sparseCNFLeafCounter.
Instances For
Polynomial workspace of sparseCNFLeafCertificate.
Certificate-level workspace and split-time bounds for sparseCNFLeafCertificate.
Split ComputableInO time and polynomial-workspace bound for sparseCNFLeafCounter.