Golden tests of transitivity on procedures (Logic/ECTransProc.lean) #
EC's transitivity N.f (P₁ ==> Q₁) (P₂ ==> Q₂) (see Logic/ECAutoTest.lean for the format;
scripts/update_golden.py refreshes the expected text).
The body of proc f of module A, 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 A.f.procedure.apply_simp) rather than run. Use A.f for this procedure as a module.
Equations
- GaudisCrypt.ECTransProcTest.A.f.procedure = proc () : Bool { var b : Bool; b <$ GaudisCrypt.EC.dbool; return §b }
Instances For
Instantiating the holes of A.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 [A.f.procedure.apply_simp]).
The module declared by module A: the record of its procedures A.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 A.apply_simp to apply it with.
Instances For
@[simp]: A.f = Module.proc A.f.procedure — true by definition, proc f using no module parameter and so having no holes to fill.
proc f of module A as a module: Module.proc A.f.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — A.f.apply_simp says exactly that.
Equations
Instances For
proc f of module B as a module: Module.proc B.f.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — B.f.apply_simp says exactly that.
Equations
Instances For
@[simp]: B.f = Module.proc B.f.procedure — true by definition, proc f using no module parameter and so having no holes to fill.
The body of proc f of module B, 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 B.f.procedure.apply_simp) rather than run. Use B.f for this procedure as a module.
Equations
- GaudisCrypt.ECTransProcTest.B.f.procedure = proc (x : Bool) : Bool { var b : Bool; b <$ GaudisCrypt.EC.dbool; return §b && §x }
Instances For
Instantiating the holes of B.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 [B.f.procedure.apply_simp]).
The module declared by module B: the record of its procedures B.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 B.apply_simp to apply it with.