Ltac rewrite_state :=
    match goal with
      | [st : name -> raft_data,
              H : forall _, ?st _ = _  |- _] =>
        rewrite H in *
    end.Ltac t :=
    repeat break_match;
    simpl in *; try find_inversion; rewrite_state;
    try use_applyEntries_spec;
    repeat break_if; subst; eauto; simpl in *; try discriminate.

(* Specifications: *)
Theorem candidates_vote_for_selves_do_leader : raft_net_invariant_do_leader (candidates_vote_for_selves).
Lemma candidates_vote_for_selves_client_request : raft_net_invariant_client_request (candidates_vote_for_selves).
Lemma candidates_vote_for_selves_timeout : raft_net_invariant_timeout candidates_vote_for_selves.
Lemma candidates_vote_for_selves_append_entries : raft_net_invariant_append_entries candidates_vote_for_selves.
Lemma candidates_vote_for_selves_append_entries_reply : raft_net_invariant_append_entries_reply candidates_vote_for_selves.
Lemma candidates_vote_for_selves_request_vote : raft_net_invariant_request_vote candidates_vote_for_selves.
Lemma candidates_vote_for_selves_request_vote_reply : raft_net_invariant_request_vote_reply candidates_vote_for_selves.
Lemma candidates_vote_for_selves_do_generic_server : raft_net_invariant_do_generic_server candidates_vote_for_selves.
Lemma candidates_vote_for_selves_state_same_packet_subset : raft_net_invariant_state_same_packet_subset candidates_vote_for_selves.
Lemma candidates_vote_for_selves_reboot : raft_net_invariant_reboot candidates_vote_for_selves.
Theorem candidates_vote_for_selves_init : raft_net_invariant_init candidates_vote_for_selves.
Theorem candidates_vote_for_selves_invariant : forall net, raft_intermediate_reachable net -> candidates_vote_for_selves net.