Indifferentiability of the sponge with failing oracles (EasyCrypt proof/SHA3_OIndiff.ec) — #
EC-fidelity port
SHA3OIndiff, the one lemma of SHA3_OIndiff.ec, in EC's script, over the first port's
declarations of the file's modules (section FirstPort below: FSome, PSome, Poget,
CSome, OSimulator, Counter, OFC, OPC, ODRestr, DFSome, DPSome, OD), as
SHA3Indiff.lean over the first port's.
Translation:
- the lemma quantifies its own
Dist(the section'sdeclare module Distis used by none of its lemmas): adeclare modulein a section of its own; the restriction also names the modules of the filessecuritygoes through (fresh in EC), andDisthas a region for itsglob(with glob R, exception E14), sincesecurityis applied toOD(Dist); - EC's hypothesis on
Disthas no restriction onFandP;security's has ({-OD(Dist)}).
Gap list (batch-fix later, see TRANSFER_SKILL.md §1.6):
- GAP 1 (closed):
PSome(Perm).initbehind the first port's record was not opened byinline*; it is since 2026-11-17 (procedures across clones' module types), and the hand unfolding left over from before went on 2026-11-21. - GAP 2:
simdoes not go through the loops of the inlinedSponge.f(GAP 2 ofSHA3Indiff.lean): thewhilerule with the variables' equalities. (IRO.f's loop, whose relation after it readsx0{1}againstx1{2}, which the loops keep: EC'ssimsince 2026-11-21, its framed loop rule.) - GAP 3: EC's
sim n mandspat the start of the two games are positions in EC's inlined code; ours has the inliner'sreset_varsstatements:wpfor the last assignments, and the initializations stay before the call (EC'sautoafter it takes them). - GAP 4: the first port's
OD(D, F, P)passes the oracles on as records of their procedures: the hypothesis onDistis applied at those records (as GAP 6 ofSHA3Indiff.lean).
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):
clone import OptionIndifferentiability as OIndif with type p <- state, type f_out <- bool list, type f_in <- bool list * intis the namespaceOIndifof abbreviations, opened.require import SHA3Indiffcomes last, so itsstate,parseandvalidwin over the root-levelstateandSponge.BIRO.valid; stated withexport.FSome(F)hasproc init = F.initand is used as a functor (CSome): EC's alias (proc f = c;, since 2026-11-20; before, itsinitcalledF.init, exception E5).PSome(P)is only applied toPerm: it is a Lean function assemblingP.initwith its ownf,fi(PSome.own).CSome(C)(P) = FSome(C(Poget(P)))isModule.comp FSome (Module.comp C Poget).OSimulator,OFC,OPC,DFSome,DPSomehave no type in EasyCrypt; they are declared at the types they are used as.- The section's
declare module Distis used by none of its lemmas:SHA3OIndiffquantifies its ownDist.
`clone import OptionIndifferentiability as OIndif with type p <- state, #
type f_out <- bool list, type f_in <- bool list * int`
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
Equations
Instances For
EC's subtyping OPRIMITIVE <: ODPRIMITIVE (its f, fi).
Equations
- One or more equations did not get rendered due to their size.
EC's subtyping OFUNCTIONALITY <: ODFUNCTIONALITY (its f).
Equations
- One or more equations did not get rendered due to their size.
proc init = …; of module FSome: 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 FSome.init.procedure: applied with the @[simp] lemma FSome.init.apply_simp, it is the callee.
Equations
Instances For
Instantiating the holes of FSome.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [FSome.f.procedure.apply_simp]).
proc f of module FSome 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 FSome.f.apply_simp, which fills the holes of FSome.f.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 f of module FSome, 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 FSome.f.procedure.apply_simp) rather than run. Use FSome.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying FSome to a tuple of its single parameter F — the record of its procedures FSome.init, FSome.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 FSome.init.apply_simp, FSome.f.apply_simp to fill that procedure's holes.
@[simp]: applying FSome.f to the parameters proc f uses (F) is Module.proc (FSome.f.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 FSome.init, applied to the parameters its callee uses (F), is its callee, as written in the declaration.
The module declared by module FSome, 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 FSome.init, FSome.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FSome.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc fi of module PSome.own as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma PSome.own.fi.apply_simp, which fills the holes of PSome.own.fi.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 PSome.own, abstracted over its single parameter 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 PSome.own.f, PSome.own.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma PSome.own.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc f of module PSome.own as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma PSome.own.f.apply_simp, which fills the holes of PSome.own.f.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying PSome.own.fi to the parameters proc fi uses (P) is Module.proc (PSome.own.fi.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 PSome.own to a tuple of its single parameter P — the record of its procedures PSome.own.f, PSome.own.fi, 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 PSome.own.f.apply_simp, PSome.own.fi.apply_simp to fill that procedure's holes.
The body of proc fi of module PSome.own, as a procedure of its own: the one call it makes to a module parameter (P) 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 PSome.own.fi.procedure.apply_simp) rather than run. Use PSome.own.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of PSome.own.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [PSome.own.f.procedure.apply_simp]).
@[simp]: applying PSome.own.f to the parameters proc f uses (P) is Module.proc (PSome.own.f.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 f of module PSome.own, as a procedure of its own: the one call it makes to a module parameter (P) 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 PSome.own.f.procedure.apply_simp) rather than run. Use PSome.own.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of PSome.own.fi.procedure with a tuple holeArgs of procedures: the body of proc fi 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 [PSome.own.fi.procedure.apply_simp]).
EC's PSome (P : PRIMITIVE) : OPRIMITIVE: proc init = P.init, and proc f, proc fi.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc fi of module Poget, as a procedure of its own: the one call it makes to a module parameter (P) 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 Poget.fi.procedure.apply_simp) rather than run. Use Poget.fi 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 Poget, abstracted over its single parameter 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 Poget.f, Poget.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Poget.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc f of module Poget, as a procedure of its own: the one call it makes to a module parameter (P) 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 Poget.f.procedure.apply_simp) rather than run. Use Poget.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Poget.fi to the parameters proc fi uses (P) is Module.proc (Poget.fi.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 Poget.f to the parameters proc f uses (P) is Module.proc (Poget.f.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 f of module Poget as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Poget.f.apply_simp, which fills the holes of Poget.f.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 Poget.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [Poget.f.procedure.apply_simp]).
@[simp]: applying Poget to a tuple of its single parameter P — the record of its procedures Poget.f, Poget.fi, 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 Poget.f.apply_simp, Poget.fi.apply_simp to fill that procedure's holes.
Instantiating the holes of Poget.fi.procedure with a tuple holeArgs of procedures: the body of proc fi 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 [Poget.fi.procedure.apply_simp]).
proc fi of module Poget as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Poget.fi.apply_simp, which fills the holes of Poget.fi.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
module (CSome (C : CONSTRUCTION) : OCONSTRUCTION) (P : ODPRIMITIVE) = FSome(C(Poget(P))).
Equations
Instances For
The body of proc f of module OSimulator, 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 OSimulator.f.procedure.apply_simp) rather than run. Use OSimulator.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: OSimulator.fi = Module.proc OSimulator.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.
The body of proc init of module OSimulator, 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 OSimulator.init.procedure.apply_simp) rather than run. Use OSimulator.init 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 OSimulator, 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 OSimulator.init, OSimulator.f, OSimulator.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma OSimulator.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OSimulator.f to the parameters proc f uses (F) is Module.proc (OSimulator.f.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 OSimulator.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [OSimulator.f.procedure.apply_simp]).
The body of proc fi of module OSimulator, 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 OSimulator.fi.procedure.apply_simp) rather than run. Use OSimulator.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OSimulator to a tuple of its single parameter F — the record of its procedures OSimulator.init, OSimulator.f, OSimulator.fi, 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 OSimulator.init.apply_simp, OSimulator.f.apply_simp, OSimulator.fi.apply_simp to fill that procedure's holes.
proc f of module OSimulator 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 OSimulator.f.apply_simp, which fills the holes of OSimulator.f.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc fi of module OSimulator as a module: Module.proc OSimulator.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — OSimulator.fi.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of OSimulator.fi.procedure with a tuple holeArgs of procedures: the body of proc fi 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 [OSimulator.fi.procedure.apply_simp]).
Instantiating the holes of OSimulator.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 [OSimulator.init.procedure.apply_simp]).
proc init of module OSimulator as a module: Module.proc OSimulator.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — OSimulator.init.apply_simp says exactly that.
Equations
Instances For
@[simp]: OSimulator.init = Module.proc OSimulator.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
EC's Counter.c.
Equations
- GaudisCrypt.SHA3.SHA3_OIndiff.Counter.c = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.SHA3_OIndiff.Counter.c" ℤ)
Instances For
The module declared by module Counter: the record of its procedures Counter.init.
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 Counter.apply_simp to apply it with.
Instances For
The body of proc init of module Counter, 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 Counter.init.procedure.apply_simp) rather than run. Use Counter.init for this procedure as a module.
Equations
- GaudisCrypt.SHA3.SHA3_OIndiff.Counter.init.procedure = proc () : Unit { GaudisCrypt.SHA3.SHA3_OIndiff.Counter.c <- 0; return () }
Instances For
proc init of module Counter as a module: Module.proc Counter.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Counter.init.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of Counter.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 [Counter.init.procedure.apply_simp]).
@[simp]: Counter.init = Module.proc Counter.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OFC to a tuple of its single parameter F — the record of its procedures OFC.init, OFC.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 OFC.init.apply_simp, OFC.f.apply_simp to fill that procedure's holes.
proc f of module OFC 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 OFC.f.apply_simp, which fills the holes of OFC.f.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OFC.f to the parameters proc f uses (F) is Module.proc (OFC.f.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 OFC, 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 OFC.init, OFC.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma OFC.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 OFC, 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 OFC.init.procedure.apply_simp) rather than run. Use OFC.init for this procedure as a module.
Equations
- GaudisCrypt.SHA3.SHA3_OIndiff.OFC.init.procedure = proc () : Unit { call GaudisCrypt.SHA3.SHA3_OIndiff.Counter.init.procedure (); return () }
Instances For
Instantiating the holes of OFC.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 [OFC.init.procedure.apply_simp]).
proc init of module OFC as a module: Module.proc OFC.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — OFC.init.apply_simp says exactly that.
Equations
Instances For
@[simp]: OFC.init = Module.proc OFC.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
The body of proc f of module OFC, 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 OFC.f.procedure.apply_simp) rather than run. Use OFC.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of OFC.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [OFC.f.procedure.apply_simp]).
proc init of module OPC as a module: Module.proc OPC.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — OPC.init.apply_simp says exactly that.
Equations
Instances For
The body of proc f of module OPC, as a procedure of its own: the one call it makes to a module parameter (P) 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 OPC.f.procedure.apply_simp) rather than run. Use OPC.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OPC.f to the parameters proc f uses (P) is Module.proc (OPC.f.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 OPC.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 [OPC.init.procedure.apply_simp]).
proc f of module OPC as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma OPC.f.apply_simp, which fills the holes of OPC.f.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 OPC.fi.procedure with a tuple holeArgs of procedures: the body of proc fi 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 [OPC.fi.procedure.apply_simp]).
@[simp]: OPC.init = Module.proc OPC.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
@[simp]: applying OPC to a tuple of its single parameter P — the record of its procedures OPC.init, OPC.f, OPC.fi, 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 OPC.init.apply_simp, OPC.f.apply_simp, OPC.fi.apply_simp to fill that procedure's holes.
The body of proc init of module OPC, 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 OPC.init.procedure.apply_simp) rather than run. Use OPC.init for this procedure as a module.
Equations
- GaudisCrypt.SHA3.SHA3_OIndiff.OPC.init.procedure = proc () : Unit { skip; return () }
Instances For
Instantiating the holes of OPC.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [OPC.f.procedure.apply_simp]).
proc fi of module OPC as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma OPC.fi.apply_simp, which fills the holes of OPC.fi.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OPC.fi to the parameters proc fi uses (P) is Module.proc (OPC.fi.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 fi of module OPC, as a procedure of its own: the one call it makes to a module parameter (P) 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 OPC.fi.procedure.apply_simp) rather than run. Use OPC.fi 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 OPC, abstracted over its single parameter 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 OPC.init, OPC.f, OPC.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma OPC.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module ODRestr, 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 ODRestr.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma ODRestr.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of ODRestr.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 [ODRestr.distinguish.procedure.apply_simp]).
The body of proc distinguish of module ODRestr, as a procedure of its own: the one call it makes to a module parameter (F, P) 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 ODRestr.distinguish.procedure.apply_simp) rather than run. Use ODRestr.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying ODRestr.distinguish to the parameters proc distinguish uses (F, P) is Module.proc (ODRestr.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 ODRestr to a tuple of its 2 parameters F, P — the record of its procedures ODRestr.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 ODRestr.distinguish.apply_simp to fill that procedure's holes.
proc distinguish of module ODRestr as a module, abstracted over the module parameters it uses (F, P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma ODRestr.distinguish.apply_simp, which fills the holes of ODRestr.distinguish.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The section, with declare module Dist <: ODISTINGUISHER {-Perm, -Gconcl_list.SimLast, …} #
(used by none of its lemmas)
The body of proc f of module DFSome, 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 DFSome.f.procedure.apply_simp) rather than run. Use DFSome.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of DFSome.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [DFSome.f.procedure.apply_simp]).
The module declared by module DFSome, 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 DFSome.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DFSome.apply_simp says.
Equations
Instances For
@[simp]: applying DFSome to a tuple of its single parameter F — the record of its procedures DFSome.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 DFSome.f.apply_simp to fill that procedure's holes.
proc f of module DFSome 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 DFSome.f.apply_simp, which fills the holes of DFSome.f.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DFSome.f to the parameters proc f uses (F) is Module.proc (DFSome.f.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 DPSome.fi.procedure with a tuple holeArgs of procedures: the body of proc fi 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 [DPSome.fi.procedure.apply_simp]).
Instantiating the holes of DPSome.f.procedure with a tuple holeArgs of procedures: the body of proc f as written, with each hole call replaced by the matching holeArgs.lookup (HoleIndex.zero being the first hole the body declared). True by rfl.
Deliberately not @[simp], unlike the other apply_simp lemmas: its right-hand side is the whole body written out, so letting it fire on its own would turn any goal mentioning an instantiated procedure into that body. Inlining a procedure is a step to ask for by name (simp [DPSome.f.procedure.apply_simp]).
The body of proc fi of module DPSome, as a procedure of its own: the one call it makes to a module parameter (P) 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 DPSome.fi.procedure.apply_simp) rather than run. Use DPSome.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DPSome.f to the parameters proc f uses (P) is Module.proc (DPSome.f.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 f of module DPSome as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma DPSome.f.apply_simp, which fills the holes of DPSome.f.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc fi of module DPSome as a module, abstracted over the module parameters it uses (P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma DPSome.fi.apply_simp, which fills the holes of DPSome.fi.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying DPSome to a tuple of its single parameter P — the record of its procedures DPSome.f, DPSome.fi, 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 DPSome.f.apply_simp, DPSome.fi.apply_simp to fill that procedure's holes.
@[simp]: applying DPSome.fi to the parameters proc fi uses (P) is Module.proc (DPSome.fi.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 DPSome, abstracted over its single parameter 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 DPSome.f, DPSome.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DPSome.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc f of module DPSome, as a procedure of its own: the one call it makes to a module parameter (P) 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 DPSome.f.procedure.apply_simp) rather than run. Use DPSome.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying OD.distinguish to the parameters proc distinguish uses (F, P) is Module.proc (OD.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 OD to a tuple of its 2 parameters F, P — the record of its procedures OD.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 OD.distinguish.apply_simp to fill that procedure's holes.
The body of proc distinguish of module OD, as a procedure of its own: the one call it makes to a module parameter (F, P) 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 OD.distinguish.procedure.apply_simp) rather than run. Use OD.distinguish 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 OD, 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 OD.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma OD.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc distinguish of module OD as a module, abstracted over the module parameters it uses (F, P, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma OD.distinguish.apply_simp, which fills the holes of OD.distinguish.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 OD.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 [OD.distinguish.procedure.apply_simp]).
The two haves of SHA3OIndiff #
The option games against the bit-level games of SHA3Indiff for DRestr(OD(Dist)): they differ in
Cntr.c (written on the right only); EC's invariant ={glob Counter} /\ ={c}(Counter, Cntr) (with
={glob Perm} or ={glob IRO, glob Simulator}) is the states equal outside ocL with ocI.
OD(Dist) touches Dist's variables and Counter.c. Not an EC lemma.
EC's glob OD(Dist): glob Dist (the region given for Dist) and Counter.c.
EC's lemma SHA3OIndiff (Dist <: ODISTINGUISHER{-Counter, -Perm, -IRO, -BlockSponge.BIRO.IRO, -Cntr, -Simulator, -Gconcl_list.SimLast(Gconcl.S), -BlockSponge.C, -Gconcl.S, -SLCommon.F.RO, -SLCommon.F.FRO, -SLCommon.Redo, -SLCommon.C, -Gconcl_list.BIRO2.IRO, -Gconcl_list.F2.RO, -Gconcl_list.F2.FRO, -Gconcl_list.Simulator, -OSimulator}) &m : (forall (F <: ODFUNCTIONALITY) (P <: ODPRIMITIVE), islossless P.f => islossless P.fi => islossless F.f => islossless Dist(F,P).distinguish) => |Pr[OGReal(CSome(Sponge), PSome(Perm), ODRestr(Dist)).main() @ &m : res] -
Pr[OGIdeal(FSome(IRO), OSimulator, ODRestr(Dist)).main() @ &m : res]| <=
(limit ^ 2 - limit)%r / (2 ^ (r + c + 1))%r + (4 * limit ^ 2)%r / (2 ^ c)%r`.