Require Export VST.veric.Clight_base.
Local Open Scope pred.
Definition tc_expr {CS: compspecs} (Delta: tycontext) (e: expr) : environ -> mpred:=
fun rho => denote_tc_assert (typecheck_expr Delta e) rho.
Definition tc_exprlist {CS: compspecs} (Delta: tycontext) (t : list type) (e: list expr) : environ -> mpred :=
fun rho => denote_tc_assert (typecheck_exprlist Delta t e) rho.
Definition tc_lvalue {CS: compspecs} (Delta: tycontext) (e: expr) : environ -> mpred :=
fun rho => denote_tc_assert (typecheck_lvalue Delta e) rho.
Definition tc_temp_id {CS: compspecs} (id : positive) (ty : type)
(Delta : tycontext) (e : expr) : environ -> mpred  :=
fun rho => denote_tc_assert (typecheck_temp_id id ty Delta e) rho.
Definition tc_expropt {CS: compspecs} Delta (e: option expr) (t: type) : environ -> mpred :=
match e with None => `!!(t=Tvoid)
| Some e' => tc_expr Delta (Ecast e' t)
end.
Definition tc_temp_id_load id tfrom Delta v : environ -> mpred  :=
fun rho => !! (exists tto, (temp_types Delta) ! id = Some tto
/\ tc_val tto (eval_cast tfrom tto (v rho))).

Lemma extend_tc_andp':
forall {CS: compspecs} A B rho,
boxy extendM (denote_tc_assert A rho) ->
boxy extendM (denote_tc_assert B rho) ->
boxy extendM (denote_tc_assert (tc_andp' A B) rho).