Inductive D_queue : queue Message -> Prop :=
  | D_empty : D_queue (empty Message)
  | D_dec :
      forall qm : queue Message,
      alternate qm -> In_queue_before Message dec is_inc_dec qm -> D_queue qm.Inductive D_queue : queue Message -> Prop :=
  | D_empty : D_queue (empty Message)
  | D_dec :
      forall qm : queue Message,
      alternate qm -> In_queue_before Message dec is_inc_dec qm -> D_queue qm.Inductive D_queue : queue Message -> Prop :=
  | D_empty : D_queue (empty Message)
  | D_dec :
      forall qm : queue Message,
      alternate qm -> In_queue_before Message dec is_inc_dec qm -> D_queue qm.

(* Specifications: *)
Lemma not_D_queue : forall (q0 : queue Message) (m : Message), ~ D_queue q0 -> m <> dec -> ~ D_queue (input Message m q0).
Lemma D_queue_is_alternate : forall q0 : queue Message, D_queue q0 -> alternate q0.
Lemma in_q_before_first_out : forall q : queue Message, In_queue_before Message dec is_inc_dec q -> In_queue_before Message dec is_inc_dec (first_out Message q).
Lemma alt_first_out : forall q0 : queue Message, alternate q0 -> alternate (first_out Message q0).
Lemma D_first_out : forall q0 : queue Message, D_queue q0 -> D_queue (first_out Message q0).
Lemma D_input : forall q : queue Message, D_queue (input Message copy q) -> D_queue q.
Lemma D_collect : forall s1 s2 : Site, D_queue (b0 s0 owner) -> D_queue (Collect_message Message b0 s1 s2 s0 owner).
Lemma D_post_elsewhere : forall (s1 s2 : Site) (m : Message), s1 <> s0 \/ s2 <> owner -> D_queue (b0 s0 owner) -> D_queue (Post_message Message m b0 s1 s2 s0 owner).
Lemma D_post_dec : alternate (b0 s0 owner) -> D_queue (Post_message Message dec b0 s0 owner s0 owner).
Lemma alt_collect : forall s1 s2 : Site, alternate (b0 s0 owner) -> alternate (Collect_message Message b0 s1 s2 s0 owner).
Lemma alt_post_elsewhere : forall (s1 s2 : Site) (m : Message), s1 <> s0 \/ s2 <> owner -> alternate (b0 s0 owner) -> alternate (Post_message Message m b0 s1 s2 s0 owner).
Lemma alt_post_any : forall m : Message, (forall s : Site, m <> inc_dec s) -> alternate (b0 s0 owner) -> alternate (Post_message Message m b0 s0 owner s0 owner).
Lemma alt_post_inc : forall s1 : Site, alternate (b0 s0 owner) -> In_queue_before Message dec is_inc_dec (b0 s0 owner) -> alternate (Post_message Message (inc_dec s1) b0 s0 owner s0 owner).
Lemma alt_post_inc_old : forall s1 : Site, alternate (b0 s0 owner) -> b0 s0 owner = empty Message \/ last Message (b0 s0 owner) = value Message dec -> alternate (Post_message Message (inc_dec s1) b0 s0 owner s0 owner).
Lemma in_q_before_append : forall q1 q2 : queue Message, In_queue_before Message dec is_inc_dec (append Message q1 q2) -> In_queue_before Message dec is_inc_dec (append Message q1 (input Message copy q2)).
Lemma in_q_before_append2 : forall q1 q2 : queue Message, In_queue_before Message dec is_inc_dec (append Message q1 (input Message copy q2)) -> In_queue_before Message dec is_inc_dec (append Message q1 q2).
Lemma alt_shuffle_copy1 : forall q1 q2 : queue Message, alternate (input Message copy (append Message q1 q2)) -> alternate (append Message q1 (input Message copy q2)).
Lemma alt_shuffle_copy2 : forall q1 q2 : queue Message, alternate (append Message q1 (input Message copy q2)) -> alternate (append Message q1 q2).
Lemma alt_shuffle_copy : forall q1 q2 q3 q4 : queue Message, append Message q1 q2 = append Message q3 q4 -> alternate (append Message q1 (input Message copy q2)) -> alternate (append Message q3 (input Message copy q4)).
Lemma D_shuffle_copy1 : forall q1 q2 : queue Message, D_queue (input Message copy (append Message q1 q2)) -> D_queue (append Message q1 (input Message copy q2)).
Lemma D_shuffle_copy : forall q1 q2 q3 q4 : queue Message, append Message q1 q2 = append Message q3 q4 -> D_queue (append Message q1 (input Message copy q2)) -> D_queue (append Message q3 (input Message copy q4)).