Proof using.
intros. unfold doGenericServer in *.
repeat break_match; find_inversion;
use_applyEntries_spec; simpl in *;
subst; 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) \/
(assoc_default name_eq_dec (matchIndex (handleRequestVoteReply n st src t v)) n 0
= maxIndex (log (handleRequestVoteReply n st src t v))).