Proof using.
unfold in_input_trace.
intuition; break_exists_exists; intuition.
Qed.
Section inner.
Variable client : clientId.
Variable id : nat.
Variable i : input.

(* Specifications: *)
Lemma applied_implies_input_update_split :
forall client id i net h d ps,
applied_implies_input_state client id i (mkNetwork ps (update name_eq_dec (nwState net) h d)) ->
exists e,
correct_entry client id i e /\
(In e (log d) \/
(exists h, In e (log (nwState net h))) \/
(exists p es, In p ps /\ mEntries (pBody p) = Some es /\ In e es)).