Section InLogInAllEntries.
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 in_log_in_all_entries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
find_eapply_lem_hyp update_elections_data_appendEntries_log_allEntries; eauto.
intuition; repeat find_rewrite; eauto;
match goal with
| H : allEntries _ = _ |- _ => rewrite H in *
end; eauto.
- copy_eapply_prop_hyp In In.
break_exists_exists.
apply in_app_iff.
eauto.
- eexists.
apply in_app_iff.
left.
apply in_map_iff.
eexists; intuition; eauto.
- do_in_app. intuition.
+ eexists.
apply in_app_iff.
left.
apply in_map_iff.
eexists; intuition; eauto.
+ find_apply_lem_hyp removeAfterIndex_in.
copy_eapply_prop_hyp In In.
break_exists_exists.
apply in_app_iff.
eauto.
Qed.
Proof using.
red. unfold in_log_in_all_entries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
find_erewrite_lem handleAppendEntriesReply_log. eauto.
Qed.
Proof using.
red. unfold in_log_in_all_entries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
rewrite update_elections_data_requestVote_allEntries.
find_erewrite_lem handleRequestVote_log. eauto.
Qed.
Proof using.
red. unfold in_log_in_all_entries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
rewrite update_elections_data_requestVoteReply_allEntries.
find_erewrite_lem handleRequestVoteReply_log. eauto.
Qed.
Proof using.
red. unfold in_log_in_all_entries. intros. simpl in *.
subst. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
rewrite update_elections_data_timeout_allEntries.
find_erewrite_lem handleTimeout_log_same. eauto.
Qed.

Lemma in_log_in_all_entries_client_request :
refined_raft_net_invariant_client_request in_log_in_all_entries.