From Undecidability.L Require Import ComputableTactics Lproc mixedTactics Tactics.Computable ComputableTime Lrewrite.
Local Fixpoint subst' (s : term) (k : nat) (u : term) {struct s} : term :=
match s with
| # n => if Init.Nat.eqb n k then u else # n
| app s0 t => (subst' s0 k u) (subst' t k u)
| (lam s0) => (lam (subst' s0 (S k) u))
end.

Lemma subst'_eq s k u: subst s k u = subst' s k u.