Proof using.
induction l; simpl in *; intros; intuition eauto.
- apply H0. intuition.
- apply H0. intuition.
Qed.

Lemma handleMessage_applied_entries :
forall net h h' m st' ms,
raft_intermediate_reachable net ->
In {| pBody := m; pDst := h; pSrc := h' |} (nwPackets net) ->
handleMessage h' h m (nwState net h) = (st', ms) ->
applied_entries (nwState net) = applied_entries (update name_eq_dec (nwState net) h st').