Proof using miaei.
unfold advanceCommitIndex.
intros. simpl in *.
match goal with
| [ H : context [fold_left Nat.max ?l ?x] |- _ ] =>
pose proof fold_left_maximum_cases l x
end. intuition.
break_exists. break_and.
find_apply_lem_hyp in_map_iff.
break_exists_name witness. break_and.
find_apply_lem_hyp filter_In.  break_and.
find_apply_lem_hyp findGtIndex_necessary. do_bool. break_and. do_bool. break_and.
do_bool.
unfold committed.
exists h, witness. intuition.
eapply haveQuorum_directly_committed; eauto.
Qed.

(* Specifications: *)
Lemma lifted_advanceCommitIndex_lifted_committed :
forall h net,
msg_refined_raft_intermediate_reachable net ->
type (snd (nwState net h)) = Leader ->
(forall e, In e (log (snd (nwState net h))) ->
eIndex e <= commitIndex (snd (nwState net h)) ->
lifted_committed net e (currentTerm (snd (nwState net h)))) ->
(forall e, In e (log (snd (nwState net h))) ->
eIndex e <= commitIndex (advanceCommitIndex (snd (nwState net h)) h) ->
lifted_committed net e (currentTerm (snd (nwState net h)))).