(* 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)}}.

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