Section OF_LIST.
Variable A: Type.
Let f := fun (m: T.t A) (k_v: T.elt * A) => T.set (fst k_v) (snd k_v) m.
Definition of_list (l: list (T.elt * A)) : T.t A :=
List.fold_left f l (T.empty _).
Remark of_list_unchanged:
forall k l m, ~In k (map fst l) -> T.get k (List.fold_left f l m) = T.get k m.

Lemma of_list_unique:
forall k v l1 l2,
~In k (map fst l2) -> T.get k (of_list (l1 ++ (k, v) :: l2)) = Some v.