(* 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 peq_eq_block:
forall a b A (c d: A), is_true (peq a b) ->
(if eq_block a b then c else d) = c.