Sigma protocols (EasyCrypt theories/crypto/SigmaProtocol.ec) #
EC's theory SigmaProtocol: the module types of a scheme and of its algorithms (extractor and
simulator), and the experiments for completeness, special soundness and special honest-verifier
zero knowledge.
The theory's types are outParams of the class Params, its operators de and R the fields:
a clone is clone import GaudisCrypt.EC.SigmaProtocol as SP with type statement <- …, op R <- …, op de <- …. EC's op slen, op wlen with their axioms slen_pos, wlen_pos are used by no
declaration of the theory and are left out (EC's clones leave them abstract). R x w is a
proposition; where a program stores it (r <- R x w) it is decided classically, as EC's logic
is. EC's variable to is a Lean keyword, hence «to».
SimulateHonestVerifier.main calls the module's own procedures (b' <@ gameIdeal()): written
with their paths, SimulateHonestVerifier(S, A, D).gameIdeal.
EC's type statement, witness, message, secret, challenge, response, op de and op R.
- de : SubProbability challenge
- R : statement → witness → Prop
Instances
EC's type transcript = message * challenge * response.
Equations
- GaudisCrypt.EC.SigmaProtocol.transcript = (message × challenge × response)
Instances For
What is derivable about the accessor SigmaScheme.respond, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaScheme.respond.utilities.accessorModule : SigmaScheme →ₘ …— the accessor as a module, a projection being a module morphism;SigmaScheme.respond.utilities.apply_simp—Module.app SigmaScheme.respond.utilities.accessorModule m = SigmaScheme.respond m: applying that module is the accessor;SigmaScheme.respond.utilities.expression_eq— the same at the level of expressions:(SigmaScheme.respond m).expression = (SigmaScheme.respond.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field commit back off a module built from a record — SigmaScheme.commit (SigmaScheme.mk r) = r.commit.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.commit.apply_simp.
The field test of a module of type SigmaScheme: the projection onto component 2 of the right-nested tuple SigmaScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaScheme.test.mk_simp reads this field back off a module built by SigmaScheme.mk; SigmaScheme.test.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, m, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.test = (GaudisCrypt.Module.snd' theModule✝).snd'.fst'
Instances For
The IsModule SigmaScheme instance: SigmaScheme is a module type, with representation SigmaScheme.typeRep.
It is what lets the name SigmaScheme stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module SigmaScheme.typeRep would do on its own but SigmaScheme, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.EC.SigmaProtocol.instIsModuleSigmaScheme = { moduleTypeRep := GaudisCrypt.EC.SigmaProtocol.SigmaScheme.typeRep, isModule := ⋯ }
What is derivable about the accessor SigmaScheme.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaScheme.gen.utilities.accessorModule : SigmaScheme →ₘ …— the accessor as a module, a projection being a module morphism;SigmaScheme.gen.utilities.apply_simp—Module.app SigmaScheme.gen.utilities.accessorModule m = SigmaScheme.gen m: applying that module is the accessor;SigmaScheme.gen.utilities.expression_eq— the same at the level of expressions:(SigmaScheme.gen m).expression = (SigmaScheme.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field verify of a module of type SigmaScheme: the projection onto component 4 of the right-nested tuple SigmaScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaScheme.verify.mk_simp reads this field back off a module built by SigmaScheme.mk; SigmaScheme.verify.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, m, e, z, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Instances For
What is derivable about the accessor SigmaScheme.test, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaScheme.test.utilities.accessorModule : SigmaScheme →ₘ …— the accessor as a module, a projection being a module morphism;SigmaScheme.test.utilities.apply_simp—Module.app SigmaScheme.test.utilities.accessorModule m = SigmaScheme.test m: applying that module is the accessor;SigmaScheme.test.utilities.expression_eq— the same at the level of expressions:(SigmaScheme.test m).expression = (SigmaScheme.test.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field gen of a module of type SigmaScheme: the projection onto component 0 of the right-nested tuple SigmaScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaScheme.gen.mk_simp reads this field back off a module built by SigmaScheme.mk; SigmaScheme.gen.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- theModule✝.gen = GaudisCrypt.Module.fst' theModule✝
Instances For
The field commit of a module of type SigmaScheme: the projection onto component 1 of the right-nested tuple SigmaScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaScheme.commit.mk_simp reads this field back off a module built by SigmaScheme.mk; SigmaScheme.commit.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, w, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.commit = (GaudisCrypt.Module.snd' theModule✝).fst'
Instances For
The record of a module's fields: SigmaScheme.structure m is SigmaScheme.Structure.mk applied to SigmaScheme.gen, SigmaScheme.commit, SigmaScheme.test, SigmaScheme.respond, SigmaScheme.verify of m.
Inverse of SigmaScheme.mk (SigmaScheme.mk_destruct, SigmaScheme.destruct_mk).
Equations
Instances For
What is derivable about the accessor SigmaScheme.verify, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaScheme.verify.utilities.accessorModule : SigmaScheme →ₘ …— the accessor as a module, a projection being a module morphism;SigmaScheme.verify.utilities.apply_simp—Module.app SigmaScheme.verify.utilities.accessorModule m = SigmaScheme.verify m: applying that module is the accessor;SigmaScheme.verify.utilities.expression_eq— the same at the level of expressions:(SigmaScheme.verify m).expression = (SigmaScheme.verify.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The record of the fields of a module of type SigmaScheme: the fields gen, commit, test, respond, verify, one per moduletype field, each of that field's own module type.
SigmaScheme.mk turns such a record into a SigmaScheme, SigmaScheme.structure turns a SigmaScheme back into one.
Instances For
@[simp]: SigmaScheme.structure (SigmaScheme.mk r) = r — destructing a module built from a record gives that record back.
@[simp]: reading the field test back off a module built from a record — SigmaScheme.test (SigmaScheme.mk r) = r.test.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.test.apply_simp.
@[simp]: SigmaScheme.mk (SigmaScheme.structure m) = m — rebuilding a module from its own fields gives that module back.
@[simp]: reading the field gen back off a module built from a record — SigmaScheme.gen (SigmaScheme.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
@[simp]: reading the field verify back off a module built from a record — SigmaScheme.verify (SigmaScheme.mk r) = r.verify.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.verify.apply_simp.
What is derivable about the accessor SigmaScheme.commit, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaScheme.commit.utilities.accessorModule : SigmaScheme →ₘ …— the accessor as a module, a projection being a module morphism;SigmaScheme.commit.utilities.apply_simp—Module.app SigmaScheme.commit.utilities.accessorModule m = SigmaScheme.commit m: applying that module is the accessor;SigmaScheme.commit.utilities.expression_eq— the same at the level of expressions:(SigmaScheme.commit m).expression = (SigmaScheme.commit.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Builds a module of type SigmaScheme from the record SigmaScheme.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of SigmaScheme.structure (SigmaScheme.mk_destruct, SigmaScheme.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas SigmaScheme.gen.mk_simp, SigmaScheme.commit.mk_simp, SigmaScheme.test.mk_simp, SigmaScheme.respond.mk_simp, SigmaScheme.verify.mk_simp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field respond back off a module built from a record — SigmaScheme.respond (SigmaScheme.mk r) = r.respond.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaScheme.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.respond.apply_simp.
The field respond of a module of type SigmaScheme: the projection onto component 3 of the right-nested tuple SigmaScheme.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaScheme.respond.mk_simp reads this field back off a module built by SigmaScheme.mk; SigmaScheme.respond.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named sw, ms, e, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Instances For
The module type declared by moduletype SigmaScheme, with fields gen, commit, test, respond, verify: the type Module SigmaScheme.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with SigmaScheme.mk, read a single field off one with the accessors SigmaScheme.gen, SigmaScheme.commit, SigmaScheme.test, SigmaScheme.respond, SigmaScheme.verify, and get the whole record back with SigmaScheme.structure.
Equations
Instances For
The ModuleTypeRep underlying SigmaScheme, the module type declared by moduletype SigmaScheme: the right-nested product of its 5 field types, in declaration order.
SigmaScheme is by definition Module SigmaScheme.typeRep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What is derivable about the accessor SigmaAlgorithms.simulate, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaAlgorithms.simulate.utilities.accessorModule : SigmaAlgorithms →ₘ …— the accessor as a module, a projection being a module morphism;SigmaAlgorithms.simulate.utilities.apply_simp—Module.app SigmaAlgorithms.simulate.utilities.accessorModule m = SigmaAlgorithms.simulate m: applying that module is the accessor;SigmaAlgorithms.simulate.utilities.expression_eq— the same at the level of expressions:(SigmaAlgorithms.simulate m).expression = (SigmaAlgorithms.simulate.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The module type declared by moduletype SigmaAlgorithms, with fields soundness, simulate: the type Module SigmaAlgorithms.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with SigmaAlgorithms.mk, read a single field off one with the accessors SigmaAlgorithms.soundness, SigmaAlgorithms.simulate, and get the whole record back with SigmaAlgorithms.structure.
Equations
Instances For
The ModuleTypeRep underlying SigmaAlgorithms, the module type declared by moduletype SigmaAlgorithms: the right-nested product of its 2 field types, in declaration order.
SigmaAlgorithms is by definition Module SigmaAlgorithms.typeRep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What is derivable about the accessor SigmaAlgorithms.soundness, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaAlgorithms.soundness.utilities.accessorModule : SigmaAlgorithms →ₘ …— the accessor as a module, a projection being a module morphism;SigmaAlgorithms.soundness.utilities.apply_simp—Module.app SigmaAlgorithms.soundness.utilities.accessorModule m = SigmaAlgorithms.soundness m: applying that module is the accessor;SigmaAlgorithms.soundness.utilities.expression_eq— the same at the level of expressions:(SigmaAlgorithms.soundness m).expression = (SigmaAlgorithms.soundness.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field soundness back off a module built from a record — SigmaAlgorithms.soundness (SigmaAlgorithms.mk r) = r.soundness.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaAlgorithms.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.soundness.apply_simp.
The record of a module's fields: SigmaAlgorithms.structure m is SigmaAlgorithms.Structure.mk applied to SigmaAlgorithms.soundness, SigmaAlgorithms.simulate of m.
Inverse of SigmaAlgorithms.mk (SigmaAlgorithms.mk_destruct, SigmaAlgorithms.destruct_mk).
Equations
Instances For
The field simulate of a module of type SigmaAlgorithms: the projection onto component 1 of the right-nested tuple SigmaAlgorithms.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaAlgorithms.simulate.mk_simp reads this field back off a module built by SigmaAlgorithms.mk; SigmaAlgorithms.simulate.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, e, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.simulate = GaudisCrypt.Module.snd' theModule✝
Instances For
The field soundness of a module of type SigmaAlgorithms: the projection onto component 0 of the right-nested tuple SigmaAlgorithms.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaAlgorithms.soundness.mk_simp reads this field back off a module built by SigmaAlgorithms.mk; SigmaAlgorithms.soundness.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, m, e, z, e', z', in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.soundness = GaudisCrypt.Module.fst' theModule✝
Instances For
The record of the fields of a module of type SigmaAlgorithms: the fields soundness, simulate, one per moduletype field, each of that field's own module type.
SigmaAlgorithms.mk turns such a record into a SigmaAlgorithms, SigmaAlgorithms.structure turns a SigmaAlgorithms back into one.
Instances For
@[simp]: SigmaAlgorithms.structure (SigmaAlgorithms.mk r) = r — destructing a module built from a record gives that record back.
@[simp]: SigmaAlgorithms.mk (SigmaAlgorithms.structure m) = m — rebuilding a module from its own fields gives that module back.
The IsModule SigmaAlgorithms instance: SigmaAlgorithms is a module type, with representation SigmaAlgorithms.typeRep.
It is what lets the name SigmaAlgorithms stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module SigmaAlgorithms.typeRep would do on its own but SigmaAlgorithms, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.EC.SigmaProtocol.instIsModuleSigmaAlgorithms = { moduleTypeRep := GaudisCrypt.EC.SigmaProtocol.SigmaAlgorithms.typeRep, isModule := ⋯ }
Builds a module of type SigmaAlgorithms from the record SigmaAlgorithms.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of SigmaAlgorithms.structure (SigmaAlgorithms.mk_destruct, SigmaAlgorithms.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas SigmaAlgorithms.soundness.mk_simp, SigmaAlgorithms.simulate.mk_simp.
Equations
- GaudisCrypt.EC.SigmaProtocol.SigmaAlgorithms.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.soundness theRecord✝.simulate
Instances For
@[simp]: reading the field simulate back off a module built from a record — SigmaAlgorithms.simulate (SigmaAlgorithms.mk r) = r.simulate.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaAlgorithms.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.simulate.apply_simp.
The body of proc main of module Completeness, as a procedure of its own: the 4 calls it makes to module parameters (S) 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 Completeness.main.procedure.apply_simp) rather than run. Use Completeness.main 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 Completeness.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 [Completeness.main.procedure.apply_simp]).
The module declared by module Completeness, abstracted over its single parameter S, 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 Completeness.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Completeness.apply_simp says.
Equations
Instances For
@[simp]: applying Completeness.main to the parameters proc main uses (S) is Module.proc (Completeness.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.
proc main of module Completeness as a module, abstracted over the module parameters it uses (S, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Completeness.main.apply_simp, which fills the holes of Completeness.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Completeness to a tuple of its single parameter S — the record of its procedures Completeness.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 Completeness.main.apply_simp to fill that procedure's holes.
@[simp]: applying Run to a tuple of its single parameter S — the record of its procedures Run.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 Run.main.apply_simp to fill that procedure's holes.
@[simp]: applying Run.main to the parameters proc main uses (S) is Module.proc (Run.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.
The module declared by module Run, abstracted over its single parameter S, 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 Run.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Run.apply_simp says.
Equations
Instances For
The body of proc main of module Run, as a procedure of its own: the 4 calls it makes to module parameters (S) 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 Run.main.procedure.apply_simp) rather than run. Use Run.main 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 Run.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 [Run.main.procedure.apply_simp]).
proc main of module Run as a module, abstracted over the module parameters it uses (S, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Run.main.apply_simp, which fills the holes of Run.main.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 SpecialSoundnessExperiment, abstracted over its 2 parameters S, A, 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 SpecialSoundnessExperiment.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SpecialSoundnessExperiment.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module SpecialSoundnessExperiment, as a procedure of its own: the 2 calls it makes to module parameters (S, A) 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 SpecialSoundnessExperiment.main.procedure.apply_simp) rather than run. Use SpecialSoundnessExperiment.main 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 SpecialSoundnessExperiment.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 [SpecialSoundnessExperiment.main.procedure.apply_simp]).
proc main of module SpecialSoundnessExperiment as a module, abstracted over the module parameters it uses (S, A, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SpecialSoundnessExperiment.main.apply_simp, which fills the holes of SpecialSoundnessExperiment.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SpecialSoundnessExperiment.main to the parameters proc main uses (S, A) is Module.proc (SpecialSoundnessExperiment.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]: applying SpecialSoundnessExperiment to a tuple of its 2 parameters S, A — the record of its procedures SpecialSoundnessExperiment.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 SpecialSoundnessExperiment.main.apply_simp to fill that procedure's holes.
proc main of module SpecialHVZKExperiment as a module, abstracted over the module parameters it uses (S, A, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SpecialHVZKExperiment.main.apply_simp, which fills the holes of SpecialHVZKExperiment.main.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 SpecialHVZKExperiment.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 [SpecialHVZKExperiment.main.procedure.apply_simp]).
@[simp]: applying SpecialHVZKExperiment.main to the parameters proc main uses (S, A) is Module.proc (SpecialHVZKExperiment.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.
The module declared by module SpecialHVZKExperiment, abstracted over its 2 parameters S, A, 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 SpecialHVZKExperiment.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SpecialHVZKExperiment.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying SpecialHVZKExperiment to a tuple of its 2 parameters S, A — the record of its procedures SpecialHVZKExperiment.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 SpecialHVZKExperiment.main.apply_simp to fill that procedure's holes.
The body of proc main of module SpecialHVZKExperiment, as a procedure of its own: the 2 calls it makes to module parameters (S, A) 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 SpecialHVZKExperiment.main.procedure.apply_simp) rather than run. Use SpecialHVZKExperiment.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The IsModule SigmaTraceDistinguisher instance: SigmaTraceDistinguisher is a module type, with representation SigmaTraceDistinguisher.typeRep.
It is what lets the name SigmaTraceDistinguisher stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module SigmaTraceDistinguisher.typeRep would do on its own but SigmaTraceDistinguisher, a plain (non-reducible) def, would not.
Equations
- GaudisCrypt.EC.SigmaProtocol.instIsModuleSigmaTraceDistinguisher = { moduleTypeRep := GaudisCrypt.EC.SigmaProtocol.SigmaTraceDistinguisher.typeRep, isModule := ⋯ }
The field distinguish of a module of type SigmaTraceDistinguisher: the projection onto component 0 of the right-nested tuple SigmaTraceDistinguisher.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
SigmaTraceDistinguisher.distinguish.mk_simp reads this field back off a module built by SigmaTraceDistinguisher.mk; SigmaTraceDistinguisher.distinguish.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named x, t, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.distinguish = theModule✝
Instances For
The record of a module's fields: SigmaTraceDistinguisher.structure m is SigmaTraceDistinguisher.Structure.mk applied to SigmaTraceDistinguisher.distinguish of m.
Inverse of SigmaTraceDistinguisher.mk (SigmaTraceDistinguisher.mk_destruct, SigmaTraceDistinguisher.destruct_mk).
Equations
- theModule✝.structure = { distinguish := theModule✝.distinguish }
Instances For
What is derivable about the accessor SigmaTraceDistinguisher.distinguish, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
SigmaTraceDistinguisher.distinguish.utilities.accessorModule : SigmaTraceDistinguisher →ₘ …— the accessor as a module, a projection being a module morphism;SigmaTraceDistinguisher.distinguish.utilities.apply_simp—Module.app SigmaTraceDistinguisher.distinguish.utilities.accessorModule m = SigmaTraceDistinguisher.distinguish m: applying that module is the accessor;SigmaTraceDistinguisher.distinguish.utilities.expression_eq— the same at the level of expressions:(SigmaTraceDistinguisher.distinguish m).expression = (SigmaTraceDistinguisher.distinguish.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field distinguish back off a module built from a record — SigmaTraceDistinguisher.distinguish (SigmaTraceDistinguisher.mk r) = r.distinguish.
It is what carries the right-hand side of an X.apply_simp (which is an SigmaTraceDistinguisher.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.distinguish.apply_simp.
Builds a module of type SigmaTraceDistinguisher from the record SigmaTraceDistinguisher.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of SigmaTraceDistinguisher.structure (SigmaTraceDistinguisher.mk_destruct, SigmaTraceDistinguisher.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas SigmaTraceDistinguisher.distinguish.mk_simp.
Equations
- GaudisCrypt.EC.SigmaProtocol.SigmaTraceDistinguisher.mk theRecord✝ = theRecord✝.distinguish
Instances For
@[simp]: SigmaTraceDistinguisher.mk (SigmaTraceDistinguisher.structure m) = m — rebuilding a module from its own fields gives that module back.
The ModuleTypeRep underlying SigmaTraceDistinguisher, the module type declared by moduletype SigmaTraceDistinguisher: the right-nested product of its 1 field types, in declaration order.
SigmaTraceDistinguisher is by definition Module SigmaTraceDistinguisher.typeRep.
Equations
Instances For
The module type declared by moduletype SigmaTraceDistinguisher, with fields distinguish: the type Module SigmaTraceDistinguisher.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with SigmaTraceDistinguisher.mk, read a single field off one with the accessors SigmaTraceDistinguisher.distinguish, and get the whole record back with SigmaTraceDistinguisher.structure.
Equations
Instances For
@[simp]: SigmaTraceDistinguisher.structure (SigmaTraceDistinguisher.mk r) = r — destructing a module built from a record gives that record back.
The record of the fields of a module of type SigmaTraceDistinguisher: the fields distinguish, one per moduletype field, each of that field's own module type.
SigmaTraceDistinguisher.mk turns such a record into a SigmaTraceDistinguisher, SigmaTraceDistinguisher.structure turns a SigmaTraceDistinguisher back into one.
Instances For
@[simp]: applying SimulateHonestVerifier.main to the parameters proc main uses (S, A, D) is Module.proc (SimulateHonestVerifier.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]: applying SimulateHonestVerifier.gameReal to the parameters proc gameReal uses (S, D) is Module.proc (SimulateHonestVerifier.gameReal.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 gameIdeal of module SimulateHonestVerifier, as a procedure of its own: the 4 calls it makes to module parameters (S, A, D) 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 SimulateHonestVerifier.gameIdeal.procedure.apply_simp) rather than run. Use SimulateHonestVerifier.gameIdeal 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 SimulateHonestVerifier.gameReal.procedure with a tuple holeArgs of procedures: the body of proc gameReal 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 [SimulateHonestVerifier.gameReal.procedure.apply_simp]).
@[simp]: applying SimulateHonestVerifier.gameIdeal to the parameters proc gameIdeal uses (S, A, D) is Module.proc (SimulateHonestVerifier.gameIdeal.procedure.instantiate …) — the procedure with its holes filled by the callees they were made from, each written as it was in the body (with the arguments in place of the module parameters) and turned into a Procedure by Module.Proc.procedure.
Instantiating the holes of SimulateHonestVerifier.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 [SimulateHonestVerifier.main.procedure.apply_simp]).
@[simp]: applying SimulateHonestVerifier to a tuple of its 3 parameters S, A, D — the record of its procedures SimulateHonestVerifier.gameIdeal, SimulateHonestVerifier.gameReal, SimulateHonestVerifier.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 SimulateHonestVerifier.gameIdeal.apply_simp, SimulateHonestVerifier.gameReal.apply_simp, SimulateHonestVerifier.main.apply_simp to fill that procedure's holes.
The body of proc gameReal of module SimulateHonestVerifier, as a procedure of its own: the 2 calls it makes to module parameters (S, D) 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 SimulateHonestVerifier.gameReal.procedure.apply_simp) rather than run. Use SimulateHonestVerifier.gameReal for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc gameIdeal of module SimulateHonestVerifier as a module, abstracted over the module parameters it uses (S, A, D, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SimulateHonestVerifier.gameIdeal.apply_simp, which fills the holes of SimulateHonestVerifier.gameIdeal.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 SimulateHonestVerifier.gameIdeal.procedure with a tuple holeArgs of procedures: the body of proc gameIdeal 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 [SimulateHonestVerifier.gameIdeal.procedure.apply_simp]).
The module declared by module SimulateHonestVerifier, abstracted over its 3 parameters S, A, D, 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 SimulateHonestVerifier.gameIdeal, SimulateHonestVerifier.gameReal, SimulateHonestVerifier.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma SimulateHonestVerifier.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module SimulateHonestVerifier, as a procedure of its own: the 2 calls it makes to module parameters (S, A, D) 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 SimulateHonestVerifier.main.procedure.apply_simp) rather than run. Use SimulateHonestVerifier.main for this procedure as a module.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc main of module SimulateHonestVerifier as a module, abstracted over the module parameters it uses (S, A, D, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SimulateHonestVerifier.main.apply_simp, which fills the holes of SimulateHonestVerifier.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc gameReal of module SimulateHonestVerifier as a module, abstracted over the module parameters it uses (S, D, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma SimulateHonestVerifier.gameReal.apply_simp, which fills the holes of SimulateHonestVerifier.gameReal.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.