Fixpoint countLeadingZerosWord ni no: word ni -> word no :=
match ni return word ni -> word no with
| 0 => fun _ => $ 0
| S m => fun e =>
if (weq (split2 m 1 (nat_cast (fun n => word n) (eq_sym (Nat.add_1_r m)) e)) WO~0)
then $ 1 ^+ @countLeadingZerosWord m no (split1 m 1 (nat_cast (fun n => word n) (eq_sym (Nat.add_1_r m)) e))
else $ 0
end.

Lemma combine_shiftl_plus_n n x:
x < pow2 n ->
(combine (natToWord n x) WO~1) = (natToWord (n + 1) (pow2 n)) ^+ natToWord (n + 1) x.