Proof using lmi smsi misi si.
intros. apply raft_net_invariant'; auto.
- apply client_cache_correct_init.
- apply client_cache_correct_client_request.
- apply client_cache_correct_timeout.
- apply client_cache_correct_append_entries.
- apply client_cache_correct_append_entries_reply.
- apply client_cache_correct_request_vote.
- apply client_cache_correct_request_vote_reply.
- apply client_cache_correct_do_leader.
- apply client_cache_correct_do_generic_server.
- apply client_cache_correct_state_same_packet_subset.
- apply client_cache_correct_reboot.
Qed.

Theorem state_machine_correct_invariant :
forall net,
raft_intermediate_reachable net ->
state_machine_correct net.