Definition server_send_trans :=
SendTrans server_send_safe_coh server_send_safe_in server_step_def server_step_coh.
End ServerGenericSendTransitions.
Section ServerSendTransitions.
Definition server_send_grant_prec (ss : server_state) to m :=
exists rest e,
ss = ServerState (to :: rest) e None /\
m = [:: e].
Program Definition server_send_grant_trans : send_trans LockCoh :=
@server_send_trans grant_tag server_send_grant_prec _.
Next Obligation.
case: H=>/eqP->H; rewrite /coh_msg eqxx; split=>//=.
case: H0=>[rest] [e] []-> ->/=. by rewrite /msg_from_server /= eqxx.
Qed.
End ServerSendTransitions.
Section ServerGenericReceiveTransitions.
Notation coh := LockCoh.
Variable the_tag : nat.
Variable server_recv_wf : forall d, coh d -> nid -> nid -> TaggedMessage -> bool.
Definition rs_step : receive_step_t coh :=
fun this (from : nid) (m : seq nat) d (pf : coh d) (pt : this \in nodes) =>
if (this == server)
then let s := getSt_server pf in
st :-> server_recv_step s from the_tag m
else getLocal this d.

(* Specifications: *)
Lemma rs_step_coh : r_step_coh_t server_recv_wf the_tag rs_step.
Definition rs_recv_trans := ReceiveTrans rs_step_coh.