Proof using.
induction l; intros; simpl in *; auto.
break_if; simpl in *; eauto.
do_bool.
destruct (clientId_eq_dec (eClient a) c); simpl in *; subst; auto.
- eapply le_trans; eauto.
eauto using log_to_ks'_assoc_default_ks.
- match goal with
| [ |- context [ assoc_set ?e ?ks ?c' ?i ] ] =>
assert (assoc_default e ks c 0 = assoc_default e (assoc_set e ks c' i) c 0)
end; repeat find_rewrite; eauto.
rewrite assoc_default_assoc_set_diff; auto.
Qed.

Lemma log_to_ks'_assoc_default_eq :
forall l ks ks' c,
assoc_default clientId_eq_dec (log_to_ks' l ks) c 0 <= assoc_default clientId_eq_dec ks' c 0 ->
assoc_default clientId_eq_dec (log_to_ks' l ks') c 0 = assoc_default clientId_eq_dec ks' c 0.