(*Recursive Definition BV_full_adder_carry: (list bool)->(list bool)->bool->bool
									   :=
     (nil bool) (nil bool) b => b
   | (nil bool) (cons vh vt) b => 
	(BV_full_adder_carry (nil bool) vt (half_adder_carry vh b))
   | (cons vh vt) (nil bool) b =>
	(BV_full_adder_carry vt (nil bool) (half_adder_carry vh b))
   | (cons vh vt) (cons wh wt) b => 
	(BV_full_adder_carry vt wt (full_adder_carry vh wh b)).
*)



Definition BV_full_adder_carry :=
  (fix F (l : list bool) : list bool -> bool -> bool :=
     match l with
     | nil =>
         (fix F0 (l0 : list bool) : bool -> bool :=
            match l0 with
            | nil => fun z : bool => z
            | b :: l1 => fun z : bool => F0 l1 (half_adder_carry b z)
            end)
     | b :: l0 =>
         fun x2 : list bool =>
         match x2 with
         | nil => fun y z : bool => F l0 nil (half_adder_carry y z)
         | b0 :: l1 => fun y z : bool => F l0 l1 (full_adder_carry y b0 z)
         end b
     end).

Lemma BV_full_adder_carry_eq1 : forall b : bool, BV_full_adder_carry nil nil b = b.