Documentation

GaudisCrypt.Examples.SHA3.OptionIndifferentiability

Indifferentiability with failing oracles (EasyCrypt proof/OptionIndifferentiability.eca) — #

EC-fidelity port

Indifferentiability.eca with procedures that may fail: the primitive and the functionality return options, and every name gets an O prefix. The translation is that of Indifferentiability.lean: the theory's types are outParams of the (field-less) class Params p f_in f_out, so a clone is clone OptionIndifferentiability as OIndif with type p <- … (Syntax/Clone.lean); EC's subtyping of module types is module_subtype; EC's call restrictions ({ P.f }) are not part of a module type (exception E2 of the port), they are the ext of declare module's representability.

Declarations of the first port #

Definitions and plain lemmas of the first port of this file (2026-10/11) that the proofs below use; its program-logic proofs are gone.

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

OPRIMITIVE is by definition Module OPRIMITIVE.typeRep.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

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

    • OPRIMITIVE.init.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
    • OPRIMITIVE.init.utilities.apply_simp — Module.app OPRIMITIVE.init.utilities.accessorModule m = OPRIMITIVE.init m: applying that module is the accessor;
    • OPRIMITIVE.init.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.init m).expression = (OPRIMITIVE.init.utilities.proj m.expression).reduce.
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.init (p f_in f_out : Type) :
      OPRIMITIVE p f_in f_out → procmod () → Unit

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

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

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

      Equations
      Instances For
        @[simp]
        theorem GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.init.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
        init p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.init

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

        It is what carries the right-hand side of an X.apply_simp (which is an OPRIMITIVE.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.SHA3.OptionIndifferentiability.OPRIMITIVE.structure (p f_in f_out : Type) :
        OPRIMITIVE p f_in f_out → Structure p f_in f_out

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

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

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

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

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

          Equations
          Instances For
            @[simp]
            theorem GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.destruct_mk (p f_in f_out : Type) (theModule✝ : OPRIMITIVE p f_in f_out) :
            mk p f_in f_out («structure» p f_in f_out theModule✝) = theModule✝

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

            @[reducible]
            noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.mk (p f_in f_out : Type) :
            Structure p f_in f_out → OPRIMITIVE p f_in f_out

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

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

            Equations
            Instances For
              @[implicit_reducible]

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

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

              Equations
              noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.fi (p f_in f_out : Type) :
              OPRIMITIVE p f_in f_out → procmod (p) → Option p

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

              OPRIMITIVE.fi.mk_simp reads this field back off a module built by OPRIMITIVE.mk; OPRIMITIVE.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

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

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

                Instances For
                  @[simp]
                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.f.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                  f p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.f

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

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

                  @[simp]
                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.fi.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                  fi p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.fi

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

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

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

                  • OPRIMITIVE.fi.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                  • OPRIMITIVE.fi.utilities.apply_simp — Module.app OPRIMITIVE.fi.utilities.accessorModule m = OPRIMITIVE.fi m: applying that module is the accessor;
                  • OPRIMITIVE.fi.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.fi m).expression = (OPRIMITIVE.fi.utilities.proj m.expression).reduce.
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.f (p f_in f_out : Type) :
                    OPRIMITIVE p f_in f_out → procmod (p) → Option p

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

                    OPRIMITIVE.f.mk_simp reads this field back off a module built by OPRIMITIVE.mk; OPRIMITIVE.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.SHA3.OptionIndifferentiability.OPRIMITIVE.mk_destruct (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                      «structure» p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝

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

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

                      • OPRIMITIVE.f.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                      • OPRIMITIVE.f.utilities.apply_simp — Module.app OPRIMITIVE.f.utilities.accessorModule m = OPRIMITIVE.f m: applying that module is the accessor;
                      • OPRIMITIVE.f.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.f m).expression = (OPRIMITIVE.f.utilities.proj m.expression).reduce.
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[reducible]
                        noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.mk (p f_in f_out : Type) :
                        Structure p f_in f_out → ODPRIMITIVE p f_in f_out

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

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

                        Equations
                        Instances For

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

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

                          Instances For

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

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

                            Equations
                            Instances For
                              @[simp]
                              theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.mk_destruct (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                              «structure» p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝

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

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

                              • ODPRIMITIVE.f.utilities.accessorModule : ODPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                              • ODPRIMITIVE.f.utilities.apply_simp — Module.app ODPRIMITIVE.f.utilities.accessorModule m = ODPRIMITIVE.f m: applying that module is the accessor;
                              • ODPRIMITIVE.f.utilities.expression_eq — the same at the level of expressions: (ODPRIMITIVE.f m).expression = (ODPRIMITIVE.f.utilities.proj m.expression).reduce.
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.structure (p f_in f_out : Type) :
                                ODPRIMITIVE p f_in f_out → Structure p f_in f_out

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

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

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  @[implicit_reducible]

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

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

                                  Equations
                                  @[simp]
                                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.f.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                  f p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.f

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

                                  It is what carries the right-hand side of an X.apply_simp (which is an ODPRIMITIVE.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 ODPRIMITIVE, the module type declared by moduletype ODPRIMITIVE: the right-nested product of its 2 field types, in declaration order.

                                  ODPRIMITIVE is by definition Module ODPRIMITIVE.typeRep.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.fi (p f_in f_out : Type) :
                                    ODPRIMITIVE p f_in f_out → procmod (p) → Option p

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

                                    ODPRIMITIVE.fi.mk_simp reads this field back off a module built by ODPRIMITIVE.mk; ODPRIMITIVE.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

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

                                      • ODPRIMITIVE.fi.utilities.accessorModule : ODPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                      • ODPRIMITIVE.fi.utilities.apply_simp — Module.app ODPRIMITIVE.fi.utilities.accessorModule m = ODPRIMITIVE.fi m: applying that module is the accessor;
                                      • ODPRIMITIVE.fi.utilities.expression_eq — the same at the level of expressions: (ODPRIMITIVE.fi m).expression = (ODPRIMITIVE.fi.utilities.proj m.expression).reduce.
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        @[simp]
                                        theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODPRIMITIVE.fi.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                        fi p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.fi

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

                                        It is what carries the right-hand side of an X.apply_simp (which is an ODPRIMITIVE.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.SHA3.OptionIndifferentiability.ODPRIMITIVE.f (p f_in f_out : Type) :
                                        ODPRIMITIVE p f_in f_out → procmod (p) → Option p

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

                                        ODPRIMITIVE.f.mk_simp reads this field back off a module built by ODPRIMITIVE.mk; ODPRIMITIVE.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.SHA3.OptionIndifferentiability.ODPRIMITIVE.destruct_mk (p f_in f_out : Type) (theModule✝ : ODPRIMITIVE p f_in f_out) :
                                          mk p f_in f_out («structure» p f_in f_out theModule✝) = theModule✝

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

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

                                          • OFUNCTIONALITY.init.utilities.accessorModule : OFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                          • OFUNCTIONALITY.init.utilities.apply_simp — Module.app OFUNCTIONALITY.init.utilities.accessorModule m = OFUNCTIONALITY.init m: applying that module is the accessor;
                                          • OFUNCTIONALITY.init.utilities.expression_eq — the same at the level of expressions: (OFUNCTIONALITY.init m).expression = (OFUNCTIONALITY.init.utilities.proj m.expression).reduce.
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

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

                                            OFUNCTIONALITY is by definition Module OFUNCTIONALITY.typeRep.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.structure (p f_in f_out : Type) :
                                              OFUNCTIONALITY p f_in f_out → Structure p f_in f_out

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

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

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

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

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

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

                                                Equations
                                                Instances For
                                                  @[simp]
                                                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.destruct_mk (p f_in f_out : Type) (theModule✝ : OFUNCTIONALITY p f_in f_out) :
                                                  mk p f_in f_out («structure» p f_in f_out theModule✝) = theModule✝

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

                                                  @[simp]
                                                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.init.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                                  init p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.init

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

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

                                                  @[simp]
                                                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.mk_destruct (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                                  «structure» p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝

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

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

                                                  • OFUNCTIONALITY.f.utilities.accessorModule : OFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                                  • OFUNCTIONALITY.f.utilities.apply_simp — Module.app OFUNCTIONALITY.f.utilities.accessorModule m = OFUNCTIONALITY.f m: applying that module is the accessor;
                                                  • OFUNCTIONALITY.f.utilities.expression_eq — the same at the level of expressions: (OFUNCTIONALITY.f m).expression = (OFUNCTIONALITY.f.utilities.proj m.expression).reduce.
                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    @[reducible]
                                                    noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.mk (p f_in f_out : Type) :
                                                    Structure p f_in f_out → OFUNCTIONALITY p f_in f_out

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

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

                                                    Equations
                                                    Instances For
                                                      @[simp]
                                                      theorem GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.f.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                                      f p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.f

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

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

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

                                                      OFUNCTIONALITY.f.mk_simp reads this field back off a module built by OFUNCTIONALITY.mk; OFUNCTIONALITY.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

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

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

                                                        Equations
                                                        Instances For

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

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

                                                          Instances For
                                                            @[implicit_reducible]

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

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

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.

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

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

                                                            Instances For
                                                              @[simp]
                                                              theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODFUNCTIONALITY.f.mk_simp (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                                              f p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝.f

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

                                                              It is what carries the right-hand side of an X.apply_simp (which is an ODFUNCTIONALITY.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 ODFUNCTIONALITY, the module type declared by moduletype ODFUNCTIONALITY: the right-nested product of its 1 field types, in declaration order.

                                                              ODFUNCTIONALITY is by definition Module ODFUNCTIONALITY.typeRep.

                                                              Equations
                                                              Instances For

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

                                                                ODFUNCTIONALITY.f.mk_simp reads this field back off a module built by ODFUNCTIONALITY.mk; ODFUNCTIONALITY.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
                                                                  @[reducible]
                                                                  noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.ODFUNCTIONALITY.mk (p f_in f_out : Type) :
                                                                  Structure p f_in f_out → ODFUNCTIONALITY p f_in f_out

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

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

                                                                  Equations
                                                                  Instances For
                                                                    @[simp]
                                                                    theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODFUNCTIONALITY.destruct_mk (p f_in f_out : Type) (theModule✝ : ODFUNCTIONALITY p f_in f_out) :
                                                                    mk p f_in f_out («structure» p f_in f_out theModule✝) = theModule✝

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

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

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

                                                                    Equations
                                                                    Instances For

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

                                                                      • ODFUNCTIONALITY.f.utilities.accessorModule : ODFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                      • ODFUNCTIONALITY.f.utilities.apply_simp — Module.app ODFUNCTIONALITY.f.utilities.accessorModule m = ODFUNCTIONALITY.f m: applying that module is the accessor;
                                                                      • ODFUNCTIONALITY.f.utilities.expression_eq — the same at the level of expressions: (ODFUNCTIONALITY.f m).expression = (ODFUNCTIONALITY.f.utilities.proj m.expression).reduce.
                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        @[simp]
                                                                        theorem GaudisCrypt.SHA3.OptionIndifferentiability.ODFUNCTIONALITY.mk_destruct (p f_in f_out : Type) (theRecord✝ : Structure p f_in f_out) :
                                                                        «structure» p f_in f_out (mk p f_in f_out theRecord✝) = theRecord✝

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

                                                                        @[implicit_reducible]

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

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

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        @[reducible, inline]

                                                                        EasyCrypt's module type OCONSTRUCTION (P : ODPRIMITIVE) = { proc init() : unit {} proc f(x : f_in): f_out option { P.f } }: a construction takes a primitive and builds a functionality.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          @[reducible, inline]

                                                                          EasyCrypt's module type OSIMULATOR (F : ODFUNCTIONALITY) = { proc init() : unit { } proc f(x : p) : p option { F.f } proc fi(x : p) : p option { F.f } }: a simulator takes a functionality and simulates the primitive.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            @[reducible, inline]

                                                                            EasyCrypt's module type ODISTINGUISHER (F : ODFUNCTIONALITY, P : ODPRIMITIVE) = { proc distinguish(): bool }: a distinguisher gets oracle access to a primitive and a functionality and returns its guess.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OFUNCTIONALITY.view (p f_in f_out : Type) (F : OFUNCTIONALITY p f_in f_out) :
                                                                              ODFUNCTIONALITY p f_in f_out

                                                                              The distinguisher's view of a functionality (EasyCrypt's subtyping OFUNCTIONALITY <: ODFUNCTIONALITY).

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OPRIMITIVE.view (p f_in f_out : Type) (P : OPRIMITIVE p f_in f_out) :
                                                                                ODPRIMITIVE p f_in f_out

                                                                                The distinguisher's view of a primitive (EasyCrypt's subtyping OPRIMITIVE <: ODPRIMITIVE).

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  @[simp]
                                                                                  theorem GaudisCrypt.SHA3.OptionIndifferentiability.OIndif.main.apply_simp (p f_in f_out : Type) (F : OFUNCTIONALITY p f_in f_out) (P : OPRIMITIVE p f_in f_out) (D : ODISTINGUISHER p f_in f_out) :
                                                                                  Module.app (Module.app (Module.app (main p f_in f_out) F) P) D = Module.proc ((procedure p f_in f_out).instantiate ((OPRIMITIVE.init p f_in f_out P).procedure, (OFUNCTIONALITY.init p f_in f_out F).procedure, (Module.app D (Module.pair (ODFUNCTIONALITY.mk p f_in f_out { f := OFUNCTIONALITY.f p f_in f_out F }) (ODPRIMITIVE.mk p f_in f_out { f := OPRIMITIVE.f p f_in f_out P, fi := OPRIMITIVE.fi p f_in f_out P }))).procedure))

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

                                                                                  noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OIndif.main (p f_in f_out : Type) :
                                                                                  Module.Arr (OFUNCTIONALITY p f_in f_out) (Module.Arr (OPRIMITIVE p f_in f_out) (Module.Arr (ODISTINGUISHER p f_in f_out) (procmod () → Bool)))

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

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

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    @[simp]
                                                                                    theorem GaudisCrypt.SHA3.OptionIndifferentiability.OIndif.apply_simp (p f_in f_out : Type) (F : OFUNCTIONALITY p f_in f_out) (P : OPRIMITIVE p f_in f_out) (D : ODISTINGUISHER p f_in f_out) :
                                                                                    OIndif(p, f_in, f_out, F, P, D).main = Module.app (Module.app (Module.app (main p f_in f_out) F) P) D

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

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

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OIndif (p f_in f_out : Type) :
                                                                                      Module.Arr (Module.Prod (OFUNCTIONALITY p f_in f_out) (Module.Prod (OPRIMITIVE p f_in f_out) (ODISTINGUISHER p f_in f_out))) (procmod () → Bool)

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

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        theorem GaudisCrypt.SHA3.OptionIndifferentiability.OIndif.main.procedure.apply_simp (p f_in f_out : Type) (holeArgs✝ : (HoleSigs.cons (procsig () → Unit) (HoleSigs.cons (procsig () → Unit) (HoleSigs.cons (procsig () → Bool) HoleSigs.empty))).Instantiation) :
                                                                                        (procedure p f_in f_out).instantiate holeArgs✝ = proc () : Bool { var b : Bool; call (holeArgs✝.lookup HoleIndex.zero) (); call (holeArgs✝.lookup HoleIndex.zero.succ) (); b <- call (holeArgs✝.lookup HoleIndex.zero.succ.succ) (); return §b }

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

                                                                                        noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OGReal (p f_in f_out : Type) (C : OCONSTRUCTION p f_in f_out) (P : OPRIMITIVE p f_in f_out) (D : ODISTINGUISHER p f_in f_out) :

                                                                                        module OGReal(C : OCONSTRUCTION, P : OPRIMITIVE) = OIndif(C(P), P).

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          noncomputable def GaudisCrypt.SHA3.OptionIndifferentiability.OGIdeal (p f_in f_out : Type) (F : OFUNCTIONALITY p f_in f_out) (S : OSIMULATOR p f_in f_out) (D : ODISTINGUISHER p f_in f_out) :

                                                                                          module OGIdeal(F : OFUNCTIONALITY, S : OSIMULATOR) = OIndif(F, S(F)).

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For

                                                                                            EC's type p., type f_in, f_out.: the theory's types (a clone fixes them).

                                                                                              Instances

                                                                                                A primitive: the building block we assume ideal.

                                                                                                noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.init {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

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

                                                                                                Equations
                                                                                                Instances For

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

                                                                                                  • OPRIMITIVE.f.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                  • OPRIMITIVE.f.utilities.apply_simp — Module.app OPRIMITIVE.f.utilities.accessorModule m = OPRIMITIVE.f m: applying that module is the accessor;
                                                                                                  • OPRIMITIVE.f.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.f m).expression = (OPRIMITIVE.f.utilities.proj m.expression).reduce.
                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For
                                                                                                    noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.f {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                    OPRIMITIVE.f.mk_simp reads this field back off a module built by OPRIMITIVE.mk; OPRIMITIVE.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.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.fi.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                      (mk theRecord✝).fi = theRecord✝.fi

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

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

                                                                                                      @[simp]
                                                                                                      theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.destruct_mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theModule✝ : OPRIMITIVE) :
                                                                                                      mk theModule✝.structure = theModule✝

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

                                                                                                      @[implicit_reducible]

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

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

                                                                                                      Equations
                                                                                                      @[simp]
                                                                                                      theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.mk_destruct {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                      (mk theRecord✝).structure = theRecord✝

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

                                                                                                      noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.fi {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                      OPRIMITIVE.fi.mk_simp reads this field back off a module built by OPRIMITIVE.mk; OPRIMITIVE.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.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                        Equations
                                                                                                        • theModule✝.structure = { init := theModule✝.init, f := theModule✝.f, fi := theModule✝.fi }
                                                                                                        Instances For
                                                                                                          def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                          Equations
                                                                                                          Instances For

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

                                                                                                            • OPRIMITIVE.fi.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                            • OPRIMITIVE.fi.utilities.apply_simp — Module.app OPRIMITIVE.fi.utilities.accessorModule m = OPRIMITIVE.fi m: applying that module is the accessor;
                                                                                                            • OPRIMITIVE.fi.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.fi m).expression = (OPRIMITIVE.fi.utilities.proj m.expression).reduce.
                                                                                                            Equations
                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                            Instances For
                                                                                                              @[simp]
                                                                                                              theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.init.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                              (mk theRecord✝).init = theRecord✝.init

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

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

                                                                                                              structure GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.Structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                              Instances For
                                                                                                                @[reducible]
                                                                                                                noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  @[simp]
                                                                                                                  theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OPRIMITIVE.f.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                  (mk theRecord✝).f = theRecord✝.f

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

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

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

                                                                                                                  • OPRIMITIVE.init.utilities.accessorModule : OPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                  • OPRIMITIVE.init.utilities.apply_simp — Module.app OPRIMITIVE.init.utilities.accessorModule m = OPRIMITIVE.init m: applying that module is the accessor;
                                                                                                                  • OPRIMITIVE.init.utilities.expression_eq — the same at the level of expressions: (OPRIMITIVE.init m).expression = (OPRIMITIVE.init.utilities.proj m.expression).reduce.
                                                                                                                  Equations
                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                  Instances For

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

                                                                                                                    OPRIMITIVE is by definition Module OPRIMITIVE.typeRep.

                                                                                                                    Equations
                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                    Instances For
                                                                                                                      def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        @[implicit_reducible]

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

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

                                                                                                                        Equations

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

                                                                                                                        • ODPRIMITIVE.fi.utilities.accessorModule : ODPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                        • ODPRIMITIVE.fi.utilities.apply_simp — Module.app ODPRIMITIVE.fi.utilities.accessorModule m = ODPRIMITIVE.fi m: applying that module is the accessor;
                                                                                                                        • ODPRIMITIVE.fi.utilities.expression_eq — the same at the level of expressions: (ODPRIMITIVE.fi m).expression = (ODPRIMITIVE.fi.utilities.proj m.expression).reduce.
                                                                                                                        Equations
                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                        Instances For

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

                                                                                                                          ODPRIMITIVE is by definition Module ODPRIMITIVE.typeRep.

                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            structure GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.Structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                            Instances For
                                                                                                                              noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.fi {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                                              ODPRIMITIVE.fi.mk_simp reads this field back off a module built by ODPRIMITIVE.mk; ODPRIMITIVE.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
                                                                                                                                @[reducible]
                                                                                                                                noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  @[simp]
                                                                                                                                  theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.fi.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                  (mk theRecord✝).fi = theRecord✝.fi

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

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

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

                                                                                                                                  • ODPRIMITIVE.f.utilities.accessorModule : ODPRIMITIVE →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                                  • ODPRIMITIVE.f.utilities.apply_simp — Module.app ODPRIMITIVE.f.utilities.accessorModule m = ODPRIMITIVE.f m: applying that module is the accessor;
                                                                                                                                  • ODPRIMITIVE.f.utilities.expression_eq — the same at the level of expressions: (ODPRIMITIVE.f m).expression = (ODPRIMITIVE.f.utilities.proj m.expression).reduce.
                                                                                                                                  Equations
                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                  Instances For
                                                                                                                                    noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      @[simp]
                                                                                                                                      theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.destruct_mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theModule✝ : ODPRIMITIVE) :
                                                                                                                                      mk theModule✝.structure = theModule✝

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

                                                                                                                                      @[simp]
                                                                                                                                      theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.f.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                      (mk theRecord✝).f = theRecord✝.f

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

                                                                                                                                      It is what carries the right-hand side of an X.apply_simp (which is an ODPRIMITIVE.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.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.f {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                                                      ODPRIMITIVE.f.mk_simp reads this field back off a module built by ODPRIMITIVE.mk; ODPRIMITIVE.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.SHA3.Pilot.OptionIndifferentiability.ODPRIMITIVE.mk_destruct {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                        (mk theRecord✝).structure = theRecord✝

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

                                                                                                                                        A functionality: the target construction.

                                                                                                                                        @[simp]
                                                                                                                                        theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.mk_destruct {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                        (mk theRecord✝).structure = theRecord✝

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

                                                                                                                                        noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.f {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                                                        OFUNCTIONALITY.f.mk_simp reads this field back off a module built by OFUNCTIONALITY.mk; OFUNCTIONALITY.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

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

                                                                                                                                          OFUNCTIONALITY is by definition Module OFUNCTIONALITY.typeRep.

                                                                                                                                          Equations
                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                          Instances For
                                                                                                                                            @[simp]
                                                                                                                                            theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.init.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                            (mk theRecord✝).init = theRecord✝.init

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

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

                                                                                                                                            @[simp]
                                                                                                                                            theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.f.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                            (mk theRecord✝).f = theRecord✝.f

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

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

                                                                                                                                            @[simp]
                                                                                                                                            theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.destruct_mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theModule✝ : OFUNCTIONALITY) :
                                                                                                                                            mk theModule✝.structure = theModule✝

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

                                                                                                                                            noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                            Equations
                                                                                                                                            Instances For
                                                                                                                                              def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                              Equations
                                                                                                                                              Instances For
                                                                                                                                                @[implicit_reducible]

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

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

                                                                                                                                                Equations
                                                                                                                                                noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.init {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

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

                                                                                                                                                Equations
                                                                                                                                                Instances For

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

                                                                                                                                                  • OFUNCTIONALITY.f.utilities.accessorModule : OFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                                                  • OFUNCTIONALITY.f.utilities.apply_simp — Module.app OFUNCTIONALITY.f.utilities.accessorModule m = OFUNCTIONALITY.f m: applying that module is the accessor;
                                                                                                                                                  • OFUNCTIONALITY.f.utilities.expression_eq — the same at the level of expressions: (OFUNCTIONALITY.f m).expression = (OFUNCTIONALITY.f.utilities.proj m.expression).reduce.
                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For
                                                                                                                                                    structure GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.Structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                    Instances For
                                                                                                                                                      @[reducible]
                                                                                                                                                      noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OFUNCTIONALITY.mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                      Equations
                                                                                                                                                      Instances For

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

                                                                                                                                                        • OFUNCTIONALITY.init.utilities.accessorModule : OFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                                                        • OFUNCTIONALITY.init.utilities.apply_simp — Module.app OFUNCTIONALITY.init.utilities.accessorModule m = OFUNCTIONALITY.init m: applying that module is the accessor;
                                                                                                                                                        • OFUNCTIONALITY.init.utilities.expression_eq — the same at the level of expressions: (OFUNCTIONALITY.init m).expression = (OFUNCTIONALITY.init.utilities.proj m.expression).reduce.
                                                                                                                                                        Equations
                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                        Instances For
                                                                                                                                                          @[simp]
                                                                                                                                                          theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.mk_destruct {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                                          (mk theRecord✝).structure = theRecord✝

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

                                                                                                                                                          noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                          Equations
                                                                                                                                                          Instances For
                                                                                                                                                            @[reducible]
                                                                                                                                                            noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                            Equations
                                                                                                                                                            Instances For
                                                                                                                                                              noncomputable def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.f {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

                                                                                                                                                              ODFUNCTIONALITY.f.mk_simp reads this field back off a module built by ODFUNCTIONALITY.mk; ODFUNCTIONALITY.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
                                                                                                                                                              • theModule✝.f = theModule✝
                                                                                                                                                              Instances For
                                                                                                                                                                @[simp]
                                                                                                                                                                theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.f.mk_simp {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theRecord✝ : Structure) :
                                                                                                                                                                (mk theRecord✝).f = theRecord✝.f

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

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

                                                                                                                                                                @[implicit_reducible]

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

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

                                                                                                                                                                Equations
                                                                                                                                                                @[simp]
                                                                                                                                                                theorem GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.destruct_mk {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] (theModule✝ : ODFUNCTIONALITY) :
                                                                                                                                                                mk theModule✝.structure = theModule✝

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

                                                                                                                                                                def GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                                Equations
                                                                                                                                                                Instances For

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

                                                                                                                                                                  ODFUNCTIONALITY is by definition Module ODFUNCTIONALITY.typeRep.

                                                                                                                                                                  Equations
                                                                                                                                                                  Instances For

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

                                                                                                                                                                    • ODFUNCTIONALITY.f.utilities.accessorModule : ODFUNCTIONALITY →ₘ … — the accessor as a module, a projection being a module morphism;
                                                                                                                                                                    • ODFUNCTIONALITY.f.utilities.apply_simp — Module.app ODFUNCTIONALITY.f.utilities.accessorModule m = ODFUNCTIONALITY.f m: applying that module is the accessor;
                                                                                                                                                                    • ODFUNCTIONALITY.f.utilities.expression_eq — the same at the level of expressions: (ODFUNCTIONALITY.f m).expression = (ODFUNCTIONALITY.f.utilities.proj m.expression).reduce.
                                                                                                                                                                    Equations
                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                    Instances For
                                                                                                                                                                      structure GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.ODFUNCTIONALITY.Structure {p f_in f_out : Type} [_gaudiParam0 : Params p f_in f_out] :

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

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

                                                                                                                                                                      Instances For
                                                                                                                                                                        @[implicit_reducible]

                                                                                                                                                                        An OPRIMITIVE is an ODPRIMITIVE (its f, fi).

                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        @[implicit_reducible]

                                                                                                                                                                        An OFUNCTIONALITY is an ODFUNCTIONALITY (its f).

                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        @[reducible, inline]

                                                                                                                                                                        EC's module type OCONSTRUCTION (P : ODPRIMITIVE) = { proc init() : unit {} proc f(x : f_in): f_out option { P.f } }.

                                                                                                                                                                        Equations
                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                        Instances For
                                                                                                                                                                          @[reducible, inline]

                                                                                                                                                                          EC's module type OSIMULATOR (F : ODFUNCTIONALITY) = { proc init() : unit { } proc f(x : p) : p option { F.f } proc fi(x : p) : p option { F.f } }.

                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For
                                                                                                                                                                            @[reducible, inline]

                                                                                                                                                                            EC's module type ODISTINGUISHER (F : ODFUNCTIONALITY, P : ODPRIMITIVE) = { proc distinguish(): bool }.

                                                                                                                                                                            Equations
                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                            Instances For

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

                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For
                                                                                                                                                                                @[simp]

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

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

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

                                                                                                                                                                                Equations
                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                Instances For

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

                                                                                                                                                                                  @[simp]

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

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

                                                                                                                                                                                  Equations
                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    @[reducible, inline]
                                                                                                                                                                                    noncomputable abbrev GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OGReal {p f_in f_out : Type} [Params p f_in f_out] (C : OCONSTRUCTION) (P : OPRIMITIVE) (D : ODISTINGUISHER) :

                                                                                                                                                                                    module OGReal(C : OCONSTRUCTION, P : OPRIMITIVE) = OIndif(C(P), P).

                                                                                                                                                                                    Equations
                                                                                                                                                                                    Instances For
                                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                                      noncomputable abbrev GaudisCrypt.SHA3.Pilot.OptionIndifferentiability.OGIdeal {p f_in f_out : Type} [Params p f_in f_out] (F : OFUNCTIONALITY) (S : OSIMULATOR) (D : ODISTINGUISHER) :

                                                                                                                                                                                      module OGIdeal(F : OFUNCTIONALITY, S : OSIMULATOR) = OIndif(F, S(F)).

                                                                                                                                                                                      Equations
                                                                                                                                                                                      Instances For