Proof using.
red. unfold requestVote_maxIndex_maxTerm. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
assert (In p0 (nwPackets net)) by
(find_apply_hyp_hyp; repeat find_rewrite; intuition; [in_crush|];
exfalso; subst; simpl in *; subst;
unfold handleAppendEntries in *;
repeat break_match; find_inversion).
repeat find_rewrite.
destruct_update; simpl in *; eauto;
try rewrite votesWithLog_same_append_entries; eauto;
find_apply_lem_hyp handleAppendEntries_log_term_type.
break_or_hyp; try congruence.
break_and; repeat find_rewrite; eauto.
Qed.

Lemma requestVote_maxIndex_maxTerm_append_entries_reply :
refined_raft_net_invariant_append_entries_reply requestVote_maxIndex_maxTerm.