Proof using rvtsi.
red. unfold requestVoteReply_term_sanity. intros. simpl in *.
find_copy_apply_lem_hyp handleRequestVote_votesReceived.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
- repeat find_rewrite.
find_apply_hyp_hyp. intuition.
+ assert (In p0 (nwPackets net)) by (repeat find_rewrite; in_crush).
find_copy_apply_lem_hyp handleRequestVote_currentTerm_leaderId.
intuition; repeat find_rewrite; eauto;
eapply_prop_hyp pBody pBody; eauto; omega.
+ remember (pDst p0). subst p0. simpl in *.
subst.
find_copy_apply_lem_hyp handleRequestVote_reply_true'.
intuition.
- find_apply_hyp_hyp. intuition.
+ assert (In p0 (nwPackets net)) by (repeat find_rewrite; in_crush).
find_copy_apply_lem_hyp handleRequestVote_currentTerm_leaderId.
intuition; repeat find_rewrite; eauto;
eapply_prop_hyp pBody pBody; eauto; omega.
+ remember (pDst p0). subst p0. simpl in *.
subst.
find_copy_apply_lem_hyp handleRequestVote_reply_true'.
intuition. subst.
eapply requestVote_term_sanity_invariant; eauto.
Qed.

(* Specifications: *)
Lemma requestVoteReply_term_sanity_request_vote_reply :
refined_raft_net_invariant_request_vote_reply requestVoteReply_term_sanity.