Module InnerTerm.DB
val closed : t -> bool
check whether the term is closed (all DB vars are bound within the term). If this returns
true
then the term doesn't depend on its environment.
val contains : t -> int -> bool
Does t contains the De Bruijn variable of index n?
val unshift : ?depth:int -> int -> t -> t
unshift n t
unshifts the termt
's bound variables byn
. In other words it decrements indices of all free De Bruijn variables inside byn
. Variables bound withint
are left untouched.
val replace : t -> sub:t -> t
replace t ~sub
replacessub
by a fresh De Bruijn index int
. Shifts other De Bruijn indices by 1
val replace_l : t -> l:t list -> t
N-ary version of
replace
Shifts other De Bruijn indices bylength t