Proof using miaei.
unfold haveQuorum, directly_committed.
intros. do_bool.
eexists. intuition eauto.
- apply filter_NoDup. pose proof no_dup_nodes. simpl in *. auto.
- find_apply_lem_hyp filter_In. break_and. do_bool.
eapply match_index_all_entries_invariant; eauto.
Qed.

Lemma advanceCommitIndex_committed :
forall h net,
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)) ->
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) ->
committed net e (currentTerm (snd (nwState net h)))).