Proof using.
red. unfold leaderLogs_preserved. 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.
destruct_update; simpl in *; eauto.
Qed.

(* Specifications: *)
Lemma leaderLogs_preserved_do_leader :
refined_raft_net_invariant_do_leader leaderLogs_preserved.
Theorem leaderLogs_preserved_invariant :
forall net,
refined_raft_intermediate_reachable net ->
leaderLogs_preserved net.