Definition qsend_trans :=
SendTrans send_safe_coh send_safe_in send_safe_def send_step_coh.
End GenericQuerySendTransitions.
Definition send_req_prec (q : qstate) (to : nid) (payload : seq nat) :=
payload = [::(fresh_id q.1)].

(* Making sure that the precondition is legit *)
Lemma send_req_prec_safe : prec_safe treq send_req_prec.
Definition send_resp_prec (q : qstate) (to : nid) (payload : seq nat) :=
exists rid d, payload = rid :: (serialize d) /\
(to, rid) \in q.2.