Padded SAT instances comparing two binary variable indices
DefinitionPaddedSATIndexcomplexity-theoryformal-verification
For m-bit integers a and b, form a positive unit on index 2^m+a, followed by g copies of a fixed tautological clause, and a negative unit on index 2^m+b. Encode this formula by the mission binary CNF encoding.
Definition code
import Definitions.Def_PvsNP
set_option autoImplicit false
namespace PvsNP.PaddedInequalityWorkTape
def variableIndex {m : ℕ} (a : Fin (2^m)) : ℕ := 2^m + a.val
def unitCode {m : ℕ} (positive : Bool) (a : Fin (2^m)) : Str :=
encodeClause [(positive,variableIndex a)]
def marker : Clause := [(false,0),(true,0)]
def gap (g : ℕ) : CNF := List.replicate g marker
def paddedPayload {m : ℕ} (g : ℕ) (a b : Fin (2^m)) : Str :=
encodeCNF ([(true,variableIndex a)] :: gap g ++ [[(false,variableIndex b)]])
end PvsNP.PaddedInequalityWorkTape
Source
Two unit clauses separated by a fixed tautology block, using the mission CNF encoding.