Documentation

CslibFrontier.Computability.Complexity.Classes.MIP.OptimalProver

Deterministic prover optimality and history consistency for MIP #

Fixing the private coins of a multi-channel probabilistic oracle Turing machine M running under clock t yields a finite family of deterministic multi-channel query programs Cslib.Complexity.Interaction.coinProgram M t x r : WordQueryComp Oracle Bool, and averaging over uniform t-bit coin strings reproduces M.runOracle t x against any stateful multi-channel oracle (Cslib.Complexity.Interaction.acceptProb_eq_sum), in particular against Prover.independent P.

For any bounded family of multi-channel query programs, any independent family of stateful randomized provers P : ι → Prover Unit can be replaced by an independent family of deterministic stateful provers D : ι → DetProver without decreasing the expected acceptance probability (Cslib.Complexity.MIP.exists_deterministic_prover_family). We establish this by presampling a finite-depth deterministic response tree (Cslib.Complexity.MIP.TreeStrategy, Cslib.Complexity.MIP.presampleTree) independently for each prover channel before the protocol starts, showing that the presampled tree family reproduces the exact output distribution on every coin branch, and selecting a maximizing deterministic tree tuple over the finite support.

Finally, we formalize deterministic single-prover strategies (Cslib.Complexity.MIP.DetProver), pairwise history consistency (Cslib.Complexity.MIP.consistentHist), and the candidate-filtering prover (Cslib.Complexity.MIP.candidateProver), proving that a finite list of single-prover histories is realizable by a deterministic prover if and only if it is pairwise consistent.

Main definitions #

Main results #

References #

Bounded multi-channel query programs #

inductive Cslib.Complexity.MIP.IsBoundedComp {ι α : Type} (L : ℕ) :
ℕ → WordQueryComp ι α → Prop

IsBoundedComp L k p states that the deterministic multi-channel query program p makes at most k queries along every execution path, every query word has length at most L, and every continuation depends only on the first L bits of the reply.

theorem Cslib.Complexity.MIP.IsBoundedComp.mono {ι α : Type} {L m n : ℕ} {p : WordQueryComp ι α} (hp : IsBoundedComp L m p) (hmn : m ≤ n) :
theorem Cslib.Complexity.MIP.IsBoundedComp.bind {ι α β : Type} {L m n : ℕ} {p : WordQueryComp ι α} {k : α → WordQueryComp ι β} (hp : IsBoundedComp L m p) (hk : ∀ (a : α), IsBoundedComp L n (k a)) :
IsBoundedComp L (m + n) (p >>= k)
theorem Cslib.Complexity.MIP.IsBoundedComp.map {ι α β : Type} {L m : ℕ} {p : WordQueryComp ι α} (f : α → β) (hp : IsBoundedComp L m p) :
IsBoundedComp L m (f <$> p)
theorem Cslib.Complexity.MIP.isBoundedComp_coinFamily {k : ℕ} {Control Oracle : Type} [DecidableEq Oracle] (M : Turing.MultiTapePTM k Bool Control Oracle) (t : ℕ) (x : List Bool) (r : Fin t → Bool) :

Every member of coinFamily M t x is a t-bounded query program of depth t.

Deterministic provers, tree strategies, and presampling #

A deterministic single-prover strategy with internal state State.

  • State : Type

    Internal memory across rounds.

  • init : self.State

    Initial state before any query.

  • respond : List Bool → self.State → List Bool × self.State

    Deterministic response (reply, nextState) to a query word in a given state.

@[reducible, inline]

Embed a deterministic prover as a Prover Unit.

@[reducible, inline]

A finite-depth deterministic response tree for a single prover. At depth d + 1, the tree is an association list mapping each query word m to a reply y and a continuation tree of depth d.

Step a TreeStrategy on query m, returning the reply and the next (depth, tree) pair.

noncomputable def Cslib.Complexity.MIP.presampleTree (Q : Prover Unit) (L : ℕ) (queries : List (List Bool)) (d : ℕ) :

Presample a depth-d TreeStrategy from a stateful randomized prover Q : Prover Unit starting at state s, over the candidate query list queries, truncating each reply to L bits.

Independent product presampling across prover channels #

theorem Cslib.Complexity.MIP.independent_respond {ι : Type} [DecidableEq ι] (P : ι → Prover Unit) (q : ι × List Bool) (s : (i : ι) → (P i).State) :
((Prover.independent P).respond q).run s = PMF.map (fun (x : List Bool × (P q.1).State) => (x.1, Function.update s q.1 x.2)) (((P q.1).respond ((), q.2)).run (s q.1))

Finite support of presampled trees and deterministic prover optimality #

theorem Cslib.Complexity.MIP.exists_deterministic_prover_family {ι : Type} [Finite ι] [DecidableEq ι] {γ : Type} [Fintype γ] {L d : ℕ} (F : γ → WordQueryComp ι Bool) (hF : ∀ (c : γ), IsBoundedComp L d (F c)) (w : γ → ENNReal) (P : ι → Prover Unit) :
∃ (D : ι → DetProver), ∑ c : γ, w c * Interaction.acceptFrom (Prover.independent P) (Prover.independent P).init (some (F c)) ≤ ∑ c : γ, w c * Interaction.acceptFrom (Prover.independent fun (i : ι) => (D i).toProver) (Prover.independent fun (i : ι) => (D i).toProver).init (some (F c))

Deterministic prover optimality for bounded multi-channel families: for any finite family F : γ → WordQueryComp ι Bool of L-bounded query programs of depth at most d, any weights w : γ → ℝ≥0∞, and any independent prover family P : ι → Prover Unit, there exists an independent family of deterministic provers D : ι → DetProver whose weighted acceptance probability is at least that of P.

Pairwise history consistency and the candidate-filtering prover #

A single-prover history h : List (List Bool × List Bool) is valid for D : DetProver from state s when each reply matches D.respond and the remaining history is valid from the next state.

@[reducible, inline]

Truncate every reply of a DetProver to its first L bits.

theorem Cslib.Complexity.MIP.acceptFrom_truncate_eq {ι : Type} [DecidableEq ι] {p : WordQueryComp ι Bool} {L k : ℕ} (hp : IsBoundedComp L k p) (D : ι → DetProver) (s : (i : ι) → (D i).State) :

Truncating the replies of deterministic provers to L bits preserves the exact output of any L-bounded query program.

Two single-prover (query, reply) histories h₁, h₂ are consistent with a deterministic prover iff, along their common local history, equal next queries receive equal replies. As soon as they receive distinct queries, their states can diverge and no further constraint applies.

theorem Cslib.Complexity.MIP.DetProver.ValidFrom.consistentHist {D : DetProver} {s : D.State} {h₁ h₂ : List (List Bool × List Bool)} (hv₁ : D.ValidFrom s h₁) (hv₂ : D.ValidFrom s h₂) :

Any two histories valid for the same DetProver from the same state s satisfy consistentHist h₁ h₂ = true.

Filter a candidate list of histories on query q: keep the tails of histories starting with (q, r') and emit the first matching reply r' (or [] if none match).

The candidate-filtering deterministic prover built from a finite list of histories H.

theorem Cslib.Complexity.MIP.validFrom_candidateProver (H cand : List (List (List Bool × List Bool))) (hcons : ∀ h₁ ∈ cand, ∀ h₂ ∈ cand, consistentHist h₁ h₂ = true) {h : List (List Bool × List Bool)} (hh : h ∈ cand) :

If cand is a pairwise consistent list of histories and h ∈ cand, then h is a valid history for candidateProver H starting from state cand.