simple destruct 3; intros.
exists (lift_decl 1 x (n - S v)).
rewrite H2.
unfold lift in |- *.
pattern n at 1 in |- *.
replace n with (S v + (n - S v)); auto with arith pts.
rewrite <- permute_lift_rec; auto with arith pts.
case x; simpl in |- *; auto with arith pts.
apply ins_item_lt with d' g e; auto with arith pts.
Qed.
(* substitution dans un environnement *)
Inductive sub_in_env (g : env) (d1 : decl) (t : term) :
nat -> env -> env -> Prop :=
| sub_O : val_ok d1 t -> sub_in_env g d1 t 0 (d1 :: g) g
| sub_S :
forall (e f : env) (n : nat) (d : decl),
sub_in_env g d1 t n e f ->
sub_in_env g d1 t (S n) (d :: e) (subst_decl t d n :: f).
Hint Resolve sub_O sub_S: pts.

Lemma nth_sub_sup :
forall (t : term) (n : nat) (g e f : env) (d' : decl),
sub_in_env g d' t n e f ->
forall v : nat, n <= v -> forall d : decl, item d e (S v) -> item d f v.