Proof using.
unfold refined_raft_net_invariant_do_generic_server, leaderLogs_sublog.
simpl. intuition.
repeat find_higher_order_rewrite.
find_copy_apply_lem_hyp doGenericServer_type.
intuition.
repeat match goal with
| [ H : _ |- _ ] =>
rewrite update_fun_comm with (f := fst) in H
| [ H : _ |- _ ] =>
rewrite update_fun_comm with (f := snd) in H
| [ H : _ |- _ ] =>
rewrite update_fun_comm with (f := leaderLogs) in H
end.
rewrite update_fun_comm with (f := snd).
simpl in *.
rewrite update_fun_comm.
rewrite update_nop_ext' by (find_apply_lem_hyp doGenericServer_log; repeat find_rewrite; auto).
find_rewrite_lem update_fun_comm.
match goal with
| H : _ |- _ => rewrite update_nop_ext' in H by (repeat find_rewrite; auto)
end.
match goal with
| H : context [ type ] |- _ =>
rewrite update_fun_comm in H;
rewrite update_nop_ext' in H by (repeat find_rewrite; auto)
end.
match goal with
| H : _ |- _ => rewrite update_nop_ext' in H by (repeat find_rewrite; auto)
end.
eauto.
Qed.

Theorem leaderLogs_sublog_state_same_packet_subset :
refined_raft_net_invariant_state_same_packet_subset leaderLogs_sublog.