Proof using.
intros.
unfold handleAppendEntriesReply, advanceCurrentTerm in *.
repeat (break_match; try find_inversion; simpl in *; auto);
[|intros; congruence].
intros. intuition.
unfold assoc_default.
repeat break_match; rewrite get_set_diff in *; repeat find_rewrite; congruence.
Qed.

Lemma advanceCurrentTerm_matchIndex_preserved :
forall st t,
matchIndex_preserved st (advanceCurrentTerm st t).