Documentation

Complexitylib.Classes.Containments.Internal.TranscriptEnc

The transcript encoding inside the polynomial-time algebra #

⚠️ Unreviewed by Bolton

An interactive verifier reads Complexity.Protocol.view, which carries the transcript through DataEncode.bitstringEncode. A machine walking the game tree therefore has to build that encoding as it extends the transcript, one message at a time.

The encoding is a parenthesized serialization, so it is a plain concatenation once the outer brackets are stripped: Complexity.encBody is the concatenation of the per-message encodings, and extending the transcript appends to it (Complexity.encBody_append). That is what makes the walk possible — nothing has to be re-encoded when a message is added or removed.

Main definitions #

Main results #

The three layers #

The encoding of a single bit.

Equations
Instances For

    The encoding of one message.

    Equations
    Instances For

      The concatenation of the messages' encodings — the body of a transcript's encoding.

      Equations
      Instances For

        The transcript's encoding, spelled out.

        @[simp]

        A new message is appended. Nothing already written has to change.

        Encoding a message is polynomial-time #

        One step of the encoding scan: the bits emitted so far, and the message still to read.

        Equations
        Instances For
          @[simp]
          theorem Complexity.encStep_cons (acc : List Bool) (b : Bool) (t : List Bool) :
          encStep (acc, b :: t) = (acc ++ encBit b, t)

          The scan flattens the per-bit encodings.

          The packed scan #

          The packed scan state.

          Equations
          Instances For
            @[simp]
            theorem Complexity.encPack_length (acc rest : List Bool) :
            (encPack acc rest).length = 2 * acc.length + rest.length + 2

            One step of the packed scan.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Complexity.encStepP_pack (acc rest : List Bool) :
              encStepP (encPack acc rest) = encPack (encStep (acc, rest)).1 (encStep (acc, rest)).2
              theorem Complexity.encStepP_iterate_args (acc rest : List Bool) (n : ) :
              encStepP^[n] (encPack acc rest) = encPack (encStep^[n] (acc, rest)).1 (encStep^[n] (acc, rest)).2

              The flattened per-bit encodings, computed by the scan.

              Equations
              Instances For
                theorem Complexity.encFlatFn_mem_FP {a : List BoolList Bool} (ha : a FP) :
                (fun (z : List Bool) => encFlat (a z)) FP
                theorem Complexity.encMsgFn_mem_FP {a : List BoolList Bool} (ha : a FP) :
                (fun (z : List Bool) => encMsg (a z)) FP

                Transcripts given as rounds #

                A transcript, read off a list of rounds. This is the shape a stack holds: one frame per round, carrying the verifier's message and the prover's reply.

                Equations
                Instances For
                  @[simp]

                  The body of the encoding of a transcript given as rounds.

                  Equations
                  Instances For