Proof using.
start.
eapply candidateEntries_ext; eauto.
repeat find_higher_order_rewrite.
assert (candidateEntries e (nwState net)).
{ update_destruct; rewrite_update.
- assert (gd = fst (nwState net h)). { repeat find_rewrite. simpl. auto. }
subst. eauto.
- eauto. }
unfold candidateEntries in *.
break_exists; break_and.
exists x.
update_destruct; rewrite_update; [|auto].
simpl. split.
- assert (gd = fst (nwState net h)). { repeat find_rewrite. simpl. auto. }
subst. auto.
- unfold not. intros. subst. unfold reboot in *. simpl in *. discriminate.
Qed.

Lemma leaderLogs_candidateEntries_invariant :
forall net,
refined_raft_intermediate_reachable net ->
leaderLogs_candidateEntries net.