Proof using ollpti rlmli llli.
red. unfold prefix_within_term_inductive. intros.
find_eapply_lem_hyp handleRequestVoteReply_log.
intuition.
- unfold allEntries_leaderLogs_prefix_within_term, allEntries_log_prefix_within_term in *.
intros. simpl in *. repeat find_higher_order_rewrite.
destruct_update; simpl in *; try rewrite update_elections_data_requestVoteReply_allEntries; eauto;
find_apply_lem_hyp update_elections_data_requestVoteReply_leaderLogs';
intuition; subst; eauto.
- unfold log_leaderLogs_prefix_within_term in *.
intros. simpl in *. repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite; eauto;
find_apply_lem_hyp update_elections_data_requestVoteReply_leaderLogs';
intuition; subst; eauto;
eapply log_log_prefix_within_term_invariant; eauto.
- unfold allEntries_log_prefix_within_term in *.
intros. simpl in *. repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite; eauto;
rewrite update_elections_data_requestVoteReply_allEntries; eauto.
- unfold allEntries_append_entries_prefix_within_term_nw in *.
intros. simpl in *.
find_apply_hyp_hyp.
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end.
destruct_update; simpl in *; eauto;
try find_rewrite_lem update_elections_data_requestVoteReply_allEntries; eauto.
- unfold append_entries_leaderLogs_prefix_within_term, append_entries_log_prefix_within_term
in *.
intros. simpl in *. find_apply_hyp_hyp.
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end.
destruct_update; simpl in *; eauto;
find_apply_lem_hyp update_elections_data_requestVoteReply_leaderLogs'; intuition; subst; eauto.
- unfold append_entries_log_prefix_within_term in *.
intros. simpl in *. find_apply_hyp_hyp.
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end.
destruct_update; simpl in *; eauto;
repeat find_rewrite; eauto.
Qed.

Lemma prefix_within_term_inductive_append_entries_reply :
refined_raft_net_invariant_append_entries_reply prefix_within_term_inductive.