Tests of the relational tactics (Logic/PRHLWp.lean).
What is derivable about the accessor Adv.guess, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Adv.guess.utilities.accessorModule : Adv →ₘ …— the accessor as a module, a projection being a module morphism;Adv.guess.utilities.apply_simp—Module.app Adv.guess.utilities.accessorModule m = Adv.guess m: applying that module is the accessor;Adv.guess.utilities.expression_eq— the same at the level of expressions:(Adv.guess m).expression = (Adv.guess.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field guess back off a module built from a record — Adv.guess (Adv.mk r) = r.guess.
It is what carries the right-hand side of an X.apply_simp (which is an Adv.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.guess.apply_simp.
@[simp]: Adv.structure (Adv.mk r) = r — destructing a module built from a record gives that record back.
Builds a module of type Adv from the record Adv.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Adv.structure (Adv.mk_destruct, Adv.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Adv.guess.mk_simp.
Equations
- GaudisCrypt.PRHLWpTest.Adv.mk theRecord✝ = theRecord✝.guess
Instances For
The field guess of a module of type Adv: the projection onto component 0 of the right-nested tuple Adv.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Adv.guess.mk_simp reads this field back off a module built by Adv.mk; Adv.guess.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Instances For
The record of a module's fields: Adv.structure m is Adv.Structure.mk applied to Adv.guess of m.
Inverse of Adv.mk (Adv.mk_destruct, Adv.destruct_mk).
Instances For
The module type declared by moduletype Adv, with fields guess: the type Module Adv.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Adv.mk, read a single field off one with the accessors Adv.guess, and get the whole record back with Adv.structure.
Instances For
The ModuleTypeRep underlying Adv, the module type declared by moduletype Adv: the right-nested product of its 1 field types, in declaration order.
Adv is by definition Module Adv.typeRep.
Instances For
The IsModule Adv instance: Adv is a module type, with representation Adv.typeRep.
It is what lets the name Adv stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Adv.typeRep would do on its own but Adv, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.PRHLWpTest.instIsModuleAdv = { moduleTypeRep := GaudisCrypt.PRHLWpTest.Adv.typeRep, isModule := ⋯ }
The body of proc run of module CondFlip, 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 CondFlip.run.procedure.apply_simp) rather than run. Use CondFlip.run for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module CondFlip: the record of its procedures CondFlip.run.
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 CondFlip.apply_simp to apply it with.
Instances For
@[simp]: CondFlip.run = Module.proc CondFlip.run.procedure — true by definition, proc run using no module parameter and so having no holes to fill.
proc run of module CondFlip as a module: Module.proc CondFlip.run.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — CondFlip.run.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of CondFlip.run.procedure with a tuple holeArgs of procedures: the body of proc run 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 [CondFlip.run.procedure.apply_simp]).