Section update.
Variables A B : Type.
Hypothesis A_eq_dec : forall x y : A, {x = y} + {x <> y}.
Proof using.
unfold update.
intros.
break_if; congruence.
Qed.
Proof using.
unfold update.
intros. break_if; congruence.
Qed.
Proof using.
intros. subst.
unfold update.
break_if; congruence.
Qed.
Proof using.
intros.
rewrite update_eq; auto.
Qed.
Proof using.
intros.
apply functional_extensionality.
intros.
apply update_nop.
Qed.
Proof using.
intros.
subst.
apply update_nop_ext.
Qed.

Lemma update_overwrite :
forall (sigma : A -> B) h st st',
update A_eq_dec (update A_eq_dec sigma h st) h st' = update A_eq_dec sigma h st'.