Definition:Equality of Functions of Sets

Definition
Let $U$ be a universe.

Let $X_1, X_2, Y_1, Y_2 \in U$ be sets.

Let $f_1 \in Y_1^{\ X_1}$ and $f_2 \in Y_2^{\ X_2}$ be functions of sets.

The two functions are said to be equal iff:
 * $X_1 = X_2$

and
 * $\forall x \in X_1 \cup X_2$,
 * $f_1(x) = f_2(x)$.

If the two functions are equal one writes
 * $f_1 = f_2$.

In standard Boolean logic one writes
 * $f_1 \neq f_2$

if $f_1$ and $f_2$ are not equal.

Notice that in computer science, two functions may take the same input and generate the same results for all possible input. So, according to set theory, these functions would be equal. However, the two computer functions may employ different algorithms. One algorithm may be fast. The other algorithm may take until the cows come home. This would mean a big difference if the functions were part of a video, or a cruse missile. This is one of the many problems with standard set theory.