package alba
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.core/Alba_core/Term/index.html
Module Alba_core.Term
module Lambda_info : sig ... end
module Pi_info : sig ... end
module Application_info : sig ... end
type 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 = t
and formal_argument = string * typ
type t_n = t * int
type typ_n = typ * int
val proposition : t
val any : t
val any_uni : int -> t
val variable : int -> t
make_product name typed kind arg_typ res_typ
val lambda_in : formal_argument list -> t -> t
val product_in : formal_argument list -> t -> t
Rewrite a where block as an application with a lambda term.
val char : int -> t
char code
character value.
val string : string -> t
string str
string value.
val number_values : string -> t list
val is_sort : typ -> bool
val split_application : t -> t * (t * Application_info.t) list
split_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 -> t
apply_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 -> 'a
val has : (int -> bool) -> t -> bool
has p term
does the term have a free variable satisfying p
?
val forall : (int -> bool) -> t -> bool
forall p term
do all free variables in term
satisfy p
?
val has_variable : int -> t -> bool
module Monadic (M : Fmlib.Module_types.MONAD) : sig ... end
Monadic functions
module Inductive : sig ... end
Inductive types