Documentation

GaudisCrypt.Examples.Pedersen

The Pedersen commitment scheme (EasyCrypt examples/Pedersen.ec) #

Pedersen, "Non-interactive and information-theoretic secure verifiable secret sharing". EC's file, declaration by declaration and script line by line: correctness, perfect hiding (the unhider wins with probability exactly 1/2), and computational binding by reduction to the discrete logarithm (Lib/EC/DLog.lean). All of EC's lemmas are proven.

Translation:

Gap list (what keeps the file from reading as EC's; items of the examples' infrastructure batch):

theorem GaudisCrypt.Examples.Pedersen.Pedersen.verify.procedure.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (holeArgs✝ : HoleSigs.empty.Instantiation) :
procedure.instantiate holeArgs✝ = proc (h : group, m : exp, c : group, d : exp) : Bool { var c' : group; c' <- EC.CyclicGroup.g ^ §d * §h ^ §m; return decide (§c = §c') }

Instantiating the holes of Pedersen.verify.procedure with a tuple holeArgs of procedures: the body of proc verify 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 [Pedersen.verify.procedure.apply_simp]).

theorem GaudisCrypt.Examples.Pedersen.Pedersen.gen.procedure.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (holeArgs✝ : HoleSigs.empty.Instantiation) :
procedure.instantiate holeArgs✝ = proc () : group { var x : exp, h : group; x <$ EC.CyclicGroup.dt; h <- EC.CyclicGroup.g ^ §x; return §h }

Instantiating the holes of Pedersen.gen.procedure with a tuple holeArgs of procedures: the body of proc gen 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 [Pedersen.gen.procedure.apply_simp]).

noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.gen {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
procmod () → group

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

Equations
Instances For
    theorem GaudisCrypt.Examples.Pedersen.Pedersen.commit.procedure.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (holeArgs✝ : HoleSigs.empty.Instantiation) :
    procedure.instantiate holeArgs✝ = proc (h : group, m : exp) : (group × exp) { var d : exp, c : group; d <$ EC.CyclicGroup.dt; c <- EC.CyclicGroup.g ^ §d * §h ^ §m; return (§c, §d) }

    Instantiating the holes of Pedersen.commit.procedure with a tuple holeArgs of procedures: the body of proc commit 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 [Pedersen.commit.procedure.apply_simp]).

    @[simp]
    theorem GaudisCrypt.Examples.Pedersen.Pedersen.gen.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

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

    noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.verify.procedure {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

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

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.commit.procedure {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
      proctype (group, exp) -> group × exp

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

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.verify {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

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

        Equations
        Instances For
          noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.commit {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
          procmod (group, exp) → (group × exp)

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

          Equations
          Instances For
            noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
            CM.CommitmentScheme

            The module declared by module Pedersen: the record of its procedures Pedersen.gen, Pedersen.commit, Pedersen.verify.

            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 Pedersen.apply_simp to apply it with.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem GaudisCrypt.Examples.Pedersen.Pedersen.verify.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

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

              @[simp]
              theorem GaudisCrypt.Examples.Pedersen.Pedersen.commit.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

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

              noncomputable def GaudisCrypt.Examples.Pedersen.Pedersen.gen.procedure {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
              proctype () -> group

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

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                noncomputable def GaudisCrypt.Examples.Pedersen.DLogAttacker.guess {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

                proc guess of module DLogAttacker as a module, abstracted over the module parameters it uses (B, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                Apply it with the @[simp] lemma DLogAttacker.guess.apply_simp, which fills the holes of DLogAttacker.guess.procedure with the callees the body called.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem GaudisCrypt.Examples.Pedersen.DLogAttacker.guess.procedure.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (holeArgs✝ : (HoleSigs.cons (procsig (group) → group × exp × exp × exp × exp) HoleSigs.empty).Instantiation) :
                  procedure.instantiate holeArgs✝ = proc (h : group) : (Option exp) { var c : group, m : exp, d : exp, m' : exp, d' : exp, x : Option exp; c, m, d, m', d' <- call (holeArgs✝.lookup HoleIndex.zero) (§h); if (decide (§c = EC.CyclicGroup.g ^ §d * §h ^ §m ∧ §c = EC.CyclicGroup.g ^ §d' * §h ^ §m' ∧ §m ≠ §m')) { x <- some ((§d - §d') * (§m' - §m)⁻¹); } else { x <- none; } return §x }

                  Instantiating the holes of DLogAttacker.guess.procedure with a tuple holeArgs of procedures: the body of proc guess 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 [DLogAttacker.guess.procedure.apply_simp]).

                  @[simp]
                  theorem GaudisCrypt.Examples.Pedersen.DLogAttacker.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (B : CM.Binder) :

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

                  @[simp]
                  theorem GaudisCrypt.Examples.Pedersen.DLogAttacker.guess.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (B : CM.Binder) :

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

                  noncomputable def GaudisCrypt.Examples.Pedersen.DLogAttacker {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

                  The module declared by module DLogAttacker, abstracted over its single parameter B, 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 DLogAttacker.guess, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma DLogAttacker.apply_simp says.

                  Equations
                  Instances For
                    noncomputable def GaudisCrypt.Examples.Pedersen.DLogAttacker.guess.procedure {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
                    proctype (group) → Option exp uses ((group) → group × exp × exp × exp × exp)

                    The body of proc guess of module DLogAttacker, as a procedure of its own: the one call it makes to a module parameter (B) 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 DLogAttacker.guess.procedure.apply_simp) rather than run. Use DLogAttacker.guess for this procedure as a module.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      @[simp]
                      theorem GaudisCrypt.Examples.Pedersen.FakeCommit.main.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (U : CM.Unhider) :

                      @[simp]: applying FakeCommit.main to the parameters proc main uses (U) is Module.proc (FakeCommit.main.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]
                      theorem GaudisCrypt.Examples.Pedersen.FakeCommit.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (U : CM.Unhider) :

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

                      theorem GaudisCrypt.Examples.Pedersen.FakeCommit.main.procedure.apply_simp {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] (holeArgs✝ : (HoleSigs.cons (procsig (group) → exp × exp) (HoleSigs.cons (procsig (group) → Bool) HoleSigs.empty)).Instantiation) :
                      procedure.instantiate holeArgs✝ = proc () : Bool { var x : exp, h : group, m0 : exp, m1 : exp, b : Bool, d : exp, c : group, b' : Bool; x <$ EC.CyclicGroup.dt; h <- EC.CyclicGroup.g ^ §x; m0, m1 <- call (holeArgs✝.lookup HoleIndex.zero) (§h); b <$ EC.dbool; d <$ EC.CyclicGroup.dt; c <- EC.CyclicGroup.g ^ §d; b' <- call (holeArgs✝.lookup HoleIndex.zero.succ) (§c); return decide (§b = §b') }

                      Instantiating the holes of FakeCommit.main.procedure with a tuple holeArgs of procedures: the body of proc main 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 [FakeCommit.main.procedure.apply_simp]).

                      noncomputable def GaudisCrypt.Examples.Pedersen.FakeCommit {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

                      The module declared by module FakeCommit, abstracted over its single parameter U, 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 FakeCommit.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma FakeCommit.apply_simp says.

                      Equations
                      Instances For
                        noncomputable def GaudisCrypt.Examples.Pedersen.FakeCommit.main.procedure {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :
                        proctype () → Bool uses ((group) → exp × exp, (group) → Bool)

                        The body of proc main of module FakeCommit, as a procedure of its own: the 2 calls it makes to module parameters (U) 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 FakeCommit.main.procedure.apply_simp) rather than run. Use FakeCommit.main for this procedure as a module.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          noncomputable def GaudisCrypt.Examples.Pedersen.FakeCommit.main {group exp : Type} [_gaudiParam0 : CommGroup group] [_gaudiParam1 : Field exp] [_gaudiParam2 : Fintype exp] [_gaudiParam3 : DecidableEq exp] [_gaudiParam4 : DecidableEq group] [_gaudiParam5 : EC.CyclicGroup.Params group exp] :

                          proc main of module FakeCommit as a module, abstracted over the module parameters it uses (U, in declaration order): Module.Arr … (Module.Proc (procsig …)).

                          Apply it with the @[simp] lemma FakeCommit.main.apply_simp, which fills the holes of FakeCommit.main.procedure with the callees the body called.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem GaudisCrypt.Examples.Pedersen.pedersen_correctness {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] :
                            hoare[ CM.Correctness(Pedersen).main (m) : True ==> §res = true ]

                            Correctness. EC's lemma pedersen_correctness: hoare[Correctness(Pedersen).main: true ==> res].

                            theorem GaudisCrypt.Examples.Pedersen.hi_ll {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (U : CM.Unhider) :

                            EC's local lemma hi_ll (U<:Unhider): islossless U.choose => islossless U.guess => islossless FakeCommit(U).main.

                            theorem GaudisCrypt.Examples.Pedersen.fakecommit_half {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (U : CM.Unhider) (m : VariableAssignment) :
                            U.choose.procedure.IsLossless → U.guess.procedure.IsLossless → Pr[ FakeCommit(U).main () @ &m : §res = true ] = 1 / 2

                            Perfect hiding. EC's local lemma fakecommit_half (U<:Unhider) &m: islossless U.choose => islossless U.guess => Pr[FakeCommit(U).main() @ &m : res] = 1%r/2%r.

                            theorem GaudisCrypt.Examples.Pedersen.phi_hi {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (U : CM.Unhider) (m : VariableAssignment) :
                            Pr[ CM.HidingExperiment(Pedersen, U).main () @ &m : §res = true ] = Pr[ FakeCommit(U).main () @ &m : §res = true ]

                            EC's local lemma phi_hi (U<:Unhider) &m: Pr[HidingExperiment(Pedersen,U).main() @ &m : res] = Pr[FakeCommit(U).main() @ &m : res].

                            theorem GaudisCrypt.Examples.Pedersen.pedersen_perfect_hiding {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (U : CM.Unhider) (m : VariableAssignment) :
                            U.choose.procedure.IsLossless → U.guess.procedure.IsLossless → Pr[ CM.HidingExperiment(Pedersen, U).main () @ &m : §res = true ] = 1 / 2

                            Perfect hiding - QED. EC's lemma pedersen_perfect_hiding (U<:Unhider) &m: islossless U.choose => islossless U.guess => Pr[HidingExperiment(Pedersen,U).main() @ &m : res] = 1%r/2%r.

                            theorem GaudisCrypt.Examples.Pedersen.pedersen_computational_binding {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (B : CM.Binder) (m : VariableAssignment) :
                            Pr[ CM.BindingExperiment(Pedersen, B).main () @ &m : §res = true ] = Pr[ EC.DLog.DLog.DLogExperiment(DLogAttacker(B)).main () @ &m : §res = true ]

                            Computational binding - QED. EC's lemma pedersen_computational_binding (B<:Binder) &m: Pr[BindingExperiment(Pedersen, B).main() @ &m : res] = Pr[DL.DLog.DLogExperiment(DLogAttacker(B)).main() @ &m : res].

                            EC: "The following two are to compare probability directly with book discrete logarithm experiment. Not strictly necessary though, only for completeness."

                            EC's local lemma std_red_dl_bridge (B<:Binder) &m: Pr[DL.DLog.DLogExperiment(DLogAttacker(B)).main() @ &m : res] <= Pr[DL.DLog.DLogStdExperiment(DL.StdRedAdversary(DLogAttacker(B))).main() @ &m : res].

                            theorem GaudisCrypt.Examples.Pedersen.pedersen_std_computational_binding {group exp : Type} [CommGroup group] [Field exp] [Fintype exp] [DecidableEq exp] [DecidableEq group] [EC.CyclicGroup.Params group exp] (B : CM.Binder) (m : VariableAssignment) :
                            Pr[ CM.BindingExperiment(Pedersen, B).main () @ &m : §res = true ] ≤ Pr[ EC.DLog.DLog.DLogStdExperiment(EC.DLog.StdRedAdversary(DLogAttacker(B))).main () @ &m : §res = true ]

                            EC's lemma pedersen_std_computational_binding (B<:Binder) &m: Pr[BindingExperiment(Pedersen, B).main() @ &m : res] <= Pr[DL.DLog.DLogStdExperiment(DL.StdRedAdversary(DLogAttacker(B))).main() @ &m : res].