induction b.
intros. simpl in *. omega.
intros.
elim (nat_comp a). intros.
destruct H0.
subst.
destruct (eq_nat_dec x 0).
subst. omega.
rewrite <- (lognat_prod_sum n pf) in H.
inversion H. clear H.
rewrite H1.
apply IHb in H1.
simpl in *. omega.
subst.
destruct (eq_nat_dec x 0).
subst. unfold lognat in H. simpl in *. omega.
assert ((2 * x) <> 0). omega.
rewrite (lognat_odd x H0 pf) in H.
rewrite <- (lognat_prod_sum n H0) in H.
inversion H.
rewrite H2.
apply IHb in H2.
simpl.
omega.
Qed.

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