Proof using.
unfold packets_ge_prevTerm in *. intros.
simpl in *. find_apply_hyp_hyp. intuition eauto.
Qed.

Lemma handleClientRequest_logs_sorted :
forall h client id c out st l net,
handleClientRequest h (nwState net h) client id c = (out, st, l) ->
raft_intermediate_reachable net ->
logs_sorted_host net ->
sorted (log st).