Proof using.
unfold doLeader.
intros.
repeat break_match; repeat find_inversion; simpl; auto;
apply fold_left_maximum_ind; auto.
- intros. do_in_map. find_apply_lem_hyp filter_In.
subst. break_and.
apply maxIndex_is_max; eauto using findGtIndex_in.
- intros. do_in_map. find_apply_lem_hyp filter_In.
break_and. subst.
apply maxIndex_is_max; eauto using findGtIndex_in.
Qed.

(* Specifications: *)
Lemma lifted_maxIndex_sanity_do_leader :
msg_refined_raft_net_invariant_do_leader lifted_maxIndex_sanity.