(** An injection from bits [true] and [false] to numbers 1 and 0. We declare it as a (local) coercion for shorter statements. *)
Definition b2n (b:bool) := if b then 1 else 0.
Local Coercion b2n : bool >-> t.
#[global]
Instance b2n_proper : Proper (Logic.eq ==> eq) b2n.

(* This is kept private in order to drop the `Proper` condition in implementations. *)
(* begin hide *)
Lemma Private_binary_induction (A : t -> Prop) :
(Proper (eq ==> iff) A) -> A 0 -> (forall n, A n -> A (2 * n)) ->
(forall n, A n -> A (2 * n + 1)) -> (forall n, A n).