Definition build_map (l:list (A * B)) : map :=
fold_right
(fun (ab:A * B) m =>
insert_fpm EqDec_A
(fst ab)
(mk_lifted fullshare top_share_nonunit,snd ab) m)
empty_map l.

Lemma build_map_results : forall (l:list (A*B)) a b,
NoDup (List.map (@fst _ _) l) ->
(In (a,b) l <->
(map_val a (build_map l) = Some b /\
map_share a (build_map l) = Share.top)).