Documentation

CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.Games

Public-coin Arthur–Merlin games with a fixed pattern of moves #

The Arthur–Merlin games of Babai and Babai and Moran Arora and Barak, Section 8.2 with any fixed pattern of moves. A move is AMMove.arthur (Arthur sends fresh random bits) or AMMove.merlin (Merlin sends a message). A shape List (AMMove × ℕ) lists the moves with their lengths, and a polynomial shape List (AMMove × Polynomial ℕ) evaluates to a shape at the length n of the encoded instance (Cslib.Complexity.AMGame.evalShape). The verifier reads the whole transcript, the messages concatenated in order.

The value of a game is counted exactly, as for MA and AM (Cslib.Complexity.MA, Cslib.Complexity.AM). Cslib.Complexity.AMGame.count sums over Arthur's random strings and takes the maximum over Merlin's messages. Divided by 2 ^ B, where B is the number of Arthur's bits (Cslib.Complexity.AMGame.arthurBits), it is the acceptance probability against an optimal Merlin. A problem A is in AMGameClass enc π when some polynomial shape with move pattern π and some polynomial-time verifier have count at least two thirds of 2 ^ B on members and at most one third on non-members (Cslib.Complexity.IsAMGameVerifier). The alternating patterns give AM[k] and MA[k] (Cslib.Complexity.AMk, Cslib.Complexity.MAk).

The proofs work with the normalised value Cslib.Complexity.AMGame.value, in ℚ, of a game on a payoff List Bool → ℚ. Merlin maximises (b = true) or minimises (b = false). The value is monotone and commutes with nonnegative affine maps, and it composes over concatenated shapes. The two choices of b are dual (Cslib.Complexity.AMGame.value_one_sub).

Main definitions #

Main results #

The round collapse AM[k] = AM is in CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.RoundCollapse, and parallel repetition and error reduction in CslibFrontier.Computability.Complexity.Classes.ArthurMerlin.Games.Repetition.

References #

A move of a public-coin Arthur–Merlin game.

  • arthur : AMMove

    Arthur sends fresh random bits.

  • merlin : AMMove

    Merlin sends a message.

Instances For
    @[instance_reducible]

    The alternating move pattern of length k starting with x.

    The count of a game shape g with verifier V on transcripts: the number of Arthur's random strings that an optimal Merlin makes V accept. At an Arthur move of n bits it sums over the 2 ^ n coin strings, and at a Merlin move of n bits it takes the maximum over his 2 ^ n messages. Each message is prepended to the rest of the transcript, so Merlin's later messages may depend on all earlier coins.

    The number of Arthur's random bits in a game shape.

    The value of a game shape g on a payoff f, normalised to a probability. Arthur's moves average over their coins, and Merlin's moves take the maximum over his messages (b = true) or the minimum (b = false). With b = true and a 0/1 payoff it is the count divided by 2 ^ arthurBits g (Cslib.Complexity.AMGame.count_eq).

    theorem Cslib.Complexity.AMGame.value_arthur (b : Bool) (n : ℕ) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) :
    value b ((AMMove.arthur, n) :: g) f = (∑ r : Fin n → Bool, value b g fun (t : List Bool) => f (List.ofFn r ++ t)) / 2 ^ n
    theorem Cslib.Complexity.AMGame.value_merlin_true (n : ℕ) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) :
    value true ((AMMove.merlin, n) :: g) f = Finset.univ.sup' ⋯ fun (y : Fin n → Bool) => value true g fun (t : List Bool) => f (List.ofFn y ++ t)
    theorem Cslib.Complexity.AMGame.value_merlin_false (n : ℕ) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) :
    value false ((AMMove.merlin, n) :: g) f = Finset.univ.inf' ⋯ fun (y : Fin n → Bool) => value false g fun (t : List Bool) => f (List.ofFn y ++ t)

    Total length of a transcript of a game.

    theorem Cslib.Complexity.AMGame.value_mono_of_length (b : Bool) (g : List (AMMove × ℕ)) {f f' : List Bool → ℚ} (h : ∀ (t : List Bool), t.length = transcriptLength g → f t ≤ f' t) :
    value b g f ≤ value b g f'
    theorem Cslib.Complexity.AMGame.value_mono (b : Bool) (g : List (AMMove × ℕ)) {f f' : List Bool → ℚ} (h : ∀ (t : List Bool), f t ≤ f' t) :
    value b g f ≤ value b g f'
    theorem Cslib.Complexity.AMGame.value_congr_of_length (b : Bool) (g : List (AMMove × ℕ)) {f f' : List Bool → ℚ} (h : ∀ (t : List Bool), t.length = transcriptLength g → f t = f' t) :
    value b g f = value b g f'
    theorem Cslib.Complexity.AMGame.value_affine (b : Bool) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) {c : ℚ} (hc : 0 ≤ c) (d : ℚ) :
    (value b g fun (t : List Bool) => c * f t + d) = c * value b g f + d

    Values commute with nonnegative affine maps.

    theorem Cslib.Complexity.AMGame.value_const (b : Bool) (g : List (AMMove × ℕ)) (d : ℚ) :
    (value b g fun (x : List Bool) => d) = d
    theorem Cslib.Complexity.AMGame.value_const_add (b : Bool) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) (d : ℚ) :
    (value b g fun (t : List Bool) => d + f t) = d + value b g f
    theorem Cslib.Complexity.AMGame.value_nonneg (b : Bool) (g : List (AMMove × ℕ)) {f : List Bool → ℚ} (hf : ∀ (t : List Bool), 0 ≤ f t) :
    0 ≤ value b g f
    theorem Cslib.Complexity.AMGame.value_le_one (b : Bool) (g : List (AMMove × ℕ)) {f : List Bool → ℚ} (hf : ∀ (t : List Bool), f t ≤ 1) :
    value b g f ≤ 1
    theorem Cslib.Complexity.AMGame.value_append (b : Bool) (g h : List (AMMove × ℕ)) (f : List Bool → ℚ) :
    value b (g ++ h) f = value b g fun (s : List Bool) => value b h fun (t : List Bool) => f (s ++ t)

    Values of a concatenated game.

    theorem Cslib.Complexity.AMGame.value_one_sub (b : Bool) (g : List (AMMove × ℕ)) (f : List Bool → ℚ) :
    (value b g fun (t : List Bool) => 1 - f t) = 1 - value (!b) g f

    Duality between Merlin maximising and minimising.

    theorem Cslib.Complexity.AMGame.value_merge_arthur (b : Bool) (σ τ : List (AMMove × ℕ)) (n₁ n₂ : ℕ) (f : List Bool → ℚ) :
    value b (σ ++ (AMMove.arthur, n₁) :: (AMMove.arthur, n₂) :: τ) f = value b (σ ++ (AMMove.arthur, n₁ + n₂) :: τ) f
    theorem Cslib.Complexity.AMGame.value_merge_merlin (σ τ : List (AMMove × ℕ)) (n₁ n₂ : ℕ) (f : List Bool → ℚ) :
    value true (σ ++ (AMMove.merlin, n₁) :: (AMMove.merlin, n₂) :: τ) f = value true (σ ++ (AMMove.merlin, n₁ + n₂) :: τ) f
    theorem Cslib.Complexity.AMGame.value_insert_zero (b : Bool) (σ τ : List (AMMove × ℕ)) (x : AMMove) (f : List Bool → ℚ) :
    value b (σ ++ (x, 0) :: τ) f = value b (σ ++ τ) f
    theorem Cslib.Complexity.AMGame.count_eq (g : List (AMMove × ℕ)) (V : List Bool → Bool) :
    ↑(count g V) = 2 ^ arthurBits g * value true g fun (t : List Bool) => ↑(V t).toNat
    theorem Cslib.Complexity.AMGame.count_arthur (n : ℕ) (g : List (AMMove × ℕ)) (V : List Bool → Bool) :
    count ((AMMove.arthur, n) :: g) V = ∑ r : Fin n → Bool, count g fun (t : List Bool) => V (List.ofFn r ++ t)
    theorem Cslib.Complexity.AMGame.count_merlin (n : ℕ) (g : List (AMMove × ℕ)) (V : List Bool → Bool) :
    count ((AMMove.merlin, n) :: g) V = Finset.univ.sup fun (y : Fin n → Bool) => count g fun (t : List Bool) => V (List.ofFn y ++ t)

    Evaluate the move lengths of a polynomial game shape at n.

    Total transcript length of a polynomial game shape.

    def Cslib.Complexity.IsAMGameVerifier {α : Type} (enc : α ↪ List Bool) (G : List (AMMove × Polynomial ℕ)) (V : α × List Bool → Bool) (A : Set α) :

    V is a game verifier for A with the polynomial shape G, evaluated at the length n of the encoded instance: on a member an optimal Merlin makes V (a, t) accept for at least two thirds of Arthur's random strings, and on a non-member for at most one third of them, whatever Merlin sends.

    def Cslib.Complexity.AMGameClass {α : Type} (enc : α ↪ List Bool) (π : List AMMove) :
    Set (Set α)

    The problems with polynomial-time public-coin game verifiers whose moves follow the pattern π, with polynomially long messages, with respect to the encoding enc of instances Babai and Moran.

    def Cslib.Complexity.AMk {α : Type} (enc : α ↪ List Bool) (k : ℕ) :
    Set (Set α)

    AM[k]: k alternating moves, Arthur first.

    def Cslib.Complexity.MAk {α : Type} (enc : α ↪ List Bool) (k : ℕ) :
    Set (Set α)

    MA[k]: k alternating moves, Merlin first.

    theorem Cslib.Complexity.isAMGameVerifier_iff_value {α : Type} {enc : α ↪ List Bool} {G : List (AMMove × Polynomial ℕ)} {V : α × List Bool → Bool} {A : Set α} :
    IsAMGameVerifier enc G V A ↔ ∀ (a : α), (a ∈ A → 2 ≤ 3 * AMGame.value true (AMGame.evalShape G (enc a).length) fun (t : List Bool) => ↑(V (a, t)).toNat) ∧ (a ∉ A → (3 * AMGame.value true (AMGame.evalShape G (enc a).length) fun (t : List Bool) => ↑(V (a, t)).toNat) ≤ 1)
    theorem Cslib.Complexity.AMGameClass_insert {α : Type} {enc : α ↪ List Bool} (σ τ : List AMMove) (x : AMMove) :
    AMGameClass enc (σ ++ τ) ⊆ AMGameClass enc (σ ++ x :: τ)
    theorem Cslib.Complexity.AMGameClass_merge {α : Type} {enc : α ↪ List Bool} (σ τ : List AMMove) (x : AMMove) :
    AMGameClass enc (σ ++ x :: x :: τ) ⊆ AMGameClass enc (σ ++ x :: τ)
    theorem Cslib.Complexity.AMGameClass_mono_sublist_append {α : Type} {enc : α ↪ List Bool} {l₁ l₂ : List AMMove} (h : l₁.Sublist l₂) (σ : List AMMove) :
    AMGameClass enc (σ ++ l₁) ⊆ AMGameClass enc (σ ++ l₂)

    Game classes grow along sublists of move patterns, inside any fixed prefix.

    theorem Cslib.Complexity.AMGameClass_mono {α : Type} {enc : α ↪ List Bool} {π₁ π₂ : List AMMove} (h : π₁.Sublist π₂) :
    AMGameClass enc π₁ ⊆ AMGameClass enc π₂

    Padding: game classes are monotone in the move pattern under List.Sublist.

    theorem Cslib.Complexity.isAMGameVerifier_nil_iff {α : Type} {enc : α ↪ List Bool} {V : α × List Bool → Bool} {A : Set α} :
    IsAMGameVerifier enc [] V A ↔ ∀ (a : α), a ∈ A ↔ V (a, []) = true

    A zero-move game verifier is a deterministic decider on the empty transcript.

    A single-move Arthur game verifier is a bounded-error decider.

    A single-move Merlin game verifier is an NP verifier.

    theorem Cslib.Complexity.AMGameClass_nil {α : Type} {enc : α ↪ List Bool} :
    AMGameClass enc [] = P enc

    The empty game [] is P.

    The game A is BPP.

    The game M is NP.

    theorem Cslib.Complexity.AMk_zero {α : Type} {enc : α ↪ List Bool} :
    AMk enc 0 = P enc
    theorem Cslib.Complexity.MAk_zero {α : Type} {enc : α ↪ List Bool} :
    MAk enc 0 = P enc
    theorem Cslib.Complexity.AMk_one {α : Type} {enc : α ↪ List Bool} :
    AMk enc 1 = BPP enc
    theorem Cslib.Complexity.MAk_one {α : Type} {enc : α ↪ List Bool} :
    MAk enc 1 = NP enc
    theorem Cslib.Complexity.AMk_two {α : Type} {enc : α ↪ List Bool} :
    AMk enc 2 = AM enc
    theorem Cslib.Complexity.MAk_two {α : Type} {enc : α ↪ List Bool} :
    MAk enc 2 = MA enc

    Prepending a polynomially bounded existential quantifier over words prepends a Merlin move to a public-coin game.