Fixpoint BV_increment (l : list bool) : BV :=
  match l with
  | nil => nilbv
  | false :: v => true :: v
  | true :: v => false :: BV_increment v
  end.Fixpoint BV_increment_carry (l : list bool) : bool :=
  match l with
  | nil => true
  | false :: v => false
  | true :: v => BV_increment_carry v
  end.Fixpoint BV_decrement (l : list bool) : BV :=
  match l with
  | nil => nilbv
  | false :: v => true :: BV_decrement v
  | true :: v => false :: v
  end.Fixpoint BV_decrement_carry (l : list bool) : bool :=
  match l with
  | nil => true
  | false :: v => BV_decrement_carry v
  | true :: v => false
  end.

Lemma BV_decr_incr : forall v : BV, BV_decrement (BV_increment v) = v.