package lambdapi

  1. Overview
  2. Docs

Translate the parser-level AST to Coq.

There are two modes:

  • raw_coq mode (option -o raw_coq): translation of the AST as it is (lambdapi-calculus is a subset system of coq if we ignore rules)
  • stt_coq mode (option -o stt_coq): translation of the AST as an encoding in simple type theory.

The encoding can be specified through a lambdapi file (option --encoding).

In both modes, a renaming map can be provided to rename some identifiers.

The renaming map can be specified through a lambdapi file (option --renaming).

val log : 'a Lplib.Base.outfmt -> 'a

Symbols necessary to encode STT.

type builtin =
  1. | Set
  2. | Prop
  3. | Arr
  4. | El
  5. | Imp
  6. | All
  7. | Prf
  8. | Eq
  9. | Or
  10. | And
  11. | Ex
  12. | Not
val index_of_builtin : builtin -> int
val nb_builtins : int
val builtin_of_index : int -> builtin
val index_of_name : string -> int option
val name_of_index : int -> string
val builtin : Core.Term.qident array

Set renaming map from file.

val set_renaming : string -> unit

Set symbols whose declarations have to be erased.

val erase : Lplib.Extra.StrSet.t Stdlib.ref
module Qid : sig ... end
module QidMap : sig ... end
val map_erased_qid_coq : string QidMap.t Stdlib.ref
val set_erasing : string -> unit

Set encoding.

val map_qid_builtin : builtin QidMap.t Stdlib.ref
val set_encoding : string -> unit

Translation of identifiers.

val translate_ident : string -> string
val raw_ident : string Lplib.Base.pp
val param_ids : Parsing.Syntax.p_ident option list Lplib.Base.pp

Translation of terms.

val stt : bool Stdlib.ref
val use_implicits : bool Stdlib.ref
val use_notations : bool Stdlib.ref
val arrow : Stdlib.Format.formatter -> Parsing.Syntax.p_term -> Parsing.Syntax.p_term -> unit
val abst : Stdlib.Format.formatter -> Parsing.Syntax.p_params list -> Parsing.Syntax.p_term -> unit
val prod : Stdlib.Format.formatter -> Parsing.Syntax.p_params list -> Parsing.Syntax.p_term -> unit
val params_list : Parsing.Syntax.p_params list Lplib.Base.pp
val params_list_in_abs : Parsing.Syntax.p_params list Lplib.Base.pp

Translation of commands.

Set Coq required file.

val require : string option Stdlib.ref
val set_requiring : string -> unit
val print : Parsing.Syntax.ast -> unit
OCaml

Innovation. Community. Security.