Recovering relativized counts by majority queries #
Compare a relativized count with a binary threshold using the positive-gap characterization, then recover the entire count with the existing certified binary search. Threshold requests are total on raw words through a supplied polynomial-time decoder. Thus an arbitrary encoding is never assumed to have efficient range recognition.
Main results #
Cslib.Complexity.setOf_le_mem_PPWithOracle: comparison with a relativized count.Cslib.Complexity.SharpPWithOracle.mem_CountingFunction: a count relative to C_a P is in F_(a+1), for inputs with a certified total decoder.
theorem Cslib.Complexity.setOf_le_mem_PPWithOracle {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {f : α → ℕ} (hf : f ∈ SharpPWithOracle A enc) :
{x : α × ℕ | x.2 ≤ f x.1} ∈ PPWithOracle A (Turing.MultiTapeTM.encPair enc Turing.MultiTapeTM.encNat)
Comparison with a relativized count is strict-majority decidable: the gap is f(x)+1-k.
theorem Cslib.Complexity.SharpPWithOracle.mem_CountingFunction {α : Type} {enc : α ↪ List Bool} {A : Set (List Bool)} {a : ℕ} (D : Turing.MultiTapeTM.Decoder enc) (hA : A ∈ CountingLevel a Turing.MultiTapeTM.encBits) {f : α → ℕ} (hf : f ∈ SharpPWithOracle A enc) :
A relativized count can be recovered one level above its fixed oracle. The decoder makes the threshold oracle a language on all raw words; its values off valid codes are fixed by the decoder. The search uses one more bit than the witness bound, including the endpoint 2^b.