Proof using.
unfold locks_correct_locked, valid_locked.
intros.
exists c.
intuition.
- exists t. now rewrite_update.
- now rewrite_update.
Qed.

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