(* specification of logarithm (base 2) *)
(***************************************)
Definition log2_spec (n0 : nat) :=
  {l : nat & 
  {n0 = two_power l} + {two_power l < n0 /\ n0 < two_power (S l)}}.

Lemma floor_log2 : forall n : nat, 0 < n -> {l : nat | two_power l <= n /\ n < two_power (S l)}.