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)].

(* Specifications: *)
(* 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.
Lemma send_resp_prec_safe : prec_safe tresp send_resp_prec.
Definition qsend_req  := qsend_trans send_req_prec_safe.