Documentation

GaudisCrypt.Logic.ECRndTest

Golden tests of equiv_rnd f g #

The goal EC's rnd f g leaves: its three conditions (see Logic/ECAutoTest.lean for the format; scripts/update_golden.py refreshes the expected text).

The module declared by module L: the record of its procedures L.f.

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

Equations
Instances For

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

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

    Equations
    Instances For
      theorem GaudisCrypt.ECRndTest.L.f.procedure.apply_simp (holeArgs✝ : HoleSigs.empty.Instantiation) :
      procedure.instantiate holeArgs✝ = proc () : (ZMod 7) { var k : Bool, x : ZMod 7; k <- true; x <$ SubProbability.uniform; return §x }

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

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

      @[simp]

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

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

      Equations
      Instances For
        @[simp]

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

        The module declared by module R: the record of its procedures R.f.

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

        Equations
        Instances For

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

          Equations
          Instances For

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

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

            Equations
            Instances For
              theorem GaudisCrypt.ECRndTest.R.f.procedure.apply_simp (holeArgs✝ : HoleSigs.empty.Instantiation) :
              procedure.instantiate holeArgs✝ = proc () : (ZMod 7) { var k : ZMod 7, x : ZMod 7; k <- 2; x <$ SubProbability.uniform; return §x }

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

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