Ltac cleanup_repr H :=
rewrite ?mul_repr, ?add_repr, ?sub_repr in H;
match type of H with
 | _ (Int.signed (Int.repr ?A)) (Int.signed (Int.repr ?B)) =>
    try (rewrite (Int.signed_repr A) in H by rep_omega);
    try (rewrite (Int.signed_repr B) in H by rep_omega)
 | _ (Int.unsigned (Int.repr ?A)) (Int.unsigned (Int.repr ?B)) =>
    try (rewrite (Int.unsigned_repr A) in H by rep_omega);
    try (rewrite (Int.unsigned_repr B) in H by rep_omega)
 | context [Int.signed (Int.repr ?A) ] =>
    try (rewrite (Int.signed_repr A) in H by rep_omega)
 | context [Int.unsigned (Int.repr ?A) ] =>
    try (rewrite (Int.unsigned_repr A) in H by rep_omega)
end.

(* Specifications: *)
Lemma typed_true_ptr_e: forall t v, typed_true (tptr t) v -> isptr v.
Lemma typed_false_ptr_e: forall t v, typed_false (tptr t) v -> v=nullval.
Lemma repr_neq_e: forall i j, Int.repr i <> Int.repr j -> i <> j.
Lemma repr64_neq_e: forall i j, Int64.repr i <> Int64.repr j -> i <> j.
Lemma Byte_signed_lem: forall b, (Byte.signed b = 0) = (b = Byte.zero).
Lemma Byte_signed_lem': forall b c, (Byte.signed b = Byte.signed c) = (b = c).
Lemma int_repr_byte_signed_eq0: forall c, (Int.repr (Byte.signed c) = Int.zero) = (c = Byte.zero).
Lemma int_repr_byte_signed_eq: forall c d, (Int.repr (Byte.signed c) = Int.repr (Byte.signed d)) = (c = d).
Lemma typed_true_negb_bool_val_p: forall p, typed_true tint (force_val (option_map (fun b : bool => Val.of_bool (negb b)) (bool_val_p p))) -> p = nullval.
Lemma typed_false_negb_bool_val_p: forall p, is_pointer_or_null p -> typed_false tint (force_val (option_map (fun b : bool => Val.of_bool (negb b)) (bool_val_p p))) -> isptr p.
Lemma typed_false_negb_bool_val_p': forall p : val, typed_false tint (force_val (option_map (fun b : bool => Val.of_bool (negb b)) (bool_val_p p))) -> p <> nullval.