Proof using.
intros. unfold in_applied_entries, entries_ordered in *.
induction (applied_entries (nwState net)); simpl in *; break_exists; intuition.
- subst. left. unfold has_key. break_match.
simpl. break_if; repeat (do_bool; intuition).
- right. intuition.
+ apply Bool.not_true_iff_false. intuition.
find_false.
unfold has_key in *. break_match; simpl in *; break_if; repeat (do_bool; intuition); try congruence.
subst. eexists; intuition; eauto.
+ eapply IHl.
* eexists; intuition; eauto.
* intuition. find_false. break_exists_exists. intuition.
Qed.

(* Specifications: *)
Lemma in_applied_entries_applied_implies_input_state :
forall net,
in_applied_entries client' id' net ->
exists e,
eClient e = client' /\
eId e = id' /\
applied_implies_input_state client' id' (eInput e) net.