Definition update {A B : Type} (A_eq_dec : forall x y : A, {x = y} + {x <> y}) st h (v : B) := 
  fun nm => if A_eq_dec nm h then v else st nm.

Lemma update_diff : forall (sigma : A -> B) x v y, x <> y -> update A_eq_dec sigma x v y = sigma y.