Documentation

CslibFrontier.Computability.PCP.TwoProverGame

Two-prover one-round games #

A two-prover one-round game Holenstein, Definition 2.2 draws a pair of questions (x, y) from a distribution on X × Y, sends x to Alice and y to Bob, and accepts their answers a and b according to a predicate Q x y a b. Its value is the largest winning probability of a pair of deterministic strategies X → A and Y → B (Cslib.PCP.TwoProverGame.value). Shared randomness does not help (winProb_shared_le_value) Holenstein, (2.5). The n-fold parallel repetition asks n independent pairs of questions at once and accepts when every coordinate is accepted (Cslib.PCP.TwoProverGame.pow) Holenstein, Definition 2.3. Answering each coordinate independently with an optimal strategy shows value G ^ n ≤ value (G.pow n) (pow_value_le_value_pow); the parallel repetition theorem bounds value (G.pow n) from above (value_pow_le, in CslibFrontier/Computability/PCP/ParallelRepetition.lean).

For a pair of strategies of the repetition, winsOn is the event that every coordinate in a set C is won Holenstein, Definition 2.4 and winProbOn its probability. If the questions of G embed with error ε in the law of ((x_j, y_j), (x, y)), for questions (x, y) of the repetition conditioned on winning C, then Alice and Bob can play G by running the embedding and answering at coordinate j. So coordinate j is won given C with probability at most v(G) + ε (winProbOn_insert_le). This is the step of Holenstein, proof of Lemma 6.5 that extracts a strategy.

Main definitions #

Main results #

References #

structure Cslib.PCP.TwoProverGame (X : Type u_1) (Y : Type u_2) (A : Type u_3) (B : Type u_4) :
Type (max (max (max u_1 u_2) u_3) u_4)

A two-prover one-round game Holenstein, Definition 2.2: questions drawn from questions, answers accepted by accepts.

  • questions : PMF (X × Y)

    The distribution of the pair of questions.

  • accepts : X → Y → A → B → Prop

    The acceptance predicate on questions and answers.

noncomputable def Cslib.PCP.TwoProverGame.winProb {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) (ha : X → A) (hb : Y → B) :

The probability that the deterministic strategies ha and hb win.

noncomputable def Cslib.PCP.TwoProverGame.value {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) :

The value of a game: the largest winning probability of deterministic strategies.

theorem Cslib.PCP.TwoProverGame.winProb_nonneg {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) (ha : X → A) (hb : Y → B) :
0 ≤ G.winProb ha hb
theorem Cslib.PCP.TwoProverGame.winProb_le_one {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) (ha : X → A) (hb : Y → B) :
G.winProb ha hb ≤ 1
theorem Cslib.PCP.TwoProverGame.winProb_le_value {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] (ha : X → A) (hb : Y → B) :
G.winProb ha hb ≤ G.value
theorem Cslib.PCP.TwoProverGame.exists_winProb_eq_value {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] :
∃ (ha : X → A) (hb : Y → B), G.winProb ha hb = G.value
theorem Cslib.PCP.TwoProverGame.value_nonneg {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] :
theorem Cslib.PCP.TwoProverGame.value_le_one {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] :
theorem Cslib.PCP.TwoProverGame.winProb_shared_le_value {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] {R : Type u_5} (ρ : PMF R) (ha : X → R → A) (hb : Y → R → B) :
((ρ.bind fun (r : R) => PMF.map (fun (q : X × Y) => (q, ha q.1 r, hb q.2 r)) G.questions).toOuterMeasure {z : (X × Y) × A × B | G.accepts z.1.1 z.1.2 z.2.1 z.2.2}).toReal ≤ G.value

Shared randomness does not help Holenstein, (2.5): strategies that read a common random string r drawn from ρ win with probability at most the value.

Parallel repetition #

noncomputable def Cslib.PCP.TwoProverGame.pow {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] (n : ℕ) :
TwoProverGame (Fin n → X) (Fin n → Y) (Fin n → A) (Fin n → B)

The n-fold parallel repetition Holenstein, Definition 2.3: n independent pairs of questions, accepted when every coordinate is accepted.

theorem Cslib.PCP.TwoProverGame.winProb_pow {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] (n : ℕ) (ha : X → A) (hb : Y → B) :
((G.pow n).winProb (fun (x : Fin n → X) (i : Fin n) => ha (x i)) fun (y : Fin n → Y) (i : Fin n) => hb (y i)) = G.winProb ha hb ^ n

Answering each coordinate independently wins with the product of the probabilities.

theorem Cslib.PCP.TwoProverGame.pow_value_le_value_pow {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Finite X] [Finite Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] (n : ℕ) :
G.value ^ n ≤ (G.pow n).value

Answering each coordinate independently with an optimal strategy shows that parallel repetition cannot lower the value below value G ^ n.

Winning a set of coordinates #

def Cslib.PCP.TwoProverGame.winsOn {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) (C : Finset (Fin n)) :
Set ((Fin n → X) × (Fin n → Y))

The event ⋀_{i ∈ C} W_i Holenstein, Definition 2.4 that the strategies ha and hb of the n-fold repetition win every coordinate in C.

@[simp]
theorem Cslib.PCP.TwoProverGame.winsOn_empty {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) :

Every question wins the empty set of coordinates.

theorem Cslib.PCP.TwoProverGame.winsOn_union {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) (C D : Finset (Fin n)) :
G.winsOn ha hb (C ∪ D) = G.winsOn ha hb C ∩ G.winsOn ha hb D

Winning C ∪ D is winning C and winning D.

theorem Cslib.PCP.TwoProverGame.winsOn_anti {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) :
Antitone (G.winsOn ha hb)

Winning more coordinates is a smaller event.

theorem Cslib.PCP.TwoProverGame.winsOn_univ {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] :
G.winsOn ha hb Finset.univ = {(x, y) : (Fin n → X) × (Fin n → Y) | (G.pow n).accepts x y (ha x) (hb y)}

Winning every coordinate is winning the repeated game.

noncomputable def Cslib.PCP.TwoProverGame.winProbOn {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] (C : Finset (Fin n)) :

The probability Pr[⋀_{i ∈ C} W_i] that the strategies ha and hb of the n-fold repetition win every coordinate in C.

@[simp]
theorem Cslib.PCP.TwoProverGame.winProbOn_empty {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] :
G.winProbOn ha hb ∅ = 1

The empty set of coordinates is won with probability one.

theorem Cslib.PCP.TwoProverGame.winProbOn_univ {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] :
G.winProbOn ha hb Finset.univ = (G.pow n).winProb ha hb

Winning every coordinate has the winning probability of the repeated game.

theorem Cslib.PCP.TwoProverGame.winProbOn_nonneg {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] (C : Finset (Fin n)) :
0 ≤ G.winProbOn ha hb C

Winning probabilities are nonnegative.

theorem Cslib.PCP.TwoProverGame.winProbOn_anti {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) [Finite X] [Finite Y] :

Winning more coordinates is less likely.

Strategies from embeddings #

theorem Cslib.PCP.TwoProverGame.toOuterMeasure_accepts_le_value_add {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Fintype X] [Fintype Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] {S : Type u_5} {T : Type u_6} [Fintype S] [Fintype T] {L : PMF ((X × Y) × S × T)} {ε : ℝ} (hL : Probability.CorrelatedSampling.IsEmbeddable G.questions L ε) (α : S → A) (β : T → B) :
(L.toOuterMeasure {((x, y), s, t) : (X × Y) × S × T | G.accepts x y (α s) (β t)}).toReal ≤ G.value + ε

A strategy from an embedding Holenstein, proof of Lemma 6.5. Suppose the questions of G embed with error ε in a law L of ((x, y), (s, t)), and α and β turn the outputs into answers. Then the answers α s and β t are accepted with probability at most v(G) + ε under L: Alice and Bob can run the embedding on their questions and answer α s and β t, and shared randomness does not help.

theorem Cslib.PCP.TwoProverGame.winProbOn_insert_le {X : Type u_1} {Y : Type u_2} {A : Type u_3} {B : Type u_4} (G : TwoProverGame X Y A B) [Fintype X] [Fintype Y] [Finite A] [Finite B] [Nonempty A] [Nonempty B] {n : ℕ} (ha : (Fin n → X) → Fin n → A) (hb : (Fin n → Y) → Fin n → B) (C : Finset (Fin n)) (j : Fin n) (hC : ∃ q ∈ G.winsOn ha hb C, q ∈ (G.pow n).questions.support) {ε : ℝ} (hε : Probability.CorrelatedSampling.IsEmbeddable G.questions (PMF.map (fun (x : (Fin n → X) × (Fin n → Y)) => match x with | (x, y) => ((x j, y j), x, y)) ((G.pow n).questions.filter (G.winsOn ha hb C) hC)) ε) :
G.winProbOn ha hb (insert j C) ≤ G.winProbOn ha hb C * (G.value + ε)

Strategy extraction Holenstein, proof of Lemma 6.5, multiplied out so that it never divides by Pr[W_C]. Condition the questions (x, y) of the n-fold repetition on winning every coordinate in C. If the questions of G embed with error ε in the conditioned law of ((x j, y j), (x, y)), then coordinate j is won given W_C with probability at most v(G) + ε: Pr[W_C ∧ W_j] ≤ Pr[W_C] (v(G) + ε).