Tests for ModuleSyntax #
The module type declared by moduletype TestModule, with fields main, aux: the type Module TestModule.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with TestModule.mk, read a single field off one with the accessors TestModule.main, TestModule.aux, and get the whole record back with TestModule.structure.
Instances For
Builds a module of type TestModule from the record TestModule.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of TestModule.structure (TestModule.mk_destruct, TestModule.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas TestModule.main.mk_simp, TestModule.aux.mk_simp.
Equations
- Experiment.TestModule.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.main theRecord✝.aux
Instances For
The record of a module's fields: TestModule.structure m is TestModule.Structure.mk applied to TestModule.main, TestModule.aux of m.
Inverse of TestModule.mk (TestModule.mk_destruct, TestModule.destruct_mk).
Instances For
The field main of a module of type TestModule: the projection onto component 0 of the right-nested tuple TestModule.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
TestModule.main.mk_simp reads this field back off a module built by TestModule.mk; TestModule.main.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.main = GaudisCrypt.Module.fst' theModule✝
Instances For
What is derivable about the accessor TestModule.main, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
TestModule.main.utilities.accessorModule : TestModule →ₘ …— the accessor as a module, a projection being a module morphism;TestModule.main.utilities.apply_simp—Module.app TestModule.main.utilities.accessorModule m = TestModule.main m: applying that module is the accessor;TestModule.main.utilities.expression_eq— the same at the level of expressions:(TestModule.main m).expression = (TestModule.main.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: reading the field aux back off a module built from a record — TestModule.aux (TestModule.mk r) = r.aux.
It is what carries the right-hand side of an X.apply_simp (which is an TestModule.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.aux.apply_simp.
@[simp]: TestModule.structure (TestModule.mk r) = r — destructing a module built from a record gives that record back.
The field aux of a module of type TestModule: the projection onto component 1 of the right-nested tuple TestModule.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
TestModule.aux.mk_simp reads this field back off a module built by TestModule.mk; TestModule.aux.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.aux = GaudisCrypt.Module.snd' theModule✝
Instances For
The ModuleTypeRep underlying TestModule, the module type declared by moduletype TestModule: the right-nested product of its 2 field types, in declaration order.
TestModule is by definition Module TestModule.typeRep.
Equations
Instances For
The IsModule TestModule instance: TestModule is a module type, with representation TestModule.typeRep.
It is what lets the name TestModule stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module TestModule.typeRep would do on its own but TestModule, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleTestModule = { moduleTypeRep := Experiment.TestModule.typeRep, isModule := ⋯ }
The record of the fields of a module of type TestModule: the fields main, aux, one per moduletype field, each of that field's own module type.
TestModule.mk turns such a record into a TestModule, TestModule.structure turns a TestModule back into one.
Instances For
@[simp]: TestModule.mk (TestModule.structure m) = m — rebuilding a module from its own fields gives that module back.
@[simp]: reading the field main back off a module built from a record — TestModule.main (TestModule.mk r) = r.main.
It is what carries the right-hand side of an X.apply_simp (which is an TestModule.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.main.apply_simp.
What is derivable about the accessor TestModule.aux, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
TestModule.aux.utilities.accessorModule : TestModule →ₘ …— the accessor as a module, a projection being a module morphism;TestModule.aux.utilities.apply_simp—Module.app TestModule.aux.utilities.accessorModule m = TestModule.aux m: applying that module is the accessor;TestModule.aux.utilities.expression_eq— the same at the level of expressions:(TestModule.aux m).expression = (TestModule.aux.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The IsModule OneField instance: OneField is a module type, with representation OneField.typeRep.
It is what lets the name OneField stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module OneField.typeRep would do on its own but OneField, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleOneField = { moduleTypeRep := Experiment.OneField.typeRep, isModule := ⋯ }
The record of the fields of a module of type OneField: the fields only, one per moduletype field, each of that field's own module type.
OneField.mk turns such a record into a OneField, OneField.structure turns a OneField back into one.
Instances For
The module type declared by moduletype OneField, with fields only: the type Module OneField.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with OneField.mk, read a single field off one with the accessors OneField.only, and get the whole record back with OneField.structure.
Instances For
The ModuleTypeRep underlying OneField, the module type declared by moduletype OneField: the right-nested product of its 1 field types, in declaration order.
OneField is by definition Module OneField.typeRep.
Instances For
@[simp]: reading the field only back off a module built from a record — OneField.only (OneField.mk r) = r.only.
It is what carries the right-hand side of an X.apply_simp (which is an OneField.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.only.apply_simp.
What is derivable about the accessor OneField.only, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
OneField.only.utilities.accessorModule : OneField →ₘ …— the accessor as a module, a projection being a module morphism;OneField.only.utilities.apply_simp—Module.app OneField.only.utilities.accessorModule m = OneField.only m: applying that module is the accessor;OneField.only.utilities.expression_eq— the same at the level of expressions:(OneField.only m).expression = (OneField.only.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field only of a module of type OneField: the projection onto component 0 of the right-nested tuple OneField.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
OneField.only.mk_simp reads this field back off a module built by OneField.mk; OneField.only.utilities has the accessor as a module, and the lemmas about it.
Instances For
@[simp]: OneField.structure (OneField.mk r) = r — destructing a module built from a record gives that record back.
@[simp]: OneField.mk (OneField.structure m) = m — rebuilding a module from its own fields gives that module back.
The record of a module's fields: OneField.structure m is OneField.Structure.mk applied to OneField.only of m.
Inverse of OneField.mk (OneField.mk_destruct, OneField.destruct_mk).
Instances For
Builds a module of type OneField from the record OneField.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of OneField.structure (OneField.mk_destruct, OneField.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas OneField.only.mk_simp.
Equations
- Experiment.OneField.mk theRecord✝ = theRecord✝.only
Instances For
The field g of a module of type UnicodeArrowField: the projection onto component 1 of the right-nested tuple UnicodeArrowField.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
UnicodeArrowField.g.mk_simp reads this field back off a module built by UnicodeArrowField.mk; UnicodeArrowField.g.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.g = GaudisCrypt.Module.snd' theModule✝
Instances For
What is derivable about the accessor UnicodeArrowField.f, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
UnicodeArrowField.f.utilities.accessorModule : UnicodeArrowField →ₘ …— the accessor as a module, a projection being a module morphism;UnicodeArrowField.f.utilities.apply_simp—Module.app UnicodeArrowField.f.utilities.accessorModule m = UnicodeArrowField.f m: applying that module is the accessor;UnicodeArrowField.f.utilities.expression_eq— the same at the level of expressions:(UnicodeArrowField.f m).expression = (UnicodeArrowField.f.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field f of a module of type UnicodeArrowField: the projection onto component 0 of the right-nested tuple UnicodeArrowField.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
UnicodeArrowField.f.mk_simp reads this field back off a module built by UnicodeArrowField.mk; UnicodeArrowField.f.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.f = GaudisCrypt.Module.fst' theModule✝
Instances For
The ModuleTypeRep underlying UnicodeArrowField, the module type declared by moduletype UnicodeArrowField: the right-nested product of its 2 field types, in declaration order.
UnicodeArrowField is by definition Module UnicodeArrowField.typeRep.
Equations
Instances For
@[simp]: UnicodeArrowField.mk (UnicodeArrowField.structure m) = m — rebuilding a module from its own fields gives that module back.
@[simp]: reading the field f back off a module built from a record — UnicodeArrowField.f (UnicodeArrowField.mk r) = r.f.
It is what carries the right-hand side of an X.apply_simp (which is an UnicodeArrowField.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.f.apply_simp.
The record of a module's fields: UnicodeArrowField.structure m is UnicodeArrowField.Structure.mk applied to UnicodeArrowField.f, UnicodeArrowField.g of m.
Inverse of UnicodeArrowField.mk (UnicodeArrowField.mk_destruct, UnicodeArrowField.destruct_mk).
Instances For
Builds a module of type UnicodeArrowField from the record UnicodeArrowField.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of UnicodeArrowField.structure (UnicodeArrowField.mk_destruct, UnicodeArrowField.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas UnicodeArrowField.f.mk_simp, UnicodeArrowField.g.mk_simp.
Equations
- Experiment.UnicodeArrowField.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.f theRecord✝.g
Instances For
@[simp]: reading the field g back off a module built from a record — UnicodeArrowField.g (UnicodeArrowField.mk r) = r.g.
It is what carries the right-hand side of an X.apply_simp (which is an UnicodeArrowField.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.g.apply_simp.
The module type declared by moduletype UnicodeArrowField, with fields f, g: the type Module UnicodeArrowField.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with UnicodeArrowField.mk, read a single field off one with the accessors UnicodeArrowField.f, UnicodeArrowField.g, and get the whole record back with UnicodeArrowField.structure.
Instances For
The IsModule UnicodeArrowField instance: UnicodeArrowField is a module type, with representation UnicodeArrowField.typeRep.
It is what lets the name UnicodeArrowField stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module UnicodeArrowField.typeRep would do on its own but UnicodeArrowField, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleUnicodeArrowField = { moduleTypeRep := Experiment.UnicodeArrowField.typeRep, isModule := ⋯ }
@[simp]: UnicodeArrowField.structure (UnicodeArrowField.mk r) = r — destructing a module built from a record gives that record back.
The record of the fields of a module of type UnicodeArrowField: the fields f, g, one per moduletype field, each of that field's own module type.
UnicodeArrowField.mk turns such a record into a UnicodeArrowField, UnicodeArrowField.structure turns a UnicodeArrowField back into one.
Instances For
What is derivable about the accessor UnicodeArrowField.g, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
UnicodeArrowField.g.utilities.accessorModule : UnicodeArrowField →ₘ …— the accessor as a module, a projection being a module morphism;UnicodeArrowField.g.utilities.apply_simp—Module.app UnicodeArrowField.g.utilities.accessorModule m = UnicodeArrowField.g m: applying that module is the accessor;UnicodeArrowField.g.utilities.expression_eq— the same at the level of expressions:(UnicodeArrowField.g m).expression = (UnicodeArrowField.g.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Experiment.myMod = Experiment.TestModule.mk { main := Experiment.testMain, aux := Experiment.testAux }
Instances For
What is derivable about the accessor M2.g, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
M2.g.utilities.accessorModule : M2 →ₘ …— the accessor as a module, a projection being a module morphism;M2.g.utilities.apply_simp—Module.app M2.g.utilities.accessorModule m = M2.g m: applying that module is the accessor;M2.g.utilities.expression_eq— the same at the level of expressions:(M2.g m).expression = (M2.g.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: M2.structure (M2.mk r) = r — destructing a module built from a record gives that record back.
The IsModule M2 instance: M2 is a module type, with representation M2.typeRep.
It is what lets the name M2 stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module M2.typeRep would do on its own but M2, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleM2 = { moduleTypeRep := Experiment.M2.typeRep, isModule := ⋯ }
Builds a module of type M2 from the record M2.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of M2.structure (M2.mk_destruct, M2.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas M2.g.mk_simp, M2.h.mk_simp.
Equations
- Experiment.M2.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.g theRecord✝.h
Instances For
The field g of a module of type M2: the projection onto component 0 of the right-nested tuple M2.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
M2.g.mk_simp reads this field back off a module built by M2.mk; M2.g.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- theModule✝.g = GaudisCrypt.Module.fst' theModule✝
Instances For
The ModuleTypeRep underlying M2, the module type declared by moduletype M2: the right-nested product of its 2 field types, in declaration order.
M2 is by definition Module M2.typeRep.
Equations
Instances For
@[simp]: reading the field g back off a module built from a record — M2.g (M2.mk r) = r.g.
It is what carries the right-hand side of an X.apply_simp (which is an M2.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.g.apply_simp.
@[simp]: reading the field h back off a module built from a record — M2.h (M2.mk r) = r.h.
It is what carries the right-hand side of an X.apply_simp (which is an M2.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.h.apply_simp.
What is derivable about the accessor M2.h, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
M2.h.utilities.accessorModule : M2 →ₘ …— the accessor as a module, a projection being a module morphism;M2.h.utilities.apply_simp—Module.app M2.h.utilities.accessorModule m = M2.h m: applying that module is the accessor;M2.h.utilities.expression_eq— the same at the level of expressions:(M2.h m).expression = (M2.h.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 M2, with fields g, h: the type Module M2.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with M2.mk, read a single field off one with the accessors M2.g, M2.h, and get the whole record back with M2.structure.
Instances For
The record of a module's fields: M2.structure m is M2.Structure.mk applied to M2.g, M2.h of m.
Inverse of M2.mk (M2.mk_destruct, M2.destruct_mk).
Instances For
The field h of a module of type M2: the projection onto component 1 of the right-nested tuple M2.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
M2.h.mk_simp reads this field back off a module built by M2.mk; M2.h.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- theModule✝.h = GaudisCrypt.Module.snd' theModule✝
Instances For
Instantiating the holes of X.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [X.h.procedure.apply_simp]).
The body of proc g of module X, as a procedure of its own: the one call it makes to a module parameter (A) 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 X.g.procedure.apply_simp) rather than run. Use X.g for this procedure as a module.
Equations
- Experiment.X.g.procedure = proc () uses (_hole0 : () → Unit) : Unit { call _hole0 (); call _hole0 (); call Experiment.myMod.main.procedure ("hello", 5); return () }
Instances For
@[simp]: X.h = Module.proc X.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
proc h of module X as a module: Module.proc X.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — X.h.apply_simp says exactly that.
Instances For
@[simp]: applying X to a tuple of its 2 parameters A, B — the record of its procedures X.g, X.h, 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 X.g.apply_simp, X.h.apply_simp to fill that procedure's holes.
proc g of module X as a module, abstracted over the module parameters it uses (A, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma X.g.apply_simp, which fills the holes of X.g.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 X, abstracted over its 2 parameters A, B, 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 X.g, X.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma X.apply_simp says.
Equations
Instances For
@[simp]: applying X.g to the parameters proc g uses (A) is Module.proc (X.g.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 h of module X, 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 X.h.procedure.apply_simp) rather than run. Use X.h for this procedure as a module.
Equations
- Experiment.X.h.procedure = proc () : Unit { skip; return () }
Instances For
Instantiating the holes of X.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [X.g.procedure.apply_simp]).
proc h of module Y as a module: Module.proc Y.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Y.h.apply_simp says exactly that.
Instances For
@[simp]: applying Y to a tuple of its 2 parameters A, B — the record of its procedures Y.g, Y.h, 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 Y.g.apply_simp, Y.h.apply_simp to fill that procedure's holes.
The body of proc h of module Y, 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 Y.h.procedure.apply_simp) rather than run. Use Y.h for this procedure as a module.
Equations
- Experiment.Y.h.procedure = proc () : Unit { skip; return () }
Instances For
proc g of module Y as a module, abstracted over the module parameters it uses (A, B, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Y.g.apply_simp, which fills the holes of Y.g.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc g of module Y, as a procedure of its own: the 2 calls it makes to module parameters (A, B) 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 Y.g.procedure.apply_simp) rather than run. Use Y.g for this procedure as a module.
Equations
Instances For
The module declared by module Y, abstracted over its 2 parameters A, B, 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 Y.g, Y.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Y.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of Y.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [Y.g.procedure.apply_simp]).
@[simp]: Y.h = Module.proc Y.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
Instantiating the holes of Y.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [Y.h.procedure.apply_simp]).
@[simp]: applying Y.g to the parameters proc g uses (A, B) is Module.proc (Y.g.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]: NoParams.h = Module.proc NoParams.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
The module declared by module NoParams: the record of its procedures NoParams.g, NoParams.h.
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 NoParams.apply_simp to apply it with.
Equations
Instances For
The body of proc g of module NoParams, 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 NoParams.g.procedure.apply_simp) rather than run. Use NoParams.g for this procedure as a module.
Equations
- Experiment.NoParams.g.procedure = proc () : Unit { skip; return () }
Instances For
proc h of module NoParams as a module: Module.proc NoParams.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — NoParams.h.apply_simp says exactly that.
Instances For
The body of proc h of module NoParams, 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 NoParams.h.procedure.apply_simp) rather than run. Use NoParams.h for this procedure as a module.
Equations
- Experiment.NoParams.h.procedure = proc () : Unit { skip; return () }
Instances For
Instantiating the holes of NoParams.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [NoParams.h.procedure.apply_simp]).
@[simp]: NoParams.g = Module.proc NoParams.g.procedure — true by definition, proc g using no module parameter and so having no holes to fill.
Instantiating the holes of NoParams.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [NoParams.g.procedure.apply_simp]).
proc g of module NoParams as a module: Module.proc NoParams.g.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — NoParams.g.apply_simp says exactly that.
Instances For
@[simp]: applying EmptyParams to the empty tuple — the record of its procedures EmptyParams.g, EmptyParams.h, 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 EmptyParams.g.apply_simp, EmptyParams.h.apply_simp to fill that procedure's holes.
proc g of module EmptyParams as a module: Module.proc EmptyParams.g.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — EmptyParams.g.apply_simp says exactly that.
Instances For
The module declared by module EmptyParams, abstracted over its empty parameter list: Module.Arr Module.Unit M, with M the module type it was declared with, so that the only argument it takes is the empty tuple.
Applied to such a tuple it is the record of its procedures EmptyParams.g, EmptyParams.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma EmptyParams.apply_simp says.
Equations
Instances For
proc h of module EmptyParams as a module: Module.proc EmptyParams.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — EmptyParams.h.apply_simp says exactly that.
Instances For
The body of proc h of module EmptyParams, 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 EmptyParams.h.procedure.apply_simp) rather than run. Use EmptyParams.h for this procedure as a module.
Equations
- Experiment.EmptyParams.h.procedure = proc () : Unit { skip; return () }
Instances For
The body of proc g of module EmptyParams, 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 EmptyParams.g.procedure.apply_simp) rather than run. Use EmptyParams.g for this procedure as a module.
Equations
- Experiment.EmptyParams.g.procedure = proc () : Unit { skip; return () }
Instances For
@[simp]: EmptyParams.g = Module.proc EmptyParams.g.procedure — true by definition, proc g using no module parameter and so having no holes to fill.
Instantiating the holes of EmptyParams.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [EmptyParams.g.procedure.apply_simp]).
@[simp]: EmptyParams.h = Module.proc EmptyParams.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
Instantiating the holes of EmptyParams.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [EmptyParams.h.procedure.apply_simp]).
The body of proc g of module NoType, as a procedure of its own: the one call it makes to a module parameter (A) 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 NoType.g.procedure.apply_simp) rather than run. Use NoType.g for this procedure as a module.
Equations
Instances For
The body of proc h of module NoType, 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 NoType.h.procedure.apply_simp) rather than run. Use NoType.h for this procedure as a module.
Equations
- Experiment.NoType.h.procedure = proc () : Bool { skip; return true }
Instances For
The module declared by module NoType, abstracted over its single parameter 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 NoType.g, NoType.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma NoType.apply_simp says.
Equations
Instances For
proc h of module NoType as a module: Module.proc NoType.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — NoType.h.apply_simp says exactly that.
Instances For
@[simp]: applying NoType.g to the parameters proc g uses (A) is Module.proc (NoType.g.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 NoType.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [NoType.h.procedure.apply_simp]).
Instantiating the holes of NoType.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [NoType.g.procedure.apply_simp]).
proc g of module NoType as a module, abstracted over the module parameters it uses (A, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma NoType.g.apply_simp, which fills the holes of NoType.g.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: NoType.h = Module.proc NoType.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
@[simp]: applying NoType to a tuple of its single parameter A — the record of its procedures NoType.g, NoType.h, 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 NoType.g.apply_simp, NoType.h.apply_simp to fill that procedure's holes.
The module declared by module Deep, abstracted over its 3 parameters A, B, C, 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 Deep.g, Deep.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Deep.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc h of module Deep 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 Deep.h.apply_simp, which fills the holes of Deep.h.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: applying Deep.h to the parameters proc h uses (B) is Module.proc (Deep.h.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 Deep.g to the parameters proc g uses (A, C) is Module.proc (Deep.g.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 Deep to a tuple of its 3 parameters A, B, C — the record of its procedures Deep.g, Deep.h, 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 Deep.g.apply_simp, Deep.h.apply_simp to fill that procedure's holes.
Instantiating the holes of Deep.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [Deep.g.procedure.apply_simp]).
The body of proc g of module Deep, as a procedure of its own: the 2 calls it makes to module parameters (A, C) 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 Deep.g.procedure.apply_simp) rather than run. Use Deep.g for this procedure as a module.
Equations
Instances For
The body of proc h of module Deep, 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 Deep.h.procedure.apply_simp) rather than run. Use Deep.h for this procedure as a module.
Equations
Instances For
proc g of module Deep as a module, abstracted over the module parameters it uses (A, C, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma Deep.g.apply_simp, which fills the holes of Deep.g.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 Deep.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [Deep.h.procedure.apply_simp]).
Instantiating the holes of NoTypeNoParams.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [NoTypeNoParams.g.procedure.apply_simp]).
proc g of module NoTypeNoParams as a module: Module.proc NoTypeNoParams.g.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — NoTypeNoParams.g.apply_simp says exactly that.
Equations
Instances For
The module declared by module NoTypeNoParams: the record of its procedures NoTypeNoParams.g.
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 NoTypeNoParams.apply_simp to apply it with.
Instances For
The body of proc g of module NoTypeNoParams, 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 NoTypeNoParams.g.procedure.apply_simp) rather than run. Use NoTypeNoParams.g for this procedure as a module.
Equations
- Experiment.NoTypeNoParams.g.procedure = proc () : Unit { skip; return () }
Instances For
@[simp]: NoTypeNoParams.g = Module.proc NoTypeNoParams.g.procedure — true by definition, proc g using no module parameter and so having no holes to fill.
The field gen of a module of type Sized: the projection onto component 0 of the right-nested tuple Sized.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Sized.gen.mk_simp reads this field back off a module built by Sized.mk; Sized.gen.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- Experiment.Sized.gen n theModule✝ = GaudisCrypt.Module.fst' theModule✝
Instances For
Builds a module of type Sized from the record Sized.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Sized.structure (Sized.mk_destruct, Sized.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Sized.gen.mk_simp, Sized.use.mk_simp.
Equations
- Experiment.Sized.mk n theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.gen theRecord✝.use
Instances For
@[simp]: reading the field use back off a module built from a record — Sized.use (Sized.mk r) = r.use.
It is what carries the right-hand side of an X.apply_simp (which is an Sized.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.use.apply_simp.
@[simp]: reading the field gen back off a module built from a record — Sized.gen (Sized.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an Sized.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
What is derivable about the accessor Sized.use, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Sized.use.utilities.accessorModule : Sized →ₘ …— the accessor as a module, a projection being a module morphism;Sized.use.utilities.apply_simp—Module.app Sized.use.utilities.accessorModule m = Sized.use m: applying that module is the accessor;Sized.use.utilities.expression_eq— the same at the level of expressions:(Sized.use m).expression = (Sized.use.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field use of a module of type Sized: the projection onto component 1 of the right-nested tuple Sized.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Sized.use.mk_simp reads this field back off a module built by Sized.mk; Sized.use.utilities has the accessor as a module, and the lemmas about it.
Equations
- Experiment.Sized.use n theModule✝ = GaudisCrypt.Module.snd' theModule✝
Instances For
The record of a module's fields: Sized.structure m is Sized.Structure.mk applied to Sized.gen, Sized.use of m.
Inverse of Sized.mk (Sized.mk_destruct, Sized.destruct_mk).
Equations
- Experiment.Sized.structure n theModule✝ = { gen := Experiment.Sized.gen n theModule✝, use := Experiment.Sized.use n theModule✝ }
Instances For
The ModuleTypeRep underlying Sized, the module type declared by moduletype Sized: the right-nested product of its 2 field types, in declaration order.
Sized is by definition Module Sized.typeRep.
Equations
Instances For
@[simp]: Sized.mk (Sized.structure m) = m — rebuilding a module from its own fields gives that module back.
The module type declared by moduletype Sized, with fields gen, use: the type Module Sized.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Sized.mk, read a single field off one with the accessors Sized.gen, Sized.use, and get the whole record back with Sized.structure.
Equations
Instances For
The IsModule Sized instance: Sized is a module type, with representation Sized.typeRep.
It is what lets the name Sized stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Sized.typeRep would do on its own but Sized, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleSized n = { moduleTypeRep := Experiment.Sized.typeRep n, isModule := ⋯ }
@[simp]: Sized.structure (Sized.mk r) = r — destructing a module built from a record gives that record back.
What is derivable about the accessor Sized.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Sized.gen.utilities.accessorModule : Sized →ₘ …— the accessor as a module, a projection being a module morphism;Sized.gen.utilities.apply_simp—Module.app Sized.gen.utilities.accessorModule m = Sized.gen m: applying that module is the accessor;Sized.gen.utilities.expression_eq— the same at the level of expressions:(Sized.gen m).expression = (Sized.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The IsModule Poly instance: Poly is a module type, with representation Poly.typeRep.
It is what lets the name Poly stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Poly.typeRep would do on its own but Poly, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModulePoly = { moduleTypeRep := Experiment.Poly.typeRep, isModule := ⋯ }
The field gen of a module of type Poly: the projection onto component 0 of the right-nested tuple Poly.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Poly.gen.mk_simp reads this field back off a module built by Poly.mk; Poly.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
Builds a module of type Poly from the record Poly.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Poly.structure (Poly.mk_destruct, Poly.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Poly.gen.mk_simp, Poly.use.mk_simp.
Equations
- Experiment.Poly.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.gen theRecord✝.use
Instances For
The module type declared by moduletype Poly, with fields gen, use: the type Module Poly.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Poly.mk, read a single field off one with the accessors Poly.gen, Poly.use, and get the whole record back with Poly.structure.
Instances For
@[simp]: reading the field gen back off a module built from a record — Poly.gen (Poly.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an Poly.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 use back off a module built from a record — Poly.use (Poly.mk r) = r.use.
It is what carries the right-hand side of an X.apply_simp (which is an Poly.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.use.apply_simp.
What is derivable about the accessor Poly.use, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Poly.use.utilities.accessorModule : Poly →ₘ …— the accessor as a module, a projection being a module morphism;Poly.use.utilities.apply_simp—Module.app Poly.use.utilities.accessorModule m = Poly.use m: applying that module is the accessor;Poly.use.utilities.expression_eq— the same at the level of expressions:(Poly.use m).expression = (Poly.use.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: Poly.structure (Poly.mk r) = r — destructing a module built from a record gives that record back.
What is derivable about the accessor Poly.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Poly.gen.utilities.accessorModule : Poly →ₘ …— the accessor as a module, a projection being a module morphism;Poly.gen.utilities.apply_simp—Module.app Poly.gen.utilities.accessorModule m = Poly.gen m: applying that module is the accessor;Poly.gen.utilities.expression_eq— the same at the level of expressions:(Poly.gen m).expression = (Poly.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ModuleTypeRep underlying Poly, the module type declared by moduletype Poly: the right-nested product of its 2 field types, in declaration order.
Poly is by definition Module Poly.typeRep.
Equations
Instances For
The record of a module's fields: Poly.structure m is Poly.Structure.mk applied to Poly.gen, Poly.use of m.
Inverse of Poly.mk (Poly.mk_destruct, Poly.destruct_mk).
Instances For
The field use of a module of type Poly: the projection onto component 1 of the right-nested tuple Poly.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Poly.use.mk_simp reads this field back off a module built by Poly.mk; Poly.use.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.use = GaudisCrypt.Module.snd' theModule✝
Instances For
@[simp]: applying Twice.main to the parameters proc main uses (S) is Module.proc (Twice.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 body of proc main of module Twice, as a procedure of its own: the 2 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 Twice.main.procedure.apply_simp) rather than run. Use Twice.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 Twice.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 [Twice.main.procedure.apply_simp]).
proc main of module Twice 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 Twice.main.apply_simp, which fills the holes of Twice.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 Twice, 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 Twice.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Twice.apply_simp says.
Equations
Instances For
@[simp]: applying Twice to a tuple of its single parameter S — the record of its procedures Twice.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 Twice.main.apply_simp to fill that procedure's holes.
proc main of module Fixed as a module: Module.proc Fixed.main.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Fixed.main.apply_simp says exactly that.
Instances For
@[simp]: Fixed.main = Module.proc Fixed.main.procedure — true by definition, proc main using no module parameter and so having no holes to fill.
Instantiating the holes of Fixed.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 [Fixed.main.procedure.apply_simp]).
The module declared by module Fixed: the record of its procedures Fixed.main.
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 Fixed.apply_simp to apply it with.
Equations
Instances For
The body of proc main of module Fixed, 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 Fixed.main.procedure.apply_simp) rather than run. Use Fixed.main for this procedure as a module.
Equations
Instances For
@[simp]: reading the field gen back off a module built from a record — AllTheNames.gen (AllTheNames.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an AllTheNames.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
The record of a module's fields: AllTheNames.structure m is AllTheNames.Structure.mk applied to AllTheNames.gen, AllTheNames.use of m.
Inverse of AllTheNames.mk (AllTheNames.mk_destruct, AllTheNames.destruct_mk).
Equations
- Experiment.AllTheNames.structure m s e args t theModule✝ = { gen := Experiment.AllTheNames.gen m s e args t theModule✝, use := Experiment.AllTheNames.use m s e args t theModule✝ }
Instances For
The ModuleTypeRep underlying AllTheNames, the module type declared by moduletype AllTheNames: the right-nested product of its 2 field types, in declaration order.
AllTheNames is by definition Module AllTheNames.typeRep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field use of a module of type AllTheNames: the projection onto component 1 of the right-nested tuple AllTheNames.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
AllTheNames.use.mk_simp reads this field back off a module built by AllTheNames.mk; AllTheNames.use.utilities has the accessor as a module, and the lemmas about it.
Equations
- Experiment.AllTheNames.use m s e args t theModule✝ = GaudisCrypt.Module.snd' theModule✝
Instances For
Builds a module of type AllTheNames from the record AllTheNames.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of AllTheNames.structure (AllTheNames.mk_destruct, AllTheNames.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas AllTheNames.gen.mk_simp, AllTheNames.use.mk_simp.
Equations
- Experiment.AllTheNames.mk m s e args t theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.gen theRecord✝.use
Instances For
What is derivable about the accessor AllTheNames.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
AllTheNames.gen.utilities.accessorModule : AllTheNames →ₘ …— the accessor as a module, a projection being a module morphism;AllTheNames.gen.utilities.apply_simp—Module.app AllTheNames.gen.utilities.accessorModule m = AllTheNames.gen m: applying that module is the accessor;AllTheNames.gen.utilities.expression_eq— the same at the level of expressions:(AllTheNames.gen m).expression = (AllTheNames.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
What is derivable about the accessor AllTheNames.use, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
AllTheNames.use.utilities.accessorModule : AllTheNames →ₘ …— the accessor as a module, a projection being a module morphism;AllTheNames.use.utilities.apply_simp—Module.app AllTheNames.use.utilities.accessorModule m = AllTheNames.use m: applying that module is the accessor;AllTheNames.use.utilities.expression_eq— the same at the level of expressions:(AllTheNames.use m).expression = (AllTheNames.use.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: AllTheNames.mk (AllTheNames.structure m) = m — rebuilding a module from its own fields gives that module back.
The IsModule AllTheNames instance: AllTheNames is a module type, with representation AllTheNames.typeRep.
It is what lets the name AllTheNames stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module AllTheNames.typeRep would do on its own but AllTheNames, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleAllTheNames m s e args t = { moduleTypeRep := Experiment.AllTheNames.typeRep m s e args t, isModule := ⋯ }
The module type declared by moduletype AllTheNames, with fields gen, use: the type Module AllTheNames.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with AllTheNames.mk, read a single field off one with the accessors AllTheNames.gen, AllTheNames.use, and get the whole record back with AllTheNames.structure.
Equations
- Experiment.AllTheNames m s e args t = GaudisCrypt.Module (Experiment.AllTheNames.typeRep m s e args t)
Instances For
The field gen of a module of type AllTheNames: the projection onto component 0 of the right-nested tuple AllTheNames.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
AllTheNames.gen.mk_simp reads this field back off a module built by AllTheNames.mk; AllTheNames.gen.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- Experiment.AllTheNames.gen m s e args t theModule✝ = GaudisCrypt.Module.fst' theModule✝
Instances For
@[simp]: reading the field use back off a module built from a record — AllTheNames.use (AllTheNames.mk r) = r.use.
It is what carries the right-hand side of an X.apply_simp (which is an AllTheNames.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.use.apply_simp.
@[simp]: AllTheNames.structure (AllTheNames.mk r) = r — destructing a module built from a record gives that record back.
The record of the fields of a module of type AllTheNames: the fields gen, use, one per moduletype field, each of that field's own module type.
AllTheNames.mk turns such a record into a AllTheNames, AllTheNames.structure turns a AllTheNames back into one.
Instances For
proc main of module UsesThemToo 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 UsesThemToo.main.apply_simp, which fills the holes of UsesThemToo.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 UsesThemToo.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 [UsesThemToo.main.procedure.apply_simp]).
The body of proc main of module UsesThemToo, as a procedure of its own: the one call it makes to a module parameter (S) 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 UsesThemToo.main.procedure.apply_simp) rather than run. Use UsesThemToo.main for this procedure as a module.
Equations
Instances For
@[simp]: applying UsesThemToo.main to the parameters proc main uses (S) is Module.proc (UsesThemToo.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 UsesThemToo to a tuple of its single parameter S — the record of its procedures UsesThemToo.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 UsesThemToo.main.apply_simp to fill that procedure's holes.
The module declared by module UsesThemToo, 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 UsesThemToo.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma UsesThemToo.apply_simp says.
Equations
- Experiment.UsesThemToo args = ((Experiment.UsesThemToo.main args).expression.app (GaudisCrypt.ModuleExpression.var 0)).abs.toModule ⋯
Instances For
The field use of a module of type Boxed: the projection onto component 1 of the right-nested tuple Boxed.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Boxed.use.mk_simp reads this field back off a module built by Boxed.mk; Boxed.use.utilities has the accessor as a module, and the lemmas about it.
Equations
- Experiment.Boxed.use k theModule✝ = GaudisCrypt.Module.snd' theModule✝
Instances For
@[simp]: reading the field gen back off a module built from a record — Boxed.gen (Boxed.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an Boxed.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
The module type declared by moduletype Boxed, with fields gen, use: the type Module Boxed.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Boxed.mk, read a single field off one with the accessors Boxed.gen, Boxed.use, and get the whole record back with Boxed.structure.
Equations
Instances For
@[simp]: reading the field use back off a module built from a record — Boxed.use (Boxed.mk r) = r.use.
It is what carries the right-hand side of an X.apply_simp (which is an Boxed.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.use.apply_simp.
Builds a module of type Boxed from the record Boxed.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Boxed.structure (Boxed.mk_destruct, Boxed.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Boxed.gen.mk_simp, Boxed.use.mk_simp.
Equations
- Experiment.Boxed.mk k theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.gen theRecord✝.use
Instances For
@[simp]: Boxed.structure (Boxed.mk r) = r — destructing a module built from a record gives that record back.
The ModuleTypeRep underlying Boxed, the module type declared by moduletype Boxed: the right-nested product of its 2 field types, in declaration order.
Boxed is by definition Module Boxed.typeRep.
Equations
Instances For
What is derivable about the accessor Boxed.use, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Boxed.use.utilities.accessorModule : Boxed →ₘ …— the accessor as a module, a projection being a module morphism;Boxed.use.utilities.apply_simp—Module.app Boxed.use.utilities.accessorModule m = Boxed.use m: applying that module is the accessor;Boxed.use.utilities.expression_eq— the same at the level of expressions:(Boxed.use m).expression = (Boxed.use.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 Boxed: the projection onto component 0 of the right-nested tuple Boxed.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Boxed.gen.mk_simp reads this field back off a module built by Boxed.mk; Boxed.gen.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- Experiment.Boxed.gen k theModule✝ = GaudisCrypt.Module.fst' theModule✝
Instances For
The record of a module's fields: Boxed.structure m is Boxed.Structure.mk applied to Boxed.gen, Boxed.use of m.
Inverse of Boxed.mk (Boxed.mk_destruct, Boxed.destruct_mk).
Equations
- Experiment.Boxed.structure k theModule✝ = { gen := Experiment.Boxed.gen k theModule✝, use := Experiment.Boxed.use k theModule✝ }
Instances For
The IsModule Boxed instance: Boxed is a module type, with representation Boxed.typeRep.
It is what lets the name Boxed stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Boxed.typeRep would do on its own but Boxed, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleBoxed k = { moduleTypeRep := Experiment.Boxed.typeRep k, isModule := ⋯ }
What is derivable about the accessor Boxed.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Boxed.gen.utilities.accessorModule : Boxed →ₘ …— the accessor as a module, a projection being a module morphism;Boxed.gen.utilities.apply_simp—Module.app Boxed.gen.utilities.accessorModule m = Boxed.gen m: applying that module is the accessor;Boxed.gen.utilities.expression_eq— the same at the level of expressions:(Boxed.gen m).expression = (Boxed.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instantiating the holes of Unbox.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 [Unbox.main.procedure.apply_simp]).
@[simp]: applying Unbox to a tuple of its single parameter S — the record of its procedures Unbox.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 Unbox.main.apply_simp to fill that procedure's holes.
proc main of module Unbox 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 Unbox.main.apply_simp, which fills the holes of Unbox.main.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc main of module Unbox, as a procedure of its own: the 2 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 Unbox.main.procedure.apply_simp) rather than run. Use Unbox.main 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 Unbox, 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 Unbox.main, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma Unbox.apply_simp says.
Equations
Instances For
@[simp]: applying Unbox.main to the parameters proc main uses (S) is Module.proc (Unbox.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.
Builds a module of type Shadow from the record Shadow.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of Shadow.structure (Shadow.mk_destruct, Shadow.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas Shadow.gen.mk_simp, Shadow.use.mk_simp.
Equations
- Experiment.Shadow.mk k theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.gen theRecord✝.use
Instances For
The record of a module's fields: Shadow.structure m is Shadow.Structure.mk applied to Shadow.gen, Shadow.use of m.
Inverse of Shadow.mk (Shadow.mk_destruct, Shadow.destruct_mk).
Equations
- Experiment.Shadow.structure k theModule✝ = { gen := Experiment.Shadow.gen k theModule✝, use := Experiment.Shadow.use k theModule✝ }
Instances For
The IsModule Shadow instance: Shadow is a module type, with representation Shadow.typeRep.
It is what lets the name Shadow stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module Shadow.typeRep would do on its own but Shadow, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleShadow k = { moduleTypeRep := Experiment.Shadow.typeRep k, isModule := ⋯ }
@[simp]: reading the field use back off a module built from a record — Shadow.use (Shadow.mk r) = r.use.
It is what carries the right-hand side of an X.apply_simp (which is an Shadow.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.use.apply_simp.
@[simp]: Shadow.mk (Shadow.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 — Shadow.gen (Shadow.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an Shadow.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
What is derivable about the accessor Shadow.use, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Shadow.use.utilities.accessorModule : Shadow →ₘ …— the accessor as a module, a projection being a module morphism;Shadow.use.utilities.apply_simp—Module.app Shadow.use.utilities.accessorModule m = Shadow.use m: applying that module is the accessor;Shadow.use.utilities.expression_eq— the same at the level of expressions:(Shadow.use m).expression = (Shadow.use.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ModuleTypeRep underlying Shadow, the module type declared by moduletype Shadow: the right-nested product of its 2 field types, in declaration order.
Shadow is by definition Module Shadow.typeRep.
Equations
Instances For
The module type declared by moduletype Shadow, with fields gen, use: the type Module Shadow.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with Shadow.mk, read a single field off one with the accessors Shadow.gen, Shadow.use, and get the whole record back with Shadow.structure.
Equations
Instances For
What is derivable about the accessor Shadow.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
Shadow.gen.utilities.accessorModule : Shadow →ₘ …— the accessor as a module, a projection being a module morphism;Shadow.gen.utilities.apply_simp—Module.app Shadow.gen.utilities.accessorModule m = Shadow.gen m: applying that module is the accessor;Shadow.gen.utilities.expression_eq— the same at the level of expressions:(Shadow.gen m).expression = (Shadow.gen.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: Shadow.structure (Shadow.mk r) = r — destructing a module built from a record gives that record back.
The field use of a module of type Shadow: the projection onto component 1 of the right-nested tuple Shadow.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Shadow.use.mk_simp reads this field back off a module built by Shadow.mk; Shadow.use.utilities has the accessor as a module, and the lemmas about it.
Equations
- Experiment.Shadow.use k theModule✝ = GaudisCrypt.Module.snd' theModule✝
Instances For
The field gen of a module of type Shadow: the projection onto component 0 of the right-nested tuple Shadow.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
Shadow.gen.mk_simp reads this field back off a module built by Shadow.mk; Shadow.gen.utilities has the accessor as a module, and the lemmas about it.
It takes no parameters (recorded in @[gaudiProcParamNames]).
Equations
- Experiment.Shadow.gen k theModule✝ = GaudisCrypt.Module.fst' theModule✝
Instances For
Instantiating the holes of MkSized.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 [MkSized.gen.procedure.apply_simp]).
proc gen of module MkSized as a module: Module.proc MkSized.gen.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — MkSized.gen.apply_simp says exactly that.
Instances For
@[simp]: MkSized.use = Module.proc MkSized.use.procedure — true by definition, proc use using no module parameter and so having no holes to fill.
The body of proc gen of module MkSized, 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 MkSized.gen.procedure.apply_simp) rather than run. Use MkSized.gen for this procedure as a module.
Equations
- Experiment.MkSized.gen.procedure n = proc () : (Fin (n + 1)) { skip; return 0 }
Instances For
Instantiating the holes of MkSized.use.procedure with a tuple holeArgs of procedures: the body of proc use 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 [MkSized.use.procedure.apply_simp]).
proc use of module MkSized as a module: Module.proc MkSized.use.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — MkSized.use.apply_simp says exactly that.
Instances For
The body of proc use of module MkSized, 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 MkSized.use.procedure.apply_simp) rather than run. Use MkSized.use for this procedure as a module.
Instances For
The module declared by module MkSized: the record of its procedures MkSized.gen, MkSized.use.
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 MkSized.apply_simp to apply it with.
Equations
- Experiment.MkSized n = Experiment.Sized.mk n { gen := Experiment.MkSized.gen n, use := Experiment.MkSized.use n }
Instances For
@[simp]: MkSized.gen = Module.proc MkSized.gen.procedure — true by definition, proc gen using no module parameter and so having no holes to fill.
The module declared by module MkPoly: the record of its procedures MkPoly.gen, MkPoly.use.
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 MkPoly.apply_simp to apply it with.
Equations
- Experiment.MkPoly = Experiment.Poly.mk { gen := Experiment.MkPoly.gen, use := Experiment.MkPoly.use }
Instances For
Instantiating the holes of MkPoly.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 [MkPoly.gen.procedure.apply_simp]).
The body of proc use of module MkPoly, 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 MkPoly.use.procedure.apply_simp) rather than run. Use MkPoly.use for this procedure as a module.
Equations
- Experiment.MkPoly.use.procedure = proc (_x : α) : Bool { skip; return true }
Instances For
proc gen of module MkPoly as a module: Module.proc MkPoly.gen.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — MkPoly.gen.apply_simp says exactly that.
Instances For
proc use of module MkPoly as a module: Module.proc MkPoly.use.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — MkPoly.use.apply_simp says exactly that.
Instances For
The body of proc gen of module MkPoly, 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 MkPoly.gen.procedure.apply_simp) rather than run. Use MkPoly.gen for this procedure as a module.
Equations
- Experiment.MkPoly.gen.procedure = proc () : α { skip; return default }
Instances For
@[simp]: MkPoly.gen = Module.proc MkPoly.gen.procedure — true by definition, proc gen using no module parameter and so having no holes to fill.
Instantiating the holes of MkPoly.use.procedure with a tuple holeArgs of procedures: the body of proc use 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 [MkPoly.use.procedure.apply_simp]).
@[simp]: MkPoly.use = Module.proc MkPoly.use.procedure — true by definition, proc use using no module parameter and so having no holes to fill.
@[simp]: applying WrapSized.use to the parameters proc use uses (S) is Module.proc (WrapSized.use.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 WrapSized.gen to the parameters proc gen uses (S) is Module.proc (WrapSized.gen.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 WrapSized to a tuple of its single parameter S — the record of its procedures WrapSized.gen, WrapSized.use, 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 WrapSized.gen.apply_simp, WrapSized.use.apply_simp to fill that procedure's holes.
Instantiating the holes of WrapSized.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 [WrapSized.gen.procedure.apply_simp]).
The body of proc gen of module WrapSized, as a procedure of its own: the one call it makes to a module parameter (S) 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 WrapSized.gen.procedure.apply_simp) rather than run. Use WrapSized.gen for this procedure as a module.
Equations
Instances For
The module declared by module WrapSized, abstracted over its single parameter S, 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 WrapSized.gen, WrapSized.use, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma WrapSized.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc gen of module WrapSized 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 WrapSized.gen.apply_simp, which fills the holes of WrapSized.gen.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
proc use of module WrapSized 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 WrapSized.use.apply_simp, which fills the holes of WrapSized.use.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 WrapSized.use.procedure with a tuple holeArgs of procedures: the body of proc use 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 [WrapSized.use.procedure.apply_simp]).
The body of proc use of module WrapSized, as a procedure of its own: the one call it makes to a module parameter (S) 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 WrapSized.use.procedure.apply_simp) rather than run. Use WrapSized.use for this procedure as a module.
Equations
Instances For
@[simp]: Warned.g = Module.proc Warned.g.procedure — true by definition, proc g using no module parameter and so having no holes to fill.
The module declared by module Warned: the record of its procedures Warned.g.
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 Warned.apply_simp to apply it with.
Equations
Instances For
proc g of module Warned as a module: Module.proc Warned.g.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Warned.g.apply_simp says exactly that.
Equations
Instances For
The body of proc g of module Warned, 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 Warned.g.procedure.apply_simp) rather than run. Use Warned.g for this procedure as a module.
Equations
- Experiment.Warned.g.procedure A = proc () : Unit { skip; return () }
Instances For
Instantiating the holes of Warned.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [Warned.g.procedure.apply_simp]).
@[simp]: Quiet.g = Module.proc Quiet.g.procedure — true by definition, proc g using no module parameter and so having no holes to fill.
The module declared by module Quiet: the record of its procedures Quiet.g.
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 Quiet.apply_simp to apply it with.
Equations
Instances For
The body of proc g of module Quiet, 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 Quiet.g.procedure.apply_simp) rather than run. Use Quiet.g for this procedure as a module.
Equations
- Experiment.Quiet.g.procedure A = proc () : Unit { skip; return () }
Instances For
Instantiating the holes of Quiet.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [Quiet.g.procedure.apply_simp]).
proc g of module Quiet as a module: Module.proc Quiet.g.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — Quiet.g.apply_simp says exactly that.
Equations
Instances For
Instantiating the holes of HoleNames.h.procedure with a tuple holeArgs of procedures: the body of proc h 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 [HoleNames.h.procedure.apply_simp]).
@[simp]: HoleNames.h = Module.proc HoleNames.h.procedure — true by definition, proc h using no module parameter and so having no holes to fill.
@[simp]: applying HoleNames.g to the parameters proc g uses (S, T) is Module.proc (HoleNames.g.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 h of module HoleNames as a module: Module.proc HoleNames.h.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — HoleNames.h.apply_simp says exactly that.
Instances For
proc g of module HoleNames as a module, abstracted over the module parameters it uses (S, T, in declaration order): Module.Arr … (Module.Proc (procsig …)).
Apply it with the @[simp] lemma HoleNames.g.apply_simp, which fills the holes of HoleNames.g.procedure with the callees the body called.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc g of module HoleNames, as a procedure of its own: the 2 calls it makes to module parameters (S, T) 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 HoleNames.g.procedure.apply_simp) rather than run. Use HoleNames.g 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 HoleNames.g.procedure with a tuple holeArgs of procedures: the body of proc g 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 [HoleNames.g.procedure.apply_simp]).
The body of proc h of module HoleNames, 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 HoleNames.h.procedure.apply_simp) rather than run. Use HoleNames.h for this procedure as a module.
Equations
- Experiment.HoleNames.h.procedure = proc () : Unit { skip; return () }
Instances For
@[simp]: applying HoleNames to a tuple of its 2 parameters S, T — the record of its procedures HoleNames.g, HoleNames.h, 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 HoleNames.g.apply_simp, HoleNames.h.apply_simp to fill that procedure's holes.
The module declared by module HoleNames, abstracted over its 2 parameters S, T, 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 HoleNames.g, HoleNames.h, each applied to the parameters that procedure itself uses — which is what the @[simp] lemma HoleNames.apply_simp says.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field plain of a module of type NamedParams: the projection onto component 3 of the right-nested tuple NamedParams.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
NamedParams.plain.mk_simp reads this field back off a module built by NamedParams.mk; NamedParams.plain.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.plain = (GaudisCrypt.Module.snd' theModule✝).snd'.snd'
Instances For
Builds a module of type NamedParams from the record NamedParams.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of NamedParams.structure (NamedParams.mk_destruct, NamedParams.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas NamedParams.commit.mk_simp, NamedParams.gen.mk_simp, NamedParams.unnamed.mk_simp, NamedParams.plain.mk_simp.
Equations
- Experiment.NamedParams.mk theRecord✝ = GaudisCrypt.Module.pair' theRecord✝.commit (GaudisCrypt.Module.pair' theRecord✝.gen (GaudisCrypt.Module.pair' theRecord✝.unnamed theRecord✝.plain))
Instances For
What is derivable about the accessor NamedParams.plain, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
NamedParams.plain.utilities.accessorModule : NamedParams →ₘ …— the accessor as a module, a projection being a module morphism;NamedParams.plain.utilities.apply_simp—Module.app NamedParams.plain.utilities.accessorModule m = NamedParams.plain m: applying that module is the accessor;NamedParams.plain.utilities.expression_eq— the same at the level of expressions:(NamedParams.plain m).expression = (NamedParams.plain.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The ModuleTypeRep underlying NamedParams, the module type declared by moduletype NamedParams: the right-nested product of its 4 field types, in declaration order.
NamedParams is by definition Module NamedParams.typeRep.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]: NamedParams.mk (NamedParams.structure m) = m — rebuilding a module from its own fields gives that module back.
The field gen of a module of type NamedParams: the projection onto component 1 of the right-nested tuple NamedParams.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
NamedParams.gen.mk_simp reads this field back off a module built by NamedParams.mk; NamedParams.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.snd' theModule✝).fst'
Instances For
@[simp]: NamedParams.structure (NamedParams.mk r) = r — destructing a module built from a record gives that record back.
@[simp]: reading the field gen back off a module built from a record — NamedParams.gen (NamedParams.mk r) = r.gen.
It is what carries the right-hand side of an X.apply_simp (which is an NamedParams.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.gen.apply_simp.
What is derivable about the accessor NamedParams.commit, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
NamedParams.commit.utilities.accessorModule : NamedParams →ₘ …— the accessor as a module, a projection being a module morphism;NamedParams.commit.utilities.apply_simp—Module.app NamedParams.commit.utilities.accessorModule m = NamedParams.commit m: applying that module is the accessor;NamedParams.commit.utilities.expression_eq— the same at the level of expressions:(NamedParams.commit m).expression = (NamedParams.commit.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field commit of a module of type NamedParams: the projection onto component 0 of the right-nested tuple NamedParams.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
NamedParams.commit.mk_simp reads this field back off a module built by NamedParams.mk; NamedParams.commit.utilities has the accessor as a module, and the lemmas about it.
Its parameters are named h, m, in that order (recorded in @[gaudiProcParamNames], a ProcedureSignature holding only their types).
Equations
- theModule✝.commit = GaudisCrypt.Module.fst' theModule✝
Instances For
@[simp]: reading the field plain back off a module built from a record — NamedParams.plain (NamedParams.mk r) = r.plain.
It is what carries the right-hand side of an X.apply_simp (which is an NamedParams.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.plain.apply_simp.
The field unnamed of a module of type NamedParams: the projection onto component 2 of the right-nested tuple NamedParams.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
NamedParams.unnamed.mk_simp reads this field back off a module built by NamedParams.mk; NamedParams.unnamed.utilities has the accessor as a module, and the lemmas about it.
Equations
- theModule✝.unnamed = (GaudisCrypt.Module.snd' theModule✝).snd'.fst'
Instances For
The IsModule NamedParams instance: NamedParams is a module type, with representation NamedParams.typeRep.
It is what lets the name NamedParams stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module NamedParams.typeRep would do on its own but NamedParams, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModuleNamedParams = { moduleTypeRep := Experiment.NamedParams.typeRep, isModule := ⋯ }
What is derivable about the accessor NamedParams.gen, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
NamedParams.gen.utilities.accessorModule : NamedParams →ₘ …— the accessor as a module, a projection being a module morphism;NamedParams.gen.utilities.apply_simp—Module.app NamedParams.gen.utilities.accessorModule m = NamedParams.gen m: applying that module is the accessor;NamedParams.gen.utilities.expression_eq— the same at the level of expressions:(NamedParams.gen m).expression = (NamedParams.gen.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 — NamedParams.commit (NamedParams.mk r) = r.commit.
It is what carries the right-hand side of an X.apply_simp (which is an NamedParams.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.commit.apply_simp.
The record of the fields of a module of type NamedParams: the fields commit, gen, unnamed, plain, one per moduletype field, each of that field's own module type.
NamedParams.mk turns such a record into a NamedParams, NamedParams.structure turns a NamedParams back into one.
Instances For
@[simp]: reading the field unnamed back off a module built from a record — NamedParams.unnamed (NamedParams.mk r) = r.unnamed.
It is what carries the right-hand side of an X.apply_simp (which is an NamedParams.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.unnamed.apply_simp.
The record of a module's fields: NamedParams.structure m is NamedParams.Structure.mk applied to NamedParams.commit, NamedParams.gen, NamedParams.unnamed, NamedParams.plain of m.
Inverse of NamedParams.mk (NamedParams.mk_destruct, NamedParams.destruct_mk).
Equations
Instances For
The module type declared by moduletype NamedParams, with fields commit, gen, unnamed, plain: the type Module NamedParams.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with NamedParams.mk, read a single field off one with the accessors NamedParams.commit, NamedParams.gen, NamedParams.unnamed, NamedParams.plain, and get the whole record back with NamedParams.structure.
Instances For
What is derivable about the accessor NamedParams.unnamed, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
NamedParams.unnamed.utilities.accessorModule : NamedParams →ₘ …— the accessor as a module, a projection being a module morphism;NamedParams.unnamed.utilities.apply_simp—Module.app NamedParams.unnamed.utilities.accessorModule m = NamedParams.unnamed m: applying that module is the accessor;NamedParams.unnamed.utilities.expression_eq— the same at the level of expressions:(NamedParams.unnamed m).expression = (NamedParams.unnamed.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The body of proc p of module NamedProcs, 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 NamedProcs.p.procedure.apply_simp) rather than run. Use NamedProcs.p for this procedure as a module.
Instances For
Instantiating the holes of NamedProcs.p.procedure with a tuple holeArgs of procedures: the body of proc p 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 [NamedProcs.p.procedure.apply_simp]).
proc p of module NamedProcs as a module: Module.proc NamedProcs.p.procedure, of type Module.Proc (procsig …). It uses no module parameter, so it is not a function — NamedProcs.p.apply_simp says exactly that.
Instances For
@[simp]: NamedProcs.p = Module.proc NamedProcs.p.procedure — true by definition, proc p using no module parameter and so having no holes to fill.
The module declared by module NamedProcs: the record of its procedures NamedProcs.p.
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 NamedProcs.apply_simp to apply it with.
Instances For
What is derivable about the accessor PartlyNamed.f, bundled into one ModuleTypeUtilities (one name per field in the namespace, rather than one per fact):
PartlyNamed.f.utilities.accessorModule : PartlyNamed →ₘ …— the accessor as a module, a projection being a module morphism;PartlyNamed.f.utilities.apply_simp—Module.app PartlyNamed.f.utilities.accessorModule m = PartlyNamed.f m: applying that module is the accessor;PartlyNamed.f.utilities.expression_eq— the same at the level of expressions:(PartlyNamed.f m).expression = (PartlyNamed.f.utilities.proj m.expression).reduce.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The field f of a module of type PartlyNamed: the projection onto component 0 of the right-nested tuple PartlyNamed.typeRep, as a chain of Module.fst'/Module.snd'. Tagged @[module_accessor].
PartlyNamed.f.mk_simp reads this field back off a module built by PartlyNamed.mk; PartlyNamed.f.utilities has the accessor as a module, and the lemmas about it.
Instances For
The module type declared by moduletype PartlyNamed, with fields f: the type Module PartlyNamed.typeRep of modules that are a right-nested tuple of the field types.
Build one from a record of its fields with PartlyNamed.mk, read a single field off one with the accessors PartlyNamed.f, and get the whole record back with PartlyNamed.structure.
Instances For
@[simp]: PartlyNamed.mk (PartlyNamed.structure m) = m — rebuilding a module from its own fields gives that module back.
@[simp]: reading the field f back off a module built from a record — PartlyNamed.f (PartlyNamed.mk r) = r.f.
It is what carries the right-hand side of an X.apply_simp (which is an PartlyNamed.mk) on to the field the caller actually asked for, so that simp chains X.apply_simp into X.f.apply_simp.
@[simp]: PartlyNamed.structure (PartlyNamed.mk r) = r — destructing a module built from a record gives that record back.
The ModuleTypeRep underlying PartlyNamed, the module type declared by moduletype PartlyNamed: the right-nested product of its 1 field types, in declaration order.
PartlyNamed is by definition Module PartlyNamed.typeRep.
Instances For
The record of the fields of a module of type PartlyNamed: the fields f, one per moduletype field, each of that field's own module type.
PartlyNamed.mk turns such a record into a PartlyNamed, PartlyNamed.structure turns a PartlyNamed back into one.
Instances For
The IsModule PartlyNamed instance: PartlyNamed is a module type, with representation PartlyNamed.typeRep.
It is what lets the name PartlyNamed stand where a module type is expected — in Module.Arr/Module.Prod (→ₘ/×ₘ), say — which the underlying Module PartlyNamed.typeRep would do on its own but PartlyNamed, a plain (non-reducible) def, would not.
Equations
- Experiment.instIsModulePartlyNamed = { moduleTypeRep := Experiment.PartlyNamed.typeRep, isModule := ⋯ }
The record of a module's fields: PartlyNamed.structure m is PartlyNamed.Structure.mk applied to PartlyNamed.f of m.
Inverse of PartlyNamed.mk (PartlyNamed.mk_destruct, PartlyNamed.destruct_mk).
Instances For
Builds a module of type PartlyNamed from the record PartlyNamed.Structure of its fields, as a right-nested Module.pair'. @[reducible].
Inverse of PartlyNamed.structure (PartlyNamed.mk_destruct, PartlyNamed.destruct_mk); a single field of a module built this way is read back by the @[simp] lemmas PartlyNamed.f.mk_simp.
Equations
- Experiment.PartlyNamed.mk theRecord✝ = theRecord✝.f