Proof using lllmi taifoi vwlsi aevwli llvwli eewci llpi lltsi pwti.
unfold leader_completeness_committed, committed.
intros.
break_exists. break_and.
find_copy_apply_lem_hyp leader_completeness_directly_committed_invariant.
unfold leader_completeness_directly_committed in *.
match goal with
| [ H : _, H' : directly_committed _ _ |- _ ] => eapply H in H'
end; [ | |eauto]; [| omega].
assert (entries_match (Raft.log (snd (nwState net x))) log) by
(eapply leaderLogs_entries_match_invariant; eauto).
match goal with
| [ H : entries_match _ _ |- _ ] => eapply H
end; eauto.
Qed.

Theorem leader_completeness_invariant :
forall net,
refined_raft_intermediate_reachable net ->
leader_completeness net.