(* 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.

(* Specifications: *)
Lemma log2_prod_sum : forall(a : positive), (S (log2 a)) = (log2 (Pmult 2 a)).
Lemma le_s : forall a b, (a <= b) -> S a <= S b.
Lemma log2_monotonic_b : forall(a : positive), (log2 a) <= (log2 (Pos.succ a)).
Lemma log2_ge_monotonic : forall(a : positive), (log2 (Pos.succ a)) >= (log2 a).