Consistency of finite partial Boolean assignments #
A partial assignment is represented as a list of variable indices and their Boolean values.
Cslib.Complexity.SAT.consistentLits checks whether two such lists agree wherever they both
assign a value. Testing a list against itself detects conflicting repetitions. The check is
polynomial-time with binary indices.
theorem Cslib.Complexity.SAT.computableInPolyTime_consistentLits :
Turing.MultiTapeTM.ComputableInPolyTime (fun (p : List (ℕ × Bool) × List (ℕ × Bool)) => consistentLits p.1 p.2)
(Turing.MultiTapeTM.encPair
(Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat Turing.MultiTapeTM.encBool))
(Turing.MultiTapeTM.encList (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encNat Turing.MultiTapeTM.encBool)))
Turing.MultiTapeTM.encBool
Consistency is decidable in polynomial time in the encoded lists, using binary variable indices.