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

(* Specifications: *)
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').
Theorem handleClientRequest_no_messages :
forall h st client id c out st' ps p,
handleClientRequest h st client id c = (out, st', ps) ->
In p ps -> False.
Lemma handleInput_applied_entries :
forall net h inp os st' ms,
raft_intermediate_reachable net ->
handleInput h inp (nwState net h) = (os, st', ms) ->
applied_entries (nwState net) = applied_entries (update name_eq_dec (nwState net) h st').
Theorem handleClientRequest_clientCache:
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
clientCache st' = clientCache st.
Theorem handleClientRequest_stateMachine:
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
stateMachine st' = stateMachine st.
Theorem handleClientRequest_lastApplied:
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
lastApplied st' = lastApplied st.