package alba
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=062f33c55ef39706c4290dff67d5a00bf009051fd757f9352be527f629ae21fc
    
    
  md5=eb4edc4d6b7e15b83d6397bd34994153
    
    
  doc/alba.core/Alba_core/Term/index.html
Module Alba_core.TermSource
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 redex- Appl ( Lambda (tp, exp, "name"), def)
Rewrite a where block as an application with a lambda term.
split_application t
up_from start delta t: increases all free variables >= start in t by delta
requires: 0 <= delta
up delta t: increases all free variables 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.
apply_nargs f n mode returns
f (Var (n-1)) ... (Var 0)
where all applications are done with mode mode.
has p term does the term have a free variable satisfying p?
Monadic functions