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.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.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.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.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.

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