Documentation

CslibFrontier.Computability.Complexity.Classes.IP.Games.Repetition

Parallel repetition of private-coin games #

The t-fold parallel repetition Cslib.Complexity.IPGame.repeatShape t g of a private-coin game shape g plays t copies of g at once: every move sends the t copies' messages concatenated, and copy i of a transcript is read with Cslib.Complexity.AMGame.copyTranscript, as for public-coin games. The repeated verifier (Cslib.Complexity.IPGame.repeatMsg, Cslib.Complexity.IPGame.repeatDec) gives copy i row i of its coins, sends at every move the messages of all copies on their own parts of the transcript, and accepts when all copies accept.

The prover may coordinate the copies, but this does not help it: against an optimal prover the repeated verifier accepts exactly bestCount ^ t of its t * ρ coin strings (Cslib.Complexity.IPGame.bestCount_repeat). The coins agreeing with a transcript of the repetition and accepting it are counted by the product over the copies (Cslib.Complexity.IPGame.acceptedCoins_repeat), and the count of a product payoff factors (Cslib.Complexity.IPGame.count_repeatShape_prod). So with T(n) copies a verifier of IPGameClass enc π with yes/no thresholds 2 / 3 and 1 / 3 becomes a polynomial-time verifier of the same pattern with thresholds (2 / 3) ^ T(n) and (1 / 3) ^ T(n), a gap of 2 ^ T(n) (Cslib.Complexity.IPGameClass.exists_repeat). This is the gap amplification that precedes the emulation of private coins by public coins Goldwasser and Sipser, Arora and Barak, Section 8.2. Completeness decreases too: the repetition reduces the soundness error relative to the completeness, not both errors.

Main definitions #

Main results #

References #

The t-fold parallel repetition of a private-coin game shape: every move sends the t copies' messages concatenated.

theorem Cslib.Complexity.IPGame.count_repeatShape_prod (t : ℕ) (g : List (IPMove × ℕ)) (f : Fin t → List Bool → ℕ) :
(count (repeatShape t g) fun (w : List Bool) => ∏ i : Fin t, f i (AMGame.copyTranscript t (↑i) (toAM g) w)) = ∏ i : Fin t, count g (f i)

The count of a parallel repetition on a product payoff is the product of the counts. The prover may coordinate the copies, but this does not help it.

The repeated verifier #

The length of move j of a game shape, 0 past its end.

def Cslib.Complexity.IPGame.repeatMsg (t : ℕ) (g : List (IPMove × ℕ)) (msg : ℕ → ℕ → List Bool → List Bool) (j : ℕ) (p : List Bool) :

The messages of t parallel copies of a verifier of shape g at move j after the transcript p: copy i sends msg i j on its own part of p, read as a string of the length of move j, and the messages of the copies are concatenated.

def Cslib.Complexity.IPGame.repeatDec (t : ℕ) (g : List (IPMove × ℕ)) (dec : ℕ → List Bool → Bool) (w : List Bool) :

The decision of t parallel copies: every copy accepts its own part of the transcript.

theorem Cslib.Complexity.IPGame.repeatDec_eq_true_iff (t : ℕ) (g : List (IPMove × ℕ)) (dec : ℕ → List Bool → Bool) (w : List Bool) :
repeatDec t g dec w = true ↔ ∀ (i : Fin t), dec (↑i) (AMGame.copyTranscript t (↑i) (toAM g) w) = true
theorem Cslib.Complexity.IPGame.eq_ofList_flatMap_iff {t n : ℕ} (r : BitString (t * n)) (F : ℕ → BitString n) :
r = BitString.ofList (t * n) (List.flatMap (fun (i : ℕ) => List.ofFn (F i)) (List.range t)) ↔ ∀ (i : Fin t), BitString.block r i = F ↑i

A bit string is the concatenation of t strings of n bits exactly when its blocks are those strings.

theorem Cslib.Complexity.IPGame.exists_eq_ofFn_append {k L : ℕ} {u : List Bool} (hu : u.length = k + L) :
∃ (r : BitString k) (v : List Bool), u = List.ofFn r ++ v ∧ v.length = L

A word whose length is k + L is a string of k bits followed by a word of length L.

Copy i of a transcript of repeatShape t (pre ++ [(v, n)]) is copy i of its part for pre followed by block i of its last move.

theorem Cslib.Complexity.IPGame.repeatMsg_append_cons (t : ℕ) (pre g : List (IPMove × ℕ)) (v : IPMove) (n : ℕ) (msg : ℕ → ℕ → List Bool → List Bool) (p : List Bool) :
repeatMsg t (pre ++ (v, n) :: g) msg pre.length p = List.flatMap (fun (i : ℕ) => List.ofFn (BitString.ofList n (msg i pre.length (AMGame.copyTranscript t i (toAM pre) p)))) (List.range t)
theorem Cslib.Complexity.IPGame.agrees_repeatMsg (t : ℕ) (msg : ℕ → ℕ → List Bool → List Bool) (g pre : List (IPMove × ℕ)) (p w : List Bool) (hp : p.length = transcriptLength (repeatShape t pre)) (hw : w.length = transcriptLength (repeatShape t g)) :
agrees (repeatMsg t (pre ++ g) msg) (repeatShape t g) pre.length p w = true ↔ ∀ (i : Fin t), agrees (msg ↑i) g pre.length (AMGame.copyTranscript t (↑i) (toAM pre) p) (AMGame.copyTranscript t (↑i) (toAM g) w) = true

The repeated verifier agrees with a transcript exactly when every copy agrees with its part. Here pre are the moves already made, with transcript p.

theorem Cslib.Complexity.IPGame.acceptedCoins_repeat (t ρ : ℕ) (msg : List Bool → ℕ → List Bool → List Bool) (dec : List Bool → List Bool → Bool) (g : List (IPMove × ℕ)) (w : List Bool) (hw : w.length = transcriptLength (repeatShape t g)) :
acceptedCoins (fun (c : BitString (t * ρ)) => repeatMsg t g fun (i : ℕ) => msg (BitString.listRow ρ i (List.ofFn c))) (fun (c : BitString (t * ρ)) => repeatDec t g fun (i : ℕ) => dec (BitString.listRow ρ i (List.ofFn c))) (repeatShape t g) w = ∏ i : Fin t, acceptedCoins (fun (c : BitString ρ) => msg (List.ofFn c)) (fun (c : BitString ρ) => dec (List.ofFn c)) g (AMGame.copyTranscript t (↑i) (toAM g) w)

Coins of the repeated verifier. Copy i reads block i of the coins. On a transcript of the repetition, the coins accepted by the repeated verifier are counted by the product over the copies of the coins accepted on each copy's part.

theorem Cslib.Complexity.IPGame.bestCount_repeat (t ρ : ℕ) (msg : List Bool → ℕ → List Bool → List Bool) (dec : List Bool → List Bool → Bool) (g : List (IPMove × ℕ)) :
bestCount (fun (c : BitString (t * ρ)) => repeatMsg t g fun (i : ℕ) => msg (BitString.listRow ρ i (List.ofFn c))) (fun (c : BitString (t * ρ)) => repeatDec t g fun (i : ℕ) => dec (BitString.listRow ρ i (List.ofFn c))) (repeatShape t g) = bestCount (fun (c : BitString ρ) => msg (List.ofFn c)) (fun (c : BitString ρ) => dec (List.ofFn c)) g ^ t

Parallel repetition of private-coin games is multiplicative. Against an optimal prover, the t-fold parallel repetition of a verifier with ρ coins, which accepts when all copies accept, accepts bestCount ^ t of its t * ρ coin strings.

theorem Cslib.Complexity.IPGame.bestCount_ofFn_congr {K K' : ℕ} (hK : K = K') (msg : List Bool → ℕ → List Bool → List Bool) (dec : List Bool → List Bool → Bool) (g : List (IPMove × ℕ)) :
bestCount (fun (c : BitString K) => msg (List.ofFn c)) (fun (c : BitString K) => dec (List.ofFn c)) g = bestCount (fun (c : BitString K') => msg (List.ofFn c)) (fun (c : BitString K') => dec (List.ofFn c)) g

The count of a verifier that reads its coins as a list does not depend on how the number of coins is written.

Polynomial time #

@[reducible, inline]

Random coin string x.2.1 of a repeated verifier message input (inst, coins, round, tr).

@[reducible, inline]

Round index x.2.2.1 of a repeated verifier message input (inst, coins, round, tr).

@[reducible, inline]

Transcript prefix x.2.2.2 of a repeated verifier message input (inst, coins, round, tr).

@[reducible, inline]

Random coin string x.2.1 of a repeated verifier decision input (inst, coins, tr).

@[reducible, inline]

Full transcript x.2.2 of a repeated verifier decision input (inst, coins, tr).

The messages of T(n) parallel copies of a private-coin game verifier msg with shape G and ρ(n) coins: copy i uses row i of the coins.

The decision of T(n) parallel copies of a private-coin game verifier dec with shape G and ρ(n) coins: all copies accept.

The shape of T(n) parallel copies: every move is T(n) times longer.

theorem Cslib.Complexity.IPGame.countAt_repeat {α : Type} (enc : α ↪ List Bool) (G : List (IPMove × Polynomial ℕ)) (T ρ : Polynomial ℕ) (msg : α × List Bool × ℕ × List Bool → List Bool) (dec : α × List Bool × List Bool → Bool) (a : α) :
countAt enc (repeatShapePoly T G) (T * ρ) (repeatVerifierMsg enc G T ρ msg) (repeatVerifierDec enc G T ρ dec) a = countAt enc G ρ msg dec a ^ Polynomial.eval (enc a).length T

Parallel repetition of a private-coin game verifier. Against an optimal prover, T(n) parallel copies that accept when all copies accept are accepted on countAt ^ T(n) of their coin strings.

Gap amplification for private-coin games. A problem with a private-coin game verifier of pattern π has, for every polynomial T, a polynomial-time verifier of the same pattern whose yes/no gap is 2 ^ T(n): on a member an optimal prover is accepted on at least a (2 / 3) ^ T(n) fraction of the coin strings, and on a non-member every prover on at most a (1 / 3) ^ T(n) fraction. The verifier runs T(n) parallel copies and accepts when all copies accept.