Restriction of Union of Mappings which Agree Equals Mapping

Theorem
Let $Y$ be a set.

Let $\family {A_i}_{i \mathop \in I}$ be a family of sets indexed by $I$.

Let $\family {f_i: A_i \to Y}$ be a family of mappings indexed by $I$.

Let $X = \ds \bigcup_{i \mathop \in I} A_i$.

Let $f = \ds \bigcup_{i \mathop \in I} f_i : X \to Y$ where $\ds \bigcup_{i \mathop \in I} f_i$ is the union of relations.

Let for all $i, j \in I$, $f_i$ and $f_j$ agree on $A_i \cap A_j$.

Let $f \restriction_{A_i} : A_i \to Y$ denote the restriction of $f$ to $A_i$.

Then:
 * $\forall i \in I: f \restriction_{A_i} = f_i: A_i \to Y$.

Proof
From Union of Family of Mappings which Agree is Mapping:
 * $f$ is a mapping from $X$ to $Y$.

Let $i \in I$.

Consider the restriction of $f$ to $A_i$:

Let $j$ be an arbitrary index of $I$.

Case 1 : $i \ne j$
Let $i \ne j$.

Let $\tuple {x, y} \in f_j \cap A_i \times Y$.

Then:
 * $x \in f_j \cap f_i$

We have:
 * $f_i$ and $f_j$ agree on $A_i \cap A_j$

By definition of agreement of mappings:
 * $y = \map {f_j} x = \map {f_i} x$

Hence:
 * $\tuple {x, y} \in f_i$

By definition of subset:
 * $f_j \cap A_i \times Y \subseteq f_i$

Case 2 : $j = i$
Let $j = i$.

By definition of mapping:
 * $f_i \subseteq A_i \times Y$

From Intersection with Subset is Subset:
 * $f_i = f_i \cap A_i \times Y$

In either case:
 * $\forall j \in I : f_j \cap A_i \times Y \subseteq f_i$