Proof using.
induction l; intros; simpl.
- auto.
- erewrite assoc_default_a_equiv by eauto.
break_if; auto using assoc_set_a_equiv.
Qed.
Fixpoint max_id_for_client_default (default : nat) (c : clientId) (l : list entry) : nat :=
match l with
| [] => default
| e :: l' => if clientId_eq_dec c (eClient e)
then max_id_for_client_default (max default (eId e)) c l'
else max_id_for_client_default default c l'
end.

Lemma log_to_ks'_max_id_for_client :
forall l c ks,
assoc_default clientId_eq_dec (log_to_ks' l ks) c 0 =
max_id_for_client_default (assoc_default clientId_eq_dec ks c 0) c l.