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

(* Specifications: *)
Lemma handleAppendEntriesReply_rvr :
forall h s src ps ps' p d l tae es res t v,
handleAppendEntriesReply h s src tae es res = (d, l) ->
(forall p' : packet,
In p' ps ->
In p' ps' \/
In p' (send_packets h l)) ->
pBody p = RequestVoteReply t v ->
In p ps ->
In p ps'.