red in |- *; intros.
generalize (refl_equal (Expected_type b c d)).
pattern a, (Expected_type b c d) at 1 in |- *.
elim H; intros; try discriminate H0.
auto.
discriminate H3.
Qed.

Lemma inf_error_no_type :
forall (m : term) (err : type_error),
inf_error m err ->
forall e : env, expln e err -> forall t : term, ~ typ e m t.