Proof with (try discriminate).
unfold comparison_type, sem_cmp; intros.
assert (X: forall b, wt_val (Val.of_bool b) (Tint I32 Signed noattr)).
{
intros b; destruct b; constructor; exact I.
}
assert (Y: forall ob, option_map Val.of_bool ob = Some v -> wt_val v (Tint I32 Signed noattr)).
{
intros ob EQ. destruct ob as [b|]; inv EQ. eauto.
}
destruct (classify_cmp ty1 ty2).
- inv H; eauto.
- DestructCases; eauto.
- DestructCases; eauto.
- DestructCases; eauto.
- DestructCases; eauto.
- unfold sem_binarith in H0.
set (ty' := Cop.binarith_type (classify_binarith ty1 ty2)) in *.
destruct (sem_cast v1 ty1 ty') as [v1'|]...
destruct (sem_cast v2 ty2 ty') as [v2'|]...
DestructCases; auto.
Qed.

Lemma binarith_type_int32s:
forall ty1 msg ty2,
binarith_type ty1 type_int32s msg = OK ty2 ->
ty2 = incrdecr_type ty1.