Documentation

GaudisCrypt.Examples.SHA3.SHA3Indiff

Indifferentiability of the sponge (EasyCrypt proof/SHA3Indiff.ec) — EC-fidelity port, complete #

The lemmas of SHA3Indiff.ec in EC's scripts, over the old port's declarations of Simulator, Cntr, FC, PC, DRestr (section FirstPort below), as SmartCounter/Gconcl.lean over the old Gconcl.

Translation:

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):

@[reducible, inline]

op limit : int = SLCommon.max_size.

Equations
Instances For

    The last inlined simulator #

    EC's Simulator.m.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      instance GaudisCrypt.SHA3.SHA3Indiff.instIsGlobalVarFMapStateMMk [SLCommon.Params] :
      Simulator.m.IsGlobalVar (VariableName.mk "GaudisCrypt.SHA3.SHA3Indiff.Simulator.m" (EC.FMap state state))

      EC's Simulator.mi.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        instance GaudisCrypt.SHA3.SHA3Indiff.instIsGlobalVarFMapStateMiMk [SLCommon.Params] :
        Simulator.mi.IsGlobalVar (VariableName.mk "GaudisCrypt.SHA3.SHA3Indiff.Simulator.mi" (EC.FMap state state))

        EC's Simulator.paths.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem GaudisCrypt.SHA3.SHA3Indiff.Simulator.fi.procedure.apply_simp [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (holeArgs✝ : HoleSigs.empty.Instantiation) :
          procedure.instantiate holeArgs✝ = proc (x : state) : state { var y1 : Common.block, y2 : Common.capacity, y : state; if (!decide ((§mi).dom §x)) { y1 <$ Common.bdistr; y2 <$ Common.cdistr; y <- (§y1, §y2); mi <- (§mi).set §x §y; m <- (§m).set §y §x; } else { y <- EC.oget ((§mi).get §x); } return §y }

          Instantiating the holes of Simulator.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 [Simulator.fi.procedure.apply_simp]).

          The body of proc init of module Simulator, 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 Simulator.init.procedure.apply_simp) rather than run. Use Simulator.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 Simulator, 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 Simulator.init, Simulator.f, Simulator.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Simulator.apply_simp says.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]

              @[simp]: Simulator.init = Module.proc Simulator.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.

              @[simp]

              @[simp]: applying Simulator.f to the parameters proc f uses (F) is Module.proc (Simulator.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 Simulator, 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 Simulator.f.procedure.apply_simp) rather than run. Use Simulator.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 Simulator.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 [Simulator.init.procedure.apply_simp]).

                proc fi of module Simulator as a module: Module.proc Simulator.fi.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Simulator.fi.apply_simp says exactly that.

                Equations
                Instances For
                  @[simp]

                  @[simp]: applying Simulator to a tuple of its single parameter F — the record of its procedures Simulator.init, Simulator.f, Simulator.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 Simulator.init.apply_simp, Simulator.f.apply_simp, Simulator.fi.apply_simp to fill that procedure's holes.

                  proc f of module Simulator 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 Simulator.f.apply_simp, which fills the holes of Simulator.f.procedure with the callees the body called.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[simp]

                    @[simp]: Simulator.fi = Module.proc Simulator.fi.procedure — true by definition, proc fi using no module parameter and so having no holes to fill.

                    proc init of module Simulator as a module: Module.proc Simulator.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Simulator.init.apply_simp says exactly that.

                    Equations
                    Instances For

                      The body of proc fi of module Simulator, 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 Simulator.fi.procedure.apply_simp) rather than run. Use Simulator.fi for this procedure as a module.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem GaudisCrypt.SHA3.SHA3Indiff.Simulator.f.procedure.apply_simp [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (holeArgs✝ : (HoleSigs.cons (procsig (List Bool × ℤ) → List Bool) HoleSigs.empty).Instantiation) :
                        procedure.instantiate holeArgs✝ = proc (x : state) : state { var p : List Common.block, v : Common.block, z : List Common.block, q : List Common.block, k : ℤ, cs : List Bool, y1 : Common.block, y2 : Common.capacity, y : state; if (!decide ((§m).dom §x)) { if (decide ((§paths).dom (§x).2)) { p, v <- EC.oget ((§paths).get (§x).2); z <- []; q, k <- parse (EC.rcons (§p) (§v +^ (§x).1)); if (valid §q) { cs <- call (holeArgs✝.lookup HoleIndex.zero) (EC.oget (Common.unpad_blocks §q), §k * Common.r); z <- Common.bits2blocks §cs; } else { z <- call Gconcl_list.BIRO2.IRO.f.procedure (§q, §k); } y1 <- EC.last Common.b0 §z; } else { y1 <$ Common.bdistr; } y2 <$ Common.cdistr; y <- (§y1, §y2); m <- (§m).set §x §y; mi <- (§mi).set §y §x; if (decide ((§paths).dom (§x).2)) { p, v <- EC.oget ((§paths).get (§x).2); paths <- (§paths).set §y2 (EC.rcons (§p) (§v +^ (§x).1), (§y).1); } } else { y <- EC.oget ((§m).get §x); } return §y }

                        Instantiating the holes of Simulator.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 [Simulator.f.procedure.apply_simp]).

                        Restrictions #

                        The counter for the functionality counts the number of times the underlying primitive is called inside the functionality. This number is equal to the sum of the number of blocks in the padding of the input, plus the number of additional blocks the squeezing phase has to output.

                        instance GaudisCrypt.SHA3.SHA3Indiff.instIsGlobalVarIntCMk :
                        Cntr.c.IsGlobalVar (VariableName.mk "GaudisCrypt.SHA3.SHA3Indiff.Cntr.c" ℤ)

                        EC's Cntr.c.

                        Equations
                        Instances For
                          @[simp]

                          @[simp]: Cntr.init = Module.proc Cntr.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.

                          proc init of module Cntr as a module: Module.proc Cntr.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Cntr.init.apply_simp says exactly that.

                          Equations
                          Instances For

                            The body of proc init of module Cntr, 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 Cntr.init.procedure.apply_simp) rather than run. Use Cntr.init for this procedure as a module.

                            Equations
                            Instances For

                              The module declared by module Cntr: the record of its procedures Cntr.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 Cntr.apply_simp to apply it with.

                              Equations
                              Instances For

                                Instantiating the holes of Cntr.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 [Cntr.init.procedure.apply_simp]).

                                Instantiating the holes of FC.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 [FC.init.procedure.apply_simp]).

                                The module declared by module FC, 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 FC.init, FC.f, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FC.apply_simp says.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  proc f of module FC 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 FC.f.apply_simp, which fills the holes of FC.f.procedure with the callees the body called.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    theorem GaudisCrypt.SHA3.SHA3Indiff.FC.f.procedure.apply_simp [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (holeArgs✝ : (HoleSigs.cons (procsig (List Bool × ℤ) → List Bool) HoleSigs.empty).Instantiation) :
                                    procedure.instantiate holeArgs✝ = proc (x : List Bool × ℤ) : (List Bool) { var bs : List Bool, n : ℤ, z : List Bool; bs, n <- §x; z <- []; if (decide (§Cntr.c + ((EC.size §bs + 1) / Common.r + 1) + max ((§n + Common.r - 1) / Common.r - 1) 0 ≤ limit)) { Cntr.c <- §Cntr.c + ((EC.size §bs + 1) / Common.r + 1) + max ((§n + Common.r - 1) / Common.r - 1) 0; z <- call (holeArgs✝.lookup HoleIndex.zero) (§bs, §n); } return §z }

                                    Instantiating the holes of FC.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 [FC.f.procedure.apply_simp]).

                                    proc init of module FC as a module: Module.proc FC.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — FC.init.apply_simp says exactly that.

                                    Equations
                                    Instances For
                                      @[simp]

                                      @[simp]: applying FC.f to the parameters proc f uses (F) is Module.proc (FC.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]

                                      @[simp]: applying FC to a tuple of its single parameter F — the record of its procedures FC.init, FC.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 FC.init.apply_simp, FC.f.apply_simp to fill that procedure's holes.

                                      The body of proc init of module FC, 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 FC.init.procedure.apply_simp) rather than run. Use FC.init for this procedure as a module.

                                      Equations
                                      Instances For

                                        The body of proc f of module FC, 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 FC.f.procedure.apply_simp) rather than run. Use FC.f for this procedure as a module.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[simp]

                                          @[simp]: FC.init = Module.proc FC.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.

                                          The body of proc fi of module PC, 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 PC.fi.procedure.apply_simp) rather than run. Use PC.fi for this procedure as a module.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            @[simp]

                                            @[simp]: applying PC to a tuple of its single parameter P — the record of its procedures PC.init, PC.f, PC.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 PC.init.apply_simp, PC.f.apply_simp, PC.fi.apply_simp to fill that procedure's holes.

                                            @[simp]

                                            @[simp]: PC.init = Module.proc PC.init.procedure — true by definition, proc init using no module parameter and so having no holes to fill.

                                            Instantiating the holes of PC.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 [PC.fi.procedure.apply_simp]).

                                            proc f of module PC 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 PC.f.apply_simp, which fills the holes of PC.f.procedure with the callees the body called.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              @[simp]

                                              @[simp]: applying PC.fi to the parameters proc fi uses (P) is Module.proc (PC.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.

                                              proc fi of module PC 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 PC.fi.apply_simp, which fills the holes of PC.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 PC.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 [PC.init.procedure.apply_simp]).

                                                The body of proc f of module PC, 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 PC.f.procedure.apply_simp) rather than run. Use PC.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 PC, 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 PC.init, PC.f, PC.fi, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma PC.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 PC, 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 PC.init.procedure.apply_simp) rather than run. Use PC.init for this procedure as a module.

                                                    Equations
                                                    Instances For

                                                      Instantiating the holes of PC.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 [PC.f.procedure.apply_simp]).

                                                      proc init of module PC as a module: Module.proc PC.init.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — PC.init.apply_simp says exactly that.

                                                      Equations
                                                      Instances For
                                                        @[simp]

                                                        @[simp]: applying PC.f to the parameters proc f uses (P) is Module.proc (PC.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]

                                                        @[simp]: applying DRestr to a tuple of its 2 parameters F, P — the record of its procedures DRestr.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 DRestr.distinguish.apply_simp to fill that procedure's holes.

                                                        Instantiating the holes of DRestr.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 [DRestr.distinguish.procedure.apply_simp]).

                                                        The body of proc distinguish of module DRestr, 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 DRestr.distinguish.procedure.apply_simp) rather than run. Use DRestr.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 DRestr, 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 DRestr.distinguish, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DRestr.apply_simp says.

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            @[simp]

                                                            @[simp]: applying DRestr.distinguish to the parameters proc distinguish uses (F, P) is Module.proc (DRestr.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 DRestr 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 DRestr.distinguish.apply_simp, which fills the holes of DRestr.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 <: DISTINGUISHER {-Perm, -Gconcl_list.SimLast, -IRO, #

                                                              -Cntr, -BlockSponge.BIRO.IRO, -Simulator, -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}anddeclare axiom Dist_lossless`

                                                              EC's ={c}(Cntr, BlockSponge.C): Cntr.c{1} = BlockSponge.C.c{2}.

                                                              Equations
                                                              Instances For

                                                                SimLast(Gconcl.S) is an EasyCrypt-like simulator: its init does not depend on the oracle (Gconcl.S.init calls nothing), so it is representable (SIMULATOR.representable_of_init), and it has finitely many variables. Not an EC lemma (EasyCrypt's module typing).

                                                                The bound (limit ^ 2 - limit)%r / (2 ^ (r + c + 1))%r + (4 * limit ^ 2)%r / (2 ^ c)%r of security and SHA3Indiff (an abbreviation).

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                Instances For

                                                                  Gap list (batch-fix later, see TRANSFER_SKILL.md §1.6):

                                                                  theorem GaudisCrypt.SHA3.Pilot.SHA3Indiff.drestr_commute1 [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (Dist : Sponge.DISTINGUISHER) [Module.Declared Dist (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] (m : VariableAssignment) :

                                                                  EC's lemma drestr_commute1 &m.

                                                                  theorem GaudisCrypt.SHA3.Pilot.SHA3Indiff.drestr_commute2 [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (Dist : Sponge.DISTINGUISHER) [Module.Declared Dist (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] (m : VariableAssignment) :

                                                                  EC's lemma drestr_commute2 &m.

                                                                  EC's local equiv equiv_sim_f (F <: DFUNCTIONALITY{-Gconcl.S, -Simulator}) : RaiseSim(Gconcl_list.SimLast(Gconcl.S),F).f ~ Simulator(F).f : ={arg, glob F, glob Gconcl_list.BIRO2.IRO} /\ ={m, mi, paths}(Gconcl.S,Simulator) ==> ={res, glob F, glob Gconcl_list.BIRO2.IRO} /\ ={m, mi, paths}(Gconcl.S,Simulator).

                                                                  EC's local equiv equiv_sim_fi (F <: DFUNCTIONALITY{-Gconcl.S, -Simulator}) : RaiseSim(Gconcl_list.SimLast(Gconcl.S),F).fi ~ Simulator(F).fi : ={arg, glob F, glob Gconcl_list.BIRO2.IRO} /\ ={m, mi, paths}(Gconcl.S,Simulator) ==> ={res, glob F, glob Gconcl_list.BIRO2.IRO} /\ ={m, mi, paths}(Gconcl.S,Simulator).

                                                                  theorem GaudisCrypt.SHA3.Pilot.SHA3Indiff.replace_simulator [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (Dist : Sponge.DISTINGUISHER) [Module.Declared Dist (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] (m : VariableAssignment) :

                                                                  EC's local lemma replace_simulator &m.

                                                                  theorem GaudisCrypt.SHA3.Pilot.SHA3Indiff.security [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (Dist : Sponge.DISTINGUISHER) [Module.Declared Dist (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] {R : Footprint VariableAssignment} [Module.ECGlob Dist R] [R.Restricted (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] (Dist_lossless : ∀ (F : Sponge.DFUNCTIONALITY) [Module.Declared F R] (P : Sponge.DPRIMITIVE) [Module.Declared P R], (SHA3.Indifferentiability.DPRIMITIVE.f (Common.block × Common.capacity) (List Bool × ℤ) (List Bool) P).procedure.IsLossless → (SHA3.Indifferentiability.DPRIMITIVE.fi (Common.block × Common.capacity) (List Bool × ℤ) (List Bool) P).procedure.IsLossless → (SHA3.Indifferentiability.DFUNCTIONALITY.f (Common.block × Common.capacity) (List Bool × ℤ) (List Bool) F).procedure.IsLossless → (Module.app Dist (Module.pair F P)).procedure.IsLossless) (m : VariableAssignment) :

                                                                  EC's lemma security &m : |Pr[RealIndif(Sponge, Perm, DRestr(Dist)).main() @ &m : res] - Pr[IdealIndif(IRO, Simulator, DRestr(Dist)).main() @ &m : res]| <= (limit ^ 2 - limit)%r / (2 ^ (r + c + 1))%r + (4 * limit ^ 2)%r / (2 ^ c)%r`.

                                                                  theorem GaudisCrypt.SHA3.Pilot.SHA3Indiff.SHA3Indiff [SLCommon.Params] [BlockSponge.Params] [Gconcl_list.Params] (Dist : Sponge.DISTINGUISHER) [Module.Declared Dist (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] {R : Footprint VariableAssignment} [Module.ECGlob Dist R] [R.Restricted (Common.Perm.m.footprint ⊔ Common.Perm.mi.footprint ⊔ Gconcl_list.BIRO2.IRO.mp.footprint ⊔ Sponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Cntr.c.footprint ⊔ BlockSponge.BIRO.IRO.mp.footprint ⊔ SHA3Indiff.Simulator.m.footprint ⊔ SHA3Indiff.Simulator.mi.footprint ⊔ SHA3Indiff.Simulator.paths.footprint ⊔ BlockSponge.C.c.footprint ⊔ Gconcl.S.m.footprint ⊔ Gconcl.S.mi.footprint ⊔ Gconcl.S.paths.footprint ⊔ SLCommon.F.RO.m.footprint ⊔ SLCommon.F.FRO.m.footprint ⊔ SLCommon.Redo.prefixes.footprint ⊔ SLCommon.C.c.footprint ⊔ SLCommon.C.queries.footprint ⊔ Gconcl_list.F2.RO.m.footprint ⊔ Gconcl_list.F2.FRO.m.footprint ⊔ Gconcl_list.Simulator.m.footprint ⊔ Gconcl_list.Simulator.mi.footprint ⊔ Gconcl_list.Simulator.paths.footprint ⊔ Gconcl_list.Simulator.unvalid_map.footprint ⊔ Sponge.HybridIRO.HybridIROLazy.mp.footprint ⊔ Sponge.HybridIRO.HybridIROEager.mp.footprint ⊔ Sponge.HybridIRO.ERO.RO.m.footprint ⊔ Sponge.HybridIRO.ERO.FRO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.RO.m.footprint ⊔ Gconcl_list.Simplify_Simulator.IRO2.FRO.m.footprint ⊔ Handle.G1.m.footprint ⊔ Handle.G1.mi.footprint ⊔ Handle.G1.mh.footprint ⊔ Handle.G1.mhi.footprint ⊔ Handle.G1.bext.footprint ⊔ Handle.G1.bcol.footprint ⊔ Handle.ROhandle.FRO.m.footprint ⊔ Handle.G1.paths.footprint ⊔ Handle.G1.chandle.footprint ⊔ ConcreteF.PF.m.footprint ⊔ ConcreteF.PF.mi.footprint ⊔ Handle.ROhandle.RO.m.footprint ⊔ Gext.ReSample.count.footprint ⊔ Gcol.Gcol.count.footprint ⊔ ConcreteF.Switching.DBounder.FBounder.c.footprint ⊔ ConcreteF.Switching.ARP.coll.footprint ⊔ ConcreteF.Switching.ARP.m.footprint ⊔ ConcreteF.Switching.ARP.mi.footprint ⊔ ConcreteF.Switching.PRPi.m.footprint ⊔ ConcreteF.Switching.PRPi.mi.footprint)] (m : VariableAssignment) :

                                                                  EC's lemma SHA3Indiff (Dist <: DISTINGUISHER{-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}) &m : (forall (F <: DFUNCTIONALITY {-Dist}) (P <: DPRIMITIVE {-Dist}), islossless P.f => islossless P.fi => islossless F.f => islossless Dist(F,P).distinguish) => |Pr[RealIndif(Sponge, Perm, DRestr(Dist)).main() @ &m : res] - Pr[IdealIndif(IRO, Simulator, DRestr(Dist)).main() @ &m : res]| <= (limit ^ 2 - limit)%r / (2 ^ (r + c + 1))%r + (4 * limit ^ 2)%r / (2 ^ c)%r`.

                                                                  The restriction and glob Dist as in the section above.