Proof using.
red. unfold prefix_within_term_inductive. intros. subst.
find_copy_apply_lem_hyp handleAppendEntriesReply_log.
find_apply_lem_hyp handleAppendEntriesReply_packets. subst. simpl in *.
intuition.
- unfold allEntries_leaderLogs_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
- unfold log_leaderLogs_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite; eauto.
- unfold allEntries_log_prefix_within_term in *.
intros. simpl in *.
repeat find_higher_order_rewrite.
destruct_update; simpl in *; repeat find_rewrite; eauto.
- unfold allEntries_append_entries_prefix_within_term_nw in *.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *; eauto.
- unfold append_entries_leaderLogs_prefix_within_term in *.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *; eauto.
- unfold append_entries_log_prefix_within_term in *.
intros. simpl in *.
find_apply_hyp_hyp.
intuition;
match goal with
| H : forall _, _ _ = update _ _ _ _ _ |- _ =>
rewrite H in *
end;
destruct_update; simpl in *; repeat find_rewrite; eauto.
Qed.

Lemma update_elections_data_timeout_allEntries :
forall h st,
allEntries (update_elections_data_timeout h st) = allEntries (fst st).