Proof using.
unfold message_enables_label.
intros.
find_apply_lem_hyp in_split.
break_exists_name xs. break_exists_name ys.
unfold enabled.
destruct (ServerNetHandler (Client i) Lock (nwState net Server)) eqn:?.
destruct p. destruct p.
cut (l0 = MsgLock i); intros.
subst.
- repeat eexists. econstructor; eauto.
- handler_unfold. repeat break_match; repeat find_inversion; auto.
Qed.
Definition message_delivered_label p l :=
forall l' net net' tr,
lb_step_async net l' net' tr ->
In p (nwPackets net) ->
~ In p (nwPackets net') ->
l = l'.

(* Specifications: *)
Lemma In_split_not_In :
forall A (p : A) p' xs ys zs,
In p (xs ++ p' :: ys) ->
~ In p (zs ++ xs ++ ys) ->
p = p'.