Proof using.
unfold refined_raft_net_invariant_timeout. intros.
unfold cronies_correct, update_elections_data_timeout in *; intuition.
- unfold votes_received_cronies, handleTimeout, tryToBecomeLeader in *.
intros. simpl in *.
repeat break_match; repeat find_inversion; subst; simpl in *; eauto;
repeat find_higher_order_rewrite; repeat (break_if; simpl in *); auto; congruence.
- unfold cronies_votes, handleTimeout, tryToBecomeLeader in *. intros.
simpl in *.
repeat break_match; repeat find_inversion; subst; simpl in *; eauto;
repeat find_higher_order_rewrite; repeat (break_if; simpl in *); auto;
repeat find_inversion; subst; intuition;
congruence.
- unfold votes_nw in *. intros. simpl in *.
assert (In p (nwPackets net)) by eauto using handleTimeout_rvr.
repeat find_apply_hyp_hyp.
repeat find_higher_order_rewrite.
repeat break_match; subst; repeat find_rewrite; simpl in *; intuition.
- unfold votes_received_leaders in *. intros. simpl in *. repeat find_higher_order_rewrite.
unfold handleTimeout, tryToBecomeLeader in *. simpl in *.
repeat (break_match; subst; simpl in *; repeat find_inversion; try discriminate);
intuition eauto.
Qed.

(* Specifications: *)
Lemma cronies_correct_append_entries :
refined_raft_net_invariant_append_entries cronies_correct.