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 doLeader_log. find_rewrite. auto.
- find_apply_hyp_hyp. intuition; eauto.
unfold doLeader in *. repeat break_match; tuple_inversion; subst; try contradiction.
repeat do_in_map. unfold replicaMessage in *. subst. simpl in *. find_inversion.
eapply terms_and_indices_from_one_In. apply findGtIndex_in. auto.
Qed.

Lemma terms_and_indices_from_one_log_ind_do_generic_server :
raft_net_invariant_do_generic_server terms_and_indices_from_one_log_ind.