(****************)
(* Paired words *)
(****************)

(* (paired w) ==  w = [b1 ~b1 b2 ~b2 ... bn ~bn] *)
Inductive paired : word -> Prop :=
  | paired_empty : paired empty
  | paired_bit :
      forall w : word,
      paired w -> forall b : bool, paired (bit (negb b) (bit b w)).(****************)
(* Paired words *)
(****************)

(* (paired w) ==  w = [b1 ~b1 b2 ~b2 ... bn ~bn] *)
Inductive paired : word -> Prop :=
  | paired_empty : paired empty
  | paired_bit :
      forall w : word,
      paired w -> forall b : bool, paired (bit (negb b) (bit b w)).(****************)
(* Paired words *)
(****************)

(* (paired w) ==  w = [b1 ~b1 b2 ~b2 ... bn ~bn] *)
Inductive paired : word -> Prop :=
  | paired_empty : paired empty
  | paired_bit :
      forall w : word,
      paired w -> forall b : bool, paired (bit (negb b) (bit b w)).(* paired_odd_l b w == w = [b b1 ~b1 b2 ~b2 ... bn ~bn] *)
Definition paired_odd_l (b : bool) (w : word) := paired (bit (negb b) w).

Lemma paired_odd_l_intro : forall (b : bool) (w : word), paired w -> paired_odd_l b (bit b w).