Proof using.
intros. unfold advanceCommitIndex. simpl in *.
apply fold_left_max; auto.
intros.
do_in_map. subst.
find_apply_lem_hyp filter_In.
repeat (intuition; do_bool).
Qed.

(* Specifications: *)
Lemma doLeader_same_commitIndex :
forall st (os : list raft_output) (d' : raft_data)
(ms : list (name * msg)) (h0 : name),
doLeader st h0 = (os, d', ms) ->
commitIndex st <= commitIndex d'.