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

(* Specifications: *)
Lemma handleRequestVote_currentTerm_same_or_follower :
forall h st t h' lli llt st' m,
handleRequestVote h st t h' lli llt = (st', m) ->
(currentTerm st' = currentTerm st /\ type st' = type st) \/
type st' = Follower.
Lemma update_elections_data_requestVote_votes_preserved :
forall t c h h' t' h'' lli llt st,
In (t, c) (votes (fst st)) ->
In (t, c)
(votes (update_elections_data_requestVote h h' t' h'' lli llt st)).
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).
Lemma handleRequestVote_type_term :
forall st h h' t lli llt st' m,
handleRequestVote h st t h' lli llt = (st', m) ->
(type st' = type st /\ currentTerm st' = currentTerm st) \/
(type st' = Follower /\ currentTerm st' >= currentTerm st).