let mk_update = let update = mk_app (Arrays(Update)) in fun is_equal a j y -> match a with | App(Arrays(Update), [b; i; x]) when Term.eq i j -> update [b; i; y] | _ -> update [a; j; y]