Module Subst.FO
include SPECIALIZED with type term = Term.t
val find_exn : t -> var Scoped.t -> term Scoped.t
val get_var : t -> var Scoped.t -> term Scoped.t option
val deref : t -> term Scoped.t -> term Scoped.t
val apply : ?shift_vars:int -> Renaming.t -> t -> term Scoped.t -> term
Apply the substitution to the given term/type.
- parameter renaming
used to desambiguate free variables from distinct scopes
val bind : t -> var Scoped.t -> term Scoped.t -> t
Add
v
->t
to the substitution. Both terms have a context.- raises InconsistentBinding
if
v
is already bound in the same context, to another term.
val bind' : t -> Type.t HVar.t Scoped.t -> term Scoped.t -> t
val apply_l : ?shift_vars:int -> Renaming.t -> t -> term list Scoped.t -> term list
val of_list' : ?init:t -> (Type.t HVar.t Scoped.t * term Scoped.t) list -> t
val map : (term -> term) -> t -> t
val iter : (Type.t HVar.t Scoped.t -> term Scoped.t -> unit) -> t -> unit
val filter : (Type.t HVar.t Scoped.t -> term Scoped.t -> bool) -> t -> t
val compose : scope:int -> t -> t -> t
Takes a substitution that might map a variable x to a term that containts loosely bound variables. It fixes the substitution so that all such variables are remaped to a fresh skolem