auto. Qed.
(* In the current version of Coq (V 5.10.14.b) it is impossible to use recursive definitions with BV's constructors on left of "=>" as in the following code: *)
(*Recursive Definition BV_to_nat : BV -> nat := nilbv => O | (consbv b w) => (plus (bool_to_nat b) (plus (BV_to_nat w) (BV_to_nat w))). *)

Lemma BV_to_nat_app :
forall (l n : BV) (ll : nat),
lenbv l ll -> BV_to_nat (appbv l n) = BV_to_nat l + power2 ll * BV_to_nat n.