Documentation

CslibFrontier.Computability.Complexity.Classes.PH.Closure

Union and intersection closure at each level of the polynomial hierarchy #

Pair the two certificates at each quantifier block and split them before running the two verifiers. This preserves the number and polarity of the quantifiers, including at level zero. The construction uses exact certificate lengths and polynomial-time bit-string slicing.

Main definitions #

Main results #

References #

Split consecutive blocks of lengths n + m into two words, concatenating their first n and last m bits respectively. Bits beyond the specified blocks are ignored.

theorem Cslib.Complexity.alternation_splitAlternatingBlocks (ns : List (ℕ × ℕ)) (q : Bool) (P Q : List Bool → Prop) :
(Alternation q (List.map (fun (nm : ℕ × ℕ) => nm.1 + nm.2) ns) fun (w : List Bool) => P (splitAlternatingBlocks ns w).1 ∧ Q (splitAlternatingBlocks ns w).2) ↔ Alternation q (List.map Prod.fst ns) P ∧ Alternation q (List.map Prod.snd ns) Q

Independent alternating predicates can be conjoined by pairing their certificate blocks. Each quantified domain is nonempty, including blocks of length zero.

theorem Cslib.Complexity.IsAlternatingVerifier.inter {α : Type} {enc : α ↪ List Bool} {q : Bool} {ps : List (Polynomial ℕ × Polynomial ℕ)} {V W : α × List Bool → Bool} {A B : Set α} (hA : IsAlternatingVerifier enc q (List.map Prod.fst ps) V A) (hB : IsAlternatingVerifier enc q (List.map Prod.snd ps) W B) :
IsAlternatingVerifier enc q (List.map (fun (pq : Polynomial ℕ × Polynomial ℕ) => pq.1 + pq.2) ps) (fun (x : α × List Bool) => have w := splitAlternatingBlocks (List.map (fun (pq : Polynomial ℕ × Polynomial ℕ) => (Polynomial.eval (enc x.1).length pq.1, Polynomial.eval (enc x.1).length pq.2)) ps) x.2; V (x.1, w.1) && W (x.1, w.2)) (A ∩ B)

Conjoin two alternating verifiers by pairing equally positioned certificate blocks.

theorem Cslib.Complexity.inter_mem_SigmaP {α : Type} {enc : α ↪ List Bool} {k : ℕ} {A B : Set α} (hA : A ∈ SigmaP k enc) (hB : B ∈ SigmaP k enc) :
A ∩ B ∈ SigmaP k enc

Each existential level is closed under intersection, without adding a quantifier block.

theorem Cslib.Complexity.inter_mem_PiP {α : Type} {enc : α ↪ List Bool} {k : ℕ} {A B : Set α} (hA : A ∈ PiP k enc) (hB : B ∈ PiP k enc) :
A ∩ B ∈ PiP k enc

Each universal level is closed under intersection, without adding a quantifier block.

theorem Cslib.Complexity.union_mem_SigmaP {α : Type} {enc : α ↪ List Bool} {k : ℕ} {A B : Set α} (hA : A ∈ SigmaP k enc) (hB : B ∈ SigmaP k enc) :
A ∪ B ∈ SigmaP k enc

Each existential level is closed under union, by intersection and quantifier duality.

theorem Cslib.Complexity.union_mem_PiP {α : Type} {enc : α ↪ List Bool} {k : ℕ} {A B : Set α} (hA : A ∈ PiP k enc) (hB : B ∈ PiP k enc) :
A ∪ B ∈ PiP k enc

Each universal level is closed under union, by intersection and quantifier duality.

theorem Cslib.Complexity.compl_mem_PH {α : Type} {enc : α ↪ List Bool} {A : Set α} (hA : A ∈ PH enc) :
Aᶜ ∈ PH enc

Complementation swaps quantifier polarities, remaining within the polynomial hierarchy.

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

Two PH languages can be intersected at the larger of their two existential levels.

PH as a Boolean subalgebra of Set α.

@[simp]
theorem Cslib.Complexity.PH.mem_booleanSubalgebra {α : Type} {enc : α ↪ List Bool} {A : Set α} :
theorem Cslib.Complexity.union_mem_PH {α : Type} {enc : α ↪ List Bool} {A B : Set α} (hA : A ∈ PH enc) (hB : B ∈ PH enc) :
A ∪ B ∈ PH enc

Two PH languages can be united at the larger of their two existential levels.

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

The polynomial hierarchy is closed under set difference.

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

The polynomial hierarchy is closed under symmetric difference.