Definition mod_bound_pos a b (_:0<=a) := mod_pos_bound a b.

(* Specifications: *)
Lemma mod_neg_bound a b : b < 0 -> b < a mod b <= 0.
Theorem quotrem_eq a b : let (q,r) := quotrem a b in a = q * b + r.
Lemma quot_rem' a b : a = b*(a÷b) + rem a b.
Lemma quot_rem a b : b<>0 -> a = b*(a÷b) + rem a b.
Lemma rem_bound_pos a b : 0<=a -> 0<b -> 0 <= rem a b < b.
Lemma rem_opp_l' a b : rem (-a) b = - (rem a b).
Lemma rem_opp_r' a b : rem a (-b) = rem a b.
Lemma rem_opp_l a b : b<>0 -> rem (-a) b = - (rem a b).
Lemma rem_opp_r a b : b<>0 -> rem a (-b) = rem a b.
Lemma divide_Zpos p q : (pos p|pos q) <-> (p|q)%positive.
Lemma divide_Zpos_Zneg_r n p : (n|pos p) <-> (n|neg p).
Lemma divide_Zpos_Zneg_l n p : (pos p|n) <-> (neg p|n).
Lemma ggcd_gcd a b : fst (ggcd a b) = gcd a b.
Lemma ggcd_correct_divisors a b : let '(g,(aa,bb)) := ggcd a b in a = g*aa /\ b = g*bb.
Lemma gcd_divide_l a b : (gcd a b | a).
Lemma gcd_divide_r a b : (gcd a b | b).
Lemma gcd_greatest a b c : (c|a) -> (c|b) -> (c | gcd a b).
Lemma gcd_nonneg a b : 0 <= gcd a b.
Theorem ggcd_opp a b : ggcd (-a) b = (let '(g,(aa,bb)) := ggcd a b in (g,(-aa,bb))).
Lemma testbit_of_N a n : testbit (of_N a) (of_N n) = N.testbit a n.
Lemma testbit_of_N' a n : 0<=n -> testbit (of_N a) n = N.testbit a (to_N n).
Lemma testbit_Zpos a n : 0<=n -> testbit (pos a) n = N.testbit (N.pos a) (to_N n).
Lemma testbit_Zneg a n : 0<=n -> testbit (neg a) n = negb (N.testbit (Pos.pred_N a) (to_N n)).
Lemma div2_spec a : div2 a = shiftr a 1.
Lemma testbit_0_l n : testbit 0 n = false.
Lemma testbit_neg_r a n : n<0 -> testbit a n = false.
Lemma testbit_odd_0 a : testbit (2*a+1) 0 = true.
Lemma testbit_even_0 a : testbit (2*a) 0 = false.
Lemma testbit_odd_succ a n : 0<=n -> testbit (2*a+1) (succ n) = testbit a n.
Lemma testbit_even_succ a n : 0<=n -> testbit (2*a) (succ n) = testbit a n.
Lemma shiftr_spec_aux a n m : 0<=n -> 0<=m -> testbit (shiftr a n) m = testbit a (m+n).
Lemma shiftl_spec_low a n m : m<n -> testbit (shiftl a n) m = false.
Lemma shiftl_spec_high a n m : 0<=m -> n<=m -> testbit (shiftl a n) m = testbit a (m-n).
Lemma shiftr_spec a n m : 0<=m -> testbit (shiftr a n) m = testbit a (m+n).
Lemma lor_spec a b n : testbit (lor a b) n = testbit a n || testbit b n.
Lemma land_spec a b n : testbit (land a b) n = testbit a n && testbit b n.
Lemma ldiff_spec a b n : testbit (ldiff a b) n = testbit a n && negb (testbit b n).
Lemma lxor_spec a b n : testbit (lxor a b) n = xorb (testbit a n) (testbit b n).
Theorem mod_bound_pos_le a b : 0 <= a -> 0 < b -> 0 <= a mod b <= a.
Lemma gt_lt_iff n m : n > m <-> m < n.
Lemma gt_lt n m : n > m -> m < n.
Lemma lt_gt n m : n < m -> m > n.
Lemma ge_le_iff n m : n >= m <-> m <= n.
Lemma ge_le n m : n >= m -> m <= n.
Lemma le_ge n m : n <= m -> m >= n.