(*****************************************************)
(**            Power                                 *)
Local Infix "^^" := pow (at level 30, right associativity).
#[global]
Instance pow_wd : Proper (N.eq==>N.eq==>N.eq) pow.

Lemma pow_succ : forall n m, n^^(S m) == n*(n^^m).
Definition log (x : N.t) : N.t :=
strong_rec 0
(fun g x =>
if x << 2 then 0
else S (g (half x)))
x.