Documentation

CslibFrontier.Computability.Complexity.Classes.RP.Closure

Closure properties of RP, coRP and ZPP #

RP (Cslib.Complexity.RP) is closed under union and intersection, and so are coRP and ZPP = RP ∩ coRP Arora and Barak, Section 7.3. Both constructions run one-sided error deciders for the two problems on disjoint parts of the random string.

A decider ignoring an empty random string shows P ⊆ RP; with closure of P under complement (Cslib.Complexity.compl_mem_P), P ⊆ coRP and P ⊆ ZPP. Since RP ⊆ NP, ZPP ⊆ NP ∩ coNP.

Main results #

References #

Inclusions of P #

theorem Cslib.Complexity.P_subset_RP {α : Type} {enc : α ↪ List Bool} :
P enc ⊆ RP enc

P ⊆ RP: a decider is a one-sided-error decider ignoring its random string, of length 0.

theorem Cslib.Complexity.P_subset_coRP {α : Type} {enc : α ↪ List Bool} :
P enc ⊆ coRP enc

P ⊆ coRP: P is closed under complement.

theorem Cslib.Complexity.P_subset_ZPP {α : Type} {enc : α ↪ List Bool} :
P enc ⊆ ZPP enc

P ⊆ ZPP, since ZPP = RP ∩ coRP.

theorem Cslib.Complexity.ZPP_subset_NP_inter_coNP {α : Type} {enc : α ↪ List Bool} :
ZPP enc ⊆ NP enc ∩ coNP enc

ZPP ⊆ NP ∩ coNP.

Union and intersection #

theorem Cslib.Complexity.union_mem_RP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ RP enc) (hB : B ∈ RP enc) :
A ∪ B ∈ RP enc

RP is closed under union: accept when the decider for either problem accepts, on disjoint parts of the random string.

theorem Cslib.Complexity.inter_mem_RP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ RP enc) (hB : B ∈ RP enc) :
A ∩ B ∈ RP enc

RP is closed under intersection: reduce the error of both deciders to 1 / 4, and accept when both accept, on disjoint parts of the random string.

theorem Cslib.Complexity.union_mem_coRP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ coRP enc) (hB : B ∈ coRP enc) :
A ∪ B ∈ coRP enc

coRP is closed under union.

theorem Cslib.Complexity.inter_mem_coRP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ coRP enc) (hB : B ∈ coRP enc) :
A ∩ B ∈ coRP enc

coRP is closed under intersection.

theorem Cslib.Complexity.inter_mem_ZPP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ ZPP enc) (hB : B ∈ ZPP enc) :
A ∩ B ∈ ZPP enc

ZPP is closed under intersection.

ZPP as a Boolean subalgebra of Set α.

Instances For
    @[simp]
    theorem Cslib.Complexity.union_mem_ZPP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ ZPP enc) (hB : B ∈ ZPP enc) :
    A ∪ B ∈ ZPP enc

    ZPP is closed under union.

    theorem Cslib.Complexity.diff_mem_ZPP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ ZPP enc) (hB : B ∈ ZPP enc) :
    A \ B ∈ ZPP enc

    ZPP is closed under set difference.

    theorem Cslib.Complexity.symmDiff_mem_ZPP {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ ZPP enc) (hB : B ∈ ZPP enc) :
    symmDiff A B ∈ ZPP enc

    ZPP is closed under symmetric difference.