Proof using.
intros. unfold handleTimeout, tryToBecomeLeader in *.
repeat break_match; find_inversion; auto.
Qed.

Lemma handleTimeout_type_strong :
forall h st out st' l,
handleTimeout h st = (out, st', l) ->
(type st' = type st /\ currentTerm st' = currentTerm st) \/
(type st' = Candidate /\ currentTerm st' = S (currentTerm st)).