End ServerGenericReceiveTransitions.
Section ServerReceiveTransitions.
Definition s_matches_tag (ss : server_state) from t :=
(t == acquire_tag) ||
((t == release_tag) && (current_holder ss == Some from)).
Definition server_msg_wf d (C : LockCoh d) (this from : nid) :=
[pred m : TaggedMessage | s_matches_tag (getSt_server C) from (tag m)].
Definition server_recv_acquire_trans := rs_recv_trans acquire_tag server_msg_wf.
Definition server_recv_release_trans := rs_recv_trans release_tag server_msg_wf.
End ServerReceiveTransitions.
Section ClientGenericSendTransitions.
Definition HClient this to := (this \in clients /\ to == server).
Variable the_tag : nat.
Variable prec : client_state -> nid -> seq nat -> Prop.
Hypothesis prec_safe :
forall this to s m,
HClient this to ->
prec s to m ->
msg_from_client (TMsg the_tag m).
Notation coh := LockCoh.

Lemma client_send_this_in this to : HClient this to -> this \in nodes.
Definition client_step (this to : nid) (d : dstatelet)
(msg : seq nat)
(pf : client_send_safe this to d msg) :=
let C := client_send_safe_coh pf in
let s := getSt_client C (client_send_this_in (proj1 pf)) in
Some (st :-> client_send_step s).