simple destruct 1; intros.
apply inf_error_no_type with err0; auto with pts.
red in |- *; intros.
apply H1.
generalize (type_correctness _ _ _ H3); intros.
inversion_clear H4; intros.
elim inf_error_no_type with (1 := H0) (2 := H2) (3 := H5).
split with s; trivial.
trivial.
red in |- *; intros.
apply H0.
inversion_clear H1.
generalize (type_correctness _ _ _ H2); intros.
inversion_clear H1; intros.
elim H4 with s; trivial.
split with s; trivial.
inversion_clear H0.
trivial.
Qed.
Inductive decl_error : decl -> type_error -> Prop :=
| Decax_ill :
forall (m : term) (err : type_error),
inf_error m err -> decl_error (Ax m) err
| Decax_type : forall m t : term, decl_error (Ax m) (Not_a_type m t)
| Decdef :
forall (m t : term) (err : type_error),
chk_error m t err -> decl_error (Def m t) err
| Decdef_type :
forall (m t k : term) (err : type_error),
decl_error (Ax t) err -> decl_error (Def m t) err.
Hint Resolve Decax_ill Decax_type Decdef Decdef_type: pts.

(* Specifications: *)
Lemma decl_err_not_wf :
forall (e : env) (d : decl) (err : type_error),
decl_error d err -> expln e err -> ~ wf (d :: e).