Proof using.
unfold refined_raft_net_invariant_append_entries. intros.
unfold cronies_correct in *; intuition.
- unfold votes_received_cronies, handleAppendEntries in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
unfold update_elections_data_appendEntries.
repeat break_match; repeat find_inversion; subst; simpl in *; eauto;
repeat find_higher_order_rewrite; repeat (break_if; simpl in *); intuition; try congruence.
- unfold cronies_votes in *. intros.
simpl in *. repeat find_higher_order_rewrite.
unfold update_elections_data_appendEntries in *.
repeat break_match; repeat find_inversion; subst; simpl in *; eauto.
- unfold votes_nw in *. intros. simpl in *.
assert (In p0 (xs ++ ys)) by eauto using handleAppendEntries_rvr.
assert (In p0 (nwPackets net)) by (repeat find_rewrite; in_crush).
repeat find_apply_hyp_hyp.
repeat find_higher_order_rewrite.
unfold update_elections_data_appendEntries in *.
repeat break_match; subst; repeat find_rewrite; simpl in *; intuition.
- unfold votes_received_leaders in *. intros. simpl in *.
repeat find_higher_order_rewrite. repeat break_if; eauto.
subst. simpl in *. unfold handleAppendEntries in *.
repeat break_match; find_inversion; subst; simpl in *;
try discriminate; eauto.
Qed.

Lemma cronies_correct_append_entries_reply :
refined_raft_net_invariant_append_entries_reply cronies_correct.