Section INVARIANT6.
Variable c0 : Config.
Fixpoint inc_dec_in_queue (s : Site) (q : queue Message) {struct q} : Prop :=
match q with
| empty => False
| input (inc_dec s2) q' =>
if eq_site_dec s2 s then True else False
| input _ q' => inc_dec_in_queue s q'
end.
(* note that the contrary is not true ! *)
(* s1 is parent of s0 *)
Inductive parent : Site -> Site -> Prop :=
parent_intro :
forall s1 s0 : Site,
rt c0 s0 = true -> inc_dec_in_queue s1 (bm c0 s0 owner) -> parent s1 s0.
(* s1 is ancestor of s0 *)
Inductive ancestor : Site -> Site -> Prop :=
| short : forall s1 s0 : Site, parent s1 s0 -> ancestor s1 s0
| long :
forall s2 s1 s0 : Site,
ancestor s2 s1 -> parent s1 s0 -> ancestor s2 s0.

Lemma decide_parent : forall s1 s3 : Site, {parent s1 s3} + {~ parent s1 s3}.