Proof using.
red. unfold allEntries_log in *. intros. simpl in *.
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.
repeat find_higher_order_rewrite.
find_copy_apply_lem_hyp doLeader_log.
find_apply_lem_hyp doLeader_currentTerm_leaderId.
destruct_update; simpl in *; eauto; find_apply_hyp_hyp; repeat find_rewrite; intuition;
right; break_exists_exists; intuition; find_higher_order_rewrite;
destruct_update; simpl in *; auto.
Qed.

Lemma doGenericServer_currentTerm_leaderId :
forall st h out st' m,
doGenericServer h st = (out, st', m) ->
currentTerm st' = currentTerm st /\
leaderId st' = leaderId st.