Definition log2ceil (n: nat): nat :=
  match n with
  | 0 => 0
  | S n' => ceil_log2_S n'
  end.Function floor_log2_S (n: nat) {wf lt n}: nat :=
  match n with
  | 0 => 0
  | S n' => S (floor_log2_S (div2 n'))
  end.

Lemma O_le_inv_INR_S n: (0 <= / INR (S n))%R.