Proof using.
intros.
unfold handleInput in *. break_match; repeat break_let; repeat find_inversion.
- left.
find_apply_lem_hyp handleTimeout_log_same.
update_destruct; subst; rewrite_update; repeat find_rewrite;
unfold applied_implies_input_state, correct_entry; eexists; intuition; eauto.
- find_apply_lem_hyp handleClientRequest_log. intuition.
+ left.
update_destruct; subst; rewrite_update; repeat find_rewrite;
unfold applied_implies_input_state, correct_entry; eexists; intuition; eauto.
+ break_exists. intuition.
update_destruct; subst; rewrite_update; repeat find_rewrite;
try solve [left; unfold applied_implies_input_state, correct_entry; eexists; intuition; eauto].
simpl in *. intuition; subst; intuition.
left; unfold applied_implies_input_state, correct_entry; eexists; intuition; eauto.
Qed.

(* Specifications: *)
Lemma in_applied_entries_step_applied_implies_input_state' :
forall (failed : list name) net failed' net' o,
raft_intermediate_reachable net ->
step_failure (failed, net) (failed', net') o ->
~ in_applied_entries client id net ->
in_applied_entries client id net' ->
(exists e,
eClient e = client /\
eId e = id /\
applied_implies_input_state client id (eInput e) net) \/
exists h o' inp,
o = (h, inl (ClientRequest client id inp)) :: o'.