Ltac prove_in :=
    match goal with
      | [ _ : nwPackets ?net = _,
              _ : In (?p : packet) _ |- _] =>
        assert (In p (nwPackets net)) by (repeat find_rewrite; do_in_app; intuition)
      | [ _ : nwPackets ?net = _,
              _ : pBody ?p = _ |- _] =>
        assert (In p (nwPackets net)) by (repeat find_rewrite; intuition)
    end.

Lemma doLeader_in_entries : forall (h : name) d h os d' ms m t li pli plt es ci e, doLeader d h = (os, d', ms) -> snd m = AppendEntries t li pli plt es ci -> In m ms -> In e es -> In e (log d).