Inductive chk_error (m t : term) : type_error -> Prop :=
    | Chke_subj :
        forall err : type_error, inf_error m err -> chk_error m t err
    | Chke_type :
        forall err : type_error,
        inf_error t err ->
        ~ (exists s : sort, t = Srt s) -> chk_error m t err
    | Chke_type2 :
        forall k : term,
        ~ (exists s : sort, t = Srt s) -> chk_error m t (Not_a_type t k)
    | Chke_exp : forall at_ : term, chk_error m t (Expected_type m at_ t).Inductive chk_error (m t : term) : type_error -> Prop :=
    | Chke_subj :
        forall err : type_error, inf_error m err -> chk_error m t err
    | Chke_type :
        forall err : type_error,
        inf_error t err ->
        ~ (exists s : sort, t = Srt s) -> chk_error m t err
    | Chke_type2 :
        forall k : term,
        ~ (exists s : sort, t = Srt s) -> chk_error m t (Not_a_type t k)
    | Chke_exp : forall at_ : term, chk_error m t (Expected_type m at_ t).Inductive chk_error (m t : term) : type_error -> Prop :=
    | Chke_subj :
        forall err : type_error, inf_error m err -> chk_error m t err
    | Chke_type :
        forall err : type_error,
        inf_error t err ->
        ~ (exists s : sort, t = Srt s) -> chk_error m t err
    | Chke_type2 :
        forall k : term,
        ~ (exists s : sort, t = Srt s) -> chk_error m t (Not_a_type t k)
    | Chke_exp : forall at_ : term, chk_error m t (Expected_type m at_ t).Inductive chk_error (m t : term) : type_error -> Prop :=
    | Chke_subj :
        forall err : type_error, inf_error m err -> chk_error m t err
    | Chke_type :
        forall err : type_error,
        inf_error t err ->
        ~ (exists s : sort, t = Srt s) -> chk_error m t err
    | Chke_type2 :
        forall k : term,
        ~ (exists s : sort, t = Srt s) -> chk_error m t (Not_a_type t k)
    | Chke_exp : forall at_ : term, chk_error m t (Expected_type m at_ t).Inductive chk_error (m t : term) : type_error -> Prop :=
    | Chke_subj :
        forall err : type_error, inf_error m err -> chk_error m t err
    | Chke_type :
        forall err : type_error,
        inf_error t err ->
        ~ (exists s : sort, t = Srt s) -> chk_error m t err
    | Chke_type2 :
        forall k : term,
        ~ (exists s : sort, t = Srt s) -> chk_error m t (Not_a_type t k)
    | Chke_exp : forall at_ : term, chk_error m t (Expected_type m at_ t).

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