(* log2 is like log_inf except it returns nat, so I don't have to reason about an unnecessary conversion. This function is only used to implement lognat below.*)
Fixpoint log2(n : positive) : nat :=
  match n with 
    | xH => 0
    | xO n' | xI n' => (S (log2 n'))
  end.

Lemma log2_monotonic_b : forall(a : positive), (log2 a) <= (log2 (Pos.succ a)).