Qed.
Hint Resolve unary_op_beq_refl : expr_beq.
Hint Rewrite unary_op_beq_refl : expr_beq.
Hint Resolve unary_op_beq_sound: expr_beq.
Definition binary_op_beq a b :=
match a, b with
Oadd, Oadd
| Osub, Osub
| Omul, Omul
| Odiv, Odiv
| Omod, Omod
| Oand, Oand
| Oor, Oor
| Oxor, Oxor
| Oshl, Oshl
| Oshr, Oshr
| Oeq, Oeq
| One, One
| Olt, Olt
| Ogt, Ogt
| Ole, Ole
| Oge, Oge => true
| _, _ => false
end.

Lemma binary_op_beq_sound : forall a b, binary_op_beq a b = true -> a = b .
destruct a, b; simpl in *; try congruence; auto.