Documentation

Starlib.OracleReduction.Prelude

Prelude for Interactive (Oracle) Reductions #

This file contains preliminary definitions and instances that is used in defining I(O)Rs.

⊕ᵥ is notation for Sum.rec, the dependent elimination of `Sum.

This sends (a : α) → γ (.inl a) and (b : β) → γ (.inr b) to (a : α ⊕ β) → γ a.

Instances For
    @[implicit_reducible]
    class VCVCompatible (α : Type u_1) extends Fintype α, Inhabited α :
    Type u_1

    VCVCompabible is a type class for types that are finite, inhabited, and have decidable equality. These instances are needed when the type is used as the range of some OracleSpec.

    Instances
      @[implicit_reducible]
      @[simp]
      theorem Vector.ofFn_get {α : Type u_1} {n : } (v : Vector α n) :
      ofFn v.get = v
      def Equiv.rootVectorEquivFin {α : Type u_1} {n : } :
      Vector α n (Fin nα)
      Instances For
        @[implicit_reducible]
        instance Vector.instFintype {α : Type u_1} {n : } [VCVCompatible α] :
        @[implicit_reducible]
        instance instVCVCompatibleForallFin {α : Type u_1} {n : } [VCVCompatible α] :
        VCVCompatible (Fin nα)
        @[implicit_reducible]
        instance instVCVCompatibleVector {α : Type u_1} {n : } [VCVCompatible α] :
        @[implicit_reducible]
        inductive Direction :

        Enum type for the direction of a round in a protocol specification. It is either .P_to_V (the prover sends a message to the verifier) or .V_to_P (the verifier sends a challenge to the prover).

        Instances For
          @[implicit_reducible]
          @[implicit_reducible]
          @[implicit_reducible]

          Equivalence between Direction and Fin 2, sending V_to_P to 0 and P_to_V to 1 (the choice is essentially arbitrary).

          Instances For

            Equivalence between Direction and Bool, sending V_to_P to false and P_to_V to true (the choice is essentially arbitrary).

            Instances For
              @[implicit_reducible]

              This allows us to write 0 for .V_to_P and 1 for .P_to_V.

              @[implicit_reducible]
              @[reducible]
              def Set.language {α : Type u_1} {β : Type u_2} (rel : Set (α × β)) :
              Set α

              The associated language Set α for a relation Set (α × β).

              Instances For
                @[simp]
                theorem Set.mem_language_iff {α : Type u_1} {β : Type u_2} (rel : Set (α × β)) (stmt : α) :
                stmt rel.language ∃ (wit : β), (stmt, wit) rel
                @[simp]
                theorem Set.not_mem_language_iff {α : Type u_1} {β : Type u_2} (rel : Set (α × β)) (stmt : α) :
                stmtrel.language ∀ (wit : β), (stmt, wit)rel

                The trivial relation on Boolean statement and unit witness, which outputs the Boolean (i.e. accepts or rejects).

                Instances For

                  The trivial relation on Boolean statement, no oracle statements, and unit witness.

                  Instances For