Proof using.
intros.
do 2 (apply functional_extensionality; intros).
destruct (A_eq_dec x x0);
destruct (A_eq_dec y x1).
- repeat rewrite update2_eq; auto.
- repeat rewrite update2_diff2; auto.
- repeat rewrite update2_diff1; auto.
- repeat rewrite update2_diff1; auto.
Qed.
End Update2.

(* Specifications: *)
Lemma update2_fun_comm :
forall A B C A_eq_dec (f : B -> C) (st : A -> A -> B) x y v x' y',
f (update2 A_eq_dec st x y v x' y') = update2 A_eq_dec (fun x y => f (st x y)) x y (f v) x' y'.