(************************************************************************)
(******       Auxiliary lemmas for establishing stability          ******)
(************************************************************************)

Lemma send_lq_all_cases req_num data reqs resp to s
(N : this != to) (Qn : to \in qnodes) (H : core_state_to_data to (getLc' s to) data)
(L : local_indicator data (getLc' s this))
(M : [\/ msg_just_sent (getSq s) reqs resp req_num to, msg_received (getSq s) reqs resp req_num to
| msg_responded (getSq s) reqs resp req_num to data])
to' msg (n : heap) (C : Coh W s) (st : send_trans (Protocols.coh (getProtocol W (plab pq))))
(H1 : st \In get_st W (plab pq))
(H2 : to \in nodes (getProtocol W (plab pq)) (getSq s))
(H4 : send_safe st to to' (getSq s) msg) :
all_hooks_fire query_hookz (plab pq) (t_snd st) s to msg to' -> Some n = send_step H4 ->
let: d := getStatelet (upd (plab pq)
(DStatelet (upd to n (dstate (getSq s)))
(dsoup (getSq s) \+ fresh (dsoup (getSq s)) \\->
Msg (TMsg (t_snd st) msg) to to' true)) s) lq in
[\/ msg_just_sent d reqs resp req_num to,
msg_received  d reqs resp req_num to
| msg_responded d reqs resp req_num to data].