Conclusion of the squeezeless sponge proof (EasyCrypt proof/smart_counter/Gconcl.ec) — #
EC-fidelity port
The equivalences G2_G3, G3_G4, G4_Ideal in EC's scripts, over the old port's declarations of
IF, S, G3, G4 (section FirstPort below), as SmartCounter/Gext.lean.
Translation:
- EC's local
G3(RO),G4(RO)takeDas a Lean parameter (the section'sD):G3(D, F.LRO)for EC'sG3(F.LRO); declare module D <: DISTINGUISHER {-C, -Perm, -F.RO, -F.FRO, -S, -Redo}with the section'slocal clone import Gext as Gext0: the clone's modules are fresh forDin EC, hereD's restriction names them (G1,FRO.m).
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):
module IF = { proc init = F.RO.init proc f = F.RO.get }is a definition assembling the aliased procedures.- The section's
local clone import Gext as Gext0isGext, opened. The clone's module variables (G1.m,PF.m,ROhandle.FRO.m…) are fixedglobal_vars here, so their freshness forDis the hypothesisGext0Fresh D(exception E13). G3(RO : F.RO)andG4(RO : F.RO)take the module typeF.RO(F.RO_T, exception E3). Their inner modules depend onROonly: they are functors ofRO(G3.M,G3.S,G4.C,G4.S);G3 D,G4 Dare the games'distinguish, withDa Lean parameter, and take EasyCrypt'sd_in_t = unitargument, so that they areF.RO_Distinguishers (forRO_LRO_D).
EC's S.m.
Equations
- GaudisCrypt.SHA3.Gconcl.S.m = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Gconcl.S.m" GaudisCrypt.SHA3.SLCommon.smap)
Instances For
EC's S.mi.
Equations
- GaudisCrypt.SHA3.Gconcl.S.mi = GaudisCrypt.varLens (GaudisCrypt.VariableName.mk "GaudisCrypt.SHA3.Gconcl.S.mi" GaudisCrypt.SHA3.SLCommon.smap)
Instances For
EC's S.paths.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc fi of module 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 S.fi.procedure.apply_simp) rather than run. Use S.fi for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc f of module S, 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 S.f.procedure.apply_simp) rather than run. Use S.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying S.f to the parameters proc f uses (F) is Module.proc (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 S, 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 S.init, S.f, S.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma S.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc fi of module S as a module: Module.proc S.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — S.fi.apply_simp says exactly that.
Equations
Instances For
@[simp]: S.fi = Module.proc S.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.
@[simp]: S.init = Module.proc S.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.
proc f of module S 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 S.f.apply_simp, which fills the holes of 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 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 [S.fi.procedure.apply_simp]).
The body of proc init of module 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 S.init.procedure.apply_simp) rather than run. Use S.init for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying S to a tuple of its single parameter F — the record of its procedures S.init, S.f, 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 S.init.apply_simp, S.f.apply_simp, S.fi.apply_simp to fill that procedure's holes.
proc init of module S as a module: Module.proc S.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — S.init.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of 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 [S.f.procedure.apply_simp]).
Instantiating the holes of S.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 [S.init.procedure.apply_simp]).
The section #
The body of proc f of module G3.M, as a procedure of its own: the 2 calls it makes to module parameters (RO) 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 G3.M.f.procedure.apply_simp) rather than run. Use G3.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 G3.M to a tuple of its single parameter RO — the record of its procedures G3.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 G3.M.f.apply_simp to fill that procedure's holes.
proc f of module G3.M as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G3.M.f.apply_simp, which fills the holes of G3.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 G3.M.f to the parameters proc f uses (RO) is Module.proc (G3.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.
The module declared by module G3.M, abstracted over its single parameter RO, 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 G3.M.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G3.M.apply_simp says.
Equations
Instances For
Instantiating the holes of G3.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 [G3.M.f.procedure.apply_simp]).
@[simp]: G3.S.fi = Module.proc G3.S.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.
@[simp]: applying G3.S to a tuple of its single parameter RO — the record of its procedures G3.S.f, G3.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 G3.S.f.apply_simp, G3.S.fi.apply_simp to fill that procedure's holes.
Instantiating the holes of G3.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 [G3.S.fi.procedure.apply_simp]).
Instantiating the holes of G3.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 [G3.S.f.procedure.apply_simp]).
proc f of module G3.S as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G3.S.f.apply_simp, which fills the holes of G3.S.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 fi of module G3.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 G3.S.fi.procedure.apply_simp) rather than run. Use G3.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 G3.S as a module: Module.proc G3.S.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — G3.S.fi.apply_simp says exactly that.
Equations
Instances For
The body of proc f of module G3.S, as a procedure of its own: the one call it makes to a module parameter (RO) 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 G3.S.f.procedure.apply_simp) rather than run. Use G3.S.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying G3.S.f to the parameters proc f uses (RO) is Module.proc (G3.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 G3.S, abstracted over its single parameter RO, 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 G3.S.f, G3.S.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G3.S.apply_simp says.
Equations
Instances For
The body of proc distinguish of module G3, as a procedure of its own: the 2 calls it makes to module parameters (RO) 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 G3.distinguish.procedure.apply_simp) rather than run. Use G3.distinguish for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying G3 to a tuple of its single parameter RO — the record of its procedures G3.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 G3.distinguish.apply_simp to fill that procedure's holes.
proc distinguish of module G3 as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G3.distinguish.apply_simp, which fills the holes of G3.distinguish.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module declared by module G3, abstracted over its single parameter RO, 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 G3.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G3.apply_simp says.
Equations
Instances For
Instantiating the holes of G3.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 [G3.distinguish.procedure.apply_simp]).
@[simp]: applying G3.distinguish to the parameters proc distinguish uses (RO) is Module.proc (G3.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 G4.C to a tuple of its single parameter RO — the record of its procedures G4.C.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 G4.C.f.apply_simp to fill that procedure's holes.
Instantiating the holes of G4.C.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 [G4.C.f.procedure.apply_simp]).
@[simp]: applying G4.C.f to the parameters proc f uses (RO) is Module.proc (G4.C.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 G4.C, as a procedure of its own: the 2 calls it makes to module parameters (RO) 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 G4.C.f.procedure.apply_simp) rather than run. Use G4.C.f 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 G4.C, abstracted over its single parameter RO, 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 G4.C.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G4.C.apply_simp says.
Equations
Instances For
proc f of module G4.C as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G4.C.f.apply_simp, which fills the holes of G4.C.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 G4.S, as a procedure of its own: the one call it makes to a module parameter (RO) 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 G4.S.f.procedure.apply_simp) rather than run. Use G4.S.f for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: G4.S.fi = Module.proc G4.S.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.
Instantiating the holes of G4.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 [G4.S.f.procedure.apply_simp]).
Instantiating the holes of G4.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 [G4.S.fi.procedure.apply_simp]).
proc f of module G4.S as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G4.S.f.apply_simp, which fills the holes of G4.S.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 G4.S to a tuple of its single parameter RO — the record of its procedures G4.S.f, G4.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 G4.S.f.apply_simp, G4.S.fi.apply_simp to fill that procedure's holes.
@[simp]: applying G4.S.f to the parameters proc f uses (RO) is Module.proc (G4.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.
proc fi of module G4.S as a module: Module.proc G4.S.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — G4.S.fi.apply_simp says exactly that.
Equations
Instances For
The module declared by module G4.S, abstracted over its single parameter RO, 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 G4.S.f, G4.S.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G4.S.apply_simp says.
Equations
Instances For
The body of proc fi of module G4.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 G4.S.fi.procedure.apply_simp) rather than run. Use G4.S.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 G4, abstracted over its single parameter RO, 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 G4.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma G4.apply_simp says.
Equations
Instances For
@[simp]: applying G4 to a tuple of its single parameter RO — the record of its procedures G4.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 G4.distinguish.apply_simp to fill that procedure's holes.
The body of proc distinguish of module G4, as a procedure of its own: the 2 calls it makes to module parameters (RO) 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 G4.distinguish.procedure.apply_simp) rather than run. Use G4.distinguish 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 G4.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 [G4.distinguish.procedure.apply_simp]).
@[simp]: applying G4.distinguish to the parameters proc distinguish uses (RO) is Module.proc (G4.distinguish.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
proc distinguish of module G4 as a module, abstracted over the module parameters it uses (RO, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma G4.distinguish.apply_simp, which fills the holes of G4.distinguish.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The oracles' steps #
G3 D touches glob D and the variables of C and G1 and FRO.m (not F.RO.m, its
oracle's). Not an EC lemma: EasyCrypt reads a concrete module's globals off its code (for
RO_LRO_D's side conditions, in Real_Ideal).
G4 D touches glob D and the variables of C and G1.m, G1.mi, G1.paths (as
fvP_G3).
Gap list (batch-fix later, see TRANSFER_SKILL.md §1.6):
- (GAP 1, fixed: EC's
simgoes into calls of different concrete procedures,G4.S(F.LRO).fagainstS(IF).f: where ours makes no progress, it inlines the callees and closes what is left byauto_close.) - (GAP 3, fixed as Gext's GAP 4: a procedure's parameter,
xofG3.S.f, is a name of the conditions afterproc.) - (closed, was GAP 4) EC's
swap{1} [3..7] -2;swap{2} [4..8] -3inG2_G3'sS.fmovesRRO's calls past the conditional callingF.RO.get; footprint disjointness does not apply (both readx). EC's laterinline *comes first here: what the block moves past is then deterministic code, which ourswapcommutes with it (StmtSwap.discharge), at EC's positions after the inlining; the rest of EC's script with itsseqs at the inlined positions. - (GAP 5, fixed:
simthrough two loops whose relation after them reads what they change: EC's equality set as the invariant.) - (GAP 2, fixed: the one-sided
equiv_while{i}keeps EC's frame, its exit in the precondition goal: EC's invarianttrue.)
EC's local equiv G2_G3: Eager(G2(DRestr(D))).main2 ~ G3(F.LRO).distinguish : ={glob D} ==> ={res}.
EC's local equiv G3_G4 : G3(F.RO).distinguish ~ G4(F.RO).distinguish : ={glob D} ==> ={res}.
EC's local equiv G4_Ideal : G4(F.LRO).distinguish ~ IdealIndif(IF,S,DRestr(D)).main : ={glob D} ==> ={res}.
Real_Ideal #
D's restriction also names the local modules of Gext, Gcol and ConcreteF (fresh in EC)
that Real_G2 excludes.
EC's lemma Real_Ideal &m: Pr[GReal(D).main() @ &m: res /\ C.c <= max_size] <= Pr[IdealIndif(IF,S,DRestr(D)).main() @ &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).