(****************************************************************)

Definition full_adder_sum (a b c : bool) :=
  half_adder_sum (half_adder_sum a b) c.Definition full_adder_carry (a b c : bool) :=
  half_adder_carry a b || half_adder_carry (half_adder_sum a b) c.

(* Specifications: *)
Lemma full_adder_sum_sym1 : forall a b c : bool, full_adder_sum a b c = full_adder_sum b a c.
Lemma full_adder_sum_sym2 : forall a b c : bool, full_adder_sum a b c = full_adder_sum a c b.
Lemma full_adder_sum_false : forall a : bool, full_adder_sum a false false = a.
Lemma full_adder_sum_true : forall a : bool, full_adder_sum a true true = a.
Lemma full_adder_carry_sym1 : forall a b c : bool, full_adder_carry a b c = full_adder_carry b a c.
Lemma full_adder_carry_sym2 : forall a b c : bool, full_adder_carry a b c = full_adder_carry a c b.
Lemma full_adder_carry_false : forall a : bool, full_adder_carry a false false = false.
Lemma full_adder_carry_true : forall a : bool, full_adder_carry a true true = true.
Lemma full_adder_carry_true_false : forall a : bool, full_adder_carry a true false = a.
Lemma full_adder_carry_neg : forall a b : bool, full_adder_carry a (negb a) b = b.
Theorem full_adder_ok : forall a b c : bool, bool_to_nat (full_adder_sum a b c) + (bool_to_nat (full_adder_carry a b c) + bool_to_nat (full_adder_carry a b c)) = bool_to_nat a + bool_to_nat b + bool_to_nat c.