package dedukti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=97171b48dd96043d84587581d72edb442f63e7b5ac1695771aa1c3c9074739e15bc7d17678fedb7062acbf403a0bf323d97485c31b92376b80c63b5c2300ee3c
sha256=5e1b6a859dfa1eb2098947a99c7d11ee450f750d96da1720f4834e1505d1096c
doc/dedukti.kernel/Kernel/Subst/index.html
Module Kernel.SubstSource
Substitutions using DeBruijn indices.
A substitution is a function mapping a variable (location, identifier and DB index) under a given number of lambda abstractions to a term. A substitution raises Not_found meaning that the variable is not subsituted.
apply_subst subst n t applies subst to t under n lambda abstractions.
- Variables with DB index
k<nare considered "locally bound" and are never substituted. - Variables with DB index
k>=nmay be substituted ifk-nis mapped insigma.
unshift i t shifts every De Bruijn indices in t by -i. Raises UnshiftExn when t contains De Bruijn variables of indices k <i.
psubst_l l k t substitutes the first n De Bruijn variables (with n = length l) in t with the corresponding term in l. Unshifts n times the free variables with greater indices.
subst t u substitutes the first free De Bruijn variable with u in t. Unshifts the other free variables.
subst_n n y t substitutes the n-th free De Bruijn variable in t with a fresh variable named y becoming the first free variable in t. All others free variables are shifted by one preventing index collision.