Definition type_term_log_monotonic st st' :=
    type st' = Leader ->
    type st = Leader /\
    currentTerm st' = currentTerm st /\
    (forall e, In e (log st) -> In e (log st')).Notation appendEntries_leader_predicate ps st :=
    (forall p t lid pli plt es lci e,
      In p ps ->
      pBody p = AppendEntries t lid pli plt es lci ->
      In e es ->
      currentTerm st = t ->
      type st = Leader ->
      In e (log st)).

Lemma handleRequestVoteReply_spec' : forall h st h' t r st', handleRequestVoteReply h st h' t r = st' -> type st' = Follower \/ st' = st \/ type st' = Candidate \/ (type st' = Leader /\ type st = Candidate /\ log st' = log st /\ r = true /\ t = currentTerm st /\ wonElection (dedup name_eq_dec (h' :: votesReceived st)) = true /\ currentTerm st' = currentTerm st).