Proof using.
intros.
unfold doLeader, advanceCommitIndex in *.
repeat break_match; simpl in *; find_inversion; auto.
Qed.

(* Specifications: *)
Lemma fold_left_max :
forall l y z,
(forall x, In x l ->
y <= x) ->
y <= z ->
y <= fold_left max l z.