Proof using.
unfold at_head_of_queue.
intuition. break_exists.
rewrite_update.
find_rewrite.
eauto.
Qed.
Ltac set_up_net_handlers :=
intros;
match goal with
| [ H : context [ NetHandler (pDst ?p) _ _ _ ] |- _ ] =>
destruct (pDst p) eqn:?
end; simpl in *;
[find_apply_lem_hyp ClientNetHandler_cases |
find_apply_lem_hyp ServerNetHandler_cases; intuition; try break_exists ];
intuition; subst;
simpl in *; intuition;
repeat find_rewrite;
repeat find_inversion;
simpl in *;
try now rewrite update_nop_ext.

(* Specifications: *)
Lemma locks_correct_net_handlers :
forall p sigma u st' out ms,
NetHandler (pDst p) (pSrc p) (pBody p) (sigma (pDst p)) = (u, out, st', ms) ->
locks_correct sigma ->
locks_correct_unlock sigma p ->
locks_correct_locked sigma p ->
locks_correct (update name_eq_dec sigma (pDst p) st').
Lemma locks_correct_net_handlers :
forall p sigma u st' out ms,
NetHandler (pDst p) (pSrc p) (pBody p) (sigma (pDst p)) = (u, out, st', ms) ->
locks_correct sigma ->
locks_correct_unlock sigma p ->
locks_correct_locked sigma p ->
locks_correct (update name_eq_dec sigma (pDst p) st').