Coercion b2i (b: bool) : int := if b then 1%uint63 else 0%uint63.

(* Specifications: *)
Lemma bit_0_spec i: φ (bit i 0) = φ i mod 2.
Lemma bit_b2i (b: bool) i : bit b i = (i =? 0)%uint63 && b.
Lemma bit_1 n : bit 1 n = (n =? 0)%uint63.
Lemma bit_M i n (H: (digits <=? n = true)%uint63): bit i n = false.
Lemma bit_ext i j : (forall n, bit i n = bit j n) -> i = j.
Lemma lor_le x y : (y <=? x lor y)%uint63 = true.
Lemma bit_0 n : bit 0 n = false.
Lemma bit_add_or x y: (forall n, bit x n = true -> bit y n = true -> False) <-> (x + y)%uint63= x lor y.
Lemma addmuldiv_spec x y p : φ p <= φ digits -> φ (addmuldiv p x y) = (φ x * (2 ^ φ p) + φ y / (2 ^ (φ digits - φ p))) mod wB.
Lemma is_even_bit i : is_even i = negb (bit i 0).
Lemma is_even_spec x : if is_even x then φ x mod 2 = 0 else φ x mod 2 = 1.
Lemma is_even_0 : is_even 0 = true.