Proof using.
induction l; simpl; intuition.
- eauto.
- break_if; do_bool.
+ destruct (clientId_eq_dec (eClient e) (eClient a)).
* repeat find_rewrite. unfold assoc_default in *. find_rewrite.
specialize (IHl (assoc_set clientId_eq_dec ks (eClient a) (eId a)) (eId a)).
conclude_using ltac:(now rewrite get_set_same).
break_exists_exists. intuition.
* rewrite log_to_ks'_assoc_set_diff by auto.
auto.
+ auto.
Qed.

(* Specifications: *)
Lemma in_l_log_to_ks'_le :
forall e l ks,
In e l ->
exists id, assoc clientId_eq_dec (log_to_ks' l ks) (eClient e) = Some id /\ eId e <= id.