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.
repeat find_higher_order_rewrite.
unfold candidateEntries in *.
destruct_update; simpl in *;
find_apply_hyp_hyp; break_exists_exists;
destruct_update; simpl in *; intuition;
congruence.
Qed.

(* Specifications: *)
Lemma allEntries_candidateEntries_invariant :
forall net,
refined_raft_intermediate_reachable net ->
allEntries_candidateEntries net.