Section VotesVotesWithLogCorrespond.
Context {orig_base_params : BaseParams}.
Context {one_node_params : OneNodeParams orig_base_params}.
Context {raft_params : RaftParams orig_base_params}.
Context {rri : raft_refinement_interface}.
Proof using.
red. unfold votes_votesWithLog_correspond. split; intros; break_and.
- unfold votes_votesWithLog in *; intros.
repeat find_higher_order_rewrite; update_destruct; rewrite_update; [|eauto].
simpl in *. break_or_hyp; repeat break_exists; break_and.
+ repeat find_rewrite. eauto.
+ repeat find_rewrite. simpl in *. intuition; try tuple_inversion; eauto.
- unfold votesWithLog_votes in *; intros.
repeat find_higher_order_rewrite; update_destruct; rewrite_update; [|eauto].
simpl in *. break_or_hyp; repeat break_exists; break_and.
+ repeat find_rewrite. eauto.
+ repeat find_rewrite. simpl in *. intuition.
* eexists. tuple_inversion. intuition.
* find_apply_hyp_hyp. break_exists. eexists. eauto.
Qed.
Ltac start :=
red; intros; eapply votes_votesWithLog_correspond_cases; eauto.
Ltac finish :=
repeat break_match; subst_max; first [
left; solve[eauto] |
right; repeat eexists; solve[eauto]
].
Ltac unfold_all :=
red; unfold votes_votesWithLog_correspond, votes_votesWithLog, votesWithLog_votes.

Lemma votes_votesWithLog_correspond_invariant :
forall net,
refined_raft_intermediate_reachable net ->
votes_votesWithLog_correspond net.