Ltac find_eapply_hyp_goal :=
    match goal with
      | H : _ |- _ =>
        eapply H
    end.

Lemma handleAppendEntries_logs_sorted : forall net p t n pli plt es ci st' m, raft_intermediate_reachable net -> logs_sorted net -> handleAppendEntries (pDst p) (nwState net (pDst p)) t n pli plt es ci = (st', m) -> pBody p = AppendEntries t n pli plt es ci -> In p (nwPackets net) -> sorted (log st').