Proof using.
unfold refined_raft_net_invariant_client_request, prevLog_candidateEntriesTerm.
simpl. intros.
find_apply_hyp_hyp. break_or_hyp.
- eapply candidateEntriesTerm_ext; eauto.
eapply candidateEntriesTerm_same; eauto; intros;
update_destruct_simplify; auto.
+ now erewrite update_elections_data_client_request_cronies by eauto.
+ find_apply_lem_hyp handleClientRequest_type. intuition.
+ find_apply_lem_hyp handleClientRequest_type. intuition.
- find_apply_lem_hyp in_map_iff. break_exists. break_and. subst. simpl in *.
exfalso. eapply handleClientRequest_no_append_entries; eauto.
find_rewrite. eauto 10.
Qed.

(* Specifications: *)
Lemma update_elections_data_timeout_cronies :
forall h d out d' l t,
handleTimeout h (snd d) = (out, d', l) ->
cronies (update_elections_data_timeout h d) t = cronies (fst d) t \/
(t = currentTerm d' /\ type d' = Candidate /\
cronies (update_elections_data_timeout h d) t = votesReceived d').