Documentation

CslibFrontier.Computability.Complexity.Reduction.TruthTable

Polynomial-time truth-table reductions #

A nonadaptive reduction uses a uniformly computed indexed batch of queries, a unary query count, and a polynomial-time Boolean combiner. The combiner receives the original input and all answers. The query generator is total even outside the used range; unused outputs do not affect semantics. The answer word truthTableAnswers and the resource-free kernel TruthTableReducibleBy live in CslibFrontier.Computability.Reduction.TruthTable, publicly re-exported here. PolyTimeTruthTableReducible is by definition TruthTableReducibleBy with polynomial-time data, so the kernel lemmas prove its complementation and many-one embedding below.

Main definitions #

Main results #

References #

def Cslib.Complexity.PolyTimeTruthTableReducible {α β : Type} (encA : α ↪ List Bool) (encB : β ↪ List Bool) (L : Set α) (B : Set β) :

A polynomial-time truth-table reduction generates all queries without access to their answers, then applies a polynomial-time Boolean combiner to the input and answer word. The count is computed in unary; query lengths and counts may vary at fixed input length.

theorem Cslib.Complexity.PolyTimeReducible.polyTimeTruthTableReducible {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {L : Set α} {B : Set β} (h : PolyTimeReducible encA encB L B) :

Every polynomial-time many-one reduction is a polynomial-time truth-table reduction making a single query.

Every problem reduces to itself under polynomial-time truth-table reductions.

theorem Cslib.Complexity.PolyTimeTruthTableReducible.compl_left {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {L : Set α} {B : Set β} (h : PolyTimeTruthTableReducible encA encB L B) :

Negating the Boolean combiner reduces the complement Lᶜ to B.

theorem Cslib.Complexity.PolyTimeTruthTableReducible.compl_right {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {L : Set α} {B : Set β} (h : PolyTimeTruthTableReducible encA encB L B) :

Negating each answer bit before invoking the combiner reduces L to Bᶜ.

theorem Cslib.Complexity.PolyTimeTruthTableReducible.compl {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {L : Set α} {B : Set β} (h : PolyTimeTruthTableReducible encA encB L B) :

A polynomial-time truth-table reduction from L to B also reduces Lᶜ to Bᶜ.

A jointly polynomial-time decidable family supports any polynomial-time Boolean combination of a computed unary batch of queries.

theorem Cslib.Complexity.PolyTimeTruthTableReducible.mem_P {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {L : Set α} {B : Set β} (h : PolyTimeTruthTableReducible encA encB L B) (hB : B ∈ P encB) :
L ∈ P encA

P is closed under polynomial-time truth-table reductions.