package alba
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.core/Alba_core/Term/index.html
Module Alba_core.Term
module Lambda_info : sig ... endmodule Pi_info : sig ... endmodule Application_info : sig ... endtype t = | Sort of Sort.t| Value of Value.t| Variable of int| Typed of t * typ| Appl of t * t * Application_info.t| Lambda of typ * t * Lambda_info.t| Pi of typ * typ * Pi_info.t| Where of string * typ * t * t(*Where
*)(name, tp, exp, def)is equivalent to the beta redexAppl ( Lambda (tp, exp, "name"), def)
and typ = tand formal_argument = string * typtype t_n = t * inttype typ_n = typ * intval proposition : tval any : tval any_uni : int -> tval variable : int -> tmake_product name typed kind arg_typ res_typ
val lambda_in : formal_argument list -> t -> tval product_in : formal_argument list -> t -> tRewrite a where block as an application with a lambda term.
val char : int -> tchar code character value.
val string : string -> tstring str string value.
val number_values : string -> t listval is_sort : typ -> boolval split_application : t -> t * (t * Application_info.t) listsplit_application t
up_from start delta t: increases all free variables >= start in t by delta
requires: 0 <= delta
down_from start delta t: decreases all free variables >= start in t by delta if possible. Returns None it there is a free variable in t with index i < delta.
requires: 0 <= delta
down delta t: decreases all free variables in t by delta if possible. Returns None if there is a free variable in t with index i < delta.
requires: 0 <= delta
substitute f term substitutes each free variable i in term by the term f i.
substitute f term substitutes each free variable i in term by the term f i and do beta reduction in case that f i appears in a function position and is a function abstraction.
val apply_nargs : t -> int -> Application_info.t -> tapply_nargs f n mode returns
f (Var (n-1)) ... (Var 0)
where all applications are done with mode mode.
val fold_free : (int -> 'a -> 'a) -> t -> 'a -> 'aval has : (int -> bool) -> t -> boolhas p term does the term have a free variable satisfying p?
val forall : (int -> bool) -> t -> boolforall p term do all free variables in term satisfy p?
val has_variable : int -> t -> boolmodule Monadic (M : Fmlib.Module_types.MONAD) : sig ... endMonadic functions
module Inductive : sig ... endInductive types