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.

Theorem candidates_vote_for_selves_invariant : forall net, raft_intermediate_reachable net -> candidates_vote_for_selves net.