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

(*  A lemma covering send-cases in the lc-part of the world  *)
Lemma send_lc_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 pc))))
(H1 : st \In get_st W (plab pc))
(H2 : to \in nodes (getProtocol W (plab pc)) (getSq s))
(H4 : send_safe st to to' (getSq s) msg) :
all_hooks_fire query_hookz (plab pc) (t_snd st) s to msg to' -> Some n = send_step H4 ->
let: d := getStatelet (upd (plab pc)
(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].