(**************)
(* Singletons *)
(**************)
Definition single (b : bool) := bit b empty.
(*********************)
(* Parities of words *)
(*********************)
Inductive odd : word -> Prop :=
even_odd : forall w : word, even w -> forall b : bool, odd (bit b w)
with even : word -> Prop :=
| even_empty : even empty
| odd_even : forall w : word, odd w -> forall b : bool, even (bit b w).
Hint Resolve odd_even even_empty even_odd.

(* Specifications: *)
Lemma not_odd_empty : ~ odd empty.
Hint Resolve not_odd_empty.
Lemma inv_odd : forall (w : word) (b : bool), odd (bit b w) -> even w.
Lemma inv_even : forall (w : word) (b : bool), even (bit b w) -> odd w.
(**********************)
(* (odd w) + (even w) *)
(**********************)
Lemma odd_or_even : forall w : word, odd w \/ even w.
Lemma not_odd_and_even : forall w : word, odd w -> even w -> False.
(************************)
(* Parities of subwords *)
(************************)
Lemma odd_even_conc :
forall u v w : word,
conc u v w ->
odd w /\ (odd u /\ even v \/ even u /\ odd v) \/
even w /\ (odd u /\ odd v \/ even u /\ even v).
Lemma even_conc :
forall u v w : word,
conc u v w -> even w -> odd u /\ odd v \/ even u /\ even v.