Documentation

GaudisCrypt.Lib.EC.PRP

EasyCrypt's pseudo-random permutations (theories/crypto/PRP.eca) #

The abstract type D and the operator dD are Lean parameters, so EasyCrypt's clone PRP with type D <- … and clone RP with op dD <- … are applications. So are the module variables (RP.m, RP.mi): a clone declares its own global_vars and passes them. The sub-theories StrongPRP and RP are namespaces. Only what ported developments use is here (WeakPRP is not).

noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.f (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :
PRP D → procmod (D) → D

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

PRP.f.mk_simp reads this field back off a module built by PRP.mk; PRP.f.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.PRP.StrongPRP.PRP.mk_destruct (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
    «structure» D (mk D theRecord✝) = theRecord✝

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

    noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.fi.utilities (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

    • PRP.fi.utilities.accessorModule : PRP →ₘ … — the accessor as a module, a projection being a module morphism;
    • PRP.fi.utilities.apply_simp — Module.app PRP.fi.utilities.accessorModule m = PRP.fi m: applying that module is the accessor;
    • PRP.fi.utilities.expression_eq — the same at the level of expressions: (PRP.fi m).expression = (PRP.fi.utilities.proj m.expression).reduce.
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def GaudisCrypt.EC.PRP.StrongPRP.PRP.typeRep (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

      PRP is by definition Module PRP.typeRep.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[implicit_reducible]
        instance GaudisCrypt.EC.PRP.StrongPRP.instIsModulePRP (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

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

        Equations
        noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.init (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

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

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

        Equations
        Instances For
          @[reducible]
          noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.mk (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :
          Structure D → PRP D

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

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

          Equations
          Instances For
            @[simp]
            theorem GaudisCrypt.EC.PRP.StrongPRP.PRP.fi.mk_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
            fi D (mk D theRecord✝) = theRecord✝.fi

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

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

            structure GaudisCrypt.EC.PRP.StrongPRP.PRP.Structure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

            The record of the fields of a module of type PRP: the fields init, f, fi, one per moduletype field, each of that field's own module type.

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

            Instances For
              noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.init.utilities (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

              • PRP.init.utilities.accessorModule : PRP →ₘ … — the accessor as a module, a projection being a module morphism;
              • PRP.init.utilities.apply_simp — Module.app PRP.init.utilities.accessorModule m = PRP.init m: applying that module is the accessor;
              • PRP.init.utilities.expression_eq — the same at the level of expressions: (PRP.init m).expression = (PRP.init.utilities.proj m.expression).reduce.
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.structure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :
                PRP D → Structure D

                The record of a module's fields: PRP.structure m is PRP.Structure.mk applied to PRP.init, PRP.f, PRP.fi of m.

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

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def GaudisCrypt.EC.PRP.StrongPRP.PRP (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                  Build one from a record of its fields with PRP.mk, read a single field off one with the accessors PRP.init, PRP.f, PRP.fi, and get the whole record back with PRP.structure.

                  Equations
                  Instances For
                    @[simp]
                    theorem GaudisCrypt.EC.PRP.StrongPRP.PRP.f.mk_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
                    f D (mk D theRecord✝) = theRecord✝.f

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

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

                    noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.f.utilities (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                    • PRP.f.utilities.accessorModule : PRP →ₘ … — the accessor as a module, a projection being a module morphism;
                    • PRP.f.utilities.apply_simp — Module.app PRP.f.utilities.accessorModule m = PRP.f m: applying that module is the accessor;
                    • PRP.f.utilities.expression_eq — the same at the level of expressions: (PRP.f m).expression = (PRP.f.utilities.proj m.expression).reduce.
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      noncomputable def GaudisCrypt.EC.PRP.StrongPRP.PRP.fi (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :
                      PRP D → procmod (D) → D

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

                      PRP.fi.mk_simp reads this field back off a module built by PRP.mk; PRP.fi.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.PRP.StrongPRP.PRP.destruct_mk (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theModule✝ : PRP D) :
                        mk D («structure» D theModule✝) = theModule✝

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

                        @[simp]
                        theorem GaudisCrypt.EC.PRP.StrongPRP.PRP.init.mk_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
                        init D (mk D theRecord✝) = theRecord✝.init

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

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

                        noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.structure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

                        The record of a module's fields: SPRP_Oracles.structure m is SPRP_Oracles.Structure.mk applied to SPRP_Oracles.f, SPRP_Oracles.fi of m.

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

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

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

                          Equations
                          Instances For
                            @[reducible]
                            noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.mk (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

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

                            Equations
                            Instances For
                              @[simp]
                              theorem GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.fi.mk_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
                              fi D (mk D theRecord✝) = theRecord✝.fi

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

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

                              noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.fi (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                              SPRP_Oracles.fi.mk_simp reads this field back off a module built by SPRP_Oracles.mk; SPRP_Oracles.fi.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
                                noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.f (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                SPRP_Oracles.f.mk_simp reads this field back off a module built by SPRP_Oracles.mk; SPRP_Oracles.f.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
                                  @[implicit_reducible]

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

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

                                  Equations
                                  noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.f.utilities (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                  • SPRP_Oracles.f.utilities.accessorModule : SPRP_Oracles →ₘ … — the accessor as a module, a projection being a module morphism;
                                  • SPRP_Oracles.f.utilities.apply_simp — Module.app SPRP_Oracles.f.utilities.accessorModule m = SPRP_Oracles.f m: applying that module is the accessor;
                                  • SPRP_Oracles.f.utilities.expression_eq — the same at the level of expressions: (SPRP_Oracles.f m).expression = (SPRP_Oracles.f.utilities.proj m.expression).reduce.
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    structure GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.Structure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

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

                                    Instances For
                                      @[simp]
                                      theorem GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.f.mk_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
                                      f D (mk D theRecord✝) = theRecord✝.f

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

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

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

                                      SPRP_Oracles is by definition Module SPRP_Oracles.typeRep.

                                      Equations
                                      Instances For
                                        noncomputable def GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.fi.utilities (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                        • SPRP_Oracles.fi.utilities.accessorModule : SPRP_Oracles →ₘ … — the accessor as a module, a projection being a module morphism;
                                        • SPRP_Oracles.fi.utilities.apply_simp — Module.app SPRP_Oracles.fi.utilities.accessorModule m = SPRP_Oracles.fi m: applying that module is the accessor;
                                        • SPRP_Oracles.fi.utilities.expression_eq — the same at the level of expressions: (SPRP_Oracles.fi m).expression = (SPRP_Oracles.fi.utilities.proj m.expression).reduce.
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[simp]
                                          theorem GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.destruct_mk (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theModule✝ : SPRP_Oracles D) :
                                          mk D («structure» D theModule✝) = theModule✝

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

                                          @[simp]
                                          theorem GaudisCrypt.EC.PRP.StrongPRP.SPRP_Oracles.mk_destruct (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (theRecord✝ : Structure D) :
                                          «structure» D (mk D theRecord✝) = theRecord✝

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

                                          theorem GaudisCrypt.EC.PRP.StrongPRP.IND.main.procedure.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (holeArgs✝ : (HoleSigs.cons (procsig () → Unit) (HoleSigs.cons (procsig () → Bool) HoleSigs.empty)).Instantiation) :
                                          (procedure D).instantiate holeArgs✝ = proc () : Bool { var b : Bool; call (holeArgs✝.lookup HoleIndex.zero) (); b <- call (holeArgs✝.lookup HoleIndex.zero.succ) (); return §b }

                                          Instantiating the holes of IND.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 [IND.main.procedure.apply_simp]).

                                          noncomputable def GaudisCrypt.EC.PRP.StrongPRP.IND.main (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                          Apply it with the @[simp] lemma IND.main.apply_simp, which fills the holes of IND.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.PRP.StrongPRP.IND.main.procedure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              @[simp]
                                              theorem GaudisCrypt.EC.PRP.StrongPRP.IND.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (P : PRP D) (Dist : Distinguisher D) :
                                              IND(D, P, Dist).main = Module.app (Module.app (main D) P) Dist

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

                                              noncomputable def GaudisCrypt.EC.PRP.StrongPRP.IND (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] :

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

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                @[simp]
                                                theorem GaudisCrypt.EC.PRP.StrongPRP.IND.main.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (P : PRP D) (Dist : Distinguisher D) :

                                                @[simp]: applying IND.main to the parameters proc main uses (P, Dist) is Module.proc (IND.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.

                                                The module variables RP.m, RP.mi are parameters: each clone declares its own (EasyCrypt's clone RP as Perm has Perm.m, Perm.mi), so two clones never share them.

                                                @[simp]
                                                theorem GaudisCrypt.EC.PRP.RP.RP.f.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :
                                                f D dD m mi = Module.proc (procedure D dD m mi)

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

                                                noncomputable def GaudisCrypt.EC.PRP.RP.RP.fi.procedure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

                                                The body of proc fi of module RP, 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 RP.fi.procedure.apply_simp) rather than run. Use RP.fi 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.PRP.RP.RP.fi (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

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

                                                  Equations
                                                  Instances For
                                                    theorem GaudisCrypt.EC.PRP.RP.RP.init.procedure.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                    (procedure D dD m mi).instantiate holeArgs✝ = proc () : Unit { m <- FMap.empty; mi <- FMap.empty; return () }

                                                    Instantiating the holes of RP.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 [RP.init.procedure.apply_simp]).

                                                    @[simp]
                                                    theorem GaudisCrypt.EC.PRP.RP.RP.init.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :
                                                    init D dD m mi = Module.proc (procedure D dD m mi)

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

                                                    noncomputable def GaudisCrypt.EC.PRP.RP.RP (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

                                                    The module declared by module RP: the record of its procedures RP.init, RP.f, RP.fi.

                                                    The declaration has no parameter list, so no procedure of it can call one either and the module is not a function — it is the plain record itself, and there is no RP.apply_simp to apply it with.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      theorem GaudisCrypt.EC.PRP.RP.RP.fi.procedure.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                      (procedure D dD m mi).instantiate holeArgs✝ = proc (y : D) : D { var x : D; if (!decide ((§mi).dom §y)) { x <$ dexcepted dD (§mi).rng; mi <- (§mi).set §y §x; m <- (§m).set §x §y; } return oget ((§mi).get §y) }

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

                                                      noncomputable def GaudisCrypt.EC.PRP.RP.RP.init.procedure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

                                                      The body of proc init of module RP, 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 RP.init.procedure.apply_simp) rather than run. Use RP.init for this procedure as a module.

                                                      Equations
                                                      Instances For
                                                        noncomputable def GaudisCrypt.EC.PRP.RP.RP.init (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

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

                                                        Equations
                                                        Instances For
                                                          theorem GaudisCrypt.EC.PRP.RP.RP.f.procedure.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) (holeArgs✝ : HoleSigs.empty.Instantiation) :
                                                          (procedure D dD m mi).instantiate holeArgs✝ = proc (x : D) : D { var y : D; if (!decide ((§m).dom §x)) { y <$ dexcepted dD (§m).rng; m <- (§m).set §x §y; mi <- (§mi).set §y §x; } return oget ((§m).get §x) }

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

                                                          noncomputable def GaudisCrypt.EC.PRP.RP.RP.f.procedure (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

                                                          The body of proc f of module RP, 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 RP.f.procedure.apply_simp) rather than run. Use RP.f 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.PRP.RP.RP.f (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :

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

                                                            Equations
                                                            Instances For
                                                              @[simp]
                                                              theorem GaudisCrypt.EC.PRP.RP.RP.fi.apply_simp (D : Type) [_gaudiParam0 : DecidableEq D] [_gaudiParam1 : Inhabited D] (dD : SubProbability D) (m mi : Lens (FMap D D) VariableAssignment) :
                                                              fi D dD m mi = Module.proc (procedure D dD m mi)

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

                                                              theorem GaudisCrypt.EC.PRP.RP.f_ll {D : Type} [DecidableEq D] [Inhabited D] {dD : SubProbability D} {m mi : Lens (FMap D D) VariableAssignment} (dD_ll : is_lossless dD) (dD_fu : is_full dD) :

                                                              lemma f_ll: is_full dD => islossless RP.f (with the theory's axiom dD_ll): RP.f samples from dD \ rng RP.m, which keeps a value when RP.m misses the queried key (endo_dom_rng).

                                                              theorem GaudisCrypt.EC.PRP.RP.fi_ll {D : Type} [DecidableEq D] [Inhabited D] {dD : SubProbability D} {m mi : Lens (FMap D D) VariableAssignment} (dD_ll : is_lossless dD) (dD_fu : is_full dD) :

                                                              lemma fi_ll: is_full dD => islossless RP.fi (as f_ll).