Hint Rewrite globvars2pred_unfold : norm.
Hint Rewrite @exp_trivial : norm.

(* Specifications: *)
Lemma eval_var_isptr:
forall Delta t i rho,
tc_environ Delta rho ->
((var_types Delta) ! i = Some t \/
(var_types Delta)!i = None /\
(glob_types Delta) ! i = Some t) ->
isptr (eval_var i t rho).
Lemma ENTAIL_trans:
forall Delta P Q R,
local (tc_environ Delta) && P |-- Q ->
local (tc_environ Delta) && Q |-- R ->
local (tc_environ Delta) && P |-- R.
Lemma ENTAIL_refl:
forall Delta P,
local (tc_environ Delta) && P |-- P.
Lemma local_andp_bupd: forall P Q,
(local P && |==> Q) |-- |==> (local P && Q).
Lemma bupd_andp_local: forall P Q,
(|==> P) && local Q |-- |==> (P && local Q).
Lemma derives_bupd_trans: forall TC P Q R,
local TC && P |-- |==> Q ->
local TC && Q |-- |==> R ->
local TC && P |-- |==> R.
Lemma derives_bupd_refl: forall TC P,
local TC && P |-- |==> P.
Lemma derives_full_refl: forall Delta P,
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- |==> ((|> FF) || P).
Lemma derives_ENTAIL: forall TC P Q,
P |-- Q ->
local TC && P |-- Q.
Lemma orp_ENTAIL: forall TC P P' Q Q',
local TC && P |-- P' ->
local TC && Q |-- Q' ->
local TC && (P || Q) |-- P' || Q'.
Lemma sepcon_ENTAIL: forall TC P P' Q Q',
local TC && P |-- P' ->
local TC && Q |-- Q' ->
local TC && (P * Q) |-- P' * Q'.
Lemma wand_ENTAIL: forall TC P P' Q Q',
local TC && P' |-- P ->
local TC && Q |-- Q' ->
local TC && (P -* Q) |-- P' -* Q'.
Lemma exp_ENTAIL: forall Delta B (P Q: B -> environ -> mpred),
(forall x: B, local (tc_environ Delta) && P x |-- Q x) ->
local (tc_environ Delta) && exp P |-- exp Q.
Lemma later_ENTAIL: forall Delta P Q,
local (tc_environ Delta) && P |-- Q ->
local (tc_environ Delta) && |> P |-- |> Q.
Lemma andp_ENTAILL: forall Delta P P' Q Q',
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- P' ->
local (tc_environ Delta) && (allp_fun_id Delta && Q) |-- Q' ->
local (tc_environ Delta) && (allp_fun_id Delta && (P && Q)) |-- P' && Q'.
Lemma orp_ENTAILL: forall Delta P P' Q Q',
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- P' ->
local (tc_environ Delta) && (allp_fun_id Delta && Q) |-- Q' ->
local (tc_environ Delta) && (allp_fun_id Delta && (P || Q)) |-- P' || Q'.
Lemma sepcon_ENTAILL: forall Delta P P' Q Q',
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- P' ->
local (tc_environ Delta) && (allp_fun_id Delta && Q) |-- Q' ->
local (tc_environ Delta) && (allp_fun_id Delta && (P * Q)) |-- P' * Q'.
Lemma wand_ENTAILL: forall Delta P P' Q Q',
local (tc_environ Delta) && (allp_fun_id Delta && P') |-- P ->
local (tc_environ Delta) && (allp_fun_id Delta && Q) |-- Q' ->
local (tc_environ Delta) && (allp_fun_id Delta && (P -* Q)) |-- P' -* Q'.
Lemma exp_ENTAILL: forall Delta B (P Q: B -> environ -> mpred),
(forall x: B, local (tc_environ Delta) && (allp_fun_id Delta && P x) |-- Q x) ->
local (tc_environ Delta) && (allp_fun_id Delta && exp P) |-- exp Q.
Lemma later_ENTAILL: forall Delta P Q,
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- Q ->
local (tc_environ Delta) && (allp_fun_id Delta && |> P) |-- |> Q.
Lemma andp_subst_ENTAILL: forall Delta P P' Q Q' i v t,
(temp_types Delta) ! i = Some t ->
local (tc_environ Delta) && (allp_fun_id Delta && P') |-- local (`(tc_val' t) v) ->
local (tc_environ Delta) && (allp_fun_id Delta && P') |-- Q' ->
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- Q ->
local (tc_environ Delta) && (allp_fun_id Delta && (P' && subst i v P)) |-- Q' && subst i v Q.
Lemma derives_bupd_bupd_left: forall TC P Q,
local TC && P |-- |==> Q ->
(local TC && |==> P) |-- |==> Q.
Lemma derives_bupd0_bupd0_left: forall TC P Q,
local TC && P |-- |==> |> FF || Q ->
(local TC && |==> |> FF || P) |-- |==> |> FF || Q.
Lemma derives_full_bupd0_left: forall Delta P Q,
local (tc_environ Delta) && (allp_fun_id Delta && P) |-- |==> |> FF || Q ->
local (tc_environ Delta) && (allp_fun_id Delta && |==> |> FF || P) |-- |==> |> FF || Q.