Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Lambda terms
type term = private
| Kind
Kind
*)| Type of Basic.loc
Type
*)| DB of Basic.loc * Basic.ident * int
deBruijn indices
*)| Const of Basic.loc * Basic.name
Global variable
*)| App of term * term * term list
f a1 a2 ; ... ; an
, f not an App
| Lam of Basic.loc * Basic.ident * term option * term
Lambda abstraction
*)| Pi of Basic.loc * Basic.ident * term * term
Pi abstraction
*)val pp_term : term Basic.printer
val mk_Kind : term
val mk_DB : Basic.loc -> Basic.ident -> int -> term
val mk_Const : Basic.loc -> Basic.name -> term
val mk_Lam : Basic.loc -> Basic.ident -> term option -> term -> term
val mk_Pi : Basic.loc -> Basic.ident -> term -> term -> term
add_n_lambdas n t
returns the term t
with n
(extra) anonymous lambda abstraction. Doesn't shift free variables of t
.
exception InvalidSubterm of term * int
subterm t p
returns the subterm of t
at position p
. Raises InvalidSubterm in case of invalid position in given term.
val compare_term : Basic.name comparator -> term comparator
compare_term id_comp
t
t'
compares both terms (up to alpha equivalence). * The order relation goes : * Kind < Type < Const < DB < App < Lam < Pi * Besides * Const m v < Const m' v' iif (m,v) < (m',v') * DB n < DB n' iif n < n' * App f a args < App f' a' args' iif (f,a,args) < (f',a',args') * Lam x ty t < Lam x' ty' t' iif t < t' * Pi x a b < Pi x' a' b' iif (a,b) < (a',b')
val is_AC : algebra -> bool
Return true iff given algebra is AC or ACU.
val pp_cstr : cstr Basic.printer
type 'a context = (Basic.loc * Basic.ident * 'a) list
General context: variables have abstract annotations
Partially annotated context: as generated at rule parsing
type arity_context = int context
Arity annotated context: used for rewriting in untyped setting
val pp_untyped_context : 'a context Basic.printer
val pp_typed_context : typed_context Basic.printer
val pp_part_typed_context : partially_typed_context Basic.printer
val rename_vars_with_typed_context : typed_context -> term -> term