EasyCrypt's proc: a procedure judgment as the judgment about its body #
phoare_proc -- EC's `proc` on `phoare[ M.f : P ==> Q ] ⋈ r`
hoare_proc -- EC's `proc` on `hoare[ M.f : P ==> Q ]`
equiv_proc -- EC's `proc` on `equiv[ M₁.f ~ M₂.g : P ==> Q ]`
The goal becomes the judgment about the procedure's body, its parameters local variables under
their own names, the postcondition read at the return value: no call, no copies of the arguments,
no reset of the callee's frame, so that EC's statement counts (seq 1, wp 2) are ours.
Sound as EC's proc is: the body's judgment is proven from every state whose parameter
variables hold the arguments, whatever the other locals hold (phoareProc_of_body_anyLocals);
the run of the procedure starts from one of them (its other locals at their initial values). It is
unprovable only for a body reading a local before writing it, as in EC.
The expectation of a procedure is its body's, from its initial locals, read at the return
value (Procedure.ewp_eq_body for an expectation of the result too).
EC's proc for phoare: the judgment about the body, from any state whose parameter
variables (argsL, read back from the initial locals by hargs) satisfy the precondition.
EC's proc for Hoare triples, as phoareProc_of_body_anyLocals (hoareProc_of_body,
from the initial locals only, with the precondition strengthened).
EC's proc for pRHL, as phoareProc_of_body_anyLocals: the judgment about the two bodies,
from any states whose parameter variables satisfy the precondition.
Equations
EC's proc on the goal g: a phoareProc, hoareProc or prhlProc judgment becomes the
judgment about the bodies (phoareProc_of_body_anyLocals, hoareProc_of_body_anyLocals,
prhlProc_of_body_anyLocals), the conditions in the shape the statement notation builds (as
hoareProcToStmt does). The new goal is returned.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A module's procedure read off a module built from a record (DPRIMITIVE.f (DPRIMITIVE.mk { f := P.f, … }), what a module type's view leaves at a call) or out of a Module.pair, read off
(T.f.mk_simp, Module.fst_pair', …) everywhere in the goal: the two sides of a call then name
the same procedure (P.f), as EC's sim sees them.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A call of a procedure alias (proc f = c; of a module, @[gaudiModuleAlias]) is a call of
the aliased procedure, as in EC (an alias is that procedure): every callee M.procedure whose
evaluation by the module steps (Flatten.moduleStep?) passes through an alias is rewritten to what
that step gives (FM(C, P).get ↦ C(P).f). Callees whose evaluation meets no alias are left as
they are, and so is a goal that mentions no alias.
Equations
- One or more equations did not get rendered due to their size.
Instances For
EC's proc on phoare[ M.f : P ==> Q ] ⋈ r: see the module docstring.
Equations
- GaudisCrypt.tacticPhoare_proc = Lean.ParserDescr.node `GaudisCrypt.tacticPhoare_proc 1024 (Lean.ParserDescr.nonReservedSymbol "phoare_proc" false)
Instances For
EC's proc on hoare[ M.f : P ==> Q ]: see the module docstring.
Equations
- GaudisCrypt.tacticHoare_proc = Lean.ParserDescr.node `GaudisCrypt.tacticHoare_proc 1024 (Lean.ParserDescr.nonReservedSymbol "hoare_proc" false)
Instances For
EC's proc on equiv[ M₁.f ~ M₂.g : P ==> Q ]: see the module docstring.
Equations
- GaudisCrypt.tacticEquiv_proc = Lean.ParserDescr.node `GaudisCrypt.tacticEquiv_proc 1024 (Lean.ParserDescr.nonReservedSymbol "equiv_proc" false)
Instances For
module_norm: read the procedures off module views in the goal (ECProc.accessorNorm:
DPRIMITIVE.f (DPRIMITIVE.mk { f := P.f, … }) is P.f), as *_proc and sim do.
Equations
- tacticModule_norm = Lean.ParserDescr.node `tacticModule_norm 1024 (Lean.ParserDescr.nonReservedSymbol "module_norm" false)