simple induction 1; auto with arith pts; intros.
inversion_clear H1.
rewrite H4.
elim red_item with ge_type v x e0 f; intros; auto with arith pts.
apply type_var; auto with arith pts.
exists x; auto with arith pts.
elim item_trunc with decl v e0 x; auto with arith pts; intros.
elim H1 with x0; auto with arith pts; intros.
inversion_clear H7.
elim wf_sort with (1 := H5) (3 := H6); auto with arith pts; intros.
apply type_conv with (lift (S v) (typ_of_decl x1)) x2; auto with arith pts.
apply type_var; auto with arith pts.
exists x1; auto with arith pts.
apply iter_R_lift with x0; auto with arith pts.
elim H9; auto with arith pts.
replace (Srt x2) with (lift (S v) (Srt x2)); auto with arith pts.
apply thinning_n with x0; auto with arith pts.
apply type_abs with s; auto with arith pts.
apply H3; auto with arith pts.
Inversion_typ (H1 _ H4 H5).
apply wf_var with s1; auto with arith pts.
apply type_app with V; auto with arith pts.
apply type_prod with s1 s2; auto with arith pts.
apply H3; auto with arith pts.
apply wf_var with s1; auto with arith pts.
apply type_conv with U s; auto with arith pts.
apply (le_type_stable ge_type e0); auto with arith pts.
apply type_conv_srt with U; auto with arith pts.
apply le_type_stable with ge_type e0; auto with arith pts.
Qed.

Theorem typ_conv_wf :
forall (e : env) (t T U : term),
typ e t T -> wf_type e U -> le_type e T U -> typ e t U.