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.
Section update.
Variables A B : Type.
Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}.

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