Definition Mux := If BV.Definition lowbit (l : list bool) :=
  match l with
  | nil => false
  | b :: _ => b
  end.Definition highs (l : list bool) :=
  match l with
  | nil => nil (A:=bool)
  | _ :: v => v
  end.

(* Specifications: *)
Lemma lowbit_is_trunc : forall v : BV, v <> nilbv -> consbv (lowbit v) nilbv = truncbv v 1.
Lemma lowbit_is_abit : forall v : BV, v <> nilbv -> consbv (lowbit v) nilbv = abit v 0.
Lemma highs_is_strip : forall v : BV, highs v = stripbv v 1.
Lemma app_lowbit_highs : forall v : BV, v <> nilbv -> appbv (consbv (lowbit v) nilbv) (highs v) = v.
Lemma length_highs : forall v : BV, v <> nilbv -> lengthbv (highs v) = pred (lengthbv v).
Lemma length_abit : forall (v : BV) (i : nat), i < lengthbv v -> lengthbv (abit v i) = 1.