Documentation

CslibFrontier.Logics.Propositional.CNF.ThreeCNF.Exact.PolyTime

Polynomial-time count-preserving clause splitting #

The recursive OR-gate chain agrees with an indexed traversal of the input clause, with three clauses per gate. The certificate charges every lookup, fresh variable, copied literal and list delimiter. Original variables keep their supplied encoding; gate variables use their unary clause and gate indices. This mirrors the certificate for Cslib.Logic.PL.CNF.to3CNF.

Main results #

References #

theorem Cslib.Logic.PL.Clause.isPolyTime_orChainAux {W Input : Type} {input : Input ↪ List Bool} {enc : W ↪ List Bool} {fresh : Input → ℕ → W} {index : Input → ℕ} {carry : Input → Literal W} {rest : Input → Clause W} (hrest : Turing.MultiTapeTM.ComputableInPolyTime rest input (encClause enc)) (hcarry : Turing.MultiTapeTM.ComputableInPolyTime carry input (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encBool)) (hindex : Turing.MultiTapeTM.ComputableInPolyTime index input Turing.MultiTapeTM.encUnary) (hfresh : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Input × ℕ) => fresh p.1 p.2) (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encUnary) enc) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : Input) => orChainAux (fresh x) (index x) (carry x) (rest x)) input (encCNFOver enc)

The OR-gate chain of a clause tail, with a certified fresh-variable routine and runtime gate index.

theorem Cslib.Logic.PL.Clause.isPolyTime_orSplit3 {W Input : Type} {input : Input ↪ List Bool} {enc : W ↪ List Bool} {fresh : Input → ℕ → W} {index : Input → ℕ} {clause : Input → Clause W} (hclause : Turing.MultiTapeTM.ComputableInPolyTime clause input (encClause enc)) (hindex : Turing.MultiTapeTM.ComputableInPolyTime index input Turing.MultiTapeTM.encUnary) (hfresh : Turing.MultiTapeTM.ComputableInPolyTime (fun (p : Input × ℕ) => fresh p.1 p.2) (Turing.MultiTapeTM.encPair input Turing.MultiTapeTM.encUnary) enc) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : Input) => orSplit3 (fresh x) (index x) (clause x)) input (encCNFOver enc)

The OR-gate chain of a computed clause retains the input captured by its fresh-variable routine.

Convert an arbitrary CNF formula to 3CNF with the same number of models, encoding gate variables by unary clause and gate indices. The certificate includes relabelling, clause traversal and all output copying.