#[global]
Instance Decidable_ge_Z : forall (x y : Z), DecidableClass.Decidable (x >= y)%Z := {
  Decidable_spec := Z.geb_ge x y
}.

(* Specifications: *)
Lemma compare_eq_iff n m : (n ?= m) = Eq <-> n = m.
Lemma compare_sub n m : (n ?= m) = (n - m ?= 0).
Lemma compare_antisym n m : (m ?= n) = CompOpp (n ?= m).
Lemma compare_lt_iff n m : (n ?= m) = Lt <-> n < m.
Lemma compare_le_iff n m : (n ?= m) <> Gt <-> n <= m.
Lemma lt_succ_r n m : n < succ m <-> n<=m.
Lemma max_l n m : m<=n -> max n m = n.
Lemma max_r n m : n<=m -> max n m = m.
Lemma min_l n m : n<=m -> min n m = n.
Lemma min_r n m : m<=n -> min n m = m.
Lemma peano_ind (P : Z -> Prop) : P 0 -> (forall x, P x -> P (succ x)) -> (forall x, P x -> P (pred x)) -> forall z, P z.
Lemma bi_induction (P : Z -> Prop) : Proper (eq ==> iff) P -> P 0 -> (forall x, P x <-> P (succ x)) -> forall z, P z.
Lemma abs_eq n : 0 <= n -> abs n = n.
Lemma abs_neq n : n <= 0 -> abs n = - n.
Lemma sgn_null n : n = 0 -> sgn n = 0.
Lemma sgn_pos n : 0 < n -> sgn n = 1.
Lemma sgn_neg n : n < 0 -> sgn n = -1.
Lemma pow_0_r n : n^0 = 1.
Lemma pow_succ_r n m : 0<=m -> n^(succ m) = n * n^m.
Lemma pow_neg_r n m : m<0 -> n^m = 0.
Lemma pow_pos_fold n p : pow_pos n p = n ^ (pos p).
Lemma square_spec n : square n = n * n.
Lemma sqrtrem_spec n : 0<=n -> let (s,r) := sqrtrem n in n = s*s + r /\ 0 <= r <= 2*s.
Lemma sqrt_spec n : 0<=n -> let s := sqrt n in s*s <= n < (succ s)*(succ s).
Lemma sqrt_neg n : n<0 -> sqrt n = 0.
Lemma sqrtrem_sqrt n : fst (sqrtrem n) = sqrt n.
Lemma log2_spec n : 0 < n -> 2^(log2 n) <= n < 2^(succ (log2 n)).
Lemma log2_nonpos n : n<=0 -> log2 n = 0.
Lemma even_spec n : even n = true <-> Even n.
Lemma odd_spec n : odd n = true <-> Odd n.
Lemma double_spec n : double n = 2*n.
Lemma succ_double_spec n : succ_double n = 2*n + 1.
Lemma pred_double_spec n : pred_double n = 2*n - 1.
Lemma pos_div_eucl_eq a b : 0 < b -> let (q, r) := pos_div_eucl a b in pos a = q * b + r.
Lemma div_eucl_eq a b : b<>0 -> let (q, r) := div_eucl a b in a = b * q + r.
Lemma div_mod a b : b<>0 -> a = b*(a/b) + (a mod b).
Lemma pos_div_eucl_bound a b : 0<b -> 0 <= snd (pos_div_eucl a b) < b.
Lemma mod_pos_bound a b : 0 < b -> 0 <= a mod b < b.