Require Export VST.veric.environ_lemmas.
Require Export VST.veric.expr_lemmas3.
(** Main soundness result for the typechecker **)
Ltac unfold_cop2_sem_cmp :=
unfold Clight_Cop2.sem_cmp, Clight_Cop2.sem_cmp_pl, Clight_Cop2.sem_cmp_lp, Clight_Cop2.sem_cmp_pp.
(*        (Hcenv: genv_cenv ge = @cenv_cs CS)*)
Definition some_pt_type := Tpointer Tvoid noattr.
Opaque tc_andp.
(** Equivalence of CompCert eval_expr and our function eval_expr on programs that typecheck **)

Lemma cop2_sem_cast :
forall t1 t2 v m,
(classify_cast t1 t2 = classify_cast size_t tbool ->
denote_tc_test_eq v (Vint Int.zero) (m_phi m) )->
t1 <> int_or_ptr_type ->
t2 <> int_or_ptr_type ->
tc_val t1 v ->
Cop.sem_cast v t1 t2 (m_dry m) = sem_cast t1 t2 v.