Ltac solve_legal_tc_init :=
  repeat progress
   (simpl; auto;
      match goal with
      | |- context [match ?A with _ => _ end] => destruct A eqn:?H
      | |- legal_tc_init _ (tc_bool _ _) => apply legal_tc_init_tc_bool
      | |- legal_tc_init _ (tc_andp _ _) => apply legal_tc_init_tc_andp
      | |- legal_tc_init _ (tc_nonzero _) => apply legal_tc_init_tc_nonzero
      | |- legal_tc_init _ (tc_iszero _) => apply legal_tc_init_tc_iszero
      | |- legal_tc_init _ (tc_test_eq _ _) => apply legal_tc_init_tc_test_eq
      | |- legal_tc_init _ (tc_test_order _ _) => apply legal_tc_init_tc_test_order
      | |- legal_tc_init _ (tc_nodivover _ _) => apply legal_tc_init_tc_nodivover
      | |- legal_tc_init _ (tc_ilt _ _) => apply legal_tc_init_tc_ilt
      | |- legal_tc_init _ (tc_llt _ _) => apply legal_tc_init_tc_llt
      | |- legal_tc_init _ (binarithType _ _ _ _ _) => apply legal_tc_init_binarithType
      | |- legal_tc_init _ (tc_nobinover _ _ _) => apply legal_tc_init_tc_nobinover
      | |- _ => idtac
      end).

(* Specifications: *)
Lemma typecheck_lvalue_legal_tc_init: forall {cs: compspecs} Delta e, legal_tc_init Delta (typecheck_lvalue Delta e) with typecheck_expr_legal_tc_init: forall {cs: compspecs} Delta e, legal_tc_init Delta (typecheck_expr Delta e).
Lemma typecheck_LR_strong_legal_tc_init: forall {cs: compspecs} Delta e lr, legal_tc_init Delta (typecheck_LR_strong Delta e lr).
Lemma typecheck_LR_legal_tc_init: forall {cs: compspecs} Delta e lr, legal_tc_init Delta (typecheck_LR Delta e lr).
Lemma typecheck_efield_legal_tc_init: forall {cs: compspecs} Delta efs, legal_tc_init Delta (typecheck_efield Delta efs).
Lemma typecheck_exprlist_legal_tc_init: forall {cs: compspecs} Delta ts es, legal_tc_init Delta (typecheck_exprlist Delta ts es).