Proof using.
unfold handleTimeout, tryToBecomeLeader.
intros.
repeat break_match; repeat find_inversion; simpl in *; intuition;
do_in_map; subst; simpl; eauto.
Qed.

Lemma handleTimeout_not_leader_inc_term :
forall h d out d' l,
handleTimeout h d = (out, d', l) ->
type d <> Leader ->
currentTerm d' = S (currentTerm d).