Proof using.
intros.
unfold handleTimeout, tryToBecomeLeader in *; repeat break_match;
repeat find_inversion; subst; simpl in *; find_apply_hyp_hyp;
in_crush; congruence.
Qed.

Lemma handleAppendEntries_rvr :
forall h h' s ps ps' p d r tae li pli plt es lc t v,
handleAppendEntries h s tae li pli plt es lc = (d, r) ->
(forall p' : packet,
In p' ps ->
In p' ps' \/
p' = {| pSrc := h; pDst := h'; pBody := r |}) ->
pBody p = RequestVoteReply t v ->
In p ps ->
In p ps'.