Documentation

GaudisCrypt.Lib.EC.Commitment

Commitment schemes (EasyCrypt theories/crypto/Commitment.ec) #

EC's theory CommitmentProtocol: the module type of a commitment scheme and the experiments for correctness, hiding and binding. The theory's types are outParams of the (field-less) class Params: a clone is clone import GaudisCrypt.EC.CommitmentProtocol as CM with type value <- ….

class GaudisCrypt.EC.CommitmentProtocol.Params (value message commitment openingkey : outParam Type) :

EC's type value, message, commitment, openingkey.

    Instances
      @[simp]
      theorem GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.destruct_mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theModule✝ : CommitmentScheme) :
      mk theModule✝.structure = theModule✝

      @[simp]: CommitmentScheme.mk (CommitmentScheme.structure m) = m — rebuilding a module from its own fields gives that module back.

      noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.verify.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

      What is derivable about the accessor CommitmentScheme.verify, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

      • CommitmentScheme.verify.utilities.accessorModule : CommitmentScheme →ₘ … — the accessor as a module, a projection being a module morphism;
      • CommitmentScheme.verify.utilities.apply_simp — Module.app CommitmentScheme.verify.utilities.accessorModule m = CommitmentScheme.verify m: applying that module is the accessor;
      • CommitmentScheme.verify.utilities.expression_eq — the same at the level of expressions: (CommitmentScheme.verify m).expression = (CommitmentScheme.verify.utilities.proj m.expression).reduce.
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.commit.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
        (mk theRecord✝).commit = theRecord✝.commit

        @[simp]: reading the field commit back off a module built from a record — CommitmentScheme.commit (CommitmentScheme.mk r) = r.commit.

        It is what carries the right-hand side of an X.apply_simp (which is an CommitmentScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.commit.apply_simp.

        @[simp]
        theorem GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.verify.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
        (mk theRecord✝).verify = theRecord✝.verify

        @[simp]: reading the field verify back off a module built from a record — CommitmentScheme.verify (CommitmentScheme.mk r) = r.verify.

        It is what carries the right-hand side of an X.apply_simp (which is an CommitmentScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.verify.apply_simp.

        noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

        The record of a module's fields: CommitmentScheme.structure m is CommitmentScheme.Structure.mk applied to CommitmentScheme.gen, CommitmentScheme.commit, CommitmentScheme.verify of m.

        Inverse of CommitmentScheme.mk (CommitmentScheme.mk_destruct, CommitmentScheme.destruct_mk).

        Equations
        Instances For
          @[reducible]
          noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

          Builds a module of type CommitmentScheme from the record CommitmentScheme.Structure of its fields, as a right-nested Module.pair'. @[reducible].

          Inverse of CommitmentScheme.structure (CommitmentScheme.mk_destruct, CommitmentScheme.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas CommitmentScheme.gen.mk_simp, CommitmentScheme.commit.mk_simp, CommitmentScheme.verify.mk_simp.

          Equations
          Instances For
            @[simp]
            theorem GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.mk_destruct {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
            (mk theRecord✝).structure = theRecord✝

            @[simp]: CommitmentScheme.structure (CommitmentScheme.mk r) = r — destructing a module built from a record gives that record back.

            noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.commit {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
            CommitmentScheme → procmod (value, message) → (commitment × openingkey)

            The field commit of a module of type CommitmentScheme: the projection onto component 1 of the right-nested tuple CommitmentScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

            CommitmentScheme.commit.mk_simp reads this field back off a module built by CommitmentScheme.mk; CommitmentScheme.commit.utilities has the accessor as a module, and the lemmas about it.

            Its parameters are named x, m, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).

            Equations
            Instances For
              def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

              The module type declared by moduletype CommitmentScheme, with fields gen, commit, verify: the type Module CommitmentScheme.typeRep of modules that are a right-nested tuple of the field types.

              Build one from a record of its fields with CommitmentScheme.mk, read a single field off one with the accessors CommitmentScheme.gen, CommitmentScheme.commit, CommitmentScheme.verify, and get the whole record back with CommitmentScheme.structure.

              Equations
              Instances For
                noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.verify {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                The field verify of a module of type CommitmentScheme: the projection onto component 2 of the right-nested tuple CommitmentScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

                CommitmentScheme.verify.mk_simp reads this field back off a module built by CommitmentScheme.mk; CommitmentScheme.verify.utilities has the accessor as a module, and the lemmas about it.

                Its parameters are named x, m, c, d, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).

                Equations
                Instances For
                  noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.gen {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                  The field gen of a module of type CommitmentScheme: the projection onto component 0 of the right-nested tuple CommitmentScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

                  CommitmentScheme.gen.mk_simp reads this field back off a module built by CommitmentScheme.mk; CommitmentScheme.gen.utilities has the accessor as a module, and the lemmas about it.

                  It takes no parameters (recorded in @[gaudiProcParamNames]).

                  Equations
                  Instances For
                    def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.typeRep {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                    The ModuleTypeRep underlying CommitmentScheme, the module type declared by moduletype CommitmentScheme: the right-nested product of its 3 field types, in declaration order.

                    CommitmentScheme is by definition Module CommitmentScheme.typeRep.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.commit.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                      What is derivable about the accessor CommitmentScheme.commit, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

                      • CommitmentScheme.commit.utilities.accessorModule : CommitmentScheme →ₘ … — the accessor as a module, a projection being a module morphism;
                      • CommitmentScheme.commit.utilities.apply_simp — Module.app CommitmentScheme.commit.utilities.accessorModule m = CommitmentScheme.commit m: applying that module is the accessor;
                      • CommitmentScheme.commit.utilities.expression_eq — the same at the level of expressions: (CommitmentScheme.commit m).expression = (CommitmentScheme.commit.utilities.proj m.expression).reduce.
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[simp]
                        theorem GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.gen.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                        (mk theRecord✝).gen = theRecord✝.gen

                        @[simp]: reading the field gen back off a module built from a record — CommitmentScheme.gen (CommitmentScheme.mk r) = r.gen.

                        It is what carries the right-hand side of an X.apply_simp (which is an CommitmentScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.

                        structure GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.Structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                        The record of the fields of a module of type CommitmentScheme: the fields gen, commit, verify, one per moduletype field, each of that field's own module type.

                        CommitmentScheme.mk turns such a record into a CommitmentScheme, CommitmentScheme.structure turns a CommitmentScheme back into one.

                        Instances For
                          noncomputable def GaudisCrypt.EC.CommitmentProtocol.CommitmentScheme.gen.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                          What is derivable about the accessor CommitmentScheme.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

                          • CommitmentScheme.gen.utilities.accessorModule : CommitmentScheme →ₘ … — the accessor as a module, a projection being a module morphism;
                          • CommitmentScheme.gen.utilities.apply_simp — Module.app CommitmentScheme.gen.utilities.accessorModule m = CommitmentScheme.gen m: applying that module is the accessor;
                          • CommitmentScheme.gen.utilities.expression_eq — the same at the level of expressions: (CommitmentScheme.gen m).expression = (CommitmentScheme.gen.utilities.proj m.expression).reduce.
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[implicit_reducible]
                            instance GaudisCrypt.EC.CommitmentProtocol.instIsModuleCommitmentScheme {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                            The IsModule CommitmentScheme instance: CommitmentScheme is a module type, with representation CommitmentScheme.typeRep.

                            It is what lets the name CommitmentScheme stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module CommitmentScheme.typeRep would do on its own but CommitmentScheme, a plain (non-reducible) def, would not.

                            Equations
                            theorem GaudisCrypt.EC.CommitmentProtocol.Correctness.main.procedure.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (holeArgs✝ : (HoleSigs.cons (procsig () → value) (HoleSigs.cons (procsig (value, message) → commitment × openingkey) (HoleSigs.cons (procsig (value, message, commitment, openingkey) → Bool) HoleSigs.empty))).Instantiation) :
                            procedure.instantiate holeArgs✝ = proc (m : message) : Bool { var x : value, c : commitment, d : openingkey, b : Bool; x <- call (holeArgs✝.lookup HoleIndex.zero) (); c, d <- call (holeArgs✝.lookup HoleIndex.zero.succ) (§x, §m); b <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ) (§x, §m, §c, §d); return §b }

                            Instantiating the holes of Correctness.main.procedure with a tuple holeArgs of procedures: the body of proc main as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.

                            Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [Correctness.main.procedure.apply_simp]).

                            @[simp]
                            theorem GaudisCrypt.EC.CommitmentProtocol.Correctness.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) :

                            @[simp]: applying Correctness to a tuple of its single parameter S — the record of its procedures Correctness.main, each applied to the parameters it uses.

                            This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Correctness.main.apply_simp to fill that procedure's holes.

                            @[simp]
                            theorem GaudisCrypt.EC.CommitmentProtocol.Correctness.main.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) :

                            @[simp]: applying Correctness.main to the parameters proc main uses (S) is Module.proc (Correctness.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.

                            noncomputable def GaudisCrypt.EC.CommitmentProtocol.Correctness {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                            The module declared by module Correctness, abstracted over its single parameter S, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.

                            Applied to such a tuple it is the record of its procedures Correctness.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Correctness.apply_simp says.

                            Equations
                            Instances For
                              noncomputable def GaudisCrypt.EC.CommitmentProtocol.Correctness.main {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                              proc main of module Correctness as a module, abstracted over the module parameters it uses (S, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                              Apply it with the @[simp] lemma Correctness.main.apply_simp, which fills the holes of Correctness.main.procedure with the callees the body called.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                noncomputable def GaudisCrypt.EC.CommitmentProtocol.Correctness.main.procedure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                proctype (message) → Bool uses (() → value, (value, message) → commitment × openingkey, (value, message, commitment, openingkey) → Bool)

                                The body of proc main of module Correctness, as a procedure of its own: the 3 calls it makes to module parameters (S) are its holes, in the order the body makes them.

                                A hole stands for a call whose callee is not known here — a module parameter is supplied only when the module is applied — so the body is a ProcedureWithHoles, to be instantiated (see Correctness.main.procedure.apply_simp) rather than run. Use Correctness.main for this procedure as a module.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def GaudisCrypt.EC.CommitmentProtocol.Unhider.typeRep {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                  The ModuleTypeRep underlying Unhider, the module type declared by moduletype Unhider: the right-nested product of its 2 field types, in declaration order.

                                  Unhider is by definition Module Unhider.typeRep.

                                  Equations
                                  Instances For
                                    @[implicit_reducible]
                                    instance GaudisCrypt.EC.CommitmentProtocol.instIsModuleUnhider {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                    The IsModule Unhider instance: Unhider is a module type, with representation Unhider.typeRep.

                                    It is what lets the name Unhider stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Unhider.typeRep would do on its own but Unhider, a plain (non-reducible) def, would not.

                                    Equations
                                    noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                    The record of a module's fields: Unhider.structure m is Unhider.Structure.mk applied to Unhider.choose, Unhider.guess of m.

                                    Inverse of Unhider.mk (Unhider.mk_destruct, Unhider.destruct_mk).

                                    Equations
                                    Instances For
                                      noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.choose.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                      What is derivable about the accessor Unhider.choose, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

                                      • Unhider.choose.utilities.accessorModule : Unhider →ₘ … — the accessor as a module, a projection being a module morphism;
                                      • Unhider.choose.utilities.apply_simp — Module.app Unhider.choose.utilities.accessorModule m = Unhider.choose m: applying that module is the accessor;
                                      • Unhider.choose.utilities.expression_eq — the same at the level of expressions: (Unhider.choose m).expression = (Unhider.choose.utilities.proj m.expression).reduce.
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.choose {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                        Unhider → procmod (value) → (message × message)

                                        The field choose of a module of type Unhider: the projection onto component 0 of the right-nested tuple Unhider.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

                                        Unhider.choose.mk_simp reads this field back off a module built by Unhider.mk; Unhider.choose.utilities has the accessor as a module, and the lemmas about it.

                                        Its parameters are named x, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem GaudisCrypt.EC.CommitmentProtocol.Unhider.destruct_mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theModule✝ : Unhider) :
                                          mk theModule✝.structure = theModule✝

                                          @[simp]: Unhider.mk (Unhider.structure m) = m — rebuilding a module from its own fields gives that module back.

                                          @[simp]
                                          theorem GaudisCrypt.EC.CommitmentProtocol.Unhider.guess.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                                          (mk theRecord✝).guess = theRecord✝.guess

                                          @[simp]: reading the field guess back off a module built from a record — Unhider.guess (Unhider.mk r) = r.guess.

                                          It is what carries the right-hand side of an X.apply_simp (which is an Unhider.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.guess.apply_simp.

                                          @[simp]
                                          theorem GaudisCrypt.EC.CommitmentProtocol.Unhider.choose.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                                          (mk theRecord✝).choose = theRecord✝.choose

                                          @[simp]: reading the field choose back off a module built from a record — Unhider.choose (Unhider.mk r) = r.choose.

                                          It is what carries the right-hand side of an X.apply_simp (which is an Unhider.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.choose.apply_simp.

                                          @[simp]
                                          theorem GaudisCrypt.EC.CommitmentProtocol.Unhider.mk_destruct {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                                          (mk theRecord✝).structure = theRecord✝

                                          @[simp]: Unhider.structure (Unhider.mk r) = r — destructing a module built from a record gives that record back.

                                          @[reducible]
                                          noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                          Builds a module of type Unhider from the record Unhider.Structure of its fields, as a right-nested Module.pair'. @[reducible].

                                          Inverse of Unhider.structure (Unhider.mk_destruct, Unhider.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Unhider.choose.mk_simp, Unhider.guess.mk_simp.

                                          Equations
                                          Instances For
                                            noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.guess.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                            What is derivable about the accessor Unhider.guess, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

                                            • Unhider.guess.utilities.accessorModule : Unhider →ₘ … — the accessor as a module, a projection being a module morphism;
                                            • Unhider.guess.utilities.apply_simp — Module.app Unhider.guess.utilities.accessorModule m = Unhider.guess m: applying that module is the accessor;
                                            • Unhider.guess.utilities.expression_eq — the same at the level of expressions: (Unhider.guess m).expression = (Unhider.guess.utilities.proj m.expression).reduce.
                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              noncomputable def GaudisCrypt.EC.CommitmentProtocol.Unhider.guess {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                              The field guess of a module of type Unhider: the projection onto component 1 of the right-nested tuple Unhider.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

                                              Unhider.guess.mk_simp reads this field back off a module built by Unhider.mk; Unhider.guess.utilities has the accessor as a module, and the lemmas about it.

                                              Its parameters are named c, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).

                                              Equations
                                              Instances For
                                                def GaudisCrypt.EC.CommitmentProtocol.Unhider {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                The module type declared by moduletype Unhider, with fields choose, guess: the type Module Unhider.typeRep of modules that are a right-nested tuple of the field types.

                                                Build one from a record of its fields with Unhider.mk, read a single field off one with the accessors Unhider.choose, Unhider.guess, and get the whole record back with Unhider.structure.

                                                Equations
                                                Instances For
                                                  structure GaudisCrypt.EC.CommitmentProtocol.Unhider.Structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                  The record of the fields of a module of type Unhider: the fields choose, guess, one per moduletype field, each of that field's own module type.

                                                  Unhider.mk turns such a record into a Unhider, Unhider.structure turns a Unhider back into one.

                                                  Instances For
                                                    noncomputable def GaudisCrypt.EC.CommitmentProtocol.HidingExperiment {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                    The module declared by module HidingExperiment, abstracted over its 2 parameters S, U, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.

                                                    Applied to such a tuple it is the record of its procedures HidingExperiment.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma HidingExperiment.apply_simp says.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      theorem GaudisCrypt.EC.CommitmentProtocol.HidingExperiment.main.procedure.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (holeArgs✝ : (HoleSigs.cons (procsig () → value) (HoleSigs.cons (procsig (value) → message × message) (HoleSigs.cons (procsig (value, message) → commitment × openingkey) (HoleSigs.cons (procsig (commitment) → Bool) HoleSigs.empty)))).Instantiation) :
                                                      procedure.instantiate holeArgs✝ = proc () : Bool { var x : value, m0 : message, m1 : message, b : Bool, c : commitment, d : openingkey, b' : Bool; x <- call (holeArgs✝.lookup HoleIndex.zero) (); m0, m1 <- call (holeArgs✝.lookup HoleIndex.zero.succ) (§x); b <$ dbool; c, d <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ) (§x, if §b = true then §m1 else §m0); b' <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ.succ) (§c); return decide (§b = §b') }

                                                      Instantiating the holes of HidingExperiment.main.procedure with a tuple holeArgs of procedures: the body of proc main as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.

                                                      Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [HidingExperiment.main.procedure.apply_simp]).

                                                      @[simp]
                                                      theorem GaudisCrypt.EC.CommitmentProtocol.HidingExperiment.main.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) (U : Unhider) :

                                                      @[simp]: applying HidingExperiment.main to the parameters proc main uses (S, U) is Module.proc (HidingExperiment.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.

                                                      @[simp]
                                                      theorem GaudisCrypt.EC.CommitmentProtocol.HidingExperiment.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) (U : Unhider) :

                                                      @[simp]: applying HidingExperiment to a tuple of its 2 parameters S, U — the record of its procedures HidingExperiment.main, each applied to the parameters it uses.

                                                      This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with HidingExperiment.main.apply_simp to fill that procedure's holes.

                                                      noncomputable def GaudisCrypt.EC.CommitmentProtocol.HidingExperiment.main.procedure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                                      proctype () → Bool uses (() → value, (value) → message × message, (value, message) → commitment × openingkey, (commitment) → Bool)

                                                      The body of proc main of module HidingExperiment, as a procedure of its own: the 4 calls it makes to module parameters (S, U) are its holes, in the order the body makes them.

                                                      A hole stands for a call whose callee is not known here — a module parameter is supplied only when the module is applied — so the body is a ProcedureWithHoles, to be instantiated (see HidingExperiment.main.procedure.apply_simp) rather than run. Use HidingExperiment.main for this procedure as a module.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        noncomputable def GaudisCrypt.EC.CommitmentProtocol.HidingExperiment.main {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                        proc main of module HidingExperiment as a module, abstracted over the module parameters it uses (S, U, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                                                        Apply it with the @[simp] lemma HidingExperiment.main.apply_simp, which fills the holes of HidingExperiment.main.procedure with the callees the body called.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          @[simp]
                                                          theorem GaudisCrypt.EC.CommitmentProtocol.Binder.mk_destruct {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                                                          (mk theRecord✝).structure = theRecord✝

                                                          @[simp]: Binder.structure (Binder.mk r) = r — destructing a module built from a record gives that record back.

                                                          @[simp]
                                                          theorem GaudisCrypt.EC.CommitmentProtocol.Binder.bind.mk_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theRecord✝ : Structure) :
                                                          (mk theRecord✝).bind = theRecord✝.bind

                                                          @[simp]: reading the field bind back off a module built from a record — Binder.bind (Binder.mk r) = r.bind.

                                                          It is what carries the right-hand side of an X.apply_simp (which is an Binder.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.bind.apply_simp.

                                                          noncomputable def GaudisCrypt.EC.CommitmentProtocol.Binder.structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                          The record of a module's fields: Binder.structure m is Binder.Structure.mk applied to Binder.bind of m.

                                                          Inverse of Binder.mk (Binder.mk_destruct, Binder.destruct_mk).

                                                          Equations
                                                          Instances For
                                                            @[reducible]
                                                            noncomputable def GaudisCrypt.EC.CommitmentProtocol.Binder.mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                            Builds a module of type Binder from the record Binder.Structure of its fields, as a right-nested Module.pair'. @[reducible].

                                                            Inverse of Binder.structure (Binder.mk_destruct, Binder.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Binder.bind.mk_simp.

                                                            Equations
                                                            Instances For
                                                              structure GaudisCrypt.EC.CommitmentProtocol.Binder.Structure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                              The record of the fields of a module of type Binder: the fields bind, one per moduletype field, each of that field's own module type.

                                                              Binder.mk turns such a record into a Binder, Binder.structure turns a Binder back into one.

                                                              Instances For
                                                                @[implicit_reducible]
                                                                instance GaudisCrypt.EC.CommitmentProtocol.instIsModuleBinder {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                                The IsModule Binder instance: Binder is a module type, with representation Binder.typeRep.

                                                                It is what lets the name Binder stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Binder.typeRep would do on its own but Binder, a plain (non-reducible) def, would not.

                                                                Equations
                                                                @[simp]
                                                                theorem GaudisCrypt.EC.CommitmentProtocol.Binder.destruct_mk {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (theModule✝ : Binder) :
                                                                mk theModule✝.structure = theModule✝

                                                                @[simp]: Binder.mk (Binder.structure m) = m — rebuilding a module from its own fields gives that module back.

                                                                noncomputable def GaudisCrypt.EC.CommitmentProtocol.Binder.bind {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                                                Binder → procmod (value) → (commitment × message × openingkey × message × openingkey)

                                                                The field bind of a module of type Binder: the projection onto component 0 of the right-nested tuple Binder.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].

                                                                Binder.bind.mk_simp reads this field back off a module built by Binder.mk; Binder.bind.utilities has the accessor as a module, and the lemmas about it.

                                                                Its parameters are named x, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).

                                                                Equations
                                                                • theModule✝.bind = theModule✝
                                                                Instances For
                                                                  def GaudisCrypt.EC.CommitmentProtocol.Binder {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                                  The module type declared by moduletype Binder, with fields bind: the type Module Binder.typeRep of modules that are a right-nested tuple of the field types.

                                                                  Build one from a record of its fields with Binder.mk, read a single field off one with the accessors Binder.bind, and get the whole record back with Binder.structure.

                                                                  Equations
                                                                  Instances For
                                                                    def GaudisCrypt.EC.CommitmentProtocol.Binder.typeRep {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                                    The ModuleTypeRep underlying Binder, the module type declared by moduletype Binder: the right-nested product of its 1 field types, in declaration order.

                                                                    Binder is by definition Module Binder.typeRep.

                                                                    Equations
                                                                    Instances For
                                                                      noncomputable def GaudisCrypt.EC.CommitmentProtocol.Binder.bind.utilities {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                                                      ModuleTypeUtilities Binder (procmod (value) → (commitment × message × openingkey × message × openingkey)) bind

                                                                      What is derivable about the accessor Binder.bind, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):

                                                                      • Binder.bind.utilities.accessorModule : Binder →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                      • Binder.bind.utilities.apply_simp — Module.app Binder.bind.utilities.accessorModule m = Binder.bind m: applying that module is the accessor;
                                                                      • Binder.bind.utilities.expression_eq — the same at the level of expressions: (Binder.bind m).expression = (Binder.bind.utilities.proj m.expression).reduce.
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        noncomputable def GaudisCrypt.EC.CommitmentProtocol.BindingExperiment.main {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                                        proc main of module BindingExperiment as a module, abstracted over the module parameters it uses (S, B, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                                                                        Apply it with the @[simp] lemma BindingExperiment.main.apply_simp, which fills the holes of BindingExperiment.main.procedure with the callees the body called.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          noncomputable def GaudisCrypt.EC.CommitmentProtocol.BindingExperiment.main.procedure {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :
                                                                          proctype () → Bool uses (() → value, (value) → commitment × message × openingkey × message × openingkey, (value, message, commitment, openingkey) → Bool)

                                                                          The body of proc main of module BindingExperiment, as a procedure of its own: the 3 calls it makes to module parameters (S, B) are its holes, in the order the body makes them.

                                                                          A hole stands for a call whose callee is not known here — a module parameter is supplied only when the module is applied — so the body is a ProcedureWithHoles, to be instantiated (see BindingExperiment.main.procedure.apply_simp) rather than run. Use BindingExperiment.main for this procedure as a module.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            theorem GaudisCrypt.EC.CommitmentProtocol.BindingExperiment.main.procedure.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (holeArgs✝ : (HoleSigs.cons (procsig () → value) (HoleSigs.cons (procsig (value) → commitment × message × openingkey × message × openingkey) (HoleSigs.cons (procsig (value, message, commitment, openingkey) → Bool) HoleSigs.empty))).Instantiation) :
                                                                            procedure.instantiate holeArgs✝ = proc () : Bool { var x : value, c : commitment, m : message, d : openingkey, m' : message, d' : openingkey, v : Bool, v' : Bool; x <- call (holeArgs✝.lookup HoleIndex.zero) (); c, m, d, m', d' <- call (holeArgs✝.lookup HoleIndex.zero.succ) (§x); v <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ) (§x, §m, §c, §d); v' <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ) (§x, §m', §c, §d'); return §v && §v' && decide (§m ≠ §m') }

                                                                            Instantiating the holes of BindingExperiment.main.procedure with a tuple holeArgs of procedures: the body of proc main as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.

                                                                            Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [BindingExperiment.main.procedure.apply_simp]).

                                                                            @[simp]
                                                                            theorem GaudisCrypt.EC.CommitmentProtocol.BindingExperiment.main.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) (B : Binder) :

                                                                            @[simp]: applying BindingExperiment.main to the parameters proc main uses (S, B) is Module.proc (BindingExperiment.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.

                                                                            noncomputable def GaudisCrypt.EC.CommitmentProtocol.BindingExperiment {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] :

                                                                            The module declared by module BindingExperiment, abstracted over its 2 parameters S, B, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.

                                                                            Applied to such a tuple it is the record of its procedures BindingExperiment.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma BindingExperiment.apply_simp says.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              @[simp]
                                                                              theorem GaudisCrypt.EC.CommitmentProtocol.BindingExperiment.apply_simp {value message commitment openingkey : Type} [_gaudiParam0 : Inhabited value] [_gaudiParam1 : Inhabited message] [_gaudiParam2 : Inhabited commitment] [_gaudiParam3 : Inhabited openingkey] [_gaudiParam4 : DecidableEq message] [_gaudiParam5 : Params value message commitment openingkey] (S : CommitmentScheme) (B : Binder) :

                                                                              @[simp]: applying BindingExperiment to a tuple of its 2 parameters S, B — the record of its procedures BindingExperiment.main, each applied to the parameters it uses.

                                                                              This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with BindingExperiment.main.apply_simp to fill that procedure's holes.