Documentation

Starlib.OracleReduction.Basic

Interactive (Oracle) Reductions #

This file defines the basic components of a public-coin Interactive Oracle Reduction (IOR). These are interactive protocols between two parties, a prover and a verifier, with the following format:

Our formulation of IORs can be seen in the literature as F-IORs, where F denotes an arbitrary class of oracles. See the blueprint for more details about our modeling choices.

We can then specialize our definition to obtain specific instantiations in the literature:

We note that this file only defines the type signature of IORs. The semantics of executing an IOR can be found in Execution.lean, while the security notions are found in the Security folder.

Note the appearance of the various dependencies in the type signatures:

We arrange things in this way for potential future extensions, where later types may depend on earlier types (i.e. WitIn, StmtOut, or pSpec may depend on StmtIn; though we do not expect, say, StmtOut or pSpec to depend on the witness types, as that is not available to the (oracle) verifier).

structure Indexer {ι : Type} (oSpec : OracleSpec ι) {n : } (pSpec : ProtocolSpec n) (Index Encoding : Type) :
Type (max 1 u_1)
Instances For
    structure ProverState (n : ) :

    The type signature for the prover's state at each round.

    For a protocol with n messages exchanged, there will be (n + 1) prover states, with the first state before the first message and the last state after the last message.

    Instances For
      theorem ProverState.ext_iff {n : } {x y : ProverState n} :
      theorem ProverState.ext {n : } {x y : ProverState n} (PrvState : x.PrvState = y.PrvState) :
      x = y
      structure ProverInput (StmtIn WitIn PrvState : Type) :

      Initialization of prover's state via inputting the statement and witness.

      • input : StmtIn × WitInPrvState
      Instances For
        theorem ProverInput.ext_iff {StmtIn WitIn PrvState : Type} {x y : ProverInput StmtIn WitIn PrvState} :
        x = y x.input = y.input
        theorem ProverInput.ext {StmtIn WitIn PrvState : Type} {x y : ProverInput StmtIn WitIn PrvState} (input : x.input = y.input) :
        x = y
        structure ProverInit (PrvState : Type) :
        • init : PrvState
        Instances For
          structure ProverRound {ι : Type} (oSpec : OracleSpec ι) {n : } (pSpec : ProtocolSpec n) extends ProverState n :
          Type (max 1 u_1)

          Represents the interaction of a prover for a given protocol specification.

          In each step, the prover gets access to the current state, then depending on the direction of the step, the prover either sends a message or receives a challenge, and updates its state accordingly.

          For maximum simplicity, we only define the sendMessage function as an oracle computation. All other functions are pure. We may revisit this decision in the future.

          Instances For
            theorem ProverRound.ext {ι : Type} {oSpec : OracleSpec ι} {n : } {pSpec : ProtocolSpec n} {x y : ProverRound oSpec pSpec} (PrvState : x.PrvState = y.PrvState) (sendMessage : x.sendMessage y.sendMessage) (receiveChallenge : x.receiveChallenge y.receiveChallenge) :
            x = y
            structure ProverOutput {ι : Type} (oSpec : OracleSpec ι) (Output PrvState : Type) :
            Type u_1

            The output function of the prover, which takes in the prover's final state and returns an oracle computation that outputs some specified output type Output

            We note that an honest prover may output both the output statement and witness (for easier composability), but an adversarial prover in the knowledge soundness game may only output the witness.

            Instances For
              theorem ProverOutput.ext_iff {ι : Type} {oSpec : OracleSpec ι} {Output PrvState : Type} {x y : ProverOutput oSpec Output PrvState} :
              x = y x.output = y.output
              theorem ProverOutput.ext {ι : Type} {oSpec : OracleSpec ι} {Output PrvState : Type} {x y : ProverOutput oSpec Output PrvState} (output : x.output = y.output) :
              x = y
              structure ProverInteraction {ι : Type} (oSpec : OracleSpec ι) {n : } (pSpec : ProtocolSpec n) extends ProverState n, ProverInit (self.PrvState 0), ProverRound oSpec pSpec :
              Type (max 1 u_1)

              The type of algorithms that participates in an (interactive) reduction in the role of the prover. This consists of:

              • PrvState 0, ..., PrvState n: the types for the private state, from before the first message to after the last message
              • init : PrvState 0 is the initial state
              • sendMessage and receiveChallenge are the functions for sending and receiving messages for each round, depending on the direction of the round.

              This is useful when modeling soundness, since we do not want to mandate that adversarial provers in the soundness game need to input or output anything.

              Instances For
                structure ProverInteractionWithOutput {ι : Type} (oSpec : OracleSpec ι) (Output : Type) {n : } (pSpec : ProtocolSpec n) extends ProverState n, ProverInit (self.PrvState 0), ProverRound oSpec pSpec, ProverOutput oSpec Output (self.PrvState (Fin.last n)) :
                Type (max 1 u_1)

                The type of algorithms that participates in an (interactive) reduction in the role of the prover, and returns some specified output type Output. This consists of:

                • A ProverInteraction type for the interaction with the verifier
                • An output function that takes in the algorithm's final state and returns an oracle computation that outputs the output type Output

                This is useful when modeling knowledge soundness, since we do not want to mandate that adversarial provers in the knowledge soundness game need to input the input statement or witness. We also do not need the adversarial prover to output any output statement, as such values are sourced from the verifier.

                Instances For
                  structure Prover {ι : Type} (oSpec : OracleSpec ι) (StmtIn WitIn StmtOut WitOut : Type) {n : } (pSpec : ProtocolSpec n) extends ProverState n, ProverInput StmtIn WitIn (self.PrvState 0), ProverRound oSpec pSpec, ProverOutput oSpec (StmtOut × WitOut) (self.PrvState (Fin.last n)) :
                  Type (max 1 u_1)

                  The type of honest provers for an interactive reduction with n messages. This consists of:

                  • PrvState 0, ..., PrvState n are the types for the prover's state at each round
                  • input initializes the prover's state by taking in the input statement and witness
                  • sendMessage takes in the prover's state, then returns an oracle computation that outputs a message and the next prover's state
                  • receiveChallenge takes in the prover's state, then returns an oracle computation that outputs a function that takes in a challenge and returns the next prover's state
                  • output returns the output statement and witness from the prover's state

                  Note that the output statement by the prover is present only to facilitate composing honest provers together. For completeness, we will require that the prover's output statement is always equal to the verifier's output statement. For soundness and knowledge soundness, we will use more restricted types of provers (see ProverInteraction and ProverInteractionWithOutput).

                  Instances For
                    theorem Prover.ext_iff {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Prover oSpec StmtIn WitIn StmtOut WitOut pSpec} :
                    theorem Prover.ext {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Prover oSpec StmtIn WitIn StmtOut WitOut pSpec} (PrvState : x.PrvState = y.PrvState) (input : x.input y.input) (sendMessage : x.sendMessage y.sendMessage) (receiveChallenge : x.receiveChallenge y.receiveChallenge) (output : x.output y.output) :
                    x = y
                    structure Verifier {ι : Type} (oSpec : OracleSpec ι) (StmtIn StmtOut : Type) {n : } (pSpec : ProtocolSpec n) :
                    Type u_1

                    A verifier of an interactive protocol is a function that takes in the input statement and the transcript, and performs an oracle computation that outputs a new statement

                    Instances For
                      theorem Verifier.ext_iff {ι : Type} {oSpec : OracleSpec ι} {StmtIn StmtOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Verifier oSpec StmtIn StmtOut pSpec} :
                      x = y x.verify = y.verify
                      theorem Verifier.ext {ι : Type} {oSpec : OracleSpec ι} {StmtIn StmtOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Verifier oSpec StmtIn StmtOut pSpec} (verify : x.verify = y.verify) :
                      x = y
                      @[reducible, inline]
                      def OracleProver {ι : Type} (oSpec : OracleSpec ι) (StmtIn : Type) {ιₛᵢ : Type} (OStmtIn : ιₛᵢType) (WitIn StmtOut : Type) {ιₛₒ : Type} (OStmtOut : ιₛₒType) (WitOut : Type) {n : } (pSpec : ProtocolSpec n) :
                      Type (max 1 u_1)

                      An (oracle) prover in an interactive oracle reduction is a prover in the non-oracle reduction whose input statement also consists of the underlying messages for the oracle statements

                      Instances For
                        structure OracleVerifier {ι : Type} (oSpec : OracleSpec ι) (StmtIn : Type) {ιₛᵢ : Type} (OStmtIn : ιₛᵢType) (StmtOut : Type) {ιₛₒ : Type} (OStmtOut : ιₛₒType) {n : } (pSpec : ProtocolSpec n) [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] :
                        Type (max u_1 u_2)

                        An (oracle) verifier of an interactive oracle reduction consists of:

                        • an oracle computation verify that outputs the next statement. It may make queries to each of the prover's messages and each of the oracles present in the statement (according to a specified interface defined by OracleInterface instances).

                        • output oracle statements OStmtOut : ιₛₒ → Type, meant to be a subset of the input oracle statements and the prover's oracle messages. Formally, this is specified by an embedding ιₛₒ ↪ ιₛᵢ ⊕ pSpec.MessageIdx and a proof that OStmtOut is compatible with OStmtIn and pSpec.Messages via this embedding.

                        Intuitively, the oracle verifier cannot do anything more in returning the output oracle statements, other than specifying a subset of the ones it has received (and dropping the rest).

                        • verify : StmtInpSpec.ChallengesOptionT (OracleComp (oSpec + ([OStmtIn]ₒ + [pSpec.Message]ₒ))) StmtOut

                          The core verification logic. Takes the input statement stmtIn and all verifier challenges challenges (which are determined outside this function, typically by sampling for public-coin protocols). Returns the output statement StmtOut within an OracleComp that has access to external oracles oSpec, input statement oracles OStmtIn, and prover message oracles pSpec.Message.

                        • embed : ιₛₒ ιₛᵢ pSpec.MessageIdx

                          An embedding that specifies how each output oracle statement (indexed by ιₛₒ) is derived. It maps an index i : ιₛₒ to either an index j : ιₛᵢ (meaning OStmtOut i comes from OStmtIn j) or an index k : pSpec.MessageIdx (meaning OStmtOut i comes from the prover's message pSpec.Message k). This enforces that output oracles are a subset of input oracles or received prover messages.

                        • hEq (i : ιₛₒ) : OStmtOut i = match self.embed i with | Sum.inl j => OStmtIn j | Sum.inr j => pSpec.Message j

                          A proof term ensuring that the type of each OStmtOut i matches the type of the corresponding source oracle statement (OStmtIn j or pSpec.Message k) as determined by the embed mapping.

                        Instances For
                          theorem OracleVerifier.ext {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} {Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)} {Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)} {x y : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec} (verify : x.verify = y.verify) (embed : x.embed = y.embed) :
                          x = y
                          theorem OracleVerifier.ext_iff {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} {Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)} {Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)} {x y : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec} :
                          def OracleVerifier.toVerifier {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (verifier : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :
                          Verifier oSpec (StmtIn × ((i : ιₛᵢ) → OStmtIn i)) (StmtOut × ((i : ιₛₒ) → OStmtOut i)) pSpec

                          An oracle verifier can be seen as a (non-oracle) verifier by providing the oracle interface using its knowledge of the oracle statements and the transcript messages in the clear

                          Instances For
                            def OracleVerifier.numQueries {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (stmt : StmtIn) (challenges : (i : pSpec.ChallengeIdx) → pSpec.Challenge i) (verifier : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :
                            OracleComp (oSpec + ([OStmtIn]ₒ + [pSpec.Message]ₒ))

                            The number of queries made to the oracle statements and the prover's messages, for a given input statement and challenges.

                            This is given as an oracle computation itself, since the oracle verifier may be adaptive and has different number of queries depending on the prior responses.

                            TODO: define once numQueries is defined in OracleComp

                            Instances For
                              structure OracleVerifier.NonAdaptive {ι : Type} (oSpec : OracleSpec ι) (StmtIn : Type) {ιₛᵢ : Type} (OStmtIn : ιₛᵢType) (StmtOut : Type) {ιₛₒ : Type} (OStmtOut : ιₛₒType) {n : } (pSpec : ProtocolSpec n) [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] :
                              Type (max (max u_1 u_2) u_3)

                              A non-adaptive oracle verifier is an oracle verifier that makes a fixed list of queries to the input oracle statements and the prover's messages. These queries can depend on the input statement and the challenges, but later queries are not dependent on the responses of previous queries.

                              Formally, we model this as a tuple of functions:

                              • queryOStmt, which outputs a list of queries to the input oracle statements,
                              • queryMsg, which outputs a list of queries to the prover's messages,
                              • verify, which outputs the new statement from the query-response pairs.

                              We allow querying the shared oracle (i.e. probabilistic sampling or random oracles) when deriving the output statement, but not on the list of queries made to the oracle statements or the prover's messages.

                              Finally, we also allow for choosing a subset of the input oracle statements + the prover's messages to retain for the output oracle statements.

                              Instances For
                                def OracleVerifier.NonAdaptive.toOracleVerifier {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (naVerifier : NonAdaptive oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :
                                OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec

                                Converts a non-adaptive oracle verifier into the general oracle verifier interface.

                                This essentially performs the queries via List.mapM, then runs verify on the query-response pairs.

                                Instances For
                                  def OracleVerifier.NonAdaptive.numOStmtQueries {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] [DecidableEq ιₛᵢ] (i : ιₛᵢ) (stmt : StmtIn) (challenges : (i : pSpec.ChallengeIdx) → pSpec.Challenge i) (naVerifier : NonAdaptive oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :

                                  The number of queries made to the i-th oracle statement, for a given input statement and challenges.

                                  Instances For
                                    def OracleVerifier.NonAdaptive.numOMsgQueries {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (i : pSpec.MessageIdx) (stmt : StmtIn) (challenges : (i : pSpec.ChallengeIdx) → pSpec.Challenge i) (naVerifier : NonAdaptive oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :

                                    The number of queries made to the i-th prover's message, for a given input statement and challenges.

                                    Instances For
                                      def OracleVerifier.NonAdaptive.totalNumQueries {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (stmt : StmtIn) (challenges : (i : pSpec.ChallengeIdx) → pSpec.Challenge i) (naVerifier : NonAdaptive oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec) :

                                      The total number of queries made to the oracle statements and the prover's messages, for a given input statement and challenges.

                                      Instances For
                                        structure Reduction {ι : Type} (oSpec : OracleSpec ι) (StmtIn WitIn StmtOut WitOut : Type) {n : } (pSpec : ProtocolSpec n) :
                                        Type (max 1 u_1)

                                        An interactive reduction for a given protocol specification pSpec, and relative to oracles defined by oSpec, consists of a prover and a verifier.

                                        • prover : Prover oSpec StmtIn WitIn StmtOut WitOut pSpec
                                        • verifier : Verifier oSpec StmtIn StmtOut pSpec
                                        Instances For
                                          theorem Reduction.ext {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Reduction oSpec StmtIn WitIn StmtOut WitOut pSpec} (prover : x.prover = y.prover) (verifier : x.verifier = y.verifier) :
                                          x = y
                                          theorem Reduction.ext_iff {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} {x y : Reduction oSpec StmtIn WitIn StmtOut WitOut pSpec} :
                                          structure OracleReduction {ι : Type} (oSpec : OracleSpec ι) (StmtIn : Type) {ιₛᵢ : Type} (OStmtIn : ιₛᵢType) (WitIn StmtOut : Type) {ιₛₒ : Type} (OStmtOut : ιₛₒType) (WitOut : Type) {n : } (pSpec : ProtocolSpec n) [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] :
                                          Type (max (max 1 u_1) u_2)

                                          An interactive oracle reduction for a given protocol specification pSpec, and relative to oracles defined by oSpec, consists of a prover and an oracle verifier.

                                          • prover : OracleProver oSpec StmtIn OStmtIn WitIn StmtOut OStmtOut WitOut pSpec
                                          • verifier : OracleVerifier oSpec StmtIn OStmtIn StmtOut OStmtOut pSpec
                                          Instances For
                                            theorem OracleReduction.ext_iff {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {WitIn StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {WitOut : Type} {n : } {pSpec : ProtocolSpec n} {Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)} {Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)} {x y : OracleReduction oSpec StmtIn OStmtIn WitIn StmtOut OStmtOut WitOut pSpec} :
                                            theorem OracleReduction.ext {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {WitIn StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {WitOut : Type} {n : } {pSpec : ProtocolSpec n} {Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)} {Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)} {x y : OracleReduction oSpec StmtIn OStmtIn WitIn StmtOut OStmtOut WitOut pSpec} (prover : x.prover = y.prover) (verifier : x.verifier = y.verifier) :
                                            x = y
                                            def OracleReduction.toReduction {ι : Type} {oSpec : OracleSpec ι} {StmtIn ιₛᵢ : Type} {OStmtIn : ιₛᵢType} {WitIn StmtOut ιₛₒ : Type} {OStmtOut : ιₛₒType} {WitOut : Type} {n : } {pSpec : ProtocolSpec n} [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStmtIn i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] (oracleReduction : OracleReduction oSpec StmtIn OStmtIn WitIn StmtOut OStmtOut WitOut pSpec) :
                                            Reduction oSpec (StmtIn × ((i : ιₛᵢ) → OStmtIn i)) WitIn (StmtOut × ((i : ιₛₒ) → OStmtOut i)) WitOut pSpec

                                            An interactive oracle reduction can be seen as an interactive reduction, via coercing the oracle verifier to a (normal) verifier

                                            Instances For
                                              @[reducible]
                                              def Proof {ι : Type} (oSpec : OracleSpec ι) (Statement Witness : Type) {n : } (pSpec : ProtocolSpec n) :
                                              Type (max 1 u_1)

                                              An interactive proof (IP) is an interactive reduction where the output statement is a boolean, the output witness is trivial (a Unit), and the relation checks whether the output statement is true.

                                              Instances For
                                                @[reducible]
                                                def OracleProof {ι : Type} (oSpec : OracleSpec ι) (Statement : Type) {ιₛᵢ : Type} (OStatement : ιₛᵢType) (Witness : Type) {n : } (pSpec : ProtocolSpec n) [Oₛᵢ : (i : ιₛᵢ) → OracleInterface (OStatement i)] [Oₘ : (i : pSpec.MessageIdx) → OracleInterface (pSpec.Message i)] :
                                                Type (max (max 1 u_1) u_2)

                                                An interactive oracle proof (IOP) is an interactive oracle reduction where the output statement is a boolean, while both the output oracle statement & the output witness are trivial (Unit type).

                                                As a consequence, the output relation in an IOP is effectively a function Bool → Prop, which we can again assume to be the trivial one (sending true to True).

                                                Instances For
                                                  @[reducible]
                                                  def NonInteractiveProver (Message : Type) {ι : Type} (oSpec : OracleSpec ι) (StmtIn WitIn StmtOut WitOut : Type) :
                                                  Type (max 1 u_1)

                                                  A non-interactive prover is a prover that only sends a single message to the verifier.

                                                  Instances For
                                                    @[reducible]
                                                    def NonInteractiveVerifier (Message : Type) {ι : Type} (oSpec : OracleSpec ι) (StmtIn StmtOut : Type) :
                                                    Type u_1

                                                    A non-interactive verifier is a verifier that only receives a single message from the prover.

                                                    Instances For
                                                      @[reducible]
                                                      def NonInteractiveReduction (Message : Type) {ι : Type} (oSpec : OracleSpec ι) (StmtIn WitIn StmtOut WitOut : Type) :
                                                      Type (max 1 u_1)

                                                      A non-interactive reduction is an interactive reduction with only a single message from the prover to the verifier (and none in the other direction).

                                                      Instances For
                                                        def Prover.id {ι : Type} {oSpec : OracleSpec ι} {Statement Witness : Type} :
                                                        Prover oSpec Statement Witness Statement Witness !p[]

                                                        The trivial / identity prover, which does not send any messages to the verifier, and returns its input context (statement & witness) as output.

                                                        Instances For
                                                          def Verifier.id {ι : Type} {oSpec : OracleSpec ι} {Statement : Type} :
                                                          Verifier oSpec Statement Statement !p[]

                                                          The trivial / identity verifier, which does not receive any messages from the prover, and returns its input statement as output.

                                                          Instances For
                                                            def Reduction.id {ι : Type} {oSpec : OracleSpec ι} {Statement Witness : Type} :
                                                            Reduction oSpec Statement Witness Statement Witness !p[]

                                                            The trivial / identity reduction, which consists of the trivial prover and verifier.

                                                            Instances For
                                                              def OracleProver.id {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} {Witness : Type} :
                                                              OracleProver oSpec Statement OStatement Witness Statement OStatement Witness !p[]

                                                              The trivial / identity prover in an oracle reduction, which unfolds to the trivial prover for the associated non-oracle reduction.

                                                              Instances For
                                                                def OracleVerifier.id {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                OracleVerifier oSpec Statement OStatement Statement OStatement !p[]

                                                                The trivial / identity verifier in an oracle reduction, which receives no messages from the prover, and returns its input statement as output.

                                                                Instances For
                                                                  def OracleReduction.id {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} {Witness : Type} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                  OracleReduction oSpec Statement OStatement Witness Statement OStatement Witness !p[]

                                                                  The trivial / identity oracle reduction, which consists of the trivial oracle prover and verifier.

                                                                  Instances For
                                                                    def Prover.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement Witness : Type} :
                                                                    Prover oSpec Statement Witness Statement Witness !p[]

                                                                    Alias of Prover.id.


                                                                    The trivial / identity prover, which does not send any messages to the verifier, and returns its input context (statement & witness) as output.

                                                                    Instances For
                                                                      def Verifier.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement : Type} :
                                                                      Verifier oSpec Statement Statement !p[]

                                                                      Alias of Verifier.id.


                                                                      The trivial / identity verifier, which does not receive any messages from the prover, and returns its input statement as output.

                                                                      Instances For
                                                                        def Reduction.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement Witness : Type} :
                                                                        Reduction oSpec Statement Witness Statement Witness !p[]

                                                                        Alias of Reduction.id.


                                                                        The trivial / identity reduction, which consists of the trivial prover and verifier.

                                                                        Instances For
                                                                          def OracleProver.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} {Witness : Type} :
                                                                          OracleProver oSpec Statement OStatement Witness Statement OStatement Witness !p[]

                                                                          Alias of OracleProver.id.


                                                                          The trivial / identity prover in an oracle reduction, which unfolds to the trivial prover for the associated non-oracle reduction.

                                                                          Instances For
                                                                            def OracleVerifier.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                            OracleVerifier oSpec Statement OStatement Statement OStatement !p[]

                                                                            Alias of OracleVerifier.id.


                                                                            The trivial / identity verifier in an oracle reduction, which receives no messages from the prover, and returns its input statement as output.

                                                                            Instances For
                                                                              def OracleReduction.trivial {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} {Witness : Type} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                              OracleReduction oSpec Statement OStatement Witness Statement OStatement Witness !p[]

                                                                              Alias of OracleReduction.id.


                                                                              The trivial / identity oracle reduction, which consists of the trivial oracle prover and verifier.

                                                                              Instances For
                                                                                @[simp]
                                                                                theorem OracleVerifier.id_toVerifier {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                                @[simp]
                                                                                theorem OracleReduction.id_toReduction {ι : Type} {oSpec : OracleSpec ι} {Statement ιₛ : Type} {OStatement : ιₛType} {Witness : Type} [Oₛ : (i : ιₛ) → OracleInterface (OStatement i)] :
                                                                                class ProtocolSpec.ProverFirst {n : } (pSpec : ProtocolSpec n) [NeZero n] :

                                                                                A protocol specification with the prover speaking first

                                                                                Instances
                                                                                  Instances
                                                                                    class ProtocolSpec.ProverLast {n : } (pSpec : ProtocolSpec n) [inst : NeZero n] :
                                                                                    Instances

                                                                                      A protocol specification with the verifier speaking last

                                                                                      Instances

                                                                                        A non-interactive protocol specification with a single message from the prover to the verifier

                                                                                        Instances For
                                                                                          @[simp]
                                                                                          theorem ProtocolSpec.prover_first {n : } (pSpec : ProtocolSpec n) [NeZero n] [h : pSpec.ProverFirst] :
                                                                                          @[simp]
                                                                                          theorem ProtocolSpec.verifier_first {n : } (pSpec : ProtocolSpec n) [NeZero n] [h : pSpec.VerifierFirst] :
                                                                                          @[simp]
                                                                                          theorem ProtocolSpec.prover_last {n : } (pSpec : ProtocolSpec n) [NeZero n] [h : pSpec.ProverLast] :
                                                                                          pSpec.dir n - 1, = Direction.P_to_V
                                                                                          @[simp]
                                                                                          theorem ProtocolSpec.verifier_last {n : } (pSpec : ProtocolSpec n) [NeZero n] [h : pSpec.VerifierLast] :
                                                                                          pSpec.dir n - 1, = Direction.V_to_P
                                                                                          @[implicit_reducible]
                                                                                          @[implicit_reducible]
                                                                                          @[implicit_reducible]
                                                                                          class ProtocolSpec.IsSingleRound (pSpec : ProtocolSpec 2) extends pSpec.ProverFirst, pSpec.VerifierLast :

                                                                                          A protocol specification with a single round of interaction consisting of two messages, with the prover speaking first and the verifier speaking last

                                                                                          This notation is currently somewhat ambiguous, given that there are other valid ways of defining a "single-round" protocol, such as letting the verifier speaks first, letting the prover speaks multiple times, etc.

                                                                                          Instances

                                                                                            Alias of ProtocolSpec.IsSingleRound.


                                                                                            A protocol specification with a single round of interaction consisting of two messages, with the prover speaking first and the verifier speaking last

                                                                                            This notation is currently somewhat ambiguous, given that there are other valid ways of defining a "single-round" protocol, such as letting the verifier speaks first, letting the prover speaks multiple times, etc.

                                                                                            Instances For
                                                                                              @[implicit_reducible]

                                                                                              The first message is the only message from the prover to the verifier

                                                                                              @[implicit_reducible]

                                                                                              The second message is the only challenge from the verifier to the prover

                                                                                              @[reducible, inline]
                                                                                              def ProtocolSpec.FullTranscript.mk2 {pSpec : ProtocolSpec 2} (msg0 : pSpec.Type 0) (msg1 : pSpec.Type 1) :
                                                                                              Instances For
                                                                                                theorem ProtocolSpec.FullTranscript.mk2_eq_snoc_snoc {pSpec : ProtocolSpec 2} (msg0 : pSpec.Type 0) (msg1 : pSpec.Type 1) :
                                                                                                class Prover.IsPure {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} (P : Prover oSpec StmtIn WitIn StmtOut WitOut pSpec) :
                                                                                                Instances
                                                                                                  class Verifier.IsPure {ι : Type} {oSpec : OracleSpec ι} {StmtIn StmtOut : Type} {n : } {pSpec : ProtocolSpec n} (V : Verifier oSpec StmtIn StmtOut pSpec) :
                                                                                                  Instances
                                                                                                    class Reduction.IsPure {ι : Type} {oSpec : OracleSpec ι} {StmtIn WitIn StmtOut WitOut : Type} {n : } {pSpec : ProtocolSpec n} (R : Reduction oSpec StmtIn WitIn StmtOut WitOut pSpec) :
                                                                                                    Instances