Proof using.
unfold refined_raft_net_invariant_do_leader, votes_correct.
intros.
match goal with H : nwState _ _ = _ |- _ =>
assert (gd = fst (nwState net h) /\
d = snd (nwState net h)) by (intuition; find_rewrite; reflexivity);
clear H
end.
split_votes_correct; start_proof; subst.
- eauto.
- find_apply_lem_hyp doLeader_term_votedFor. break_and.
repeat find_rewrite. eauto.
- find_apply_lem_hyp doLeader_term_votedFor. break_and.
repeat find_rewrite. eauto.
Qed.

Lemma votes_correct_do_generic_server :
refined_raft_net_invariant_do_generic_server votes_correct.