Proof using lhlli.
red. unfold append_entries_came_from_leaders. intros.
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.
subst. simpl in *.
find_apply_hyp_hyp. intuition eauto.
- find_apply_hyp_hyp.
break_exists.
repeat find_higher_order_rewrite.
update_destruct; subst_max; rewrite_update; simpl in *; eauto; subst; auto.
- do_in_map. subst. simpl in *.
find_eapply_lem_hyp doLeader_messages; eauto.
repeat break_and.
subst.
find_eapply_lem_hyp leaders_have_leaderLogs_invariant; eauto.
repeat find_higher_order_rewrite.
update_destruct; subst_max; rewrite_update; simpl in *; eauto; subst; auto.
Qed.

(* Specifications: *)
Lemma append_entries_came_from_leaders_doGenericServer :
refined_raft_net_invariant_do_generic_server append_entries_came_from_leaders.