pub open spec fn nat_count_ones(n: nat) -> nat
{ if n < 2 { n } else { n % 2 + nat_count_ones(n / 2) } }
The number of 1 bits in the binary representation of n.
n