Documentation

CslibFrontier.Computability.Complexity.Reduction.Equiv

Polynomial-time many-one equivalence #

Cslib.Complexity.PolyTimeEquiv encA encB A B (A ≡ₘᵖ B) says that A and B reduce to each other in polynomial time. Unlike Cslib.Complexity.ReducibleEquiv in CslibFrontier.Computability.Complexity.Reduction.Autoreducibility, which takes a homogeneous relation on a single carrier Set α, PolyTimeEquiv relates problems across distinct instance types α and β and encodings encA and encB.

Main definitions #

Main results #

References #

def Cslib.Complexity.PolyTimeEquiv {α : Type u_1} {β : Type u_2} (encA : α ↪ List Bool) (encB : β ↪ List Bool) (A : Set α) (B : Set β) :

Two problems are polynomial-time many-one equivalent (A ≡ₘᵖ B) when each reduces to the other in polynomial time.

theorem Cslib.Complexity.PolyTimeEquiv.refl {α : Type u_1} (encA : α ↪ List Bool) (A : Set α) :
PolyTimeEquiv encA encA A A

Polynomial-time many-one equivalence is reflexive.

theorem Cslib.Complexity.PolyTimeEquiv.symm {α : Type u_1} {β : Type u_2} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} (h : PolyTimeEquiv encA encB A B) :
PolyTimeEquiv encB encA B A

Polynomial-time many-one equivalence is symmetric.

theorem Cslib.Complexity.PolyTimeEquiv.trans {α : Type u_1} {β : Type u_2} {γ : Type u_3} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {encC : γ ↪ List Bool} {A : Set α} {B : Set β} {C : Set γ} (hAB : PolyTimeEquiv encA encB A B) (hBC : PolyTimeEquiv encB encC B C) :
PolyTimeEquiv encA encC A C

Polynomial-time many-one equivalence is transitive.

theorem Cslib.Complexity.PolyTimeEquiv.compl {α : Type u_1} {β : Type u_2} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} (h : PolyTimeEquiv encA encB A B) :
PolyTimeEquiv encA encB Aᶜ Bᶜ

Polynomial-time many-one equivalence passes to complements.

theorem Cslib.Complexity.PolyTimeEquiv.mem_P_iff {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} (h : PolyTimeEquiv encA encB A B) :
A ∈ P encA ↔ B ∈ P encB

Polynomial-time many-one equivalent problems both lie in P or neither does.

theorem Cslib.Complexity.PolyTimeEquiv.mem_NP_iff {α β : Type} {encA : α ↪ List Bool} {encB : β ↪ List Bool} {A : Set α} {B : Set β} (h : PolyTimeEquiv encA encB A B) :
A ∈ NP encA ↔ B ∈ NP encB

Polynomial-time many-one equivalent problems both lie in NP or neither does.