Proof using.
unfold raft_net_invariant_do_generic_server. unfold logs_sorted.
intuition; simpl in *.
- subst. unfold logs_sorted_host in *. simpl in *. intros.
find_apply_lem_hyp doGenericServer_log.
repeat find_higher_order_rewrite. break_match; try find_rewrite; eauto.
- find_apply_lem_hyp doGenericServer_packets. subst. simpl in *.
eauto using logs_sorted_nw_packets_unchanged.
- find_apply_lem_hyp doGenericServer_packets. subst. simpl in *.
eauto using packets_gt_prevIndex_packets_unchanged.
- find_apply_lem_hyp doGenericServer_packets. subst. simpl in *.
eauto using packets_ge_prevTerm_packets_unchanged.
Qed.

Theorem logs_sorted_state_same_packet_subset :
raft_net_invariant_state_same_packet_subset logs_sorted.