(* This is a rather vacuous lemma, since the premise is simply True *)
(* Lemma Int64_eq_repr_signed32_nonzero: forall i, Int.eq i Int.zero = false -> Int64.eq (Int64.repr (Int.signed i)) Int64.zero = false. *)
(*  Lemma Int64_eq_repr_unsigned32_nonzero: forall i, Int.eq i Int.zero = false -> Int64.eq (Int64.repr (Int.unsigned i)) Int64.zero = false. *)
(* Lemma Int64_eq_repr_int_nonzero: forall s i, Int.eq i Int.zero = false -> Int64.eq (cast_int_long s i) Int64.zero = false. *)
Inductive tc_val_PM: type -> val -> Prop :=
| tc_val_PM_Tint: forall sz sg a v, is_int sz sg v -> tc_val_PM (Tint sz sg a) v
| tc_val_PM_Tlong: forall s a v, is_long v -> tc_val_PM (Tlong s a) v
| tc_val_PM_Tfloat_single: forall a v, is_single v -> tc_val_PM (Tfloat F32 a) v
| tc_val_PM_Tfloat_double: forall a v, is_float v -> tc_val_PM (Tfloat F64 a) v
| tc_val_PM_Tpointer: forall t a v,
(if eqb_type (Tpointer t a) int_or_ptr_type
then is_pointer_or_integer
else is_pointer_or_null) v ->
tc_val_PM (Tpointer t a) v
| tc_val_PM_Tarray: forall t n a v, is_pointer_or_null v -> tc_val_PM (Tarray t n a) v
| tc_val_PM_Tfunction: forall ts t a v, is_pointer_or_null v -> tc_val_PM (Tfunction ts t a) v
| tc_val_PM_Tstruct: forall i a v, isptr v -> tc_val_PM (Tstruct i a) v
| tc_val_PM_Tunion: forall i a v, isptr v -> tc_val_PM (Tunion i a) v.
Inductive tc_val_PM': type -> val -> Prop :=
| tc_val_PM'_Tint: forall t0 sz sg a v, t0 = Tint sz sg a -> is_int sz sg v -> tc_val_PM' t0 v
| tc_val_PM'_Tlong: forall t0 s a v, stupid_typeconv t0 = Tlong s a -> is_long v -> tc_val_PM' t0 v
| tc_val_PM'_Tfloat_single: forall t0 a v, stupid_typeconv t0 = Tfloat F32 a -> is_single v -> tc_val_PM' t0 v
| tc_val_PM'_Tfloat_double: forall t0 a v, stupid_typeconv t0 = Tfloat F64 a -> is_float v -> tc_val_PM' t0 v
| tc_val_PM'_Tpointer: forall t0 t a v,
stupid_typeconv t0 = Tpointer t a ->
(if eqb_type t0 int_or_ptr_type
then is_pointer_or_integer
else is_pointer_or_null) v ->
tc_val_PM' t0 v
| tc_val_PM'_Tstruct: forall t0 i a v, stupid_typeconv t0 = Tstruct i a -> isptr v -> tc_val_PM' t0 v
| tc_val_PM'_Tunion: forall t0 i a v, stupid_typeconv t0 = Tunion i a -> isptr v -> tc_val_PM' t0 v.
Ltac solve_tc_val H :=
rewrite tc_val_tc_val_PM in H; inv H.
Ltac solve_tc_val' H :=
rewrite tc_val_tc_val_PM' in H; inv H.

Lemma tc_val_sem_binarith': forall {CS: compspecs} sem_int sem_long sem_float sem_single t1 t2 t v1 v2 deferr reterr rho m
(TV2: tc_val t2 v2)
(TV1: tc_val t1 v1),
(denote_tc_assert (binarithType' t1 t2 t deferr reterr) rho) m ->
tc_val t
(force_val
(Clight_Cop2.sem_binarith
(fun s n1 n2 => Some (Vint (sem_int s n1 n2)))
(fun s n1 n2 => Some (Vlong (sem_long s n1 n2)))
(fun n1 n2 => Some (Vfloat (sem_float n1 n2)))
(fun n1 n2 => Some (Vsingle (sem_single n1 n2)))
t1 t2 v1 v2)).