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]: S.sample = Module.proc S.sample.procedure — true by definition, proc sample using no module parameter and so having no holes to fill.
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]).
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
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]).
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
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
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]: S.sample2 = Module.proc S.sample2.procedure — true by definition, proc sample2 using no module parameter and so having no holes to fill.
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}.