Algorithmic sparsification: fast sparse -SAT gives fast -SAT on the word RAM
ProvedWordRAM.Conjectures.sparsification_transferAlgorithmic sparsification. Let and . Suppose that for every density , -CNF formulas with at most clauses can be decided in steps, where for . The algorithm and constants may depend on . Then all -CNF formulas can be decided by a single algorithm in steps, where
That is,
This is the algorithmic consequence of the Sparsification Lemma (Impagliazzo–Paturi–Zane, Corollary 1). That lemma writes every -CNF as with , where each is a -CNF with at most clauses, computable in time . Taking and running the sparse solver on each gives exponent .
import Definitions.Def_WordRAM_SETHOV_Reduction open WordRAM.Conjectures
theorem WordRAM.Conjectures.sparsification_transfer (r : Nat) (hr : 2 ≤ r) (k : Nat) (hk : 3 ≤ k)
(fastSparse : ∀ density : Nat, 1 ≤ density → HasFastSparseSAT k density r) :
HasFastSAT k (2 * r) := by sorryRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Read-back of WordRAM.Conjectures.sparsification_transfer.
The statement. Let and be natural numbers with and . Suppose that for every natural number (the "density") the property holds. The theorem concludes that holds. The order of quantifiers in the hypothesis matters: the hypothesis is (algorithm, constants). So the algorithm and all of its constants may be different for each density . Nothing in the hypothesis provides one algorithm that works for all densities. In the conclusion, a single algorithm with a single set of constants has to handle every formula whose clauses have width at most , with no bound on the number of clauses. The integer parameter of the time bound changes from in the hypothesis to in the conclusion. Both predicates are spelled out below.
Formulas. A SAT instance is made of:
- a number of variables , where is allowed;
- a finite list of clauses, where each clause is a finite list of literals.
A literal is a pair (index , polarity ). Under an assignment , a literal evaluates to when its polarity is true and to when its polarity is false.
- is satisfiable when some makes every clause in the list contain at least one literal that evaluates to true. So an empty clause makes unsatisfiable, and a formula with an empty clause list is satisfiable (for , by the empty assignment).
- is -CNF when every clause has length (number of list entries) at most . Empty clauses, repeated literals, a variable and its negation in the same clause, and repeated clauses are all allowed. The value of only caps clause length, and the hypothesis is its only other constraint.
Encoding. The encoding is the list of natural numbers
Here is the number of clauses, is the length of clause , is the variable index of its -th literal, and is for positive polarity and for negative. Its length is .
Machine model (algorithms). An algorithm consists of:
- a fixed finite list of source instructions;
- a fixed natural number , the "word factor".
The source instructions are:
- copy to an address;
- a binary operation , stored to an address;
- bitwise NOT;
- "load word width" into an address;
- unconditional jump to a fixed program position;
- conditional branch on an unsigned comparison , or of two operands, to a fixed program position;
- halt.
An operand is either a fixed natural-number literal (an immediate) or a memory cell. A cell is named either directly, by a fixed natural number, or indirectly, through the number stored in a fixed pointer cell. For a word width , the program is compiled as follows:
- immediates are reduced mod ;
- "load word width" writes the word , which equals ;
- arithmetic is mod , and in particular subtraction wraps around;
- shifts move by the operand's value with zero fill, so a shift by gives .
Memory is an infinite array of -bit words indexed by .
Word width. On input list with "extra bits" , the width is
Here is the length of the list (and is taken as nothing when the list is empty). For SAT the extra bits are , so the width grows linearly in the number of variables, and it is chosen per input.
Initial state. Cell holds , and cell holds , or if . Every other cell is . The program counter is and the machine is not halted. Loading the input costs nothing.
One step. If the machine is halted, or the program counter is outside the program, no step is possible. In the second case the machine is stuck, which does not count as halting. Otherwise the instruction at the program counter is executed, and this costs exactly one step:
- jumps and taken branches set the program counter;
- every other instruction advances the program counter by ;
- the halt instruction marks the machine halted and also counts as one step.
Exact-step decision . For as above, starting from the initial state, there is a sequence of exactly successful steps that reaches a state such that:
- is halted;
- cell of holds the word or the word ;
- cell of holds iff the proposition holds.
The initial state is not halted, and only the halt instruction sets the halted flag. So in a run that satisfies this, and the -th step is a halt instruction. The machine is deterministic, so is the unique halting time.
(the conclusion, with ). There exist an algorithm and natural numbers with such that, for every -CNF instance (with , ), there is a with and
Correctness and halting are therefore required for every -CNF instance, while the time bound is required only when . The constants are chosen after and before . The exponent is unrestricted. For the bound reads . Since , the factor involves no truncated subtraction.
(the hypothesis, with ). This is word-for-word the same as , with one change: the universal quantifier over is restricted to -CNF instances that also have at most clauses. The required bound is . Since , is ordinary subtraction. Edge cases:
- When the clause bound forces the clause list to be empty, whatever is.
- Every -CNF formula with clauses and falls under some density, for example . A formula with and clauses (each of which must be empty) falls under no density.
- The algorithm , its word factor, and the constants all depend on .
Not used. The imported split-and-list SAT-to-OV construction (Reduction.toOV, half, etc.) and the OV and SETH predicates are not mentioned by this statement.
Confirmed by the mission captain (proposal self-audit).