Section ListMaps.
Context {A B : Type} {A_eq : EqDec A} {d : Inhabitant B}.
Definition map_Znth i (L : A -> option (list B)) k := option_map (fun v => Znth i v) (L k).

Lemma map_Znth_upd : forall (m : A -> option (list B)) k v i,
map_Znth i (map_upd m k v) = map_upd (map_Znth i m) k (Znth i v).