Proof using.
unfold candidateEntriesTerm.
intros.
break_exists_exists. break_and.
update_destruct_simplify.
- rewrite update_elections_data_appendEntries_cronies.
find_apply_lem_hyp handleAppendEntries_type.
intuition; subst; repeat find_rewrite; auto.
discriminate.
- intuition.
Qed.

Lemma prevLog_candidateEntriesTerm_append_entries :
refined_raft_net_invariant_append_entries prevLog_candidateEntriesTerm.