Documentation

GaudisCrypt.Lib.EC.DProd

EasyCrypt's product distributions (theories/distributions/DProd.ec), ProdSampling #

The abstract theory ProdSampling's types t1, t2 are section variables, so a clone is an application. Only what ported developments use is here.

equiv_rnd_dprod: x <$ d1 \*` d2on the left againstx₁ <$ d1; x₂ <$ d2 on the right, coupled by the identity (prhlStmt_seq_sample_dprod`).

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem GaudisCrypt.EC.DProd.ProdSampling.S.sample.apply_simp (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

    theorem GaudisCrypt.EC.DProd.ProdSampling.S.sample2.procedure.apply_simp (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] (holeArgs✝ : HoleSigs.empty.Instantiation) :
    (procedure t1 t2).instantiate holeArgs✝ = proc (d1 : SubProbability t1, d2 : SubProbability t2) : (t1 × t2) { var r1 : t1, r2 : t2; r1 <$ §d1; r2 <$ §d2; return (§r1, §r2) }

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

    noncomputable def GaudisCrypt.EC.DProd.ProdSampling.S (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

    The module declared by module S: the record of its procedures S.sample, S.sample2.

    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 S.apply_simp to apply it with.

    Equations
    Instances For
      theorem GaudisCrypt.EC.DProd.ProdSampling.S.sample.procedure.apply_simp (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] (holeArgs✝ : HoleSigs.empty.Instantiation) :
      (procedure t1 t2).instantiate holeArgs✝ = proc (d1 : SubProbability t1, d2 : SubProbability t2) : (t1 × t2) { var r : t1 × t2; r <$ dprod §d1 §d2; return §r }

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

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

      noncomputable def GaudisCrypt.EC.DProd.ProdSampling.S.sample2 (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

      Equations
      Instances For
        noncomputable def GaudisCrypt.EC.DProd.ProdSampling.S.sample.procedure (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          noncomputable def GaudisCrypt.EC.DProd.ProdSampling.S.sample2.procedure (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem GaudisCrypt.EC.DProd.ProdSampling.S.sample2.apply_simp (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

            noncomputable def GaudisCrypt.EC.DProd.ProdSampling.S.sample (t1 t2 : Type) [_gaudiParam0 : Inhabited t1] [_gaudiParam1 : Inhabited t2] :

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

            Equations
            Instances For

              equiv sample_sample2 : S.sample ~ S.sample2 : ={d1, d2} ==> ={res}.