Proof using.
induction l; intros; simpl in *; auto.
repeat break_if; do_bool; simpl in *; eauto.
- destruct (clientId_eq_dec (eClient a) c); simpl in *; auto.
+ subst.
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.
eapply le_antisym; eauto.
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.
- destruct (clientId_eq_dec (eClient a) c); simpl in *; auto.
+ subst.
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.
eapply le_antisym; eauto.
eapply le_trans; [|eauto];
eauto using log_to_ks'_assoc_default_ks.
eapply le_trans; [|eauto using log_to_ks'_assoc_default_assoc_default_le].
omega.
+ 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_set_diff :
forall l ks k v k',
k <> k' ->
assoc clientId_eq_dec
(log_to_ks' l (assoc_set clientId_eq_dec ks k v)) k' =
assoc clientId_eq_dec
(log_to_ks' l ks) k'.