Proof using.
start.
match goal with
| H : nwState ?net ?h = (?gd, ?d) |- _ =>
replace gd with (fst (nwState net h)) in * by (rewrite H; reflexivity);
replace d with (snd (nwState net h)) in * by (rewrite H; reflexivity);
clear H
end.
eapply candidateEntries_ext; eauto.
find_higher_order_rewrite.
assert (candidateEntries e (nwState net)).
{ destruct_update; simpl in *; eauto. }
unfold candidateEntries in *.
find_apply_lem_hyp doLeader_st.
intuition.
break_exists_exists.
destruct_update; simpl in *; repeat find_rewrite; auto.
Qed.

Lemma allEntries_candidateEntries_do_generic_server :
refined_raft_net_invariant_do_generic_server allEntries_candidateEntries.