Proof using.
intros. unfold handleRequestVote, advanceCurrentTerm in *.
repeat break_match; find_inversion; auto.
Qed.

Lemma handleClientRequest_type :
forall h st client id c out st' l,
handleClientRequest h st client id c = (out, st', l) ->
type st' = type st /\ currentTerm st' = currentTerm st /\
(log st' = log st \/ exists e, eTerm e = currentTerm st /\ log st' = e :: log st).