Section ALTERNATE.
Definition is_inc_dec (m : Message) :=
match m with
| inc_dec _ => true
| _ => false
end.
Inductive alternate : queue Message -> Prop :=
| alt_null : alternate (empty Message)
| alt_any_alt :
forall (qm : queue Message) (m : Message),
(forall s : Site, m <> inc_dec s) ->
alternate qm -> alternate (input Message m qm)
| alt_inc_dec :
forall (qm : queue Message) (s0 : Site),
alternate qm ->
In_queue_before Message dec is_inc_dec qm ->
alternate (input Message (inc_dec s0) 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.

Lemma alt_first_out :
forall q0 : queue Message, alternate q0 -> alternate (first_out Message q0).