Proof using rmri pllsi rri.
intros.
pose proof (msg_lift_prop _ (lift_prop _ prevLog_leader_sublog_invariant)).
find_insterU. conclude_using eauto.
unfold prevLog_leader_sublog, lifted_prevLog_leader_sublog in *.
intros.
find_apply_lem_hyp in_mgv_ghost_packet.
find_apply_lem_hyp in_ghost_packet.
unfold deghost in *. simpl in *. break_match. simpl in *. subst.
specialize (H0 leader).
destruct (nwState leader). simpl in *.
eauto.
Qed.

Lemma commit_invariant_client_request :
forall h (net : ghost_log_network) st' ps' gd out d l client id c,
handleClientRequest h (snd (nwState net h)) client id c = (out, d, l) ->
gd = update_elections_data_client_request h (nwState net h) client id c ->
commit_invariant net ->
maxIndex_sanity (deghost (mgv_deghost net)) ->
msg_refined_raft_intermediate_reachable net ->
(forall h', st' h' = update name_eq_dec (nwState net) h (gd, d) h') ->
(forall p', In p' ps' -> In p' (nwPackets net) \/
In p' (send_packets h (add_ghost_msg (msg_ghost_params := ghost_log_params) h (gd, d) l))) ->
commit_invariant (mkNetwork ps' st').