Documentation

CslibFrontier.Computability.Interactive.Debate.Machine

Machines with an external stochastic oracle #

Debate.lean treats a randomized computation as a step law indexed by the whole transcript prefix. The source of the debate protocol starts from a machine with access to an external stochastic oracle [BrownCohenIrvingPiliouras2024, Section 3]. This module gives that machine in the form the protocol uses: at each transcript prefix the next bit is a deterministic function of the prefix, a fair internal coin, or the reply to a query computed from the prefix.

Machine.run M n runs n steps as an oracle program over the external interface, so that [BrownCohenIrvingPiliouras2024, Definition 6.1] for M is ProbOracleComp.LipschitzAt K O (M.run n). Throughout this module, Definition 6.1 means its non-strict reading: the source prints a strict inequality, which no machine satisfies (see ProbOracleComp.LipschitzAt). Machine.stepLaw M O is the step law of M against the oracle O, and the two descriptions have the same output law (Machine.evalWith_output_stepLaw). Each step makes at most one external query, so the run of n steps is ProbOracleComp.LipschitzAt with constant n at every oracle (Machine.lipschitzAt_run); the source observes after Definition 6.1 that every time-T machine is Lipschitz with constant O(T).

The transcript is the list of bits written so far, most recent first, and the step may read all of it; relevant coordinates, tapes and encodings are not modelled.

For machines whose every step queries an encoding of the whole transcript so far (prefixMachine), Definition 6.1 suffices for the soundness step of Debate.lean: a perturbation of the step law is then a perturbation of the external oracle (lipschitzAt_stepLaw_of_lipschitzAt_run, soundness_of_lipschitzAt_run_prefixMachine). This is a step toward [BrownCohenIrvingPiliouras2024, Theorem 6.2], not that theorem; the full statement is tracked in cslib-frontier issue #7579.

Main definitions #

Main results #

References #

One step of a machine with an external oracle whose replies are bits.

  • det {Query : Type} (bit : Bool) : Step Query

    Write a bit determined by the transcript so far.

  • coin {Query : Type} : Step Query

    Write a fair internal coin.

  • ask {Query : Type} (query : Query) : Step Query

    Write the reply of the external oracle to a query.

A machine with an external oracle on Query: the kind of its next step, as a function of the bits written so far, most recent first.

  • step : List Bool → Step Query

    The next step after the given transcript.

noncomputable def Cslib.Interactive.Debate.Machine.next {Query : Type} (M : Machine Query) (bits : List Bool) :
ProbOracleComp (fun (x : Query) => Bool) Bool

The program for the next bit after the transcript bits.

noncomputable def Cslib.Interactive.Debate.Machine.transcript {Query : Type} (M : Machine Query) :
ℕ → ProbOracleComp (fun (x : Query) => Bool) (List Bool)

The transcript of the first n steps, most recent bit first.

noncomputable def Cslib.Interactive.Debate.Machine.run {Query : Type} (M : Machine Query) (n : ℕ) :
ProbOracleComp (fun (x : Query) => Bool) Bool

The output of n steps of the machine against an external oracle: the last bit of its transcript (false when n = 0).

noncomputable def Cslib.Interactive.Debate.Machine.stepLaw {Query : Type} (M : Machine Query) (O : Query → PMF Bool) :

The step law of the machine against the oracle O: a point mass at a deterministic step, a fair coin at a coin step, and the reply law of O at a query step.

The next bit of the machine against O has the law given by its step law.

The transcript of the step law of a machine has the law of the machine's transcript.

The output of the step law of a machine has the law of the machine's run: the prefix-indexed description of Debate.lean and the run against the external oracle agree.

The run of n steps makes at most n external queries, one per step.

theorem Cslib.Interactive.Debate.Machine.lipschitzAt_run {Query : Type} (M : Machine Query) (O : Query → PMF Bool) (n : ℕ) :

The run of n steps is Lipschitz at every oracle with the trivial constant n: each step makes at most one external query.

Machines that query the whole transcript #

def Cslib.Interactive.Debate.prefixMachine {Query : Type} (enc : List Bool → Query) :
Machine Query

The machine whose every step asks the external oracle at an encoding of the whole transcript so far. With Query = List Bool and enc = id it asks the transcript itself.

@[simp]
theorem Cslib.Interactive.Debate.stepLaw_prefixMachine {Query : Type} (enc : List Bool → Query) (O : Query → PMF Bool) (bits : List Bool) :
(prefixMachine enc).stepLaw O bits = O (enc bits)

The step law of a machine that queries an encoding of the whole transcript is the oracle at that encoding.

With the identity encoding the machine's run is the output program of Debate.lean.

Definition 6.1 gives the step-law hypothesis for machines whose every step queries an injective encoding of the whole transcript so far: every step law near the machine's is the step law of the machine against a nearby oracle, so being Lipschitz in the external oracle ([BrownCohenIrvingPiliouras2024, Definition 6.1]) is being Lipschitz in the whole step law.

Soundness under Definition 6.1 for machines that query the whole transcript. A step toward [BrownCohenIrvingPiliouras2024, Theorem 6.2], not that theorem; the full statement is tracked in cslib-frontier issue #7579. For machines whose every step queries an injective encoding of the whole transcript so far, Definition 6.1 suffices for the soundness step soundness_of_lipschitzAt_stepLaw. If the output of such a machine of T + 1 steps is K-Lipschitz at the external oracle and is true with probability at most 1 / 3, then against the honest challenger every proposer makes the verifier accept with probability at most 2 / 5.

The protocol is Debate.run: claims and coins lie on a grid, and the interpreter draws the bit of each round from the claim and the two coins. Nothing is claimed about running time or query counts, and the constants are Params.default.

Soundness at Params.figure1 for machines that query the whole transcript, under the non-strict reading of Definition 6.1. A step toward [BrownCohenIrvingPiliouras2024, Theorem 6.2], not that theorem; the full statement is tracked in cslib-frontier issue #7579. The hypothesis hL is ProbOracleComp.LipschitzAt K O ((prefixMachine enc).run T): the bound of [BrownCohenIrvingPiliouras2024, Definition 6.1] with ≤ in place of the printed <, for the run of T steps at the one oracle O. Every step of the machine queries the injective encoding enc of the whole transcript so far, so hL gives the step-law hypothesis of soundness_figure1_of_lipschitzAt_stepLaw (lipschitzAt_stepLaw_of_lipschitzAt_run). If also the output is true with probability at most 1 / 3, then against the honest challenger of the protocol of Figure 1 at Params.figure1, every proposer makes the verifier accept with probability at most 2 / 5.

Params.figure1 takes the number of rounds and the verifier's sample count and threshold from Figure 1, and the honest provers' sample count and the honest challenger's threshold from the proof of Theorem 6.2 in Appendix D. Nothing is claimed about running time or query counts, and the grid replaces the real numbers of the source. The margins in the proof are those of soundness_figure1_of_lipschitzAt_stepLaw, not the source's.