Fixpoint lookup {K V} `{DecEq K} (k : K)
(m : Map K V) : option V :=
match m with
| [] => None
| (k',v) :: m' =>
match dec_eq k k' with
| left _ => Some v
| right _ => lookup k m'
end
end.

Lemma lookup_insert {K V} `{DecEq K} (k : K) (v : V)
(m : Map K V) : well_formed m -> lookup k (insert k v m) = Some v.