(* these two lemmas are just negations of the previous ones *)

(* Specifications: *)
Lemma inc_dec_not_in_post :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
~ inc_dec_in_queue s1 (b s0 owner) ->
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner).
Lemma inc_dec_not_in_post2 :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner) ->
~ inc_dec_in_queue s1 (b s0 owner).
Lemma inc_dec_not_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 q -> ~ inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 q -> inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_not_in_collect :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
~ inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect2 :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner) ->
inc_dec_in_queue s3 (b s0 owner).
Lemma not_inc_dec_in :
forall q : queue Message,
(forall s : Site, ~ inc_dec_in_queue s q) ->
forall s : Site, ~ In_queue Message (inc_dec s) q.
Lemma joining_node :
forall (c : Config) (s2 : Site),
legal c ->
rt c s2 = false -> forall s3 s4 : Site, parent c s3 s4 -> s2 <> s3.
Lemma ancestor_rt :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s1 = true.
Lemma ancestor_rt2 :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s2 = true.
Lemma inc_dec_not_in_post :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
~ inc_dec_in_queue s1 (b s0 owner) ->
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner).
Lemma inc_dec_not_in_post2 :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner) ->
~ inc_dec_in_queue s1 (b s0 owner).
Lemma inc_dec_not_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 q -> ~ inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 q -> inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_not_in_collect :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
~ inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect2 :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner) ->
inc_dec_in_queue s3 (b s0 owner).
Lemma not_inc_dec_in :
forall q : queue Message,
(forall s : Site, ~ inc_dec_in_queue s q) ->
forall s : Site, ~ In_queue Message (inc_dec s) q.
Lemma joining_node :
forall (c : Config) (s2 : Site),
legal c ->
rt c s2 = false -> forall s3 s4 : Site, parent c s3 s4 -> s2 <> s3.
Lemma ancestor_rt :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s1 = true.
Lemma ancestor_rt2 :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s2 = true.
Lemma inc_dec_not_in_post :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
~ inc_dec_in_queue s1 (b s0 owner) ->
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner).
Lemma inc_dec_not_in_post2 :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner) ->
~ inc_dec_in_queue s1 (b s0 owner).
Lemma inc_dec_not_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 q -> ~ inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 q -> inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_not_in_collect :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
~ inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect2 :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner) ->
inc_dec_in_queue s3 (b s0 owner).
Lemma not_inc_dec_in :
forall q : queue Message,
(forall s : Site, ~ inc_dec_in_queue s q) ->
forall s : Site, ~ In_queue Message (inc_dec s) q.
Lemma joining_node :
forall (c : Config) (s2 : Site),
legal c ->
rt c s2 = false -> forall s3 s4 : Site, parent c s3 s4 -> s2 <> s3.
Lemma ancestor_rt :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s1 = true.
Lemma ancestor_rt2 :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s2 = true.
Lemma inc_dec_not_in_post :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
~ inc_dec_in_queue s1 (b s0 owner) ->
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner).
Lemma inc_dec_not_in_post2 :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
(forall s4 : Site, m <> inc_dec s4) ->
~ inc_dec_in_queue s1 (Post_message Message m b s2 s3 s0 owner) ->
~ inc_dec_in_queue s1 (b s0 owner).
Lemma inc_dec_not_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 q -> ~ inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_in_first_out :
forall (q : queue Message) (m : Message) (s3 : Site),
first Message q = value Message m ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 q -> inc_dec_in_queue s3 (first_out Message q).
Lemma inc_dec_not_in_collect :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
~ inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
~ inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect :
forall (b : Bag_of_message) (s0 s1 s2 s3 : Site) (m : Message),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (b s0 owner) ->
m <> inc_dec s3 ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner).
Lemma inc_dec_in_collect2 :
forall (b : Bag_of_message) (m : Message) (s0 s1 s2 s3 : Site),
first Message (b s1 s2) = value Message m ->
inc_dec_in_queue s3 (Collect_message Message b s1 s2 s0 owner) ->
inc_dec_in_queue s3 (b s0 owner).
Lemma not_inc_dec_in :
forall q : queue Message,
(forall s : Site, ~ inc_dec_in_queue s q) ->
forall s : Site, ~ In_queue Message (inc_dec s) q.
Lemma joining_node :
forall (c : Config) (s2 : Site),
legal c ->
rt c s2 = false -> forall s3 s4 : Site, parent c s3 s4 -> s2 <> s3.
Lemma ancestor_rt :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s1 = true.
Lemma ancestor_rt2 :
forall c : Config,
legal c -> forall s1 s2 : Site, ancestor c s1 s2 -> rt c s2 = true.