Proof using.
unfold raft_net_invariant_reboot, logs_sorted, reboot.
intuition; simpl in *.
- unfold logs_sorted_host in *.
intros. repeat find_higher_order_rewrite.
simpl in *.
break_match; subst; eauto.
- subst. eapply logs_sorted_nw_packets_unchanged
with (st' := nwState net') (ps' := nwPackets net') ; eauto.
find_rewrite. intuition.
- subst. eapply packets_gt_prevIndex_packets_unchanged
with (st' := nwState net') (ps' := nwPackets net') ; eauto.
find_rewrite. intuition.
- subst. eapply packets_ge_prevTerm_packets_unchanged
with (st' := nwState net') (ps' := nwPackets net') ; eauto.
find_rewrite. intuition.
Qed.

Theorem logs_sorted_invariant :
forall net,
raft_intermediate_reachable net ->
logs_sorted net.