(********************************************************)
(*** More elaborated versions of the same predicates  ***)
(********************************************************)
Definition no_msg_from_to' from to
(criterion : nat -> seq nat -> bool) (d : soup) :=
forall i t c,
find i d = Some (Msg (TMsg t c) from to true) ->
~~criterion t c.

Lemma no_msg_from_to_consume' from to cond s i:
valid s ->
no_msg_from_to' from to cond s ->
no_msg_from_to' from to cond (consume_msg s i).