Documentation

CslibFrontier.Computability.Complexity.Classes.BooleanHierarchy

The Boolean hierarchy over NP #

The difference hierarchy iterates A ∖ B, with A in a base class and B at the previous level. Level zero is the singleton class containing the empty language. Over NP, level one is NP and level two is DP. This is the difference-hierarchy presentation of the Boolean hierarchy Cai et al.. We develop the dual hierarchy coBH, right-hand Boolean closure with NP languages, and the standard level-by-level collapse equivalences Cai et al.; Kadin: if coBH k ⊆ BH k at some level k, then every higher level BH m and coBH m (and the full BooleanHierarchy) collapses to BH k.

Main definitions #

Main results #

References #

def Cslib.Complexity.differenceHierarchy {α : Type u_1} (C : Set (Set α)) :
ℕ → Set (Set α)

Nested differences over C, starting with just the empty set.

@[simp]

Level zero of the difference hierarchy is the singleton containing ∅.

@[simp]

At level one, taking a difference with the empty set recovers the base class.

theorem Cslib.Complexity.differenceHierarchy_subset {α : Type u_1} {C D : Set (Set α)} (hC : C ⊆ D) (h0 : ∅ ∈ D) (hD : ∀ A ∈ D, ∀ B ∈ D, A \ B ∈ D) (n : ℕ) :

Every level lies in a difference-closed class containing the base class and the empty set.

theorem Cslib.Complexity.preimage_mem_differenceHierarchy {α : Type u_1} {β : Type u_2} {C : Set (Set α)} {D : Set (Set β)} {f : α → β} (hf : ∀ B ∈ D, f ⁻¹' B ∈ C) {n : ℕ} {A : Set β} (hA : A ∈ differenceHierarchy D n) :

Inverse images preserve every level whenever they preserve the base classes.

theorem Cslib.Complexity.differenceHierarchy_subset_succ {α : Type u_1} {C : Set (Set α)} (hC : ∅ ∈ C) (n : ℕ) :

Empty membership makes the levels increasing.

theorem Cslib.Complexity.compl_mem_differenceHierarchy_succ {α : Type u_1} {C : Set (Set α)} (hC : Set.univ ∈ C) {n : ℕ} {A : Set α} (hA : A ∈ differenceHierarchy C n) :

If the universe belongs to the base class, complementation costs one level.

theorem Cslib.Complexity.inter_mem_differenceHierarchy_right {α : Type u_1} {C : Set (Set α)} (hC : ∀ B₁ ∈ C, ∀ B₂ ∈ C, B₁ ∩ B₂ ∈ C) {n : ℕ} {A B : Set α} (hA : A ∈ differenceHierarchy C n) (hB : B ∈ C) :

Intersecting on the right with a member of the base class preserves the level when the base class is closed under intersection.

theorem Cslib.Complexity.diff_mem_differenceHierarchy_right {α : Type u_1} {C : Set (Set α)} (h0 : ∅ ∈ C) (hU : ∀ B₁ ∈ C, ∀ B₂ ∈ C, B₁ ∪ B₂ ∈ C) {n : ℕ} {A B : Set α} (hA : A ∈ differenceHierarchy C n) (hB : B ∈ C) :

Subtracting a member of the base class costs at most one level when the base class contains ∅ and is closed under union.

theorem Cslib.Complexity.union_mem_differenceHierarchy_right {α : Type u_1} {C : Set (Set α)} (h0 : ∅ ∈ C) (hU : ∀ B₁ ∈ C, ∀ B₂ ∈ C, B₁ ∪ B₂ ∈ C) {n : ℕ} {A B : Set α} (hA : A ∈ differenceHierarchy C n) (hB : B ∈ C) :
A ∪ B ∈ differenceHierarchy C (n + 1)

Taking the union with a member of the base class costs at most one level when the base class contains ∅ and is closed under union.

theorem Cslib.Complexity.differenceHierarchy_succ_subset_of_compl {α : Type u_1} {C : Set (Set α)} (hI : ∀ B₁ ∈ C, ∀ B₂ ∈ C, B₁ ∩ B₂ ∈ C) {k : ℕ} (hcompl : ∀ D ∈ differenceHierarchy C k, Dᶜ ∈ differenceHierarchy C k) :

If level k is closed under complement and the base class is closed under intersection, level k + 1 collapses to level k.

theorem Cslib.Complexity.differenceHierarchy_eq_of_succ_subset {α : Type u_1} {C : Set (Set α)} (h0 : ∅ ∈ C) {k : ℕ} (h : differenceHierarchy C (k + 1) ⊆ differenceHierarchy C k) {m : ℕ} (hm : k ≤ m) :

Once a successor level is contained in the previous level, all higher levels coincide with that level.

def Cslib.Complexity.BH {α : Type} (enc : α ↪ List Bool) (n : ℕ) :
Set (Set α)

The nth level of the Boolean hierarchy over NP, with level zero containing only ∅ Cai et al..

def Cslib.Complexity.coBH {α : Type} (enc : α ↪ List Bool) (n : ℕ) :
Set (Set α)

The complement of the nth level of the Boolean hierarchy over NP.

The union of all finite levels of the Boolean hierarchy over NP Cai et al..

theorem Cslib.Complexity.BH_subset_BooleanHierarchy {α : Type} {enc : α ↪ List Bool} (n : ℕ) :
BH enc n ⊆ BooleanHierarchy enc

Every finite level belongs to the full Boolean hierarchy.

NP is the first level of the Boolean hierarchy.

theorem Cslib.Complexity.BooleanHierarchy_subset {α : Type} {enc : α ↪ List Bool} {D : Set (Set α)} (hNP : NP enc ⊆ D) (hD : ∀ A ∈ D, ∀ B ∈ D, A \ B ∈ D) :

A difference-closed class containing NP contains its entire Boolean hierarchy.

theorem Cslib.Complexity.BooleanHierarchy_subset_iff {α : Type} {enc : α ↪ List Bool} {D : Set (Set α)} (hD : ∀ A ∈ D, ∀ B ∈ D, A \ B ∈ D) :
BooleanHierarchy enc ⊆ D ↔ NP enc ⊆ D

For a difference-closed target, containing NP is equivalent to containing the full Boolean hierarchy over NP.

@[simp]
theorem Cslib.Complexity.mem_coBH {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} :
A ∈ coBH enc n ↔ Aᶜ ∈ BH enc n
theorem Cslib.Complexity.compl_mem_coBH_iff {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} :
Aᶜ ∈ coBH enc n ↔ A ∈ BH enc n
theorem Cslib.Complexity.compl_mem_BH_iff {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} :
Aᶜ ∈ BH enc n ↔ A ∈ coBH enc n
@[simp]
theorem Cslib.Complexity.BH_zero {α : Type} {enc : α ↪ List Bool} :
BH enc 0 = {∅}
@[simp]
theorem Cslib.Complexity.coBH_zero {α : Type} {enc : α ↪ List Bool} :
@[simp]
theorem Cslib.Complexity.BH_one {α : Type} {enc : α ↪ List Bool} :
BH enc 1 = NP enc

The first level is precisely NP.

@[simp]
theorem Cslib.Complexity.coBH_one {α : Type} {enc : α ↪ List Bool} :
coBH enc 1 = coNP enc

The first dual level is precisely coNP.

theorem Cslib.Complexity.BH_two {α : Type} {enc : α ↪ List Bool} :
BH enc 2 = DP enc

The second level is precisely DP.

theorem Cslib.Complexity.coBH_two {α : Type} {enc : α ↪ List Bool} :
coBH enc 2 = coDP enc

The second dual level is precisely coDP.

theorem Cslib.Complexity.BH_mono {α : Type} {enc : α ↪ List Bool} :
Monotone (BH enc)

The levels of the Boolean hierarchy are increasing.

theorem Cslib.Complexity.coBH_mono {α : Type} {enc : α ↪ List Bool} :

The dual levels of the Boolean hierarchy are increasing.

theorem Cslib.Complexity.compl_mem_BH_succ {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} (hA : A ∈ BH enc n) :
Aᶜ ∈ BH enc (n + 1)

Complementation moves a language at most one level up.

theorem Cslib.Complexity.BH_subset_coBH_succ {α : Type} {enc : α ↪ List Bool} (n : ℕ) :
BH enc n ⊆ coBH enc (n + 1)

Every level of BH is contained in the next level of coBH.

theorem Cslib.Complexity.coBH_subset_BH_succ {α : Type} {enc : α ↪ List Bool} (n : ℕ) :
coBH enc n ⊆ BH enc (n + 1)

Every level of coBH is contained in the next level of BH.

theorem Cslib.Complexity.compl_mem_coBH_succ {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} (hA : A ∈ coBH enc n) :
Aᶜ ∈ coBH enc (n + 1)

Complementation moves a language in coBH at most one level up.

The union of the dual levels coBH coincides with BooleanHierarchy.

The union of the finite levels is closed under complement.

theorem Cslib.Complexity.inter_mem_BH_of_mem_NP {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} {B : Set α} (hA : A ∈ BH enc n) (hB : B ∈ NP enc) :
A ∩ B ∈ BH enc n

Intersecting a BH enc n language with an NP language stays in BH enc n.

theorem Cslib.Complexity.diff_mem_BH_of_mem_NP {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} {B : Set α} (hA : A ∈ BH enc n) (hB : B ∈ NP enc) :
A \ B ∈ BH enc (n + 1)

Subtracting an NP language from a BH enc n language stays in BH enc (n + 1).

theorem Cslib.Complexity.union_mem_BH_of_mem_NP {α : Type} {enc : α ↪ List Bool} {A : Set α} {n : ℕ} {B : Set α} (hA : A ∈ BH enc n) (hB : B ∈ NP enc) :
A ∪ B ∈ BH enc (n + 1)

Taking the union of a BH enc n language with an NP language stays in BH enc (n + 1).

theorem Cslib.Complexity.PolyTimeReducible.mem_BH {α β : Type} {enc : α ↪ List Bool} {A : Set α} {encB : β ↪ List Bool} {B : Set β} {n : ℕ} (h : PolyTimeReducible enc encB A B) (hB : B ∈ BH encB n) :
A ∈ BH enc n

Many-one reductions preserve each finite level.

theorem Cslib.Complexity.PolyTimeReducible.mem_coBH {α β : Type} {enc : α ↪ List Bool} {A : Set α} {encB : β ↪ List Bool} {B : Set β} {n : ℕ} (h : PolyTimeReducible enc encB A B) (hB : B ∈ coBH encB n) :
A ∈ coBH enc n

Many-one reductions preserve each finite dual level.

theorem Cslib.Complexity.PolyTimeReducible.mem_BooleanHierarchy {α β : Type} {enc : α ↪ List Bool} {A : Set α} {encB : β ↪ List Bool} {B : Set β} (h : PolyTimeReducible enc encB A B) (hB : B ∈ BooleanHierarchy encB) :

Many-one reductions preserve BooleanHierarchy.

theorem Cslib.Complexity.BH_succ_subset_iff_coBH_subset {α : Type} {enc : α ↪ List Bool} {k : ℕ} :
BH enc (k + 1) ⊆ BH enc k ↔ coBH enc k ⊆ BH enc k

Boolean-hierarchy step collapse Cai et al., Section 2: level k + 1 is contained in level k if and only if coBH enc k ⊆ BH enc k.

theorem Cslib.Complexity.BH_succ_eq_iff_coBH_subset {α : Type} {enc : α ↪ List Bool} {k : ℕ} :
BH enc (k + 1) = BH enc k ↔ coBH enc k ⊆ BH enc k

Level k + 1 equals level k if and only if coBH enc k ⊆ BH enc k.

theorem Cslib.Complexity.BH_eq_coBH_iff_BH_succ_eq {α : Type} {enc : α ↪ List Bool} {k : ℕ} :
BH enc k = coBH enc k ↔ BH enc (k + 1) = BH enc k

Level k is closed under complement (BH enc k = coBH enc k) if and only if BH enc (k + 1) = BH enc k Cai et al., Section 2.

theorem Cslib.Complexity.BH_eq_of_BH_succ_subset {α : Type} {enc : α ↪ List Bool} {k m : ℕ} (h : BH enc (k + 1) ⊆ BH enc k) (hm : k ≤ m) :
BH enc m = BH enc k

If BH enc (k + 1) ⊆ BH enc k, then every higher level BH enc m (k ≤ m) equals BH enc k.

theorem Cslib.Complexity.BH_eq_of_coBH_subset {α : Type} {enc : α ↪ List Bool} {k m : ℕ} (h : coBH enc k ⊆ BH enc k) (hm : k ≤ m) :
BH enc m = BH enc k

Upward collapse of BH Cai et al., Section 2; Kadin: if coBH enc k ⊆ BH enc k, then BH enc m = BH enc k for every m ≥ k.

theorem Cslib.Complexity.coBH_eq_BH_of_coBH_subset {α : Type} {enc : α ↪ List Bool} {k m : ℕ} (h : coBH enc k ⊆ BH enc k) (hm : k ≤ m) :
coBH enc m = BH enc k

Upward collapse of coBH Cai et al., Section 2; Kadin: if coBH enc k ⊆ BH enc k, then coBH enc m = BH enc k for every m ≥ k.

theorem Cslib.Complexity.BooleanHierarchy_eq_BH_of_coBH_subset {α : Type} {enc : α ↪ List Bool} {k : ℕ} (h : coBH enc k ⊆ BH enc k) :

Full Boolean-hierarchy collapse Cai et al., Section 2; Kadin: if coBH enc k ⊆ BH enc k, then the entire Boolean hierarchy collapses to BH enc k.

If NP = coNP, the entire Boolean hierarchy collapses to NP.