Proof using.
red. unfold prefix_within_term_inductive. intros. subst.
find_copy_apply_lem_hyp handleRequestVote_log.
intuition.
- unfold allEntries_leaderLogs_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto;
try find_rewrite_lem update_elections_data_requestVote_leaderLogs;
try rewrite update_elections_data_requestVote_allEntries;
eauto.
- unfold log_leaderLogs_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite;
try find_rewrite_lem update_elections_data_requestVote_leaderLogs;
eauto.
- unfold allEntries_log_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite;
try rewrite update_elections_data_requestVote_allEntries;
eauto.
- unfold allEntries_append_entries_prefix_within_term_nw.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
[|subst; simpl in *;
find_eapply_lem_hyp handleRequestVote_no_append_entries; subst;
intuition; find_false; repeat eexists; eauto].
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *;
try find_rewrite_lem update_elections_data_requestVote_allEntries;
eauto.
- unfold append_entries_leaderLogs_prefix_within_term in *.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
[|subst; simpl in *;
find_eapply_lem_hyp handleRequestVote_no_append_entries; subst;
intuition; find_false; repeat eexists; eauto].
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *;
try find_rewrite_lem update_elections_data_requestVote_leaderLogs;
eauto.
- unfold append_entries_log_prefix_within_term in *.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
[|subst; simpl in *;
find_eapply_lem_hyp handleRequestVote_no_append_entries; subst;
intuition; find_false; repeat eexists; eauto].
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *;
repeat find_rewrite;
eauto.
Qed.

(* Specifications: *)
Lemma prefix_within_term_inductive_do_generic_server :
refined_raft_net_invariant_do_generic_server prefix_within_term_inductive.