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

(* Specifications: *)
Lemma doGenericServer_type :
forall h st os st' ms,
doGenericServer h st = (os, st', ms) ->
type st' = type st /\ currentTerm st' = currentTerm st /\ log st' = log st.
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)).