Proof using.
induction l; simpl; intuition.
break_if.
- specialize (IHl (max x (eId a))).
intuition.
+ destruct (le_lt_dec x (eId a)).
* rewrite max_r in * by auto.
right. eauto.
* rewrite max_l in * by omega. auto.
+ right.
break_exists. break_and.
rewrite max_id_for_client_default_on_max in *.
exists x0. intuition.
- specialize (IHl x). intuition. right. break_exists_exists. intuition.
Qed.

(* Specifications: *)
Lemma max_id_for_client_default_is_max :
forall l x c e,
In e l ->
eClient e = c ->
eId e <= max_id_for_client_default x c l.