Documentation

GaudisCrypt.Examples.SHA3.IndifRO_is_secure

A construction indifferentiable from a random oracle is secure — the EC-fidelity port #

(EasyCrypt proof/IndifRO_is_secure.ec)

Collision, preimage and second-preimage resistance of FM(C, P) (a construction C over a primitive P), from the resistance of the random oracle (SecureRO) and the indifferentiability of C(P) from it, up to bound.

Translation (as the pilot SecureRO's):

The file's operators and their axioms: sampleto, limit, bound, bound_counter, increase_counter. The types are outParams: a clone is an instance.

Instances
    @[reducible, inline]
    noncomputable abbrev GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.RO {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
    Indiff0.FUNCTIONALITY

    EC's module RO : FUNCTIONALITY = { proc init = SRO.RO.RO.init proc f = SRO.RO.RO.get }: its aliases are SRO.RO's procedures themselves.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.set.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
      procedure.instantiate holeArgs✝ = proc (a : f_in, b : f_out) : Unit { skip; return () }

      Instantiating the holes of FInit.set.procedure with a tuple holeArgs of procedures: the body of proc set 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 [FInit.set.procedure.apply_simp]).

      noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.set {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

      proc set of module FInit as a module: Module.proc FInit.set.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.set.apply_simp says exactly that.

      Equations
      Instances For
        noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.sample.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

        The body of proc sample of module FInit, as a procedure of its own: it calls no module parameter, so it has no holes.

        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 FInit.sample.procedure.apply_simp) rather than run. Use FInit.sample for this procedure as a module.

        Equations
        Instances For
          theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.init.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
          procedure.instantiate holeArgs✝ = proc () : Unit { skip; return () }

          Instantiating the holes of FInit.init.procedure with a tuple holeArgs of procedures: the body of proc init 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 [FInit.init.procedure.apply_simp]).

          noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.init {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

          proc init of module FInit as a module: Module.proc FInit.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.init.apply_simp says exactly that.

          Equations
          Instances For
            theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.rem.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
            procedure.instantiate holeArgs✝ = proc (a : f_in) : Unit { skip; return () }

            Instantiating the holes of FInit.rem.procedure with a tuple holeArgs of procedures: the body of proc rem 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 [FInit.rem.procedure.apply_simp]).

            noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.set.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

            The body of proc set of module FInit, as a procedure of its own: it calls no module parameter, so it has no holes.

            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 FInit.set.procedure.apply_simp) rather than run. Use FInit.set for this procedure as a module.

            Equations
            Instances For
              noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.get {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
              Module.Arr Indiff0.DFUNCTIONALITY (procmod (f_in) → f_out)

              proc get = …; of module FInit: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no FInit.get.procedure: applied with the @[simp] lemma FInit.get.apply_simp, it is the callee.

              Equations
              Instances For
                @[simp]
                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.get.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : Indiff0.DFUNCTIONALITY) :

                @[simp]: the alias FInit.get, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.rem {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                proc rem of module FInit as a module: Module.proc FInit.rem.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.rem.apply_simp says exactly that.

                Equations
                Instances For
                  noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.rem.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                  The body of proc rem of module FInit, as a procedure of its own: it calls no module parameter, so it has no holes.

                  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 FInit.rem.procedure.apply_simp) rather than run. Use FInit.rem for this procedure as a module.

                  Equations
                  Instances For
                    @[simp]
                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.rem.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                    @[simp]: FInit.rem = Module.proc FInit.rem.procedure — true by definition, proc rem using no module parameter and so having no holes to fill.

                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.sample.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
                    procedure.instantiate holeArgs✝ = proc (a : f_in) : Unit { skip; return () }

                    Instantiating the holes of FInit.sample.procedure with a tuple holeArgs of procedures: the body of proc sample 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 [FInit.sample.procedure.apply_simp]).

                    @[simp]
                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.sample.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                    @[simp]: FInit.sample = Module.proc FInit.sample.procedure — true by definition, proc sample using no module parameter and so having no holes to fill.

                    @[simp]
                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.init.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                    @[simp]: FInit.init = Module.proc FInit.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.

                    noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                    Module.Arr Indiff0.DFUNCTIONALITY (EC.PROM.FullRO.RO_T f_in f_out)

                    The module declared by module FInit, abstracted over its single parameter F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.

                    Applied to such a tuple it is the record of its procedures FInit.init, FInit.get, FInit.set, FInit.rem, FInit.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FInit.apply_simp says.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.init.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                      The body of proc init of module FInit, as a procedure of its own: it calls no module parameter, so it has no holes.

                      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 FInit.init.procedure.apply_simp) rather than run. Use FInit.init for this procedure as a module.

                      Equations
                      Instances For
                        @[simp]
                        theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : Indiff0.DFUNCTIONALITY) :
                        Module.app FInit F = EC.PROM.FullRO.RO_T.mk f_in f_out { init := init, get := Module.app get F, set := set, rem := rem, sample := sample }

                        @[simp]: applying FInit to a tuple of its single parameter F — the record of its procedures FInit.init, FInit.get, FInit.set, FInit.rem, FInit.sample, 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 FInit.init.apply_simp, FInit.get.apply_simp, FInit.set.apply_simp, FInit.rem.apply_simp, FInit.sample.apply_simp to fill that procedure's holes.

                        @[simp]
                        theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.set.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                        @[simp]: FInit.set = Module.proc FInit.set.procedure — true by definition, proc set using no module parameter and so having no holes to fill.

                        noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.sample {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                        proc sample of module FInit as a module: Module.proc FInit.sample.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.sample.apply_simp says exactly that.

                        Equations
                        Instances For
                          noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF.f {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                          Module.Arr SRO.RO_T (procmod (f_in) → f_out)

                          proc f = …; of module GetF: an alias, EasyCrypt's proc f = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no GetF.f.procedure: applied with the @[simp] lemma GetF.f.apply_simp, it is the callee.

                          Equations
                          Instances For
                            noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF.init {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :

                            proc init = …; of module GetF: an alias, EasyCrypt's proc init = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no GetF.init.procedure: applied with the @[simp] lemma GetF.init.apply_simp, it is the callee.

                            Equations
                            Instances For
                              @[simp]
                              theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF.init.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (F : SRO.RO_T) :

                              @[simp]: the alias GetF.init, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                              noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                              Module.Arr SRO.RO_T Indiff0.FUNCTIONALITY

                              The module declared by module GetF, abstracted over its single parameter F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.

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

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                @[simp]
                                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF.f.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (F : SRO.RO_T) :

                                @[simp]: the alias GetF.f, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                @[simp]
                                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.GetF.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (F : SRO.RO_T) :

                                @[simp]: applying GetF to a tuple of its single parameter F — the record of its procedures GetF.init, GetF.f, 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 GetF.init.apply_simp, GetF.f.apply_simp to fill that procedure's holes.

                                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.init.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : (HoleSigs.cons (procsig () → Unit) (HoleSigs.cons (procsig () → Unit) HoleSigs.empty)).Instantiation) :
                                procedure.instantiate holeArgs✝ = proc () : Unit { call (holeArgs✝.lookup HoleIndex.zero) (); call (holeArgs✝.lookup HoleIndex.zero.succ) (); return () }

                                Instantiating the holes of SInit.init.procedure with a tuple holeArgs of procedures: the body of proc init 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 [SInit.init.procedure.apply_simp]).

                                noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.init.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                The body of proc init of module SInit, as a procedure of its own: the 2 calls it makes to module parameters (F, 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 SInit.init.procedure.apply_simp) rather than run. Use SInit.init for this procedure as a module.

                                Equations
                                Instances For
                                  @[simp]
                                  theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.init.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) (S : Indiff0.SIMULATOR) :

                                  @[simp]: applying SInit.init to the parameters proc init uses (F, S) is Module.proc (SInit.init.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.SHA3.Pilot.IndifRO_is_secure.SInit.rem.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) :

                                  @[simp]: the alias SInit.rem, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                  noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                  Module.Arr (Module.Prod SRO.RO_T Indiff0.SIMULATOR) (EC.PROM.FullRO.RO_T f_in f_out)

                                  The module declared by module SInit, abstracted over its 2 parameters F, S, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.

                                  Applied to such a tuple it is the record of its procedures SInit.init, SInit.get, SInit.set, SInit.rem, SInit.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SInit.apply_simp says.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    @[simp]
                                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) (S : Indiff0.SIMULATOR) :
                                    Module.app SInit (Module.pair F S) = EC.PROM.FullRO.RO_T.mk f_in f_out { init := Module.app (Module.app init F) S, get := Module.app get F, set := Module.app set F, rem := Module.app rem F, sample := Module.app sample F }

                                    @[simp]: applying SInit to a tuple of its 2 parameters F, S — the record of its procedures SInit.init, SInit.get, SInit.set, SInit.rem, SInit.sample, 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 SInit.init.apply_simp, SInit.get.apply_simp, SInit.set.apply_simp, SInit.rem.apply_simp, SInit.sample.apply_simp to fill that procedure's holes.

                                    @[simp]
                                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.get.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) :

                                    @[simp]: the alias SInit.get, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                    noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.init {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                    Module.Arr SRO.RO_T (Module.Arr Indiff0.SIMULATOR (procmod () → Unit))

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

                                    Apply it with the @[simp] lemma SInit.init.apply_simp, which fills the holes of SInit.init.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.SHA3.Pilot.IndifRO_is_secure.SInit.get {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                      Module.Arr SRO.RO_T (procmod (f_in) → f_out)

                                      proc get = …; of module SInit: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.get.procedure: applied with the @[simp] lemma SInit.get.apply_simp, it is the callee.

                                      Equations
                                      Instances For
                                        @[simp]
                                        theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.sample.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) :

                                        @[simp]: the alias SInit.sample, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                        noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.sample {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                        proc sample = …; of module SInit: an alias, EasyCrypt's proc sample = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.sample.procedure: applied with the @[simp] lemma SInit.sample.apply_simp, it is the callee.

                                        Equations
                                        Instances For
                                          noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.rem {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                          proc rem = …; of module SInit: an alias, EasyCrypt's proc rem = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.rem.procedure: applied with the @[simp] lemma SInit.rem.apply_simp, it is the callee.

                                          Equations
                                          Instances For
                                            @[simp]
                                            theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.set.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (F : SRO.RO_T) :

                                            @[simp]: the alias SInit.set, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                            noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.SInit.set {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                            proc set = …; of module SInit: an alias, EasyCrypt's proc set = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.set.procedure: applied with the @[simp] lemma SInit.set.apply_simp, it is the callee.

                                            Equations
                                            Instances For
                                              noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                              Module.Arr (Module.Prod Indiff0.CONSTRUCTION Indiff0.PRIMITIVE) (EC.PROM.FullRO.RO_T f_in f_out)

                                              The module declared by module FM, abstracted over its 2 parameters C, P, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.

                                              Applied to such a tuple it is the record of its procedures FM.init, FM.get, FM.set, FM.rem, FM.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FM.apply_simp says.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[simp]
                                                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.set.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                @[simp]: FM.set = Module.proc FM.set.procedure — true by definition, proc set using no module parameter and so having no holes to fill.

                                                @[simp]
                                                theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.init.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (C : Indiff0.CONSTRUCTION) (P : Indiff0.PRIMITIVE) :

                                                @[simp]: applying FM.init to the parameters proc init uses (C, P) is Module.proc (FM.init.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.SHA3.Pilot.IndifRO_is_secure.FM.sample.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                @[simp]: FM.sample = Module.proc FM.sample.procedure — true by definition, proc sample using no module parameter and so having no holes to fill.

                                                noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.rem {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                proc rem of module FM as a module: Module.proc FM.rem.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.rem.apply_simp says exactly that.

                                                Equations
                                                Instances For
                                                  theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.rem.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                  procedure.instantiate holeArgs✝ = proc (a : f_in) : Unit { skip; return () }

                                                  Instantiating the holes of FM.rem.procedure with a tuple holeArgs of procedures: the body of proc rem 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 [FM.rem.procedure.apply_simp]).

                                                  @[simp]
                                                  theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.get.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (C : Indiff0.CONSTRUCTION) (P : Indiff0.PRIMITIVE) :
                                                  Module.app (Module.app get C) P = C(P).f

                                                  @[simp]: the alias FM.get, applied to the parameters its callee uses (C, P), is its callee, as written in the declaration.

                                                  theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.sample.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                  procedure.instantiate holeArgs✝ = proc (a : f_in) : Unit { skip; return () }

                                                  Instantiating the holes of FM.sample.procedure with a tuple holeArgs of procedures: the body of proc sample 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 [FM.sample.procedure.apply_simp]).

                                                  theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.set.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                  procedure.instantiate holeArgs✝ = proc (a : f_in, b : f_out) : Unit { skip; return () }

                                                  Instantiating the holes of FM.set.procedure with a tuple holeArgs of procedures: the body of proc set 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 [FM.set.procedure.apply_simp]).

                                                  noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.init {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                                  Module.Arr Indiff0.CONSTRUCTION (Module.Arr Indiff0.PRIMITIVE (procmod () → Unit))

                                                  proc init of module FM as a module, abstracted over the module parameters it uses (C, P, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                                                  Apply it with the @[simp] lemma FM.init.apply_simp, which fills the holes of FM.init.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.SHA3.Pilot.IndifRO_is_secure.FM.get {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :
                                                    Module.Arr Indiff0.CONSTRUCTION (Module.Arr Indiff0.PRIMITIVE (procmod (f_in) → f_out))

                                                    proc get = …; of module FM: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (C, P, in declaration order). It has no FM.get.procedure: applied with the @[simp] lemma FM.get.apply_simp, it is the callee.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.set {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                      proc set of module FM as a module: Module.proc FM.set.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.set.apply_simp says exactly that.

                                                      Equations
                                                      Instances For
                                                        theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.init.procedure.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (holeArgs✝ : (HoleSigs.cons (procsig () → Unit) (HoleSigs.cons (procsig () → Unit) HoleSigs.empty)).Instantiation) :
                                                        procedure.instantiate holeArgs✝ = proc () : Unit { call (holeArgs✝.lookup HoleIndex.zero) (); call (holeArgs✝.lookup HoleIndex.zero.succ) (); return () }

                                                        Instantiating the holes of FM.init.procedure with a tuple holeArgs of procedures: the body of proc init 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 [FM.init.procedure.apply_simp]).

                                                        @[simp]
                                                        theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] (C : Indiff0.CONSTRUCTION) (P : Indiff0.PRIMITIVE) :
                                                        Module.app FM (Module.pair C P) = EC.PROM.FullRO.RO_T.mk f_in f_out { init := Module.app (Module.app init C) P, get := Module.app (Module.app get C) P, set := set, rem := rem, sample := sample }

                                                        @[simp]: applying FM to a tuple of its 2 parameters C, P — the record of its procedures FM.init, FM.get, FM.set, FM.rem, FM.sample, 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 FM.init.apply_simp, FM.get.apply_simp, FM.set.apply_simp, FM.rem.apply_simp, FM.sample.apply_simp to fill that procedure's holes.

                                                        noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.rem.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                        The body of proc rem of module FM, as a procedure of its own: it calls no module parameter, so it has no holes.

                                                        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 FM.rem.procedure.apply_simp) rather than run. Use FM.rem for this procedure as a module.

                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.rem.apply_simp {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                          @[simp]: FM.rem = Module.proc FM.rem.procedure — true by definition, proc rem using no module parameter and so having no holes to fill.

                                                          noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.sample {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                          proc sample of module FM as a module: Module.proc FM.sample.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.sample.apply_simp says exactly that.

                                                          Equations
                                                          Instances For
                                                            noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.init.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                            The body of proc init of module FM, as a procedure of its own: the 2 calls it makes to module parameters (C, P) 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 FM.init.procedure.apply_simp) rather than run. Use FM.init for this procedure as a module.

                                                            Equations
                                                            Instances For
                                                              noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.set.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                              The body of proc set of module FM, as a procedure of its own: it calls no module parameter, so it has no holes.

                                                              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 FM.set.procedure.apply_simp) rather than run. Use FM.set for this procedure as a module.

                                                              Equations
                                                              Instances For
                                                                noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.sample.procedure {block f_in f_out : Type} [_gaudiParam0 : Inhabited block] [_gaudiParam1 : DecidableEq f_in] [_gaudiParam2 : Inhabited f_in] [_gaudiParam3 : Inhabited f_out] [_gaudiParam4 : Params block f_in f_out] :

                                                                The body of proc sample of module FM, as a procedure of its own: it calls no module parameter, so it has no holes.

                                                                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 FM.sample.procedure.apply_simp) rather than run. Use FM.sample for this procedure as a module.

                                                                Equations
                                                                Instances For
                                                                  noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DColl.distinguish {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvCollision) :
                                                                  Module.Arr Indiff0.DFUNCTIONALITY (procmod () → Bool)

                                                                  proc distinguish = …; of module DColl: an alias, EasyCrypt's proc distinguish = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no DColl.distinguish.procedure: applied with the @[simp] lemma DColl.distinguish.apply_simp, it is the callee.

                                                                  Equations
                                                                  • One or more equations did not get rendered due to their size.
                                                                  Instances For
                                                                    @[simp]
                                                                    theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DColl.distinguish.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvCollision) (F : Indiff0.DFUNCTIONALITY) :
                                                                    Module.app (distinguish A) F = SRO.Collision(A, FInit(F)).main

                                                                    @[simp]: the alias DColl.distinguish, applied to the parameters its callee uses (F), is its callee, as written in the declaration.

                                                                    noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DColl {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvCollision) :
                                                                    Module.Arr (Module.Prod Indiff0.DFUNCTIONALITY Indiff0.DPRIMITIVE) (procmod () → Bool)

                                                                    The module declared by module DColl, abstracted over its 2 parameters F, P, 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 DColl.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DColl.apply_simp says.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      @[simp]
                                                                      theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DColl.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvCollision) (F : Indiff0.DFUNCTIONALITY) (P : Indiff0.DPRIMITIVE) :
                                                                      DColl(A, F, P).distinguish = Module.app (distinguish A) F

                                                                      @[simp]: applying DColl to a tuple of its 2 parameters F, P — the record of its procedures DColl.distinguish, 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 DColl.distinguish.apply_simp to fill that procedure's holes.

                                                                      The section Collision #

                                                                      theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.coll_resistant_if_indifferentiable {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvCollision) [Module.Declared A (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ SRO.RO.m.footprint ⊔ SRO.FRO.m.footprint)] (C : Indiff0.CONSTRUCTION) [Module.Declared C ((FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint)] (P : Indiff0.PRIMITIVE) [Module.Declared P ((FVP.fvP C).glob ⊔ (FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint)] [Countable f_in] (m : VariableAssignment) :
                                                                      (∃ (S : Indiff0.SIMULATOR) (_ : Module.Declared S (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ (FVP.fvP A).glob)), (∀ (F : Indiff0.FUNCTIONALITY), F.f.procedure.IsLossless → S(F).init.procedure.IsLossless) ∧ |Pr[ (Indiff0.GReal C P (DColl A)) () @ &m : §res = true ] - Pr[ (Indiff0.GIdeal RO S (DColl A)) () @ &m : §res = true ]| ≤ bound) → Pr[ SRO.Collision(A, FM(C, P)).main () @ &m : §res = true ] ≤ bound + ↑(limit * (limit - 1) + 2) / 2 * EC.mu1 sampleto default

                                                                      EC's coll_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder}) (P <: PRIMITIVE{-C, -A, -Bounder}) &m.

                                                                      instance GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.instIsGlobalVarHMk {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                                                                      DPre.h.IsGlobalVar (VariableName.mk "GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.h" f_out)
                                                                      noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.h {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                                                                      Equations
                                                                      Instances For
                                                                        noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.distinguish {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) :
                                                                        Module.Arr Indiff0.DFUNCTIONALITY (procmod () → Bool)

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

                                                                        Apply it with the @[simp] lemma DPre.distinguish.apply_simp, which fills the holes of DPre.distinguish.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.SHA3.Pilot.IndifRO_is_secure.DPre.distinguish.procedure {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) :

                                                                          The body of proc distinguish of module DPre, as a procedure of its own: the one call it makes to a module parameter (F) is its single hole.

                                                                          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 DPre.distinguish.procedure.apply_simp) rather than run. Use DPre.distinguish for this procedure as a module.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            @[simp]
                                                                            theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) (F : Indiff0.DFUNCTIONALITY) (P : Indiff0.DPRIMITIVE) :
                                                                            DPre(A, F, P).distinguish = Module.app (distinguish A) F

                                                                            @[simp]: applying DPre to a tuple of its 2 parameters F, P — the record of its procedures DPre.distinguish, 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 DPre.distinguish.apply_simp to fill that procedure's holes.

                                                                            noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) :
                                                                            Module.Arr (Module.Prod Indiff0.DFUNCTIONALITY Indiff0.DPRIMITIVE) (procmod () → Bool)

                                                                            The module declared by module DPre, abstracted over its 2 parameters F, P, 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 DPre.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DPre.apply_simp says.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              @[simp]
                                                                              theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.distinguish.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) (F : Indiff0.DFUNCTIONALITY) :

                                                                              @[simp]: applying DPre.distinguish to the parameters proc distinguish uses (F) is Module.proc (DPre.distinguish.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.

                                                                              theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.distinguish.procedure.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) (holeArgs✝ : (HoleSigs.cons (procsig (f_out) → Bool) HoleSigs.empty).Instantiation) :
                                                                              (procedure A).instantiate holeArgs✝ = proc () : Bool { var b : Bool; b <- call (holeArgs✝.lookup HoleIndex.zero) (§h); return §b }

                                                                              Instantiating the holes of DPre.distinguish.procedure with a tuple holeArgs of procedures: the body of proc distinguish 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 [DPre.distinguish.procedure.apply_simp]).

                                                                              The section Preimage #

                                                                              theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.preimage_resistant_if_indifferentiable {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvPreimage) [Module.Declared A (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ SRO.RO.m.footprint ⊔ SRO.FRO.m.footprint ⊔ DPre.h.footprint)] (C : Indiff0.CONSTRUCTION) [Module.Declared C ((FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ DPre.h.footprint)] (P : Indiff0.PRIMITIVE) [Module.Declared P ((FVP.fvP C).glob ⊔ (FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ DPre.h.footprint)] [Countable f_in] (m : VariableAssignment) (hash : f_out) :
                                                                              DPre.h.get m = hash → (∃ (S : Indiff0.SIMULATOR) (_ : Module.Declared S (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ (FVP.fvP A).glob ⊔ DPre.h.footprint)), (∀ (F : Indiff0.FUNCTIONALITY), F.f.procedure.IsLossless → S(F).init.procedure.IsLossless) ∧ |Pr[ (Indiff0.GReal C P (DPre A)) () @ &m : §res = true ] - Pr[ (Indiff0.GIdeal RO S (DPre A)) () @ &m : §res = true ]| ≤ bound) → Pr[ SRO.Preimage(A, FM(C, P)).main (hash) @ &m : §res = true ] ≤ bound + ↑(limit + 1) * EC.mu1 sampleto hash

                                                                              EC's preimage_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder, -DPre}) (P <: PRIMITIVE{-C, -A, -Bounder, -DPre}) &m hash.

                                                                              noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.m2 {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                                                                              Equations
                                                                              Instances For
                                                                                instance GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.instIsGlobalVarM2Mk {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] :
                                                                                D2Pre.m2.IsGlobalVar (VariableName.mk "GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.m2" f_in)
                                                                                noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) :
                                                                                Module.Arr (Module.Prod Indiff0.DFUNCTIONALITY Indiff0.DPRIMITIVE) (procmod () → Bool)

                                                                                The module declared by module D2Pre, abstracted over its 2 parameters F, P, 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 D2Pre.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma D2Pre.apply_simp says.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.distinguish.procedure {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) :

                                                                                  The body of proc distinguish of module D2Pre, as a procedure of its own: the one call it makes to a module parameter (F) is its single hole.

                                                                                  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 D2Pre.distinguish.procedure.apply_simp) rather than run. Use D2Pre.distinguish for this procedure as a module.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    noncomputable def GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.distinguish {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) :
                                                                                    Module.Arr Indiff0.DFUNCTIONALITY (procmod () → Bool)

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

                                                                                    Apply it with the @[simp] lemma D2Pre.distinguish.apply_simp, which fills the holes of D2Pre.distinguish.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.SHA3.Pilot.IndifRO_is_secure.D2Pre.distinguish.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) (F : Indiff0.DFUNCTIONALITY) :
                                                                                      Module.app (distinguish A) F = Module.proc ((procedure A).instantiate SRO.SecondPreimage(A, FInit(F)).main.procedure)

                                                                                      @[simp]: applying D2Pre.distinguish to the parameters proc distinguish uses (F) is Module.proc (D2Pre.distinguish.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.SHA3.Pilot.IndifRO_is_secure.D2Pre.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) (F : Indiff0.DFUNCTIONALITY) (P : Indiff0.DPRIMITIVE) :
                                                                                      D2Pre(A, F, P).distinguish = Module.app (distinguish A) F

                                                                                      @[simp]: applying D2Pre to a tuple of its 2 parameters F, P — the record of its procedures D2Pre.distinguish, 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 D2Pre.distinguish.apply_simp to fill that procedure's holes.

                                                                                      theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.distinguish.procedure.apply_simp {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) (holeArgs✝ : (HoleSigs.cons (procsig (f_in) → Bool) HoleSigs.empty).Instantiation) :
                                                                                      (procedure A).instantiate holeArgs✝ = proc () : Bool { var b : Bool; b <- call (holeArgs✝.lookup HoleIndex.zero) (§m2); return §b }

                                                                                      Instantiating the holes of D2Pre.distinguish.procedure with a tuple holeArgs of procedures: the body of proc distinguish 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 [D2Pre.distinguish.procedure.apply_simp]).

                                                                                      The section SecondPreimage #

                                                                                      theorem GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.second_preimage_resistant_if_indifferentiable {block f_in f_out : Type} [Inhabited block] [DecidableEq f_in] [Inhabited f_in] [Inhabited f_out] [Params block f_in f_out] (A : SRO.AdvSecondPreimage) [Module.Declared A (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ SRO.RO.m.footprint ⊔ SRO.FRO.m.footprint ⊔ D2Pre.m2.footprint ⊔ SRO.SecondPreimage.SecondPreimage2.m2.footprint ⊔ SRO.SecondPreimage.D1.m1.footprint)] (C : Indiff0.CONSTRUCTION) [Module.Declared C ((FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ D2Pre.m2.footprint)] (P : Indiff0.PRIMITIVE) [Module.Declared P ((FVP.fvP C).glob ⊔ (FVP.fvP A).glob ⊔ SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ D2Pre.m2.footprint)] [Countable f_in] [Countable f_out] (m : VariableAssignment) (mess : f_in) :
                                                                                      D2Pre.m2.get m = mess → (∃ (S : Indiff0.SIMULATOR) (_ : Module.Declared S (SRO.Bounder.bounder.footprint ⊔ SRO.Counter.c.footprint ⊔ (FVP.fvP A).glob ⊔ D2Pre.m2.footprint)), (∀ (F : Indiff0.FUNCTIONALITY), F.f.procedure.IsLossless → S(F).init.procedure.IsLossless) ∧ |Pr[ (Indiff0.GReal C P (D2Pre A)) () @ &m : §res = true ] - Pr[ (Indiff0.GIdeal RO S (D2Pre A)) () @ &m : §res = true ]| ≤ bound) → Pr[ SRO.SecondPreimage(A, FM(C, P)).main (mess) @ &m : §res = true ] ≤ bound + ↑(limit + 1) * EC.mu1 sampleto default

                                                                                      EC's second_preimage_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder, -D2Pre}) (P <: PRIMITIVE{-C, -A, -Bounder, -D2Pre}) &m mess.