Ltac Inversion_typ T :=
    let INVTYP := fresh "INVTYP" in
    (generalize T; intro INVTYP; inversion INVTYP using inversion_lemma;
      unfold inv_typ in |- *; clear INVTYP; intros).

Theorem wf_type_prod_r : forall (e : env) (A B : term), wf_type e (Prod A B) -> wf_type (Ax A :: e) B.