Proof using.
unfold refined_raft_net_invariant_do_generic_server, appendEntries_leader.
simpl.
intros.
find_apply_hyp_hyp.
intuition.
- repeat find_higher_order_rewrite.
update_destruct_simplify.
+ eapply appendEntries_leader_predicate_TTLM_preserved; eauto using doGenericServer_TTLM.
match goal with
| [ H : nwState ?net ?h = (?gd, ?d) |- _ ] =>
replace d with (snd (nwState net h)) in * by (rewrite H; auto)
end.
eauto.
+ eauto.
- find_apply_lem_hyp doGenericServer_packets. subst. simpl in *. intuition.
Qed.

Lemma appendEntries_leader_state_same_packet_subset :
refined_raft_net_invariant_state_same_packet_subset appendEntries_leader.