Definition half_double := doubleK.Definition double_inj := can_inj doubleK.

(* Specifications: *)
Lemma uphalf_double n : uphalf n.*2 = n.
Lemma uphalf_half n : uphalf n = odd n + n./2.
Lemma odd_double_half n : odd n + n./2.*2 = n.
Lemma half_bit_double n (b : bool) : (b + n.*2)./2 = n.
Lemma halfD m n : (m + n)./2 = (odd m && odd n) + (m./2 + n./2).
Lemma half_leq m n : m <= n -> m./2 <= n./2.
Lemma half_gt0 n : (0 < n./2) = (1 < n).
Lemma odd_geq m n : odd n -> (m <= n) = (m./2.*2 <= n).
Lemma odd_ltn m n : odd n -> (n < m) = (n < m./2.*2).
Lemma odd_gt0 n : odd n -> n > 0.
Lemma odd_gt2 n : odd n -> n > 1 -> n > 2.
Lemma mulnn m : m * m = m ^ 2.
Lemma sqrnD m n : (m + n) ^ 2 = m ^ 2 + n ^ 2 + 2 * (m * n).
Lemma sqrn_sub m n : n <= m -> (m - n) ^ 2 = m ^ 2 + n ^ 2 - 2 * (m * n).
Lemma sqrnD_sub m n : n <= m -> (m + n) ^ 2 - 4 * (m * n) = (m - n) ^ 2.
Lemma subn_sqr m n : m ^ 2 - n ^ 2 = (m - n) * (m + n).
Lemma ltn_sqr m n : (m ^ 2 < n ^ 2) = (m < n).
Lemma leq_sqr m n : (m ^ 2 <= n ^ 2) = (m <= n).
Lemma sqrn_gt0 n : (0 < n ^ 2) = (0 < n).
Lemma sqrn_inj : injective (expn ^~ 2).
Lemma leqif_refl m C : reflect (m <= m ?= iff C) C.
Lemma leqif_trans m1 m2 m3 C12 C23 : m1 <= m2 ?= iff C12 -> m2 <= m3 ?= iff C23 -> m1 <= m3 ?= iff C12 && C23.
Lemma leqif_geq m n : m <= n -> m <= n ?= iff (m >= n).
Lemma geq_leqif a b C : a <= b ?= iff C -> (b <= a) = C.
Lemma ltn_leqif a b C : a <= b ?= iff C -> (a < b) = ~~ C.
Lemma leqif_add m1 n1 C1 m2 n2 C2 : m1 <= n1 ?= iff C1 -> m2 <= n2 ?= iff C2 -> m1 + m2 <= n1 + n2 ?= iff C1 && C2.