induction a.
exists 0. simpl.  auto.
elim IHa. clear IHa.
intros.
destruct H.
subst. simpl.
exists x.
right. auto.
subst. simpl.
exists (S x).
left.
simpl.
omega.
Qed.

Lemma lognat_correct1 : forall(b a : nat)(pf : a <> 0),
(lognat pf) = b ->
(expnat 2 b) <= a.