EasyCrypt's module paths: M(A, B).f #
EasyCrypt names a procedure of an applied functor as M(A, B).f. Here that is a term:
Preimage(A, RO).main -- a procedure module (`Module.Proc sig`)
where M(A₁, …, Aₙ) is Module.app M (Module.pair A₁ (… Aₙ)) and .f picks the procedure:
- the result is of a
moduletypeC:.fis its accessor,C.f (Module.app M …); - the result is a procedure module itself (a
modulewith a single procedure and no declared type):.fmust be the name of that procedure,M.f.
The arguments are module paths again: a name (RO), an application (Bounder(RO)), or any Lean
term in parentheses ((RO.asRF sampleto m)). The head M is a name. A module that takes Lean
parameters before its module parameters (module D1 (A : Adv) using (F : RO_T), so that D1 A
is a module of its own, EC's partial application D1(A)) takes them first: D1(A, F) is
Module.app (D1 A) F, its first arguments the head's explicit Lean parameters.
The form exists at the term level only with the trailing .f. Without it, M(x) would also
read EasyCrypt's M.f(x) of a Pr[ ] or of a procedure judgment as a module application.
Printing: an accessor applied to a module application, and a single-procedure module applied,
print in this form whenever their heads are names (ModuleApplicationSyntaxTest.lean).
A module path: a name, an application M(A, …), or a Lean term in parentheses.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- GaudisCrypt.ec_mod_ = Lean.ParserDescr.node `GaudisCrypt.ec_mod_ 1024 (Lean.ParserDescr.const `ident)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
M(A₁, …, Aₙ).f: the procedure f of the module M applied to A₁, …, Aₙ. atomic, so
that EC's M.f(x) (the procedure M.f and its arguments, as in Pr[ M.f(x) @ &m : E ]) falls
back to the name M.f instead of failing as a path without its .f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The number of explicit Lean parameters of the constant m (none for a local): the leading
arguments of a path m(…) that are not module arguments.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The Lean term of a module path.
The module types of the n components of the parameter of the functor head
(Module.Arr (A₁ ×ₘ … ×ₘ Aₙ) B), if its type shows them: an argument elaborated on its own
is then coerced to its component (EC's subtyping inside a pair of arguments, D(F, P) with
F : FUNCTIONALITY for a DFUNCTIONALITY).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Module.app m (Module.pair a₁ (… aₙ)). Each argument is elaborated on its own, (aᵢ :),
and then coerced to the parameter's module type: so EC's subtyping of module types (an RF
where an Oracle is expected, A(Bounder(F))) goes through a coercion on the argument,
instead of the expected type being pushed into it (where Bounder's own type would have to
change).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The procedures of the module x: the constants x.f its definition mentions that are
procedures of it (isModuleProc: a x.f.procedure, or an alias).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The components of a right-nested Module.pair.
The positions, in the parameter list of the module x, of the parameters its procedure
xf uses, in the order xf takes them — read off x.apply_simp, which states the module
applied to its parameters as the record of its procedures, each applied to its own.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The names of the module parameters the procedure xf of a module takes, in its order —
read off xf.apply_simp.
Equations
- One or more equations did not get rendered due to their size.
Instances For
c is the accessor of a moduletype's field (it has c.utilities).
Equations
- GaudisCrypt.ModuleApplication.isAccessor env c = env.contains (c ++ `utilities)
Instances For
The procedure module xf of a module without a module type, applied to the arguments of
a path M(a₁, …, aₙ).f: xf's Lean parameters first (the leading arguments), then the module
parameters pick selects of the rest, one application each. none if pick fails or the
result is not a procedure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Printing #
T.mk (T.Structure.mk (C.f₁ X) … (C.fₙ X)), a moduletype's record whose fields are all
accessors applied to one module X (what a coercion for EC's subtyping builds): the index, in the
structure constructor's arguments, of the first field.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The arguments of a module application: a right-nested Module.pair chain split into its
components, each printed as a module path.
A module path: M(…) for an application with a name for its head, a name, or a
parenthesized term.
Module.app M A with M printing as a name, or as a name applied to all its explicit
Lean parameters (D1 A, read back from D1(A, F)): the name and the argument paths.
C.f (Module.app M A) for a moduletype accessor C.f: M(A).f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
C.f U for a moduletype accessor C.f of a theory and a module U whose type is a
clone's alias of C (U : CM.Unhider, CommitmentProtocol.Unhider.choose U): U.choose, as it
is written (Lean's field notation does not see through the alias).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Module.app X A of a single-procedure module X with procedure f: X(A).f.
Equations
- One or more equations did not get rendered due to their size.