Proof using glaei aelsi tsi rlmli rmri.
red.
split; red; intros; simpl in *; intuition;
unfold ghost_log_entries_match in *; break_and.
- find_copy_apply_lem_hyp handleClientRequest_packets.
subst. simpl in *.
find_apply_hyp_hyp. intuition.
repeat find_higher_order_rewrite; destruct_update; simpl in *; eauto.
find_apply_lem_hyp handleClientRequest_log.
intuition; subst; simpl in *; repeat find_rewrite; eauto.
break_exists_name e.
intuition; repeat find_rewrite; simpl in *. subst.
eapply sorted_entries_match_cons; eauto.
+ simpl. intuition; try solve [eapply lifted_entries_sorted_invariant; eauto].
* find_eapply_lem_hyp maxIndex_is_max; eauto; try omega.
eapply lifted_entries_sorted_invariant; eauto.
* repeat find_rewrite.
find_eapply_lem_hyp lifted_no_entries_past_current_term_host_invariant; eauto.
+ intuition.
break_exists. intuition.
repeat find_rewrite.
enough (exists x, In x (log (snd (nwState net h0))) /\ eIndex x = eIndex e /\ eTerm x = eTerm e).
* break_exists. intuition. repeat find_rewrite.
find_eapply_lem_hyp maxIndex_is_max; eauto;
unfold raft_data in *; simpl in *;
unfold raft_data in *; simpl in *;
[omega|]. eapply lifted_entries_sorted_invariant; eauto.
* find_eapply_lem_hyp ghost_log_allEntries_invariant; eauto.
break_exists.
repeat find_rewrite.
find_copy_eapply_lem_hyp lifted_allEntries_leader_sublog_invariant; eauto.
apply in_map_iff. eexists; intuition; eauto; auto.
- find_apply_hyp_hyp.
find_apply_hyp_hyp.
find_copy_apply_lem_hyp handleClientRequest_packets.
subst. simpl in *. intuition.
Qed.

(* Specifications: *)
Lemma ghost_log_entries_match_timeout :
msg_refined_raft_net_invariant_timeout ghost_log_entries_match.