Proof using.
intros. unfold handleTimeout, tryToBecomeLeader in *.
break_match; find_inversion; subst; auto.
Qed.

Theorem logs_sorted_nw_only_new_packets_matter :
forall net ps' l st',
logs_sorted_nw net ->
(forall p, In p ps' -> In p (nwPackets net) \/ In p l) ->
logs_sorted_nw (mkNetwork l st') ->
logs_sorted_nw (mkNetwork ps' st').