Add Zify BinOp Op_xorb.
#[global]
Instance Op_eqb : BinOp eqb :=
{ TBOp := eqb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_eqb.
#[global]
Instance Op_negb : UnOp negb :=
{ TUOp := negb ; TUOpInj _ := eq_refl}.
Add Zify UnOp Op_negb.
#[global]
Instance Op_eq_bool : BinRel (@eq bool) :=
{TR := @eq bool ; TRInj b1 b2 := iff_refl (b1 = b2) }.
Add Zify BinRel Op_eq_bool.
#[global]
Instance Op_true : CstOp true :=
{ TCst := true ; TCstInj := eq_refl }.
Add Zify CstOp Op_true.
#[global]
Instance Op_false : CstOp false :=
{ TCst := false ; TCstInj := eq_refl }.
Add Zify CstOp Op_false.
(** Comparison over Z *)
#[global]
Instance Op_Zeqb : BinOp Z.eqb :=
{ TBOp := Z.eqb ; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Zeqb.
#[global]
Instance Op_Zleb : BinOp Z.leb :=
{ TBOp := Z.leb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Zleb.
#[global]
Instance Op_Zgeb : BinOp Z.geb :=
{ TBOp := Z.geb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Zgeb.
#[global]
Instance Op_Zltb : BinOp Z.ltb :=
{ TBOp := Z.ltb ; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Zltb.
#[global]
Instance Op_Zgtb : BinOp Z.gtb :=
{ TBOp := Z.gtb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Zgtb.
(** Comparison over N *)
#[global]
Instance Op_Neqb : BinOp N.eqb :=
{ TBOp := Z.eqb; TBOpInj n m := ltac:(now destruct n, m) }.
Add Zify BinOp Op_Neqb.
#[global]
Instance Op_Nleb : BinOp N.leb :=
{ TBOp := Z.leb; TBOpInj n m := ltac:(now destruct n, m) }.
Add Zify BinOp Op_Nleb.
#[global]
Instance Op_Nltb : BinOp N.ltb :=
{ TBOp := Z.ltb; TBOpInj n m := ltac:(now destruct n, m) }.
Add Zify BinOp Op_Nltb.
(** Comparison over positive *)
#[global]
Instance Op_Pos_eqb : BinOp Pos.eqb :=
{ TBOp := Z.eqb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Pos_eqb.
#[global]
Instance Op_Pos_leb : BinOp Pos.leb :=
{ TBOp := Z.leb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Pos_leb.
#[global]
Instance Op_Pos_ltb : BinOp Pos.ltb :=
{ TBOp := Z.ltb; TBOpInj _ _ := eq_refl }.
Add Zify BinOp Op_Pos_ltb.
(** Comparison over nat *)

(* Specifications: *)
Lemma Z_of_nat_eqb_iff n m : (n =? m)%nat = (Z.of_nat n =? Z.of_nat m).
Lemma Z_of_nat_leb_iff n m : (n <=? m)%nat = (Z.of_nat n <=? Z.of_nat m).
Lemma Z_of_nat_ltb_iff n m : (n <? m)%nat = (Z.of_nat n <? Z.of_nat m).
#[global]
Instance Op_nat_eqb : BinOp Nat.eqb :=
{ TBOp := Z.eqb; TBOpInj := Z_of_nat_eqb_iff }.