Definition allEntries_log_matching_nw net :=
    forall (e e' : entry) (h : name) (p : packet)
      t leaderId prevLogIndex prevLogTerm entries leaderCommit,
      In p (nwPackets net) ->
      pBody p = AppendEntries t leaderId prevLogIndex prevLogTerm entries leaderCommit ->
      In e entries ->
      In e' (map snd (allEntries (fst (nwState net h)))) ->
      eTerm e = eTerm e' -> eIndex e = eIndex e' -> e = e'.Definition allEntries_log_matching_inductive net :=
    allEntries_log_matching net /\ allEntries_log_matching_nw net.Ltac start :=
    red; unfold allEntries_log_matching_inductive; simpl; intros.Ltac start_update :=
    start; intuition; [unfold allEntries_log_matching in *|unfold allEntries_log_matching_nw in *];
    intros; repeat find_higher_order_rewrite; repeat (update_destruct; rewrite_update); subst; simpl; eauto.

Lemma allEntries_log_matching_init : refined_raft_net_invariant_init allEntries_log_matching_inductive.