A construction indifferentiable from a random oracle is secure — the EC-fidelity port #
(EasyCrypt proof/IndifRO_is_secure.ec)
Collision, preimage and second-preimage resistance of FM(C, P) (a construction C over a
primitive P), from the resistance of the random oracle (SecureRO) and the indifferentiability
of C(P) from it, up to bound.
Translation (as the pilot SecureRO's):
- the file's types and operators, and their axioms, are the class
Params block f_in f_out(SHA3Security's clone is an instance of it); clone import SecureRO as SRO with …andclone import Indifferentiability as Indiff0 with …areclone(Syntax/Clone.lean): the instancesSRO.params,Indiff0.params, and the aliasesSRO.Bounder,SRO.RO_is_collision_resistant,Indiff0.GReal, … opened;- EC's
SRO.RO.ROis the pilot'sRO(the pilot's clone ofPROM.FullROis flattened intoRO,RO.LRO,FRO,RO.m), so hereSRO.RO; - the procedure aliases of
FInit,GetF,SInit,FM,DCollare EC's (proc f = c;, since 2026-11-20;RO's are its procedures themselves);FInitandFMare declared atSRO's module typeRO_T(EC'sRO), their proceduref, which nothing calls, left out (EC types them structurally),FM'srembeforesampleas the module type has them; - EC's
C(P)is«C»(P):C(is Mathlib's notation for continuous maps.
The file's operators and their axioms: sampleto, limit, bound, bound_counter,
increase_counter. The types are outParams: a clone is an instance.
- sampleto : SubProbability f_out
- sampleto_ll : EC.is_lossless sampleto
- sampleto_fu : EC.is_funiform sampleto
- sampleto_full : EC.is_full sampleto
- limit : ℤ
- bound : ℝ
- bound_counter : ℤ
Instances
EC's module RO : FUNCTIONALITY = { proc init = SRO.RO.RO.init proc f = SRO.RO.RO.get }: its
aliases are SRO.RO's procedures themselves.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of FInit.set.procedure with a tuple holeArgs of procedures: the body of proc set 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 [FInit.set.procedure.apply_simp]).
proc set of module FInit as a module: Module.proc FInit.set.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.set.apply_simp says exactly that.
Equations
Instances For
The body of proc sample of module FInit, 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 FInit.sample.procedure.apply_simp) rather than run. Use FInit.sample for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.sample.procedure = proc (a : f_in) : Unit { skip; return () }
Instances For
Instantiating the holes of FInit.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 [FInit.init.procedure.apply_simp]).
proc init of module FInit as a module: Module.proc FInit.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.init.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of FInit.rem.procedure with a tuple holeArgs of procedures: the body of proc rem 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 [FInit.rem.procedure.apply_simp]).
The body of proc set of module FInit, 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 FInit.set.procedure.apply_simp) rather than run. Use FInit.set for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.set.procedure = proc (a : f_in, b : f_out) : Unit { skip; return () }
Instances For
proc get = …; of module FInit: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no FInit.get.procedure: applied with the @[simp] lemma FInit.get.apply_simp, it is the callee.
Equations
Instances For
@[simp]: the alias FInit.get, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
proc rem of module FInit as a module: Module.proc FInit.rem.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.rem.apply_simp says exactly that.
Equations
Instances For
The body of proc rem of module FInit, 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 FInit.rem.procedure.apply_simp) rather than run. Use FInit.rem for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.rem.procedure = proc (a : f_in) : Unit { skip; return () }
Instances For
@[simp]: FInit.rem = Module.proc FInit.rem.procedure — true by definition, proc rem using no module parameter and so having no holes to fill.
Instantiating the holes of FInit.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 [FInit.sample.procedure.apply_simp]).
@[simp]: FInit.sample = Module.proc FInit.sample.procedure — true by definition, proc sample using no module parameter and so having no holes to fill.
@[simp]: FInit.init = Module.proc FInit.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
The module declared by module FInit, 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 FInit.init, FInit.get, FInit.set, FInit.rem, FInit.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FInit.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc init of module FInit, 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 FInit.init.procedure.apply_simp) rather than run. Use FInit.init for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FInit.init.procedure = proc () : Unit { skip; return () }
Instances For
@[simp]: applying FInit to a tuple of its single parameter F — the record of its procedures FInit.init, FInit.get, FInit.set, FInit.rem, FInit.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 FInit.init.apply_simp, FInit.get.apply_simp, FInit.set.apply_simp, FInit.rem.apply_simp, FInit.sample.apply_simp to fill that procedure's holes.
@[simp]: FInit.set = Module.proc FInit.set.procedure — true by definition, proc set using no module parameter and so having no holes to fill.
proc sample of module FInit as a module: Module.proc FInit.sample.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FInit.sample.apply_simp says exactly that.
Equations
Instances For
proc f = …; of module GetF: an alias, EasyCrypt's proc f = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no GetF.f.procedure: applied with the @[simp] lemma GetF.f.apply_simp, it is the callee.
Equations
Instances For
proc init = …; of module GetF: an alias, EasyCrypt's proc init = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no GetF.init.procedure: applied with the @[simp] lemma GetF.init.apply_simp, it is the callee.
Equations
Instances For
@[simp]: the alias GetF.init, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
The module declared by module GetF, 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 GetF.init, GetF.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma GetF.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: the alias GetF.f, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
@[simp]: applying GetF to a tuple of its single parameter F — the record of its procedures GetF.init, GetF.f, 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 GetF.init.apply_simp, GetF.f.apply_simp to fill that procedure's holes.
Instantiating the holes of SInit.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 [SInit.init.procedure.apply_simp]).
The body of proc init of module SInit, as a procedure of its own: the 2 calls it makes to module parameters (F, S) 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 SInit.init.procedure.apply_simp) rather than run. Use SInit.init for this procedure as a module.
Equations
Instances For
@[simp]: applying SInit.init to the parameters proc init uses (F, S) is Module.proc (SInit.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.
@[simp]: the alias SInit.rem, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
The module declared by module SInit, abstracted over its 2 parameters F, S, 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 SInit.init, SInit.get, SInit.set, SInit.rem, SInit.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SInit.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SInit to a tuple of its 2 parameters F, S — the record of its procedures SInit.init, SInit.get, SInit.set, SInit.rem, SInit.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 SInit.init.apply_simp, SInit.get.apply_simp, SInit.set.apply_simp, SInit.rem.apply_simp, SInit.sample.apply_simp to fill that procedure's holes.
@[simp]: the alias SInit.get, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
proc init of module SInit as a module, abstracted over the module parameters it uses (F, S, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SInit.init.apply_simp, which fills the holes of SInit.init.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc get = …; of module SInit: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.get.procedure: applied with the @[simp] lemma SInit.get.apply_simp, it is the callee.
Equations
Instances For
@[simp]: the alias SInit.sample, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
proc sample = …; of module SInit: 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 SInit.sample.procedure: applied with the @[simp] lemma SInit.sample.apply_simp, it is the callee.
Equations
Instances For
proc rem = …; of module SInit: an alias, EasyCrypt's proc rem = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.rem.procedure: applied with the @[simp] lemma SInit.rem.apply_simp, it is the callee.
Equations
Instances For
@[simp]: the alias SInit.set, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
proc set = …; of module SInit: an alias, EasyCrypt's proc set = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no SInit.set.procedure: applied with the @[simp] lemma SInit.set.apply_simp, it is the callee.
Equations
Instances For
The module declared by module FM, abstracted over its 2 parameters C, P, 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 FM.init, FM.get, FM.set, FM.rem, FM.sample, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FM.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: FM.set = Module.proc FM.set.procedure — true by definition, proc set using no module parameter and so having no holes to fill.
@[simp]: applying FM.init to the parameters proc init uses (C, P) is Module.proc (FM.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.
@[simp]: FM.sample = Module.proc FM.sample.procedure — true by definition, proc sample using no module parameter and so having no holes to fill.
proc rem of module FM as a module: Module.proc FM.rem.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.rem.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of FM.rem.procedure with a tuple holeArgs of procedures: the body of proc rem 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 [FM.rem.procedure.apply_simp]).
@[simp]: the alias FM.get, applied to the parameters its callee uses (C, P), is its callee, as written in the declaration.
Instantiating the holes of FM.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 [FM.sample.procedure.apply_simp]).
Instantiating the holes of FM.set.procedure with a tuple holeArgs of procedures: the body of proc set 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 [FM.set.procedure.apply_simp]).
proc init of module FM as a module, abstracted over the module parameters it uses (C, P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma FM.init.apply_simp, which fills the holes of FM.init.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc get = …; of module FM: an alias, EasyCrypt's proc get = M.g — the callee itself, as a module abstracted over the module parameters it uses (C, P, in declaration order). It has no FM.get.procedure: applied with the @[simp] lemma FM.get.apply_simp, it is the callee.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc set of module FM as a module: Module.proc FM.set.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.set.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of FM.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 [FM.init.procedure.apply_simp]).
@[simp]: applying FM to a tuple of its 2 parameters C, P — the record of its procedures FM.init, FM.get, FM.set, FM.rem, FM.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 FM.init.apply_simp, FM.get.apply_simp, FM.set.apply_simp, FM.rem.apply_simp, FM.sample.apply_simp to fill that procedure's holes.
The body of proc rem of module FM, 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 FM.rem.procedure.apply_simp) rather than run. Use FM.rem for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.rem.procedure = proc (a : f_in) : Unit { skip; return () }
Instances For
@[simp]: FM.rem = Module.proc FM.rem.procedure — true by definition, proc rem using no module parameter and so having no holes to fill.
proc sample of module FM as a module: Module.proc FM.sample.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FM.sample.apply_simp says exactly that.
Equations
Instances For
The body of proc init of module FM, as a procedure of its own: the 2 calls it makes to module parameters (C, P) 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 FM.init.procedure.apply_simp) rather than run. Use FM.init for this procedure as a module.
Equations
Instances For
The body of proc set of module FM, 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 FM.set.procedure.apply_simp) rather than run. Use FM.set for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.set.procedure = proc (a : f_in, b : f_out) : Unit { skip; return () }
Instances For
The body of proc sample of module FM, 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 FM.sample.procedure.apply_simp) rather than run. Use FM.sample for this procedure as a module.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.FM.sample.procedure = proc (a : f_in) : Unit { skip; return () }
Instances For
proc distinguish = …; of module DColl: an alias, EasyCrypt's proc distinguish = M.g — the callee itself, as a module abstracted over the module parameters it uses (F, in declaration order). It has no DColl.distinguish.procedure: applied with the @[simp] lemma DColl.distinguish.apply_simp, it is the callee.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: the alias DColl.distinguish, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
The module declared by module DColl, abstracted over its 2 parameters F, P, 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 DColl.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DColl.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DColl to a tuple of its 2 parameters F, P — the record of its procedures DColl.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 DColl.distinguish.apply_simp to fill that procedure's holes.
The section Collision #
EC's coll_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder}) (P <: PRIMITIVE{-C, -A, -Bounder}) &m.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.h = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.DPre.h" f_out)
Instances For
proc distinguish of module DPre 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 DPre.distinguish.apply_simp, which fills the holes of DPre.distinguish.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 distinguish of module DPre, 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 DPre.distinguish.procedure.apply_simp) rather than run. Use DPre.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DPre to a tuple of its 2 parameters F, P — the record of its procedures DPre.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 DPre.distinguish.apply_simp to fill that procedure's holes.
The module declared by module DPre, abstracted over its 2 parameters F, P, 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 DPre.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DPre.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DPre.distinguish to the parameters proc distinguish uses (F) is Module.proc (DPre.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.
Instantiating the holes of DPre.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 [DPre.distinguish.procedure.apply_simp]).
The section Preimage #
EC's preimage_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder, -DPre}) (P <: PRIMITIVE{-C, -A, -Bounder, -DPre}) &m hash.
Equations
- GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.m2 = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.IndifRO_is_secure.D2Pre.m2" f_in)
Instances For
The module declared by module D2Pre, abstracted over its 2 parameters F, P, 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 D2Pre.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma D2Pre.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 D2Pre, 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 D2Pre.distinguish.procedure.apply_simp) rather than run. Use D2Pre.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc distinguish of module D2Pre 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 D2Pre.distinguish.apply_simp, which fills the holes of D2Pre.distinguish.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying D2Pre.distinguish to the parameters proc distinguish uses (F) is Module.proc (D2Pre.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.
@[simp]: applying D2Pre to a tuple of its 2 parameters F, P — the record of its procedures D2Pre.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 D2Pre.distinguish.apply_simp to fill that procedure's holes.
Instantiating the holes of D2Pre.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 [D2Pre.distinguish.procedure.apply_simp]).
The section SecondPreimage #
EC's second_preimage_resistant_if_indifferentiable (C <: CONSTRUCTION{-A, -Bounder, -D2Pre}) (P <: PRIMITIVE{-C, -A, -Bounder, -D2Pre}) &m mess.