Proof using.
intros. unfold handleTimeout, tryToBecomeLeader in *.
break_match; simpl in *; find_inversion; subst; simpl in *; auto; congruence.
Qed.

Theorem handleClientRequest_matchIndex_maxIndex:
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
(maxIndex (log st') = maxIndex (log st) /\
matchIndex st' = matchIndex st) \/
(assoc_default name_eq_dec (matchIndex st') h 0) = maxIndex (log st').