Definition client_send_trans :=
SendTrans client_send_safe_coh client_send_safe_in client_step_def client_step_coh.
End ClientGenericSendTransitions.
Section ClientSendTransitions.
Definition client_send_acquire_prec (cs : client_state) (to : nid) (m : seq nat) :=
cs = NotHeld /\
m = [::].
Program Definition client_send_acquire_trans : send_trans LockCoh :=
@client_send_trans acquire_tag client_send_acquire_prec _.
Next Obligation.
apply/andP=>/=.
split=>//.
by case: H0=>_/eqP.
Qed.
Definition client_send_release_prec (cs : client_state) (to : nid) (m : seq nat) :=
(exists e, cs = Held e) /\
m = [::].
Program Definition client_send_release_trans : send_trans LockCoh :=
@client_send_trans release_tag client_send_release_prec _.
Next Obligation.
apply/andP=>/=.
split=>//.
by case: H0=>_/eqP.
Qed.
End ClientSendTransitions.
Section ClientGenericReceiveTransitions.
Notation coh := LockCoh.
Variable the_tag : nat.
Variable client_recv_wf : forall d, coh d -> nid -> nid -> TaggedMessage -> bool.
Definition rc_step : receive_step_t coh :=
fun this (from : nid) (m : seq nat) d (pf : coh d) (pt : this \in nodes) =>
if (this \in clients)
then let s := getSt_client pf pt in
st :-> client_recv_step s from the_tag m
else getLocal this d.

Lemma rc_step_coh : r_step_coh_t client_recv_wf the_tag rc_step.
Definition rc_recv_trans := ReceiveTrans rc_step_coh.