Section inner.
Variable client : clientId.
Variable id : nat.
Fixpoint client_id_in l :=
match l with
| [] => false
| e :: l' =>
if (andb (if clientId_eq_dec (eClient e) client then true else false)
(eId e =? id)) then
true
else
client_id_in l'
end.
Proof using.
intros. unfold in_applied_entries.
induction (applied_entries (nwState net)); simpl in *; try congruence.
break_if; break_if; do_bool; intuition; try congruence; do_bool; eauto;
break_exists_exists; intuition.
Qed.

Lemma client_id_in_false_not_in_applied_entries :
forall net,
client_id_in (applied_entries (nwState net)) = false ->
~ in_applied_entries client id net.