Kernel.TermSourceLambda terms
type term = private | KindKind
*)| Type of Basic.locType
*)| DB of Basic.loc * Basic.ident * intdeBruijn indices
*)| Const of Basic.loc * Basic.nameGlobal variable
*)| App of term * term * term listf a1 a2 ; ... ; an , f not an App
| Lam of Basic.loc * Basic.ident * term option * termLambda abstraction
*)| Pi of Basic.loc * Basic.ident * term * termPi abstraction
*)add_n_lambdas n t returns the term t with n (extra) anonymous lambda abstraction. Doesn't shift free variables of t.
Position in a term
subterm t p returns the subterm of t at position p. Raises InvalidSubterm in case of invalid position in given term.
Type for comparison functions
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')
General context: variables have abstract annotations
Partially annotated context: as generated at rule parsing
Arity annotated context: used for rewriting in untyped setting
(n, t) represents the term represented by t * (whichever its representation) under n lambda abstractions.