(* for good measure, we will define exponentiation for nat and prove that lognat is correct *)
Fixpoint expnat(a e : nat) : nat :=
  match e with
    | 0 => 1
    | (S e') => a * (expnat a e')
  end.

Theorem lognat_correct : forall(a : nat)(pf : a <> 0), (expnat 2 (lognat pf)) <= a < (expnat 2 (S (lognat pf))).