Fixpoint full_ppal_type (t : term) :
   forall e : env, wf e -> infer_ppal_type e t :=
    fun e H =>
    match t return (infer_ppal_type e t) with
    | Srt s => infer_sort e s H
    | Ref n => infer_ref e n H
    | Abs A M => infer_abs full_ppal_type e A M H
    | App u v => infer_app full_ppal_type e u v H
    | Prod A B => infer_prod full_ppal_type e A B H
    end.

Lemma tmp_check_typ_when_wf : forall (e : env) (t T : term), wf e -> wf_type e T -> check_dec e t T.