Ltac start :=
    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 *;
  match goal with
    | [ H : context [ type ] |- _ ] =>
      rewrite update_fun_comm in H;
        rewrite update_nop_ext' in H by auto
  end;
  match goal with
    | [ H : context [ currentTerm ] |- _ ] =>
      rewrite update_fun_comm in H;
        rewrite update_nop_ext' in H by auto
  end.

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