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 *.
- assert (In (t, e) (allEntries (fst (nwState net h0)))) by (repeat find_rewrite; eauto). eauto.
- eauto. }
unfold candidateEntries in *.
find_apply_lem_hyp doGenericServer_type.
intuition.
break_exists_exists.
destruct_update; simpl in *; repeat find_rewrite; auto.
Qed.

Lemma allEntries_candidateEntries_state_same_packet_subset :
refined_raft_net_invariant_state_same_packet_subset allEntries_candidateEntries.