Documentation

Complexitylib.SAT.Tseitin.Internal.Shape

Structural properties of Tseitin clause splitting #

This internal module proves that the fresh-variable-threaded splitter produces exact-width-three clauses, accounts exactly for its fresh counter, keeps every generated variable below the first unused counter, and has linear structural size in the source literal and clause counts.

theorem Complexity.SAT.CNF.is3CNF_append_internal {φ ψ : CNF} ( : φ.Is3CNF) ( : ψ.Is3CNF) :
(φ ++ ψ).Is3CNF

Exact-width-three shape is preserved by concatenating formulas.

On a nonempty clause, the fresh count is exactly length - 3.

theorem Complexity.SAT.Clause.tseitinFreshCount_wide_internal (next : ) (a b c d : Lit) (rest : List Lit) :
tseitinFreshCount (a :: b :: c :: d :: rest) = tseitinFreshCount (Lit.negVar next :: c :: d :: rest) + 1

One wide-clause split consumes one variable and leaves the remaining count to the recursive suffix.

A clause never consumes more than one plus its number of literals.

Every clause emitted by the single-clause splitter has exactly three literals.

The splitter emits exactly one more clause than the number of fresh variables that it consumes.

Coarse clause-count bound for one split clause.

theorem Complexity.SAT.Clause.var_lt_of_mem_to3CNF_internal (next : ) (c : Clause) :
(∀ c, .var < next)∀ {out : Clause}, out to3CNF next c∀ { : Lit}, out.var < next + c.tseitinFreshCount

Assuming all source variables precede next, every literal emitted for one clause precedes the returned fresh counter.

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

Splitting every clause preserves exact-width-three shape.

The top-level transformation produces exact 3-CNF.

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

to3Aux returns exactly the first counter after all fresh variables.

Total fresh-variable use is bounded by source literals plus source clauses.

The output clause count is exactly fresh variables plus source clauses.

Coarse output clause-count bound in source literals and clauses.

Exact 3-CNF has three literal occurrences per clause.

Exact literal count of the transformed formula.

Coarse transformed literal-count bound used by the later encoded-size proof.

theorem Complexity.SAT.CNF.var_lt_of_mem_to3Aux_internal (next : ) (φ : CNF) (hsource : cφ, c, .var < next) {out : Clause} (hout : out (to3Aux next φ).1) { : Lit} (hℓ : out) :
.var < next + φ.tseitinFreshCount

Assuming source variables precede next, every transformed literal precedes the returned fresh counter.

theorem Complexity.SAT.CNF.var_lt_of_mem_to3_internal (φ : CNF) {out : Clause} (hout : out φ.to3) { : Lit} (hℓ : out) :

Every literal produced by to3 lies below its final fresh counter.