Proof with auto.
intros Z P T HT HP.
induction HT; simpl...
Case "type_fvar".
destruct (X == Z)...
Case "type_all".
pick fresh Y and apply type_all...
rewrite subst_tt_open_tt_var...
Qed.
(** The following lemma depends on [subst_tt_type], [subst_te_open_ee_var], and [sbust_te_open_te_var]. *)

(* Specifications: *)
Lemma subst_te_expr : forall Z P e,
expr e ->
type P ->
expr (subst_te Z P e).