Proof using.
red. unfold terms_and_indices_from_one_log_ind. split; red; simpl in *; intuition.
- find_higher_order_rewrite. update_destruct; subst; rewrite_update; auto.
find_apply_lem_hyp handleAppendEntries_log. intuition.
+ find_rewrite. auto.
+ subst. unfold terms_and_indices_from_one_log_nw in *. eauto.
+ break_exists. intuition. subst. find_rewrite. apply terms_and_indices_from_one_app.
* eauto.
* eapply terms_and_indices_from_one_In; [eapply removeAfterIndex_in | eauto].
- unfold terms_and_indices_from_one_log_nw in *. find_apply_hyp_hyp. intuition; eauto.
find_apply_lem_hyp handleAppendEntries_not_append_entries.
exfalso. apply H. repeat eexists. subst. eauto.
Qed.

Lemma terms_and_indices_from_one_log_ind_append_entries_reply :
raft_net_invariant_append_entries_reply terms_and_indices_from_one_log_ind.