Documentation

Complexitylib.SAT.Tseitin

Size-controlled reduction from CNF-SAT to 3SAT #

CNF.to3 replaces every source clause by an exact-width-three formula. Empty clauses become a contradictory pair, short clauses repeat literals, and wide clauses use a chain of fresh variables. The transformation is equisatisfiable and its concrete unary-variable encoding is quadratically bounded.

ThreeSAT.reduction lifts the typed transformation to a total bit-string map. Malformed source encodings are sent to ThreeSAT.fallbackEncoding, a fixed valid no-instance. Machine-level polynomial-time computability is deliberately separate from this semantic layer.

Main results #

theorem Complexity.SAT.CNF.to3Aux_is3CNF (next : ) (φ : CNF) :
(to3Aux next φ).1.Is3CNF

Splitting from any initial counter produces an exact 3-CNF.

theorem Complexity.SAT.CNF.to3Aux_satisfiable_iff (next : ) (φ : CNF) (hnext : φ.maxVar < next) :

Splitting from a counter above every source variable preserves and reflects satisfiability.

Splitting produces an exact 3-CNF.

Splitting preserves and reflects satisfiability.

theorem Complexity.SAT.CNF.to3Aux_counter (next : ) (φ : CNF) :
(to3Aux next φ).2 = next + φ.tseitinFreshCount

The returned counter is exactly the initial counter plus the number of fresh variables consumed by the formula.

The transformed clause count is linear in source literal and clause counts.

theorem Complexity.SAT.CNF.var_lt_of_mem_to3 (φ : CNF) {c : Clause} (hc : c φ.to3) { : Lit} (hℓ : c) :

Every transformed variable lies below the final fresh counter.

The concrete unary-variable encoding of the output is quadratically bounded in the source encoding length.

theorem Complexity.SAT.CNF.encode_to3Aux_length_le (next : ) (φ : CNF) (hfresh : φ.maxVar < next) (hnext : next φ.encode.length + 1) :
(to3Aux next φ).1.encode.length 96 * (φ.encode.length + 1) ^ 2

A compact fresh start preserves the same quadratic encoded-size bound as the canonical transformation.

Total bit-string reduction from encoded CNF-SAT to encoded 3SAT. Malformed inputs map to a fixed valid no-instance.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    A typed CNF's transformed encoding belongs to 3SAT exactly when the source formula is satisfiable.

    A typed CNF split from any fresh counter belongs to 3SAT exactly when the source formula is satisfiable.

    Semantic correctness of the total encoded reduction.

    Source-first orientation of reduction_correct, matching the convention used by polynomial-time many-one reductions.

    The total encoded reduction has a quadratic output-length bound, including its fixed fallback value on malformed inputs.