Proof fun (M : term) (k : nat) => permute_lift_rec M 1 k 1 0 (le_O_n k).

(* Specifications: *)
Lemma simpl_subst_rec :
forall (N M : term) (n p k : nat),
p <= n + k ->
k <= p -> subst_rec N (lift_rec (S n) M k) p = lift_rec n M k.
Lemma simpl_subst :
forall (N M : term) (n p : nat),
p <= n -> subst_rec N (lift (S n) M) p = lift n M.
Lemma commut_lift_subst_rec :
forall (M N : term) (n p k : nat),
k <= p ->
lift_rec n (subst_rec N M p) k = subst_rec N (lift_rec n M k) (n + p).
Lemma commut_lift_subst :
forall (M N : term) (k : nat),
subst_rec N (lift 1 M) (S k) = lift 1 (subst_rec N M k).
Lemma distr_lift_subst_rec :
forall (M N : term) (n p k : nat),
lift_rec n (subst_rec N M p) (p + k) =
subst_rec (lift_rec n N k) (lift_rec n M (S (p + k))) p.
Lemma distr_lift_subst :
forall (M N : term) (n k : nat),
lift_rec n (subst N M) k = subst (lift_rec n N k) (lift_rec n M (S k)).