The extension event (EasyCrypt proof/smart_counter/Gext.eca) — EC-fidelity port #
Real_G2 bounds the real game by the eager G2 plus the switching bound and the probabilities of
collisions (Pr_G1col) and extensions (Pr_ext, through the resampling game Gext). Over the
old port's declarations of G2, Eager, RRO (section FirstPort below), as
SmartCounter/Handle.lean and SmartCounter/Gcol.lean.
Translation:
- the local modules
ReSample,Gextare declared here as in EC,ReSample's variablecountaglobal_var(ReSample.count);Gext.resample,Gext.M,Gext.Sare modules of their own (EC's inner modules),Gext Dthe game withDa Lean parameter; declare module D <: DISTINGUISHER {-C, -PF, -G1, -G2, -Perm, -ROhandle.RO.m, -Redo, -ReSample.count}: EC's freshness of the local module forDinD's restriction.
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 export Gcol as Gcol0clones a theory without parameters: it isGcol, opened.G2(D, HS): its inner modulesM,Sdepend onHSonly: they are the functorsG2.M,G2.SofHS.G2 Dis theFROdistinguisher, withDa Lean parameter.clone include EagerCoreis theROhandleinstance ofPROM.FullRO.FullEager:Eager,RRO.- The local module
ReSample's variablecountis the lens parameterReSample_countof the local declarations that mention it, fresh by hypothesis (exception E6). - The local modules
ReSample,Gextare modules;Gext.resampleis its own module, andGext Dthe game (withDa Lean parameter).
Equations
- GaudisCrypt.SHA3.Gext.bad_ext m mi y = (y ∈ Finset.image Prod.snd (GaudisCrypt.EC.FMap.fdom m) ∨ y ∈ Finset.image Prod.snd (GaudisCrypt.EC.FMap.fdom mi))
Instances For
Equations
Equations
- GaudisCrypt.SHA3.Gext.hinvc m c = GaudisCrypt.EC.FMap.find (fun (x : GaudisCrypt.SHA3.SLCommon.handle) (y : GaudisCrypt.SHA3.Common.capacity) => decide (y = c)) m
Instances For
The handle oracle's type: FRO at handle, capacity.
Equations
Instances For
Instantiating the holes of G2.M.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 [G2.M.f.procedure.apply_simp]).
The body of proc f of module G2.M, as a procedure of its own: the one call it makes to a module parameter (HS) 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 G2.M.f.procedure.apply_simp) rather than run. Use G2.M.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying G2.M.f to the parameters proc f uses (HS) is Module.proc (G2.M.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]: applying G2.M to a tuple of its single parameter HS — the record of its procedures G2.M.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 G2.M.f.apply_simp to fill that procedure's holes.
The module declared by module G2.M, abstracted over its single parameter HS, 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 G2.M.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G2.M.apply_simp says.
Equations
Instances For
proc f of module G2.M as a module, abstracted over the module parameters it uses (HS, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G2.M.f.apply_simp, which fills the holes of G2.M.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 G2.S.f to the parameters proc f uses (HS) is Module.proc (G2.S.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 G2.S, abstracted over its single parameter HS, 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 G2.S.f, G2.S.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G2.S.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying G2.S to a tuple of its single parameter HS — the record of its procedures G2.S.f, G2.S.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 G2.S.f.apply_simp, G2.S.fi.apply_simp to fill that procedure's holes.
proc fi of module G2.S as a module, abstracted over the module parameters it uses (HS, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G2.S.fi.apply_simp, which fills the holes of G2.S.fi.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 G2.S.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 [G2.S.f.procedure.apply_simp]).
The body of proc f of module G2.S, as a procedure of its own: the 4 calls it makes to module parameters (HS) 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 G2.S.f.procedure.apply_simp) rather than run. Use G2.S.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 G2.S.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 [G2.S.fi.procedure.apply_simp]).
@[simp]: applying G2.S.fi to the parameters proc fi uses (HS) is Module.proc (G2.S.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 G2.S, as a procedure of its own: the 4 calls it makes to module parameters (HS) 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 G2.S.fi.procedure.apply_simp) rather than run. Use G2.S.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc f of module G2.S as a module, abstracted over the module parameters it uses (HS, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G2.S.f.apply_simp, which fills the holes of G2.S.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 G2.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 [G2.distinguish.procedure.apply_simp]).
@[simp]: applying G2 to a tuple of its single parameter HS — the record of its procedures G2.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 G2.distinguish.apply_simp to fill that procedure's holes.
proc distinguish of module G2 as a module, abstracted over the module parameters it uses (HS, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G2.distinguish.apply_simp, which fills the holes of G2.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 G2, as a procedure of its own: the 2 calls it makes to module parameters (HS) 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 G2.distinguish.procedure.apply_simp) rather than run. Use G2.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying G2.distinguish to the parameters proc distinguish uses (HS) is Module.proc (G2.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.
The module declared by module G2, abstracted over its single parameter HS, 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 G2.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G2.apply_simp says.
Equations
Instances For
G2(DRestr(D)) touches glob D and the variables of C, F.RO and G1 (not FRO.m). Not
an EC lemma: EasyCrypt reads a concrete module's globals off its code (for Eager_1_2's side
conditions, in Real_G2).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- GaudisCrypt.SHA3.Gext.inv_ext1 bext1 bext2 m mi FROm = (bext1 = true → bext2 = true ∨ GaudisCrypt.SHA3.Gext.inv_ext m mi FROm)
Instances For
cdistr is lossless (DCapacity.dunifin_ll), as an expectation.
A write at a fresh handle keeps inv_ext.
The handles stay below G1.chandle after a write at it and its increment.
A fresh write keeps the bindings of F.
inv_ext for an extension of F.
G1's update of G1.bext at the start of S.f, S.fi, against inv_ext1: the bad event, an
unknown handle for x.2, or inv_ext, all for the (extended) map F'.
Back to inv_ext1 from the weakened implication, after x entered G1.m or G1.mi and F
grew.
inv_ext1_of_weak when the unknown handle hy is resampled (G2's FRO.get): a witness at
hy makes G2's update of G1.bext fire.
The section EXT #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
One oracle step from inv_lt to inv_le: each of G1.m, G1.mi gains at most a binding, and
the count plus the unknown handles does not grow.
set_set_eqE.
G2's update of G1.bext is ReSample.f1's: bad_ext is membership in the capacities of
G1.m, G1.mi.
inv_le at a larger budget (below max_size).
Gap list (batch-fix later, see TRANSFER_SKILL.md §1.6):
- (GAP 1, fixed as Gcol's: the oracles' judgments without
={glob D}.) - GAP 2: as Gcol's: inline by name vs the old declarations' accessors: by index.
- GAP 3 (fixed):
spthrough an inlined call left whole-state existentials; now EC'sexists x0, P[x0/x] /\ x = e[x0/x]andequiv_elim*(Logic/ECSp.lean,Logic/ECElim.lean). - (GAP 4, fixed: a procedure's parameter,
xofS.f, is a name of the conditions afterproc—FrameVar.nameable: a binderxelsewhere in the goal no longer hides it.) - GAP 5 (closed 2026-11-21): a call's frame (
equiv_call) kept only variables outside the callee's footprint; it is now by writes, as EC's (RRO.allKnownreadsFRO.m). - (GAP 7, fixed: the local
hinG1_G2'sM.fis a name of the conditions — as GAP 4.) - (GAP 6, fixed:
smt_close [size_ge0]closes0 ≤ size p— whengrindfails, the lemmas' instances at the goal's terms are added,ec_instances.) - GAP 8:
={glob M}of a concrete functor application (G2(DRestr(D))) is the equality of an upper bound of its footprint: it does not give its variables' equalities (Real_G2's step throughEager_1_2onG1.bext \/ inv_ext …); EC readsglob Moff the code. (A module of procedures is read off its code now,Logic/GlobWrites.lean;G2(DRestr(D))is a functor, the oracle applied later: its footprint has no lower bound by its procedures yet.) The runs' equalityEager.main2_eq_main1instead. - EC's
x(the wrapperDRestr's parameter) is not a program variable after oursp(it is substituted):x{1} = x0{1}dropped,xread asx0.
The footprints of RRO's procedures (as Lib/EC/PROM.lean's for RO; to move there).
The footprint of the functor G2.S (for the solver, which reads concrete modules off their
code but not a functor's): G1's variables and F.RO.m (EC reads a module's globals off its
code).
EC's equiv G1_G2 : G1(DRestr(D)).main ~ Eager(G2(DRestr(D))).main1 : ={glob D} ==> ={res} /\ inv_ext1 G1.bext{1} G1.bext{2} G1.m{2} G1.mi{2} FRO.m{2}.
The section EXT #
EC's ReSample.count.
Equations
- GaudisCrypt.SHA3.Pilot.Gext.ReSample.count = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Pilot.Gext.ReSample.count" ℤ)
Instances For
@[simp]: ReSample.f = Module.proc ReSample.f.procedure — true by definition, proc f using no module parameter and so having no holes to fill.
The body of proc f1 of module ReSample, 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 ReSample.f1.procedure.apply_simp) rather than run. Use ReSample.f1 for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: ReSample.f1 = Module.proc ReSample.f1.procedure — true by definition, proc f1 using no module parameter and so having no holes to fill.
Instantiating the holes of ReSample.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 [ReSample.f.procedure.apply_simp]).
proc f of module ReSample as a module: Module.proc ReSample.f.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — ReSample.f.apply_simp says exactly that.
Equations
Instances For
The module declared by module ReSample: the record of its procedures ReSample.f, ReSample.f1.
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 ReSample.apply_simp to apply it with.
Equations
Instances For
Instantiating the holes of ReSample.f1.procedure with a tuple holeArgs of procedures: the body of proc f1 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 [ReSample.f1.procedure.apply_simp]).
The body of proc f of module ReSample, 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 ReSample.f.procedure.apply_simp) rather than run. Use ReSample.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc f1 of module ReSample as a module: Module.proc ReSample.f1.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — ReSample.f1.apply_simp says exactly that.
Equations
Instances For
@[simp]: Gext.resample.resample = Module.proc Gext.resample.resample.procedure — true by definition, proc resample using no module parameter and so having no holes to fill.
The module declared by module Gext.resample: the record of its procedures Gext.resample.resample.
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 Gext.resample.apply_simp to apply it with.
Equations
Instances For
The body of proc resample of module Gext.resample, 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 Gext.resample.resample.procedure.apply_simp) rather than run. Use Gext.resample.resample for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc resample of module Gext.resample as a module: Module.proc Gext.resample.resample.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Gext.resample.resample.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of Gext.resample.resample.procedure with a tuple holeArgs of procedures: the body of proc resample 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 [Gext.resample.resample.procedure.apply_simp]).
@[simp]: Gext.M.f = Module.proc Gext.M.f.procedure — true by definition, proc f using no module parameter and so having no holes to fill.
Instantiating the holes of Gext.M.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 [Gext.M.f.procedure.apply_simp]).
The module declared by module Gext.M: the record of its procedures Gext.M.f.
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 Gext.M.apply_simp to apply it with.
Instances For
proc f of module Gext.M as a module: Module.proc Gext.M.f.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Gext.M.f.apply_simp says exactly that.
Equations
Instances For
The body of proc f of module Gext.M, 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 Gext.M.f.procedure.apply_simp) rather than run. Use Gext.M.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: Gext.S.fi = Module.proc Gext.S.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.
The body of proc f of module Gext.S, 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 Gext.S.f.procedure.apply_simp) rather than run. Use Gext.S.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc f of module Gext.S as a module: Module.proc Gext.S.f.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Gext.S.f.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of Gext.S.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 [Gext.S.f.procedure.apply_simp]).
The body of proc fi of module Gext.S, 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 Gext.S.fi.procedure.apply_simp) rather than run. Use Gext.S.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc fi of module Gext.S as a module: Module.proc Gext.S.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Gext.S.fi.apply_simp says exactly that.
Equations
Instances For
@[simp]: Gext.S.f = Module.proc Gext.S.f.procedure — true by definition, proc f using no module parameter and so having no holes to fill.
The module declared by module Gext.S: the record of its procedures Gext.S.f, Gext.S.fi.
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 Gext.S.apply_simp to apply it with.
Equations
Instances For
Instantiating the holes of Gext.S.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 [Gext.S.fi.procedure.apply_simp]).
The body of proc distinguish of module Gext, 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 Gext.distinguish.procedure.apply_simp) rather than run. Use Gext.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: Gext.distinguish = Module.proc Gext.distinguish.procedure — true by definition, proc distinguish using no module parameter and so having no holes to fill.
The module declared by module Gext: the record of its procedures Gext.distinguish.
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 Gext.apply_simp to apply it with.
Instances For
proc distinguish of module Gext as a module: Module.proc Gext.distinguish.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Gext.distinguish.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of Gext.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 [Gext.distinguish.procedure.apply_simp]).
The footprints of Gext's oracles' procedures (for the solver, which does not read a
procedure called as a module, Module.proc).
EC's closer of the resampling loops' body in EG2_Gext (case(l{mr})=>[//|h1 l1/=Hle Hext c ?/=];split. + smt w=(drop0 size_ge0). rewrite drop0=>-[H|[x h][#]];1:by rewrite Hext // H. rewrite get_setE;case (h=h1)=> [/=->Hin->_ | Hneq ???]. + by right;apply (mem_image snd _ x). by rewrite Hext 2://;right;exists x h;rewrite Hneq.): one handle head l resampled.
EC's local lemma Pr_ext &m : Pr[Gext.distinguish()@&m : G1.bext /\ ReSample.count <= max_size] <= max_size%r * ((2*max_size)%r / (2^c)%r).
EC's closer of EG2_Gext's oracles when the unknown handle k is resampled
(rewrite … restr_set /= size_rem dom_restr Hin //=; smt w=size_set_le.): the invariant steps
from inv_lt to inv_le (G2's update of G1.bext is ReSample.f1's: the old port's
bext_eq).
EC's local equiv RROset_inv_lt : RRO.set ~ RRO.set : ={x, y, FRO.m} /\ inv_lt G1.m{2} G1.mi{2} C.c{1} FRO.m{2} ReSample.count{2} ==> ={res,FRO.m} /\ inv_lt G1.m{2} G1.mi{2} C.c{1} FRO.m{2} ReSample.count{2}.
EC's local equiv EG2_Gext : Eager(G2(DRestr(D))).main2 ~ Gext.distinguish : ={glob D} ==> ReSample.count{2} <= max_size /\ ((G1.bext{1} \/ inv_ext G1.m{1} G1.mi{1} FRO.m{1}) => G1.bext{2}).
Real_G2 #
In EC's section EXT; here a section of its own, D's restriction also naming the local
modules of Gcol and ConcreteF (fresh in EC) that Pr_G1col and Real_G1 exclude.
EC's lemma Real_G2 &m: Pr[GReal(D).main() @ &m: res /\ C.c <= max_size] <= Pr[Eager(G2(DRestr(D))).main2() @ &m: res] + (max_size ^ 2 - max_size)%r / 2%r * mu dstate (pred1 witness) + max_size%r * ((2*max_size)%r / (2^c)%r) + max_size%r * ((2*max_size)%r / (2^c)%r).