Representation Bridge and Leaf Bounds for CountingTree.countingLeaves #
This module provides the representation bridge between the recursive leaf list
CountingTree.countingLeaves (CountingTree.lean) and the generic CountingBranchingRule
interface (CountingSearch.lean), and applies the leaf-word cardinality bounds of
CountingBounds.lean (Appendix A.2–A.3 of OpenAI, The Exponential Time Hypothesis is
False, pp. 45–47) to bound (countingLeaves θ ψ).length.
Mathematical overview #
Nontautological clause filtering (
nontautological). The higher-width survival and insertion balance along counting paths (CountingSurvival.lean,CountingInsertions.lean,CountingPathBounds.lean) require that no root clause contains complementary literalslandStd.Sat.Literal.negate l. Because any clause containing complementary literals is satisfied by every assignment, filtering out such clauses vianontautological ψbefore applyingreducepreservesClauseSet.Sat(sat_nontautological_iff) andCNF.modelCountOn(modelCountOn_toCNF_nontautological,modelCountOn_toCNF_reduce_nontautological), while ensuring thatreduce (nontautological ψ)is bothReducedand nontautological (nontautological_of_mem_reduce_nontautological).Branch-word representation bridge (
countingTreeRule,countingLeafWords). InstantiatesCountingBranchingRulewithCountingTree's deterministic chooserchooseBranch θ(countingTreeRule), enumerates the duplicate-free list of branch-word addresses (countingLeafWords,nodup_countingLeafWords), proves that those addresses are exactly the leaf words ofcountingTreeRule(mem_countingLeafWords_iff_isLeafWord,isLeafWord_of_mem_countingLeafWords), and shows that walkingcountingTreeRulealongcountingLeafWords θ ψreproducescountingLeaves θ ψas a list preserving multiplicity (countingLeaves_eq_map_walk_countingLeafWords).Leaf-count and leaf-sparsity corollaries for
countingLeaves. AppliesCountingBranchingRule.card_le_of_isLeafWord,CountingBranchingRule.card_le_two_pow_of_isLeafWord, andCountingBranchingRule.card_le_two_pow_thresholdBasefromCountingBounds.leanto the address finset(countingLeafWords θ ψ).toFinsetto bound(countingLeaves θ ψ).length(counting duplicate or unsatisfiable leaf formulas with multiplicity), and packages the resulting Lemma 6.3 / Appendix A.3 leaf-count, occurrence, and model-count conservation bounds forreduce (nontautological φ.toClauseSet).
Main definitions #
Cslib.Logic.PL.ClauseSet.Sparsification.nontautological: filter removing clauses that contain a literal together with its negation.Cslib.Logic.PL.ClauseSet.Sparsification.countingTreeRule: theCountingBranchingRuleonClauseSet Vdriven bychooseBranch θandcountingChild.Cslib.Logic.PL.ClauseSet.Sparsification.countingLeafWords: the duplicate-free list of branch-word addresses of the leaves ofcountingLeaves θ ψ.
Main results #
Cslib.Logic.PL.ClauseSet.Sparsification.sat_nontautological_iff,Cslib.Logic.PL.ClauseSet.Sparsification.modelCountOn_toCNF_nontautological: removing tautological clauses preserves satisfying assignments andCNF.modelCountOn.Cslib.Logic.PL.ClauseSet.Sparsification.countingLeaves_eq_map_walk_countingLeafWords:countingLeaves θ ψ = (countingLeafWords θ ψ).map ((countingTreeRule θ).walk ψ).Cslib.Logic.PL.ClauseSet.Sparsification.mem_countingLeafWords_iff_isLeafWord: under∀ j, 1 ≤ j → 2 ≤ θ j,w ∈ countingLeafWords θ ψ ↔ (countingTreeRule θ).IsLeafWord ψ w.Cslib.Logic.PL.ClauseSet.Sparsification.length_countingLeaves_pow_le: binomial-sum leaf-count bound forcountingLeaves (M ^ ·) ψ.Cslib.Logic.PL.ClauseSet.Sparsification.length_countingLeaves_countingThresholdBase_le: exponential2 ^ (n / B + 1)leaf-count bound atcountingThresholdBase k B.Cslib.Logic.PL.ClauseSet.Sparsification.countingLeaves_nontautological_thresholdBase_spec: combined Lemma 6.3 model-count partition, leaf occurrence/clause bounds, and2 ^ (n / B + 1)leaf-count bound for an arbitraryk-CNFφ : CNF V.
References #
Nontautological clause filtering #
Filter a clause set to retain only clauses containing no complementary literal pair
l and Std.Sat.Literal.negate l.
Instances For
Membership in nontautological ψ.
nontautological ψ is a subset of ψ.
Every clause in nontautological ψ is free of complementary literals.
Every clause in reduce (nontautological ψ) is free of complementary literals.
nontautological preserves clause width bounds.
reduce (nontautological ψ) preserves clause width bounds.
nontautological preserves declared-variable support bounds.
reduce (nontautological ψ) preserves declared-variable support bounds.
Removing tautological clauses does not change the satisfying assignments of ψ, because any
clause containing both l and Std.Sat.Literal.negate l is satisfied by every assignment.
Combined nontautological filtering and subsumption reduction preserve ClauseSet.Sat.
Removing tautological clauses preserves CNF.modelCountOn on any declared variable set.
Normalizing a clause set with reduce (nontautological ψ) preserves CNF.modelCountOn on any
declared variable set.
Nontautology preservation at leaves. When 1 ≤ θ r for all r and the root ψ has no
clause with complementary literals, every leaf L ∈ countingLeaves θ ψ is likewise free of
complementary literals within each clause.
Branch-word representation bridge between countingLeaves and CountingBranchingRule #
The CountingBranchingRule on ClauseSet V instantiated with CountingTree's deterministic
chooser chooseBranch θ and step countingChild.
Instances For
Branch-direction words (false for the heart child, true for the petal-plus-negated-units
child) corresponding 1-to-1 with the leaf occurrences in countingLeaves θ ψ.
Instances For
Walking countingTreeRule θ from ψ along the branch-word addresses in
countingLeafWords θ ψ reproduces countingLeaves θ ψ in exact list order, preserving
multiplicity across equal or unsatisfiable leaf clause sets.
The number of leaves in countingLeaves θ ψ (counted with list multiplicity) equals the
number of branch-word addresses in countingLeafWords θ ψ.
The branch-word addresses in countingLeafWords θ ψ are pairwise distinct.
Because countingLeafWords θ ψ is duplicate-free, the list length (countingLeaves θ ψ).length
equals the cardinality of the address finset (countingLeafWords θ ψ).toFinset.
When ∀ j, 1 ≤ j → 2 ≤ θ j, countingLeafWords θ ψ enumerates data-exact the leaf words of
countingTreeRule θ starting from ψ.
When ∀ j, 1 ≤ j → 2 ≤ θ j, every address w ∈ countingLeafWords θ ψ is a leaf word of
countingTreeRule θ starting from ψ.
Leaf-count bounds for countingLeaves via CountingBounds #
Appendix A.3 binomial-sum leaf-count bound for countingLeaves.
For any geometric threshold base M ≥ 2 and any reduced, nontautological clause set ψ of width
at most k whose occurring variables lie in declared, the number of leaves in
countingLeaves (M ^ ·) ψ (counted with list multiplicity) is at most
∑_{j ≤ Γ |declared| / M} (C |declared| choose j), where C = countingDepthCoeff k M and
Γ = countingBChoiceCoeff k.
Leaf-count bound under explicit Appendix A.3 parameter-test hypotheses.
When 2 ≤ M, 1 ≤ B, and (for 2 ≤ k) M passes the integer budget test of Appendix A.3,
countingLeaves over declared (declared.card ≤ n) produces at most 2 ^ (n / B + 1) leaves.
Appendix A.3 2 ^ (n / B + 1) leaf-count bound at countingThresholdBase k B.
For any width k : ℕ, inverse error budget 1 ≤ B, and reduced, nontautological clause set ψ
of width at most k over declared (declared.card ≤ n), countingLeaves with threshold base
countingThresholdBase k B produces at most 2 ^ (n / B + 1) leaves.
Leaf occurrence and clause-count bounds for countingLeaves #
Every leaf L ∈ countingLeaves θ ψ of a width-≤ k root has variable occurrence degree at most
2 * ∑ c ∈ range k, θ c whenever 1 ≤ θ 0 and 2 ≤ θ j for 1 ≤ j.
Every leaf L ∈ countingLeaves θ ψ of a width-≤ k root supported on declared has at most
2 * (∑ c ∈ range k, θ c) * declared.card + 1 clauses.
Every leaf CNF L.toCNF (L ∈ countingLeaves θ ψ) of a width-≤ k root supported on
declared has length at most 2 * (∑ c ∈ range k, θ c) * declared.card + 1.
Unconditional CNF counting-sparsification corollaries #
Normalized CNF assignment partition.
Evaluating L.toCNF across the leaves of reduce (nontautological φ.toClauseSet) accepts each
assignment x at 1 leaf occurrence when φ.eval x = true and 0 otherwise.
Normalized CNF model-count conservation.
Summing L.toCNF.modelCountOn declared across the leaves of
reduce (nontautological φ.toClauseSet) equals φ.modelCountOn declared without any
nontautology precondition on φ.
CNF binomial-sum leaf-count bound.
For any 2 ≤ M and any width-≤ k formula φ : CNF V with φ.vars.toFinset ⊆ declared,
countingLeaves (M ^ ·) (reduce (nontautological φ.toClauseSet)) has length at most
∑_{j ≤ Γ |declared| / M} (C |declared| choose j).
CNF 2 ^ (n / B + 1) leaf-count bound at countingThresholdBase k B.
For any width k : ℕ, inverse error budget 1 ≤ B, and width-≤ k formula φ : CNF V with
φ.vars.toFinset ⊆ declared and declared.card ≤ n,
countingLeaves (fun j => (countingThresholdBase k B) ^ j) (reduce (nontautological φ.toClauseSet))
has length at most 2 ^ (n / B + 1).
Combined Lemma 6.3 / Appendix A counting-sparsification leaf decomposition for CNFs.
For any width k : ℕ, inverse error budget 1 ≤ B, and width-≤ k formula φ : CNF V with
occurring variables in declared (declared.card ≤ n), the leaf list
countingLeaves (fun j => (countingThresholdBase k B) ^ j) (reduce (nontautological φ.toClauseSet))
satisfies:
- exact additive
modelCountOn declaredconservation, - exact
0/1assignment partition acrossmap ClauseSet.toCNF, - leaf count at most
2 ^ (n / B + 1), and - at every leaf
L: sparsity, reducedness, nontautology, clause width≤ k, support indeclared, variable occurrence degree at most2 * ∑ c ∈ range k, M ^ c, and clause count at most2 * (∑ c ∈ range k, M ^ c) * declared.card + 1whereM = countingThresholdBase k B.