The setting
The sparsification lemma of Impagliazzo, Paturi, and Zane replaces a 3-CNF formula on variables with a disjunction of subexponentially many 3-CNF formulas on the same variables, each having only linearly many clauses in , without changing the set of satisfying assignments. In fine-grained complexity, this reduction lets one assume without loss of generality that a 3-CNF instance has clause density bounded by a constant depending only on the target exponential rate. To carry the reduction into explicit time bounds, one also needs a deterministic procedure that executes the underlying flower-splitting recursion and outputs the resulting sparse formulas within a controlled step and space budget.
The Lean library formalizes width-three sparsification at rational rates in two layers: a combinatorial bound on the size and clause count of the output family, and budgeted evaluation bounds for both fixed-parameter and uniform deterministic sparsification programs in a step-counted binary-tree computation model.
Formulas and satisfaction
Let be a natural number and write . A boolean literal over variables is a pair consisting of a variable index and a Boolean polarity .✦ A 3-CNF clause over variables is a finite list of boolean literals over variables of length at most .✦ A 3-CNF formula over variables is a finite list of 3-CNF clauses over variables; we write for its number of clauses.✦
Given a Boolean assignment , a 3-CNF clause is satisfied by if some literal in satisfies .✦ A 3-CNF formula is satisfied by if every clause in is satisfied by .✦
Flowers and sparsification trees
Let be a set with decidable equality. A clause list over is a finite list of finite lists of elements of .✦ Writing for the finite subset of consisting of the elements of a list , the CNF set of is the finite set of finite subsets of .✦
For any key map into a set with decidable equality, key-based deduplication scans a list from left to right starting from the empty list, prepending an element when has not yet appeared among the keys of the retained elements.✦ The deduplicated clause list is obtained by deduplicating with respect to .✦ For lists over , the clause difference is the sublist of of elements not in .✦ For clause lists and , the pruned clause list is , where is obtained from by removing every clause for which some satisfies .✦
A flower record over is a pair consisting of a core list over and a petal clause list over .✦ For natural numbers , the record is a valid -flower in a clause list if , , and for all : (1)✦
For and a list , let be the list of all length- lists of entries from , with and formed by prepending each element of to each entry of .✦ Writing for the concatenation of all clauses in , the candidate flower list for and pairs every with every to form .✦ Filtering the candidate flower list to the valid -flowers in gives the valid flower list ✦, and the selected flower is its first entry, defaulting to when the list is empty.✦
A sparsification step result is a triple consisting of a Boolean flag and two clause lists.✦ Branching on a flower record yields .✦ For a threshold , the sparsification step inspects , , and in that order, returning the branch on the selected flower of the first nonempty list and returning if all three lists are empty.✦
The branching tree records the deterministic flower-splitting recursion at an integer threshold, which gives effective rational-rate sparsification.
A sparsification branching tree over is a finite binary tree whose leaves each carry a clause list and whose internal nodes carry a clause list together with a left subtree and a right subtree .✦ Its root is the label at the root✦, its node count is for a leaf and for an internal node✦, and its leaf list is for a leaf and for an internal node.✦ We write for the reversal of . The tree is -valid if at every leaf labeled the flag of is , and at every internal node we have and both and are -valid.✦
Budgeted tree programs
The set of binary data trees is generated inductively by an empty tree and binary nodes for .✦ The size of a tree is and .✦ Its left and right children are , , and .✦ Booleans are encoded as for and for .✦ A tree encoding on a set is an injective map ; the Lean library extends any tree encoding on to pairs, lists, Booleans, and natural numbers.✦
The functional tree language consists of programs built from the primitives (identity), (constant ), (), and (), together with pairing, sequential composition, branching on empty versus nonempty input, conditional evaluation testing whether a predicate program returns , and while-loops that repeat a body while of the current tree is nonempty.✦ For a size bound , step-counted evaluation holds when program evaluates on to in steps with every inspected or constructed tree of size at most : each primitive and a terminating loop test takes step provided , pairing requires and adds step to its two sub-evaluations, and composition, branching, conditionals, and loop iterations each add step to their sub-evaluations.✦ Budgeted evaluation holds if there exists such that .✦
A verified tree program computing consists of a program in the functional tree language and a time function such that for every .✦ It is a polynomial-time tree program if there exist with for all ✦, and a parameterized polynomial program for if it is a verified tree program on with for functions .✦
Combining polynomial-time tree programs for linear tree expressions, tree equality, list operations, tuple generation, deduplication, flower validity checking, and pruning, the Lean library constructs a polynomial-time tree program with time function computing for each fixed , and a parameterized polynomial program with time function computing .
A depth-first search (DFS) state is a pair of lists of clause lists representing a frontier stack and an accumulated leaf list .✦ One DFS step applies to the head of (defaulting to the empty clause list), moving that head onto if the flag is and otherwise replacing it on with the two branch clause lists.✦ The fixed-parameter sparsification program initializes , loops the DFS step program built from until is empty, and returns .✦ A runtime DFS state additionally carries ✦, and the uniform sparsification program initializes from , loops the runtime DFS step program built from until is empty, and returns .✦
The claim
Lemma 5.1. First, let be a natural number, let be a 3-CNF formula over variables, and let be a positive integer. Then there exists a finite list of 3-CNF formulas over variables such that is satisfied by a Boolean assignment if and only if some is satisfied by , and every satisfies (2)✦
Second, let be a set with decidable equality and a tree encoding , let , and let be an -valid sparsification branching tree over such that every clause list appearing at a node of satisfies . If for every clause list over with , then the fixed-parameter sparsification program satisfies (3)✦
Third, under the same assumptions on , , and , if for every clause list over with , then the uniform sparsification program satisfies (4)✦
In the paper, the result reads: for every there are a constant and a deterministic algorithm expressing any 3-CNF formula on variables as a disjunction of at most 3-CNF formulas on the same variables, each with at most clauses, in time , where denotes the encoding length of . In the Lean library, (2) gives the combinatorial bound at rational rates for every with an explicit linear clause bound, while (3) and (4) bound the budgeted evaluation of the fixed-parameter and uniform depth-first sparsification programs on any valid branching tree.
What is checked
Lemma 5.1 is stated over 3-CNF formulas on variables and positive integers for the combinatorial bound (2), and over an arbitrary set with decidable equality and a tree encoding, natural numbers , and an -valid sparsification branching tree whose node encodings have size at most and whose step programs run within budget for the evaluation bounds (3) and (4). For these constructions, the Lean library also shows that the length of a deduplicated clause list equals ✦, and that any fixed-length left fold of a polynomial-time tree program has fold work bounded by a polynomial in the size of the encoded input.✦