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

Lemma msubst_tc_lvalue_sound: forall {cs: compspecs} Delta P T1 T2 GV R e,
local (tc_environ Delta) && PROPx P (LOCALx (LocalD T1 T2 GV) (SEPx R)) && ` (msubst_tc_lvalue Delta T1 T2 GV e) |--
tc_lvalue Delta e.