package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type env = t LogtkDBEnv.t
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 open_vars : t -> t Sequence.t

List of "open" De Bruijn variables (with too high an index)

  • deprecated

    since 0.5.2, dangerous, use LogtkDBEnv functions instead

val shift : int -> t -> t

shift the non-captured De Bruijn indexes in the term by n

val unshift : int -> t -> t

unshift n t unshifts the term t's bound variables by n. In other words it decrements indices of all free De Bruijn variables inside by n. Variables bound within t are left untouched.

val replace : t -> sub:t -> t

db_from_term t ~sub replaces sub by a fresh De Bruijn index in t.

val from_var : t -> var:t -> t

db_from_var t ~var replace var by a De Bruijn symbol in t. Same as replace.

val eval : env -> t -> t

Evaluate the term in the given De Bruijn environment, by replacing De Bruijn indices by their value in the environment.