unfold infer_ppal_type in |- *.
intros.
elim (pa_infer_axiom the_algos) with s; intros.
left.
inversion_clear a.
split with (Srt x).
split; intros.
constructor; auto with pts.
apply (pp_ok H0).
generalize (pp_least H0); intros.
red in H2.
Inversion_typ H1.
apply le_type_trans with (2 := H4); auto with pts.
right.
split with (Topsort s).
constructor; trivial.
red in |- *; intros.
Inversion_typ H0.
elim b with s2; trivial.
constructor.
Defined.

Theorem infer_abs :
forall (e : env) (A M : term), wf e -> infer_ppal_type e (Abs A M).