(* 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.

(* Specifications: *)
Lemma decide_rt : forall s : Site, {rt c0 s = false} + {rt c0 s = true}.
Lemma decide_inc_dec_in_queue :
forall s : Site,
{s1 : Site | inc_dec_in_queue s1 (bm c0 s owner)} +
{(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner))}.
Lemma decide_parent : forall s1 s3 : Site, {parent s1 s3} + {~ parent s1 s3}.
Inductive direct_son : Site -> Prop :=
direct_son_intro :
forall s : Site,
s <> owner ->
rt c0 s = true ->
(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner)) ->
direct_son s.
Lemma decide_rt : forall s : Site, {rt c0 s = false} + {rt c0 s = true}.
Lemma decide_inc_dec_in_queue :
forall s : Site,
{s1 : Site | inc_dec_in_queue s1 (bm c0 s owner)} +
{(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner))}.
Lemma decide_parent : forall s1 s3 : Site, {parent s1 s3} + {~ parent s1 s3}.
Inductive direct_son : Site -> Prop :=
direct_son_intro :
forall s : Site,
s <> owner ->
rt c0 s = true ->
(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner)) ->
direct_son s.
Lemma decide_rt : forall s : Site, {rt c0 s = false} + {rt c0 s = true}.
Lemma decide_inc_dec_in_queue :
forall s : Site,
{s1 : Site | inc_dec_in_queue s1 (bm c0 s owner)} +
{(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner))}.
Lemma decide_parent : forall s1 s3 : Site, {parent s1 s3} + {~ parent s1 s3}.
Inductive direct_son : Site -> Prop :=
direct_son_intro :
forall s : Site,
s <> owner ->
rt c0 s = true ->
(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner)) ->
direct_son s.
Lemma decide_rt : forall s : Site, {rt c0 s = false} + {rt c0 s = true}.
Lemma decide_inc_dec_in_queue :
forall s : Site,
{s1 : Site | inc_dec_in_queue s1 (bm c0 s owner)} +
{(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner))}.
Lemma decide_parent : forall s1 s3 : Site, {parent s1 s3} + {~ parent s1 s3}.
Inductive direct_son : Site -> Prop :=
direct_son_intro :
forall s : Site,
s <> owner ->
rt c0 s = true ->
(forall s1 : Site, ~ inc_dec_in_queue s1 (bm c0 s owner)) ->
direct_son s.