induction y; intuition; simpl in *.
assert (y = Nat.log2 (div2 x)).
symmetry.
eapply log2_div2.
trivial.
rewrite (mult_comm _ (S (S y))).
simpl.
rewrite (mult_comm _ (S y)) in IHy.
simpl in *.
assert ( S (S (y + S (S (y + (y + (y + y * y)))))) =
(S (y + (y + y * y))) + (2 * y + 3)).
omega.
rewrite H2.
clear H2.
destruct (eq_nat_dec (Nat.log2 x) 6).
assert (y = 5).
assert (S y = 6).
rewrite H.
trivial.
omega.
rewrite H2.
simpl.
assert (x >= Nat.pow 2 6).
rewrite <- e.
eapply Nat.log2_spec.
destruct (eq_nat_dec x 0).
subst.
rewrite log2_0 in H.
omega.
omega.
eapply le_trans.
2:{
eapply H3.
}
simpl.
omega.
assert ( S (y + (y + y * y)) <= div2 x).
eapply IHy.
trivial.
omega.
assert (2 * y + 3 <= div2 x).
eapply double_log_plus_3_le_h; trivial.
omega.
eapply le_trans.
eapply plus_le_compat.
eapply H2.
eapply H3.
eapply div2_ge_double.
Qed.

Theorem S_log_square_lt :
forall x,
Nat.pow 2 6 <= x->
S (Nat.log2 x) * S (Nat.log2 x) <= x.