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

Definition half_adder_sum (a b : bool) := xorb a b.Definition half_adder_carry (a b : bool) := a && b.

Theorem half_adder_ok : forall a b : bool, bool_to_nat (half_adder_sum a b) + (bool_to_nat (half_adder_carry a b) + bool_to_nat (half_adder_carry a b)) = bool_to_nat a + bool_to_nat b.