Proof using iliaei rmri.
red. unfold ghost_log_allEntries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
- repeat find_rewrite.
find_apply_hyp_hyp; intuition; eauto.
+ eapply_prop_hyp In In; eauto.
break_exists_exists.
eauto using update_elections_data_appendEntries_preserves_allEntries'.
+ remember (pSrc p0).
subst_max. simpl in *.
unfold write_ghost_log in *.
simpl in *.
match goal with
| [ H : In _ (log ?d), H' : context [handleAppendEntries ?h],
H'' : msg_refined_raft_intermediate_reachable ?net |- _ ] =>
replace d with (snd (nwState net h)) in * by
(simpl; find_higher_order_rewrite; rewrite_update; auto)
end.
find_eapply_lem_hyp lifted_in_log_in_all_entries_invariant; eauto.
break_exists_exists.
simpl in *. find_higher_order_rewrite. rewrite_update. simpl in *.
auto.
- find_apply_hyp_hyp; intuition; eauto.
subst. simpl in *. congruence.
Qed.

(* Specifications: *)
Lemma ghost_log_allEntries_append_entries_reply :
msg_refined_raft_net_invariant_append_entries_reply' ghost_log_allEntries.