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 #
splitAlternatingBlocks: split each paired block into its left and right certificates.
Main results #
alternation_splitAlternatingBlocks: alternating-quantifier equivalence for paired blocks.computableInPolyTime_splitAlternatingBlocks: plain polynomial-time certificate for splitting paired blocks whose lengths are polynomials of a computed unary size.inter_mem_SigmaP,union_mem_SigmaP: closure of each existential level.inter_mem_PiP,union_mem_PiP: closure of each universal level.compl_mem_PH,inter_mem_PH,union_mem_PH,diff_mem_PH: Boolean closure of the hierarchy.
References #
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.computableInPolyTime_splitAlternatingBlocks {γ : Type} {encIn : γ ↪ List Bool} (ps : List (Polynomial ℕ × Polynomial ℕ)) {N : γ → ℕ} (hN : Turing.MultiTapeTM.ComputableInPolyTime N encIn Turing.MultiTapeTM.encUnary) {W : γ → List Bool} (hW : Turing.MultiTapeTM.ComputableInPolyTime W encIn Turing.MultiTapeTM.encBits) :
Turing.MultiTapeTM.ComputableInPolyTime
(fun (x : γ) =>
splitAlternatingBlocks
(List.map (fun (pq : Polynomial ℕ × Polynomial ℕ) => (Polynomial.eval (N x) pq.1, Polynomial.eval (N x) pq.2)) ps)
(W x))
encIn (Turing.MultiTapeTM.encPair Turing.MultiTapeTM.encBits Turing.MultiTapeTM.encBits)
Splitting paired blocks is polynomial-time when their lengths are fixed polynomials of a computed unary size.
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.
def Cslib.Complexity.PH.booleanSubalgebra {α : Type} (enc : α ↪ List Bool) :
BooleanSubalgebra (Set α)
PH as a Boolean subalgebra of Set α.
@[simp]