Proof using.
unfold candidateEntriesTerm.
intros.
break_exists_exists.
update_destruct_simplify; intuition.
- now rewrite update_elections_data_requestVote_cronies_same.
- intros.
match goal with
| [ H : context [advanceCurrentTerm ?st ?t] |- _ ] =>
pose proof advanceCurrentTerm_same_or_type_follower st t
end.
intuition.
+ repeat find_rewrite. auto.
+ congruence.
Qed.

Lemma handleRequestVote_preserves_candidateEntriesTerm :
forall net h h' t lli llt d t' m,
handleRequestVote h (snd (nwState net h)) t h' lli llt = (d, m) ->
candidateEntriesTerm t' (nwState net) ->
candidateEntriesTerm t' (update name_eq_dec (nwState net) h
(update_elections_data_requestVote
h h' t h' lli llt (nwState net h), d)).