Random oracles with failing queries are preimage, second-preimage and collision resistant — #
the EC-fidelity port (EasyCrypt proof/SecureORO.eca)
SecureRO (SecureRO.lean) for oracles returning options: Bounder answers None once
its bound queries are used up. Translated as the pilot SecureRO:
- the theory's operators and axioms are the class
Params from to(outParamtypes: a clone is an instance), the module types and modules written as EC's (RF,Bounder(F),A(Bounder(F))); clone import PROM.FullRO as ROis the clone'sRO.m,FRO.m,RO,RO.LRO,FRO,RO_LRO_D(as the pilotSecureRO's);- the procedure aliases of
RF(R)(proc init = R.init,proc sample = R.sample) and ofBounder(proc sample = F.sample) are EC's (proc f = c;, since 2026-11-20; before, they were wrapped in a call, exception E5).
Declarations of the first port #
Definitions and plain lemmas of the first port of this file (2026-10/11) that the proofs below use; its program-logic proofs are gone.
The first port's translation notes (some mention declarations that went with its proofs):
- EasyCrypt's module type
RFand moduleRFshare a name; the module type isRF_T(exception E3). RF(R)(proc init = R.init,proc sample = R.sample) andBounder(F)(proc sample = F.sample) are used as functors, so their aliased procedures called the aliased ones (exception E5); since 2026-11-20 they are EC's aliases.- The module variables (
Bounder.bounder, the clone'sRO.m,FRO.m, and the sections' localPreimage2.hash,SecondPreimage2.m2,D1.m1) are lens parameters (exception E6 for the local ones). - The proofs are
SecureRO's, step for step; the potentials of EC'sfeland the lemmas on them areSecureRO's (their counter component0: there is noCounterhere).
clone import PROM.FullRO as RO with type in_t <- from, type out_t <- to, op dout _ <- sampleto, type d_in_t <- unit, type d_out_t <- bool; its module variable RO.m is
the lens parameter RO_m.
EasyCrypt's module type RO of the clone.
Equations
- GaudisCrypt.SHA3.SecureORO.RO.RO_T «from» «to» = GaudisCrypt.EC.PROM.FullRO.RO_T «from» «to»
Instances For
Equations
- GaudisCrypt.SHA3.SecureORO.RO.RO «from» «to» sampleto RO_m = GaudisCrypt.EC.PROM.FullRO.RO.asRO «from» «to» (fun (x : «from») => sampleto) RO_m
Instances For
Equations
- GaudisCrypt.SHA3.SecureORO.RO.LRO «from» «to» sampleto RO_m = GaudisCrypt.EC.PROM.FullRO.LRO «from» «to» (fun (x : «from») => sampleto) RO_m
Instances For
The footprints of the theory's modules (EasyCrypt reads them off the code; fp_disjoint uses
them).
The section Collision, with declare module A <: AdvCollision {-RO, -FRO, -Bounder} (its #
local modules in the namespace Collision)
The section's op collision (m : ('a, 'b) fmap): two distinct keys with the same value.
Equations
Instances For
EC's op sampleto, op bound, op increase_counter and their axioms. The types are
outParams: a clone of the theory is an instance.
- sampleto : SubProbability «to»
- bound : ℤ
- sampleto_ll : EC.is_lossless sampleto
- sampleto_full : EC.is_full sampleto
- sampleto_fu : EC.is_funiform sampleto
Instances
clone import PROM.FullRO as RO with type in_t <- from, type out_t <- to, op dout _ <- sampleto, type d_in_t <- unit, type d_out_t <- bool.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.RO.m = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.SecureORO.RO.m" (GaudisCrypt.EC.FMap «from» «to»))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The clone's RO.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.RO = GaudisCrypt.EC.PROM.FullRO.RO.asRO «from» «to» (fun (x : «from») => GaudisCrypt.SHA3.Pilot.SecureORO.sampleto) GaudisCrypt.SHA3.Pilot.SecureORO.RO.m
Instances For
The clone's lazy LRO.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.RO.LRO = GaudisCrypt.EC.PROM.FullRO.LRO «from» «to» (fun (x : «from») => GaudisCrypt.SHA3.Pilot.SecureORO.sampleto) GaudisCrypt.SHA3.Pilot.SecureORO.RO.m
Instances For
The clone's FRO.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.FRO = GaudisCrypt.EC.PROM.FullRO.FRO «from» «to» (fun (x : «from») => GaudisCrypt.SHA3.Pilot.SecureORO.sampleto) GaudisCrypt.SHA3.Pilot.SecureORO.FRO.m
Instances For
The clone's RO_LRO_D, its side conditions found (ec_module, fp_disjoint).
The record of the fields of a module of type RF_T: the fields init, get, sample, one per moduletype field, each of that field's own module type.
RF_T.mk turns such a record into a RF_T, RF_T.structure turns a RF_T back into one.
Instances For
The IsModule RF_T instance: RF_T is a module type, with representation RF_T.typeRep.
It is what lets the name RF_T stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module RF_T.typeRep would do on its own but RF_T, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.instIsModuleRF_T = { moduleTypeRep := GaudisCrypt.SHA3.Pilot.SecureORO.RF_T.typeRep, isModule := ⋯ }
The field init of a module of type RF_T: the projection onto component 0 of the right-nested tuple RF_T.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
RF_T.init.mk_simp reads this field back off a module built by RF_T.mk; RF_T.init.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- theModule✝.init = GaudisCrypt.Module.fst' theModule✝
Instances For
@[simp]: reading the field init back off a module built from a record — RF_T.init (RF_T.mk r) = r.init.
It is what carries the right-hand side of an X.apply_simp (which is an RF_T.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.init.apply_simp.
@[simp]: reading the field get back off a module built from a record — RF_T.get (RF_T.mk r) = r.get.
It is what carries the right-hand side of an X.apply_simp (which is an RF_T.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.get.apply_simp.
The record of a module's fields: RF_T.structure m is RF_T.Structure.mk applied to RF_T.init, RF_T.get, RF_T.sample of m.
Inverse of RF_T.mk (RF_T.mk_destruct, RF_T.destruct_mk).
Equations
Instances For
The field sample of a module of type RF_T: the projection onto component 2 of the right-nested tuple RF_T.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
RF_T.sample.mk_simp reads this field back off a module built by RF_T.mk; RF_T.sample.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).
Equations
- theModule✝.sample = (GaudisCrypt.Module.snd' theModule✝).snd'
Instances For
The field get of a module of type RF_T: the projection onto component 1 of the right-nested tuple RF_T.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
RF_T.get.mk_simp reads this field back off a module built by RF_T.mk; RF_T.get.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).
Equations
- theModule✝.get = (GaudisCrypt.Module.snd' theModule✝).fst'
Instances For
The module type declared by moduletype RF_T, with fields init, get, sample: the type Module RF_T.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with RF_T.mk, read a single field off one with the accessors RF_T.init, RF_T.get, RF_T.sample, and get the whole record back with RF_T.structure.
Equations
Instances For
@[simp]: RF_T.mk (RF_T.structure m) = m — rebuilding a module from its own fields gives that module back.
@[simp]: RF_T.structure (RF_T.mk r) = r — destructing a module built from a record gives that record back.
What is derivable about the accessor RF_T.sample, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
RF_T.sample.utilities.accessorModule : RF_T →ₘ …— the accessor as a module, a projection being a module morphism;RF_T.sample.utilities.apply_simp—Module.app RF_T.sample.utilities.accessorModule m = RF_T.sample m: applying that module is the accessor;RF_T.sample.utilities.expression_eq— the same at the level of expressions:(RF_T.sample m).expression = (RF_T.sample.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field sample back off a module built from a record — RF_T.sample (RF_T.mk r) = r.sample.
It is what carries the right-hand side of an X.apply_simp (which is an RF_T.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.sample.apply_simp.
The ModuleTypeRep underlying RF_T, the module type declared by moduletype RF_T: the right-nested product of its 3 field types, in declaration order.
RF_T is by definition Module RF_T.typeRep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What is derivable about the accessor RF_T.init, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
RF_T.init.utilities.accessorModule : RF_T →ₘ …— the accessor as a module, a projection being a module morphism;RF_T.init.utilities.apply_simp—Module.app RF_T.init.utilities.accessorModule m = RF_T.init m: applying that module is the accessor;RF_T.init.utilities.expression_eq— the same at the level of expressions:(RF_T.init m).expression = (RF_T.init.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Builds a module of type RF_T from the record RF_T.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of RF_T.structure (RF_T.mk_destruct, RF_T.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas RF_T.init.mk_simp, RF_T.get.mk_simp, RF_T.sample.mk_simp.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.RF_T.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.init (GaudisCrypt.Module.pair' theRecord✝.get theRecord✝.sample)
Instances For
What is derivable about the accessor RF_T.get, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
RF_T.get.utilities.accessorModule : RF_T →ₘ …— the accessor as a module, a projection being a module morphism;RF_T.get.utilities.apply_simp—Module.app RF_T.get.utilities.accessorModule m = RF_T.get m: applying that module is the accessor;RF_T.get.utilities.expression_eq— the same at the level of expressions:(RF_T.get m).expression = (RF_T.get.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of RF.get.procedure with a tuple holeArgs of procedures: the body of proc get 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 [RF.get.procedure.apply_simp]).
@[simp]: applying RF.get to the parameters proc get uses (R) is Module.proc (RF.get.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
proc get of module RF as a module, abstracted over the module parameters it uses (R, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma RF.get.apply_simp, which fills the holes of RF.get.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: the alias RF.init, applied to the parameters its callee uses (R), is its callee, as written in the declaration.
The module declared by module RF, abstracted over its single parameter R, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.
Applied to such a tuple it is the record of its procedures RF.init, RF.get, RF.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma RF.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying RF to a tuple of its single parameter R — the record of its procedures RF.init, RF.get, RF.sample, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with RF.init.apply_simp, RF.get.apply_simp, RF.sample.apply_simp to fill that procedure's holes.
@[simp]: the alias RF.sample, applied to the parameters its callee uses (R), is its callee, as written in the declaration.
The body of proc get of module RF, as a procedure of its own: the one call it makes to a module parameter (R) is its single hole.
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 RF.get.procedure.apply_simp) rather than run. Use RF.get for this procedure as a module.
Equations
Instances For
proc init = …; of module RF: an alias, EasyCrypt's proc init = M.g — the callee itself, as a module abstracted over the module parameters it uses (R, in declaration order). It has no RF.init.procedure: applied with the @[simp] lemma RF.init.apply_simp, it is the callee.
Equations
Instances For
proc sample = …; of module RF: an alias, EasyCrypt's proc sample = M.g — the callee itself, as a module abstracted over the module parameters it uses (R, in declaration order). It has no RF.sample.procedure: applied with the @[simp] lemma RF.sample.apply_simp, it is the callee.
Equations
Instances For
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.Bounder.bounder = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.SecureORO.Bounder.bounder" ℤ)
Instances For
proc init of module Bounder as a module, abstracted over the module parameters it uses (F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Bounder.init.apply_simp, which fills the holes of Bounder.init.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Bounder to a tuple of its single parameter F — the record of its procedures Bounder.init, Bounder.get, Bounder.sample, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Bounder.init.apply_simp, Bounder.get.apply_simp, Bounder.sample.apply_simp to fill that procedure's holes.
The body of proc init of module Bounder, as a procedure of its own: the one call it makes to a module parameter (F) is its single hole.
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 Bounder.init.procedure.apply_simp) rather than run. Use Bounder.init for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: the alias Bounder.sample, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
@[simp]: applying Bounder.get to the parameters proc get uses (F) is Module.proc (Bounder.get.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
The body of proc get of module Bounder, as a procedure of its own: the one call it makes to a module parameter (F) is its single hole.
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 Bounder.get.procedure.apply_simp) rather than run. Use Bounder.get for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Bounder.init to the parameters proc init uses (F) is Module.proc (Bounder.init.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
proc get of module Bounder as a module, abstracted over the module parameters it uses (F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Bounder.get.apply_simp, which fills the holes of Bounder.get.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module Bounder, abstracted over its single parameter F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the module type it was declared with.
Applied to such a tuple it is the record of its procedures Bounder.init, Bounder.get, Bounder.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Bounder.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc sample = …; of module Bounder: an alias, EasyCrypt's proc sample = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no Bounder.sample.procedure: applied with the @[simp] lemma Bounder.sample.apply_simp, it is the callee.
Equations
Instances For
Instantiating the holes of Bounder.get.procedure with a tuple holeArgs of procedures: the body of proc get 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 [Bounder.get.procedure.apply_simp]).
Instantiating the holes of Bounder.init.procedure with a tuple holeArgs of procedures: the body of proc init 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 [Bounder.init.procedure.apply_simp]).
The field get of a module of type Oracle: the projection onto component 0 of the right-nested tuple Oracle.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Oracle.get.mk_simp reads this field back off a module built by Oracle.mk; Oracle.get.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 the fields of a module of type Oracle: the fields get, one per moduletype field, each of that field's own module type.
Oracle.mk turns such a record into a Oracle, Oracle.structure turns a Oracle back into one.
Instances For
Builds a module of type Oracle from the record Oracle.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Oracle.structure (Oracle.mk_destruct, Oracle.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Oracle.get.mk_simp.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.Oracle.mk theRecord✝ = theRecord✝.get
Instances For
@[simp]: Oracle.mk (Oracle.structure m) = m — rebuilding a module from its own fields gives that module back.
The record of a module's fields: Oracle.structure m is Oracle.Structure.mk applied to Oracle.get of m.
Inverse of Oracle.mk (Oracle.mk_destruct, Oracle.destruct_mk).
Instances For
@[simp]: Oracle.structure (Oracle.mk r) = r — destructing a module built from a record gives that record back.
The IsModule Oracle instance: Oracle is a module type, with representation Oracle.typeRep.
It is what lets the name Oracle stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Oracle.typeRep would do on its own but Oracle, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.instIsModuleOracle = { moduleTypeRep := GaudisCrypt.SHA3.Pilot.SecureORO.Oracle.typeRep, isModule := ⋯ }
@[simp]: reading the field get back off a module built from a record — Oracle.get (Oracle.mk r) = r.get.
It is what carries the right-hand side of an X.apply_simp (which is an Oracle.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.get.apply_simp.
The module type declared by moduletype Oracle, with fields get: the type Module Oracle.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Oracle.mk, read a single field off one with the accessors Oracle.get, and get the whole record back with Oracle.structure.
Equations
Instances For
The ModuleTypeRep underlying Oracle, the module type declared by moduletype Oracle: the right-nested product of its 1 field types, in declaration order.
Oracle is by definition Module Oracle.typeRep.
Equations
Instances For
What is derivable about the accessor Oracle.get, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Oracle.get.utilities.accessorModule : Oracle →ₘ …— the accessor as a module, a projection being a module morphism;Oracle.get.utilities.apply_simp—Module.app Oracle.get.utilities.accessorModule m = Oracle.get m: applying that module is the accessor;Oracle.get.utilities.expression_eq— the same at the level of expressions:(Oracle.get m).expression = (Oracle.get.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
F.get out of the oracle F.
Instances For
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.instCoeRF_TOracle = { coe := fun (s : GaudisCrypt.SHA3.Pilot.SecureORO.RF_T) => GaudisCrypt.SHA3.Pilot.SecureORO.Oracle.mk { get := s.get } }
EC's module type AdvPreimage (F : Oracle) = { proc guess(h : to) : from }.
Equations
Instances For
The body of proc main of module Preimage, as a procedure of its own: the 3 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 Preimage.main.procedure.apply_simp) rather than run. Use Preimage.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Preimage to a tuple of its 2 parameters A, F — the record of its procedures Preimage.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Preimage.main.apply_simp to fill that procedure's holes.
The module declared by module Preimage, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures Preimage.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Preimage.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of Preimage.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [Preimage.main.procedure.apply_simp]).
proc main of module Preimage as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Preimage.main.apply_simp, which fills the holes of Preimage.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Preimage.main to the parameters proc main uses (A, F) is Module.proc (Preimage.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
@[simp]: applying FEL to a tuple of its 2 parameters A, F — the record of its procedures FEL.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with FEL.main.apply_simp to fill that procedure's holes.
The body of proc main of module FEL, as a procedure of its own: the 2 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 FEL.main.procedure.apply_simp) rather than run. Use FEL.main 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 FEL, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures FEL.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FEL.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of FEL.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [FEL.main.procedure.apply_simp]).
proc main of module FEL as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma FEL.main.apply_simp, which fills the holes of FEL.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying FEL.main to the parameters proc main uses (A, F) is Module.proc (FEL.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.Preimage.Preimage2.hash = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.SecureORO.Preimage.Preimage2.hash" «to»)
Instances For
The module declared by module Preimage2, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures Preimage2.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Preimage2.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module Preimage2 as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Preimage2.main.apply_simp, which fills the holes of Preimage2.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of Preimage2.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [Preimage2.main.procedure.apply_simp]).
The body of proc main of module Preimage2, as a procedure of its own: the 2 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 Preimage2.main.procedure.apply_simp) rather than run. Use Preimage2.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Preimage2.main to the parameters proc main uses (A, F) is Module.proc (Preimage2.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
@[simp]: applying Preimage2 to a tuple of its 2 parameters A, F — the record of its procedures Preimage2.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Preimage2.main.apply_simp to fill that procedure's holes.
EC's RO_is_preimage_resistant &m.
The section SecondPreimage #
EC's module type AdvSecondPreimage (F : Oracle) = { proc guess(m : from) : from }.
Equations
Instances For
The module declared by module SecondPreimage, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures SecondPreimage.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SecondPreimage.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SecondPreimage.main to the parameters proc main uses (A, F) is Module.proc (SecondPreimage.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
The body of proc main of module SecondPreimage, as a procedure of its own: the 3 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 SecondPreimage.main.procedure.apply_simp) rather than run. Use SecondPreimage.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module SecondPreimage as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SecondPreimage.main.apply_simp, which fills the holes of SecondPreimage.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of SecondPreimage.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [SecondPreimage.main.procedure.apply_simp]).
@[simp]: applying SecondPreimage to a tuple of its 2 parameters A, F — the record of its procedures SecondPreimage.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with SecondPreimage.main.apply_simp to fill that procedure's holes.
The section SecondPreimage, its local modules in the namespace SecondPreimage #
@[simp]: applying FEL.main to the parameters proc main uses (A, F) is Module.proc (FEL.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
@[simp]: applying FEL to a tuple of its 2 parameters A, F — the record of its procedures FEL.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with FEL.main.apply_simp to fill that procedure's holes.
The body of proc main of module FEL, as a procedure of its own: the 3 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 FEL.main.procedure.apply_simp) rather than run. Use FEL.main 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 FEL, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures FEL.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FEL.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module FEL as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma FEL.main.apply_simp, which fills the holes of FEL.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of FEL.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [FEL.main.procedure.apply_simp]).
EC's module variables SecondPreimage2.m2, D1.m1 of the local modules. The declared
adversary is restricted against the local modules, as EC's local modules are fresh.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- GaudisCrypt.SHA3.Pilot.SecureORO.SecondPreimage.D1.m1 = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.SecureORO.SecondPreimage.D1.m1" «from»)
Instances For
proc main of module SecondPreimage2 as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SecondPreimage2.main.apply_simp, which fills the holes of SecondPreimage2.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module SecondPreimage2, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures SecondPreimage2.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SecondPreimage2.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of SecondPreimage2.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [SecondPreimage2.main.procedure.apply_simp]).
@[simp]: applying SecondPreimage2 to a tuple of its 2 parameters A, F — the record of its procedures SecondPreimage2.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with SecondPreimage2.main.apply_simp to fill that procedure's holes.
The body of proc main of module SecondPreimage2, as a procedure of its own: the 2 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 SecondPreimage2.main.procedure.apply_simp) rather than run. Use SecondPreimage2.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SecondPreimage2.main to the parameters proc main uses (A, F) is Module.proc (SecondPreimage2.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
Instantiating the holes of D1.distinguish.procedure with a tuple holeArgs of procedures: the body of proc distinguish 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 [D1.distinguish.procedure.apply_simp]).
@[simp]: applying D1 to a tuple of its single parameter F — the record of its procedures D1.distinguish, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with D1.distinguish.apply_simp to fill that procedure's holes.
The module declared by module D1, abstracted over its single parameter F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures D1.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma D1.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc distinguish of module D1, as a procedure of its own: the one call it makes to a module parameter (F) is its single hole.
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 D1.distinguish.procedure.apply_simp) rather than run. Use D1.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying D1.distinguish to the parameters proc distinguish uses (F) is Module.proc (D1.distinguish.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
proc distinguish of module D1 as a module, abstracted over the module parameters it uses (F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma D1.distinguish.apply_simp, which fills the holes of D1.distinguish.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module SecondPreimage3, abstracted over its single parameter F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures SecondPreimage3.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SecondPreimage3.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module SecondPreimage3 as a module, abstracted over the module parameters it uses (F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SecondPreimage3.main.apply_simp, which fills the holes of SecondPreimage3.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SecondPreimage3 to a tuple of its single parameter F — the record of its procedures SecondPreimage3.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with SecondPreimage3.main.apply_simp to fill that procedure's holes.
Instantiating the holes of SecondPreimage3.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [SecondPreimage3.main.procedure.apply_simp]).
The body of proc main of module SecondPreimage3, as a procedure of its own: the 2 calls it makes to module parameters (F) are its holes, in the order the body makes them.
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 SecondPreimage3.main.procedure.apply_simp) rather than run. Use SecondPreimage3.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SecondPreimage3.main to the parameters proc main uses (F) is Module.proc (SecondPreimage3.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
EC's RO_is_second_preimage_resistant &m (mess1 : from), its proof EC's: the chain of
have->: (calc steps) from RF(RO) to RF(LRO) (EC's sim, its call of A EC's
call (_ : ={glob A, …})), to SecondPreimage2, SecondPreimage3 and back to RF(RO) (the
third and fifth EC's sims, with the local modules' variables as the frame), then
byphoare(: arg = mess1 ==> _), proc, seq 1, its invariant EC's call(: … /\ mess1 \in RO.m) and its first E goal EC's call(: arg = mess1 ==> rng (rem RO.m mess1) (oget RO.m.[mess1])) with EC's fel 2 (bad without its mess1 \in RO.m, which is in the
invariant: here bad is the event). The last goal's EC's rcondts, swaps and cases are
the conditionals split by split_ifs.
EC's module type AdvCollision (F : Oracle) = { proc guess() : from * from }.
Equations
Instances For
proc main of module Collision as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Collision.main.apply_simp, which fills the holes of Collision.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module Collision, as a procedure of its own: the 3 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 Collision.main.procedure.apply_simp) rather than run. Use Collision.main 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 Collision, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures Collision.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Collision.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Collision to a tuple of its 2 parameters A, F — the record of its procedures Collision.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Collision.main.apply_simp to fill that procedure's holes.
@[simp]: applying Collision.main to the parameters proc main uses (A, F) is Module.proc (Collision.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
Instantiating the holes of Collision.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [Collision.main.procedure.apply_simp]).
The section Collision, with declare module A <: AdvCollision {-RO, -FRO, -Bounder} (its #
local modules in the namespace Collision)
Instantiating the holes of FEL.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [FEL.main.procedure.apply_simp]).
@[simp]: applying FEL.main to the parameters proc main uses (A, F) is Module.proc (FEL.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
@[simp]: applying FEL to a tuple of its 2 parameters A, F — the record of its procedures FEL.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with FEL.main.apply_simp to fill that procedure's holes.
The module declared by module FEL, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures FEL.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FEL.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module FEL, as a procedure of its own: the 2 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 FEL.main.procedure.apply_simp) rather than run. Use FEL.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module FEL as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma FEL.main.apply_simp, which fills the holes of FEL.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of Collision2.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [Collision2.main.procedure.apply_simp]).
@[simp]: applying Collision2.main to the parameters proc main uses (A, F) is Module.proc (Collision2.main.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
The module declared by module Collision2, abstracted over its 2 parameters A, F, which it takes as one right-nested tuple: Module.Arr (T₁ ×ₘ (… ×ₘ Tₙ)) M, with M the anonymous product of the procedures' own types, the declaration naming no module type.
Applied to such a tuple it is the record of its procedures Collision2.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Collision2.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module Collision2 as a module, abstracted over the module parameters it uses (A, F, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Collision2.main.apply_simp, which fills the holes of Collision2.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module Collision2, as a procedure of its own: the 2 calls it makes to module parameters (A, F) are its holes, in the order the body makes them.
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 Collision2.main.procedure.apply_simp) rather than run. Use Collision2.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Collision2 to a tuple of its 2 parameters A, F — the record of its procedures Collision2.main, each applied to the parameters it uses.
This is the lemma that unfolds a module use: simp rewrites with it, then with the field lemmas of the module type (N.f.mk_simp) to get at the one procedure the goal is about, and then with Collision2.main.apply_simp to fill that procedure's holes.
EC's RO_is_collision_resistant &m, its proof EC's: the have->: by byequiv (a calc
step), then byphoare, proc, seq 1, its invariant EC's call(: card (fdom RO.m) <= Bounder.bounder <= bound), its first E goal EC's call(: true ==> collision RO.m) with EC's
fel 1, its last goal's EC's rcondts, swaps and cases the conditionals split by
split_ifs and EC's cases on m1 = m2, m2 \in RO.m (by_cases), and the arithmetic of EC's
last smt() in the bound goal.