Documentation

GaudisCrypt.Syntax.ModuleSubtype

EasyCrypt's subtyping of module types: module_subtype #

module_subtype RF <: Oracle

makes a module of type RF usable where an Oracle is expected, as EasyCrypt does for a module type with (at least) the procedures of another: a Coe RF Oracle whose function builds the Oracle from RF's procedures of the same names, fun s => Oracle.mk { get := s.get } — or, when the two module types have the same procedures (equal by definition), the identity: the module itself, as EC sees it. The function is a fun building the record, not a named function, so that the coercion unfolds to the record the module command reads a callee like A(Bounder(F)) back from; it prints back as the module (Syntax/ModuleApplicationSyntax.lean). Either side may be a module type applied to its parameters, in parentheses ((PROM.FullRO.RO_T «from» «to»)).

module_subtype S <: T: see the module docstring.

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