Definition E_consume_external d i this tag m from P :=
let: d' := {| dstate := upd this (loc this d) (dstate d);
dsoup := consume_msg (dsoup d) i |} in
coh d ->
find i (dsoup d) =
Some {| content := {| tag := tag; tms_cont := m |};
from := from;
to := this;
active := true |} ->
~~ internal_msg tag from this ->
P d ->
P d'.

Lemma cn_state_functional d cs1 lg1 cs2 lg2 :
valid (loc cn d) ->
cn_state d cs1 lg1 ->
cn_state d cs2 lg2 ->
cs1 = cs2 /\ lg1 = lg2.