Proof using.
unfold refined_raft_net_invariant_do_generic_server, prevLog_candidateEntriesTerm.
simpl. intros.
find_apply_hyp_hyp. break_or_hyp.
- eapply candidateEntriesTerm_ext; eauto.
eapply doGenericServer_preserves_candidateEntriesTerm; eauto.
- find_apply_lem_hyp in_map_iff. break_exists. break_and.
subst. simpl in *.
find_apply_lem_hyp doGenericServer_packets. subst. simpl in *. intuition.
Qed.

Lemma prevLog_candidateEntriesTerm_state_same_packet_subset :
refined_raft_net_invariant_state_same_packet_subset prevLog_candidateEntriesTerm.