Proof using.
unfold raft_net_invariant_request_vote, match_index_sanity.
simpl.
intros.
repeat find_higher_order_rewrite.
update_destruct_simplify.
- find_apply_lem_hyp handleRequestVote_matchIndex_preserved.
eauto using match_index_sanity_preserved.
- auto.
Qed.

Lemma handleRequestVoteReply_matchIndex :
forall n st src t v,
type (handleRequestVoteReply n st src t v) = Leader ->
type st = Leader /\
matchIndex (handleRequestVoteReply n st src t v) =
matchIndex st \/
matchIndex (handleRequestVoteReply n st src t v) =
(assoc_set name_eq_dec nil n (maxIndex (log st))).