Documentation

CslibFrontier.Computability.Interactive.Debate.TwoBlock

Figure 1 is not sound for a machine with oracle queries of length at most two #

The soundness step of Debate.lean holds under [BrownCohenIrvingPiliouras2024, Definition 6.1] for machines whose every step queries an encoding of the whole transcript so far (soundness_of_lipschitzAt_run_prefixMachine). That reading of the source, and what it costs, are recorded in #7579. This module shows that the assumption on the queries is needed: for a machine whose every step is an oracle query, but whose queries have at most two bits, the protocol of [BrownCohenIrvingPiliouras2024, Figure 1] is not sound under Definition 6.1. CopyChain.lean shows separately that it is needed that every step is a query.

Every step is an oracle query. The two blocks reuse the same one-bit address false. The proposer gives it a positive probability in the first block and zero in the second, whereas a fixed replacement oracle gives it one probability in both. Definition 6.1 controls the change under a fixed oracle only.

The machine #

The two-block machine runs two blocks. A block is one query at the empty address followed by m queries, each at the previous bit. The last step queries the pair (u, v) of the last bits of the two blocks. The oracle answers false at the empty address, answers a one-bit address with that bit, and answers the pair with true with probability c + c (u - v).

The machine has seven addresses, the strings of at most two bits (TwoBlockQuery). The source's oracle has addresses of one fixed length l (dedebate.tex, lines 127 and 239). An injective recoding into three-bit addresses preserves the argument, with one address unused, so the example is one with constant-length queries.

Reading of the source #

Main definitions #

Main results #

References #

The machine and its oracle #

@[reducible, inline]

The addresses of the two-block machine: the empty address, a one-bit address and a two-bit address. These are the seven strings of at most two bits.

The two-block machine. A block is one query at the empty address followed by m queries, each at the previous bit. The machine runs two blocks and then queries the pair of the last bits of the two blocks. Every one of its 2 m + 3 steps is an oracle query, and every query has at most two bits.

noncomputable def Cslib.Interactive.Debate.twoBlockOracle (start : PMF Bool) (c : ℝ) (hc0 : 0 ≤ c) (hc1 : 2 * c ≤ 1) :

The oracle of the two-block machine: start at the empty address; the address itself at a one-bit address; and at a pair (u, v) the answer true with probability c + c (u - v), that is 2 c at (1, 0), 0 at (0, 1) and c otherwise.

The step law at the first step of a block.

theorem Cslib.Interactive.Debate.stepLaw_twoBlockMachine_copy {m : ℕ} (O : TwoBlockQuery → PMF Bool) {bits : List Bool} (h0 : bits.length ≠ 0) (h1 : bits.length ≠ m + 1) (h2 : bits.length < 2 * m + 2) :

The step law at a later step of a block.

theorem Cslib.Interactive.Debate.stepLaw_twoBlockMachine_pair {m : ℕ} (O : TwoBlockQuery → PMF Bool) {bits : List Bool} (h : bits.length = 2 * m + 2) :
(twoBlockMachine m).stepLaw O bits = O (Sum.inr (Sum.inr (bits.getD (m + 1) false, bits.headD false)))

The step law at the last step.

The law of the run #

Definition 6.1 #

The two-block machine accepts with probability exactly c, whatever the start law.

theorem Cslib.Interactive.Debate.lipschitzAt_run_twoBlockMachine (m : ℕ) (start : PMF Bool) (c : ℝ) (hc0 : 0 ≤ c) (hc1 : 2 * c ≤ 1) :

The two-block machine satisfies Definition 6.1 with constant 1, non-strictly, for every m, every start law and every c. Under any one oracle the two blocks are independent with the same law, so the original pair lookup has expected answer c, and the lookup itself moves by at most the perturbation.

The attack #

def Cslib.Interactive.Debate.twoBlockClaim {N : ℕ} (m : ℕ) (k κ₁ κ₀ : Fin (N + 1)) (bits : List Bool) :
Fin (N + 1)

The claims of the attacking proposer, as a function of the bits written so far. At a start step it claims 0, and at a copy step the probability 1 or 0 given by the previous bit, which are the exact probabilities, except that in the first block it claims k / N at the address false. At the final lookup it claims κ₁ / N when the first block ended at true and κ₀ / N otherwise; κ₁ and κ₀ are parameters, meant as grid approximations of the two probabilities that can occur there.

noncomputable def Cslib.Interactive.Debate.twoBlockProposer (P : Params) (m : ℕ) (k κ₁ κ₀ : Fin (P.grid + 1)) :

The proposer that wins against the two-block machine. It has no state, draws no samples, and its copy returns a uniform coin, as the honest proposer's does.

theorem Cslib.Interactive.Debate.le_evalWith_run_twoBlockProposer (P : Params) (m : ℕ) (hrounds : P.rounds = 2 * m + 3) (k κ₁ κ₀ : Fin (P.grid + 1)) (hk0 : 0 < ↑↑k / ↑P.grid) (hk : ↑↑k / ↑P.grid < P.verifierTolerance) (hsamples : 0 < P.verifierSamples) (hκ : ↑κ₁ = 2 * ↑κ₀) (c : ℝ) (hc0 : 0 ≤ c) (hc1 : 2 * c ≤ 1) (v : ENNReal) (hver : ∀ (bits : List Bool), bits.length = 2 * m + 2 → bits.headD false = false → 1 - v ≤ (OracleComp.evalWith (OracleComp.sumHandler ProbComp.unifOracle ((twoBlockMachine m).stepLaw (twoBlockOracle (PMF.pure false) c hc0 hc1))) (verdict P bits (twoBlockClaim m k κ₁ κ₀ bits))) true) (B : Challenger P.grid) :
(1 - v) * (↑↑κ₀ / ↑P.grid + ↑↑κ₀ / ↑P.grid * (1 - (1 - ↑↑k / ↑P.grid) ^ m)) ≤ (OracleComp.evalWith (OracleComp.sumHandler ProbComp.unifOracle ((twoBlockMachine m).stepLaw (twoBlockOracle (PMF.pure false) c hc0 hc1))) (run P (twoBlockProposer P m k κ₁ κ₀) B)) true

The attack on a machine with oracle queries of length at most two. Let the oracle answer false at the empty address, let its parameter satisfy 0 ≤ c and 2 c ≤ 1, and let the protocol have 2 m + 3 rounds and at least one verifier sample. For any claim k / N that is positive and below the verifier's tolerance, and any last claims κ₁ = 2 κ₀, twoBlockProposer makes the verifier accept on the two-block machine with probability at least (1 - v) (a + a (1 - (1 - k / N) ^ m)) against every challenger, where a = κ₀ / N and v bounds the probability that the verifier rejects the last claim after an abort. The machine itself accepts with probability c, and the bound is close to c + c (1 - (1 - k / N) ^ m) when a is close to c and v is small.

The challenger is an arbitrary program with private state. As in Figure 1, it decides whether to abort after the bit of the round is set. Before the last round an abort does not help it: every answer is deterministic, so the verifier's samples are exact and it accepts the claim. In the last round the verifier's rejection probability after an abort is at most v.

The constants of the source #

Under the non-strict reading of Definition 6.1, the protocol of Figure 1 is not sound for a machine with oracle queries of length at most two. With the constants of [BrownCohenIrvingPiliouras2024, Figure 1] for K = 1 (Params.figure1 1) and m ≥ 601, the two-block machine of 2 m + 3 steps, against the oracle that answers false at the empty address and has c = 1 / 4, is 1-Lipschitz at its oracle in the non-strict sense and outputs true with probability 1 / 4, yet some proposer makes the verifier accept with probability above 2 / 5 against every challenger, where the protocol the source gives for [BrownCohenIrvingPiliouras2024, Theorem 6.2] claims soundness 2 / 5. The theorem's existence claim is not refuted: another protocol may meet it.

The printed Definition 6.1 has a strict inequality, which this machine does not satisfy with K = 1; not_sound_figure1_two_of_lipschitzAt_run_twoBlockMachine is the statement for the printed definition. The checked conclusion is about Debate.run, with 2 m + 3 rounds, one for each step of the machine: claims and coins lie on a grid and the interpreter computes the bit of each round. In Figure 1 the proposer can announce the same grid probabilities, supply a uniform share and set the bit as prescribed, with the same probabilities and the same argument for an abort. The sample counts are rounded up and the logarithm is natural (Params.figure1).

The protocol of Figure 1 is not sound under Definition 6.1 for a machine with oracle queries of length at most two. With the constants of [BrownCohenIrvingPiliouras2024, Figure 1] for K = 2 (Params.figure1 2) and m ≥ 1201, the two-block machine of 2 m + 3 steps is 2-Lipschitz at its oracle and outputs true with probability 1 / 4, yet some proposer makes the verifier accept with probability above 2 / 5 against every challenger. The existence claim of [BrownCohenIrvingPiliouras2024, Theorem 6.2] is not refuted: another protocol may meet it.

This covers the printed Definition 6.1, which has a strict inequality. By lipschitzAt_run_twoBlockMachine the output law of this machine moves by at most the distance between the oracles, which is strictly less than twice that distance whenever the distance is positive. So the machine satisfies the strict inequality with K = 2 against every oracle at positive distance.

The checked conclusion is about Debate.run, with 2 m + 3 rounds: claims and coins lie on a grid and the interpreter computes the bit of each round. In Figure 1 the proposer can announce the same grid probabilities, supply a uniform share and set the bit as prescribed, with the same probabilities and the same argument for an abort. The constants are read as in not_sound_figure1_of_lipschitzAt_run_twoBlockMachine.