type lc_kind = Irl of int | Ctx of term list
and local_context = int * lc_kind (* shift (0 -> no shift),
- subst (None means id) *)
+ subst (Irl n means id of
+ length n) *)
and term =
| Rel of int (* DeBruijn index, 1 based *)
| Meta of int * local_context
let subst ?avoid_beta_redexes arg =
psubst ?avoid_beta_redexes (fun x -> x)[arg];;
-(* subst_meta (n, Some [t_1 ; ... ; t_n]) t *)
+(* subst_meta (n, C.Ctx [t_1 ; ... ; t_n]) t *)
(* returns the term [t] where [Rel i] is substituted with [t_i] lifted by n *)
(* [t_i] is lifted as usual when it crosses an abstraction *)
-(* subst_meta (n, Non) t -> lift n t *)
+(* subst_meta (n, (C.Irl _ | C.Ctx [])) t | -> lift n t *)
let subst_meta = function
| m, C.Irl _
| m, C.Ctx [] -> lift m