0

Assume:

  • functions $f:X\rightarrow Y$ and $g:X\rightarrow Y$
  • predicates (boolean-valued functions) $P:X \rightarrow \{\mathrm{true}, \mathrm{false}\}$ and $Q:X \rightarrow \{\mathrm{true}, \mathrm{false}\}$
  • subsets $A,A_1,A_2 \subseteq X$.

Are the following statements true? And what is a simple proof in each case (or a reference that would discuss them)?

  1. One function, two subsets:
  • $\{f(x):x\in A_1\} \cup \{f(x):x\in A_2\} = \{f(x):x\in A_1 \cup A_2\}$ ?
  • $\{f(x):x\in A_1\} \cap \{f(x):x\in A_2\} = \{f(x):x\in A_1 \cap A_2\}$ ?
  • $\{f(x):x\in A_1\} \setminus \{f(x):x\in A_2\} = \{f(x):x\in A_1 \setminus A_2\}$ ?
  • $\{f(x):x\in A_1\} \triangle \{f(x):x\in A_2\} = \{f(x):x\in A_1 \triangle A_2\}$ ?
  1. Two functions, one subset:
  • $\{f(x):x\in A\} \cup \{g(x):x\in A\} =$ (any nontrivial form) ?
  • $\{f(x):x\in A\} \cap \{g(x):x\in A\} =$ (any nontrivial form) ?
  • $\{f(x):x\in A\} \setminus \{g(x):x\in A\} =$ (any nontrivial form) ?
  • $\{f(x):x\in A\} \triangle \{g(x):x\in A\} =$ (any nontrivial form) ?
  1. One predicate, two subsets:
  • $\{x\in A_1 : P(x)\} \cup \{x\in A_2:P(x)\} = \{x\in A_1 \cup A_2:P(x)\}$ ?
  • $\{x\in A_1:P(x)\} \cap \{x\in A_2:P(x)\} = \{x\in A_1 \cap A_2:P(x)\}$ ?
  • $\{x\in A_1:P(x)\} \setminus \{x\in A_2:P(x)\} = \{x\in A_1 \setminus A_2:P(x)\}$ ?
  • $\{x\in A_1:P(x)\} \triangle \{x\in A_2:P(x)\} = \{x\in A_1 \triangle A_2:P(x)\}$ ?
  1. Two predicates, one subset:
  • $\{x\in A:P(x)\} \cup \{x\in A:Q(x)\} = \{x\in A:P(x) \lor Q(x)\}$ ?
  • $\{x\in A:P(x)\} \cap \{x\in A:Q(x)\} = \{x\in A:P(x) \land Q(x)\}$ ?
  • $\{x\in A:P(x)\} \setminus \{x\in A:Q(x)\} = \{x\in A:P(x) \nrightarrow Q(x)\}$ ?
  • $\{x\in A:P(x)\} \triangle \{x\in A:Q(x)\} = \{x\in A:P(x) \oplus Q(x)\}$ ?

Background

Originally, I was trying to decide whether, for function $f:X\rightarrow Y$ and subsets $A_1,A_2 \subseteq X$, the following is true:

$$\{f(x):x\in A_1\} \cup \{f(x):x\in A_2\} = \{f(x):x\in A_2 \cup A_2\}\,?$$

Then I started wondering about various related questions, including:

  • extending this to other set operations ($\cup, \cap,\setminus,\triangle$)
  • using just one subset $A \subseteq X$ but different functions $f:X \rightarrow Y$ and $g:X \rightarrow Y$
  • using set-builder forms based on predicates, like $\{x \in A:P(x)\}$, instead of replacement, like $\{f(x):x \in A\}$ (a.k.a. "filters" and "maps" in functional programming).

For the sake of completeness, I have listed all combinations of these variations in the question above. Some of them intuitively seem true, but I'm having trouble convincing myself, and I'm having trouble searching for proofs/discussions of these particular situations, both on this site and in textbooks.

  • The correct notation for "xor" would be $\nleftrightarrow$, i.e. "exactly one is true". – Asaf Karagila Mar 28 '21 at 10:58
  • @AsafKaragila I've not seen evidence that either notation is universally preferred. Many references (e.g. proofwiki) prefer $\oplus$. Can you confirm whether $\nleftrightarrow$ is more common (or more "correct")? In any case, I do like $\nleftrightarrow$ better and will probably start using it in the future. – Tyler Streeter Mar 28 '21 at 17:55

2 Answers2

1

As to the original question, the answer is yes: $f(A\cup B) = f(A)\cup f(B)$.

Let us prove the inclusion $(\subseteq)$ first.

If $y\in f(A\cup B)$, then $y = f(x)$ and $x\in A\cup B$. If $x\in A$, then $y\in f(A)\subseteq f(A)\cup f(B)$.

If $x\in B$, then $y\in f(B)\subseteq f(A)\cup f(B)$.

In both cases, $y\in f(A)\cup f(B)$, and we are done.

Let us prove the inclusion $(\supseteq)$ now.

If $y\in f(A)\cup f(B)$, then $y\in f(A)$ or $y\in f(B)$.

If $y\in f(A)$, then $y = f(x)$ and $x\in A\subseteq A\cup B$. Then $y\in f(A\cup B)$.

If $y\in f(B)$, then $y = f(x)$ and $x\in B\subseteq A\cup B$. Then $y\in f(A\cup B)$.

In both cases, $y\in f(A\cup B)$, and we are done.

Comment

As to the other questions, it is advisable to ask one question at a time.

Hopefully this helps.

user0102
  • 21,572
  • Thanks for your answer, although I'm having trouble following it due to your reuse of $f$ both to represent sets and again for functions. E.g. you have "if $y \in f(A)$, then $y=f(x)$." If you wouldn't mind using a different symbol, I think it would be much clearer. E.g. use $f(x)$ as I have used it above (as the function within the set-builder forms), but something else for the sets. – Tyler Streeter Apr 27 '20 at 19:13
  • Regarding the multitude of questions I posted: I had considered splitting it into several separate questions, but I think these are so closely related that it would be a disservice (both to answerers and to readers) to separate them. E.g. answers to one part would probably extend to cover others with minimal extra work, so it seems less messy just to keep them together... – Tyler Streeter Apr 27 '20 at 19:17
  • 1
    @TylerStreeter the symbol $f(X)$ is just a shortcut for ${f(x) \mid x\in X}$. As to the other questions, I shall consider them and I will let you know if I can help you. – user0102 Apr 27 '20 at 19:21
  • Ok, in that case I really like that shortcut notation. Is that common? – Tyler Streeter Apr 27 '20 at 19:27
  • Yes, it is standard. – user0102 Apr 27 '20 at 19:28
  • Thanks again for your answer here. I'll try to extend this proof technique to some of the other cases I mentioned. Also, I skimmed several introductory set theory textbooks looking for the $f(X)={f(x):x\in X}$ notation, but I could not find an instance of it. Maybe I just missed it. Do you happen to know of any particular textbooks that use it? – Tyler Streeter Apr 28 '20 at 14:58
  • 1
    This may help you: https://en.wikipedia.org/wiki/Image_(mathematics) – user0102 Apr 28 '20 at 15:01
  • Perfect. Thank you. – Tyler Streeter Apr 28 '20 at 15:28
  • You are welcome. Accept my answer if you think I deserve it. – user0102 Apr 28 '20 at 15:39
  • I'm working on answering it in its entirety at the moment. If it turns out that I can't add anything significant beyond what you wrote, I certainly will accept yours. – Tyler Streeter Apr 28 '20 at 16:17
0

Short Answer

  1. No, not equal in general, but equal if $f$ is injective.
  2. Nothing useful.
  3. Yes.
  4. Yes.

(Thanks to user1337 for the suggestion to express things in terms of images.)

Definitions

For any function $f:X \rightarrow Y$ and subset $A \subseteq X$, the image of $A$ under $f$ is:

$$f(A) = \{f(x):x \in A\}.$$

For subset $B \subseteq Y$, the preimage of $B$ under $f$ is:

$$f^{-1}(B) = \{x \in X:f(x) \in B\}.$$

There are 16 possible binary operations (which correspond to the 16 logical connectives). Here we partition these into two groups of 8, which we call Type 1 and Type 2. For sets $I$ and $J$, there are 8 Type 1 binary operations $*$ such that $I * J \subseteq I \cup J$ always holds. These are:

$$\varnothing \quad I\!\setminus\!J \quad I\!\cap\!J \quad I \quad J\!\setminus\!I \quad I \triangle J \quad J \quad I\!\cup\!J,$$

and there are 8 Type 2 binary operations $*$ (which are just the complements of Type 1) where $I * J \subseteq I \cup J$ does not necessarily hold:

$$\varnothing^c \quad (I\!\setminus\!J)^c \quad (I\!\cap\!J)^c \quad I^c \quad (J\!\setminus\!I)^c \quad (I \triangle J)^c \quad J^c \quad (I\!\cup\!J)^c.$$

Note that some of these are also nullary or unary operations, but they can be treated as binary operations which simply ignore one or both arguments.

Part 1: One function/image, two subsets

For this case, the answer is found in many resources which discuss the image (and preimage) and its many basic properties, e.g. whether it preserves set operations. Most textbooks on set theory or topology discuss these, usually in introductory chapters, appendices, or as proof exercises. For example:

In particular, for function $f:X \rightarrow Y$ and subsets $A_1,A_2 \subseteq X$, the following properties hold in general:

  • $f(A_1) \cup f(A_2) = f(A_1 \cup A_2)$
  • $f(A_1) \cap f(A_2) \supseteq f(A_1 \cap A_2)$
  • $f(A_1) \setminus f(A_2) \subseteq f(A_1 \setminus A_2)$
  • $f(A_1) \triangle f(A_2) \subseteq f(A_1 \triangle A_2)$,

and equality holds in all four cases if $f$ is injective.

Generalization to All Binary Operations

For the 8 Type 1 operations $*$, for sets $I,J$, we have the following relations $R$ for $f(I) \! * \! f(J) \; R \; f(I\!*\!J)$:

operation $*$ $R$ (general or surjective $f$) $R$ (injective or bijective $f$)
$\varnothing$ $=$ =
$I\!\setminus\!J$ $\subseteq$ =
$I\!\cap\!J$ $\supseteq$ =
$I$ $=$ =
$J\!\setminus\!I$ $\subseteq$ =
$I \triangle J$ $\subseteq$ =
$J$ $=$ =
$I\!\cup\!J$ $=$ =

And for the 8 Type 2 operations $*$, we have the following relations $R$ (where NR means no relation):

operation $*$ $R$ (general $f$) $R$ (injective $f$) $R$ (surjective $f$) $R$ (bijective $f$)
$\varnothing^c$ $\supseteq$ $\supseteq$ $=$ $=$
$(I\!\setminus\!J)^c$ NR $\supseteq$ $\subseteq$ $=$
$(I\!\cap\!J)^c$ NR $\supseteq$ $\subseteq$ $=$
$I^c$ NR $\supseteq$ $\subseteq$ $=$
$(J\!\setminus\!I)^c$ NR $\supseteq$ $\subseteq$ $=$
$(I \triangle J)^c$ NR $\supseteq$ NR $=$
$J^c$ NR $\supseteq$ $\subseteq$ $=$
$(I\!\cup\!J)^c$ NR $\supseteq$ $\subseteq$ $=$

To prove these 16 cases, I used the following visual proof technique:

  • Make a Venn diagram involving the four sets $f(I\!\setminus\!J)$, $f(J\!\setminus\!I)$, $f(I\!\cap\!J)$, $f((I\!\cup\!J)^c)$. This diagram thus has 16 regions.
  • For each operation $*$, mark the set of regions representing $f(I)\!*\!f(J)$ with one symbol and those representing $f(I\!*\!J)$ with another symbol. (Use the fact that $f(I)\!\cup\!f(J) = f(I\!\cup\!J)$.)
  • For injective $f$, mark all 11 "overlapping" regions as empty.
  • For surjective $f$, mark the one "outside" region as empty.
  • Recall that bijective $f$ is both injective and surjective.

The result makes it easy to see what type of relation exists between the two sets, if any. I used this technique to generate the tables above. Please comment if you notice any errors here.

Part 2: Two functions/images, one subset

For functions $f:X \rightarrow Y$ and $g:X \rightarrow Y$, subset $A \subseteq X$, and binary set operation $* \in \{\cup, \cap, \setminus, \triangle\}$, these images can be written more concisely as:

$$\{f(x) : x \in A\} * \{g(x) : x \in A\} = f(A) * g(A).$$

Probably nothing general can be said in this case without further assumptions.

Part 3: One predicate, two subsets

Define predicate $P:X \rightarrow \{\mathrm{true}, \mathrm{false}\}$. For brevity, let $T=\{\mathrm{true}\}$ and $F=\{\mathrm{false}\}$.

We can express sets defined by a predicate as a preimage:

\begin{aligned} \{x \in X : P(x)\} &= \{x \in X : P(x) \in T\}\\ &= P^{-1}(T), \end{aligned}

i.e. the preimage of $T$ under $P$. We can also focus on any subset $A \subseteq X$:

\begin{aligned} \{x \in A : P(x)\} &= \{x \in A : P(x) \in T\}\\ &= A \cap P^{-1}(T). \end{aligned}

Thus, for subsets $A_1,A_2 \subseteq X$ and binary set operation $* \in \{\cup, \cap, \setminus, \triangle\}$ we have:

\begin{aligned} \{x \in A_1 : P(x)\} * \{x \in A_2 : P(x)\} &= (A_1 \cap P^{-1}(T)) * (A_2 \cap P^{-1}(T))\\ &= (A_1 * A_2) \cap P^{-1}(T)\\ &= \{x \in A_1 * A_2 : P(x)\}. \end{aligned}

This confirms the hypothesis in the original question above.

Generalization to All Binary Operations

We can extend this result to all 16 binary set operations as follows.

For all 8 Type 1 operations $*$, intersection $\cap$ is (left- and right-) distributive over $*$, so for sets $I,J,K$, we have $(I * J) \cap K = (I \cap K) * (J \cap K)$, a fact which is used in the derivation above. Thus, for these 8 operations, the above result applies, i.e.:

\begin{aligned} \{x \in A_1 : P(x)\} * \{x \in A_2 : P(x)\} &= (A_1 * A_2) \cap P^{-1}(T)\\ &= \{x \in A_1 * A_2 : P(x)\}. \end{aligned}

For all 8 Type 2 operations $*$, we instead have $\big((I * J) \cap K\big) \cup K^c = (I \cap K) * (J \cap K)$. Thus, the result becomes:

\begin{aligned} \{x \in A_1 : P(x)\} * \{x \in A_2 : P(x)\} &= (A_1 \cap P^{-1}(T)) * (A_2 \cap P^{-1}(T))\\ &= \big((A_1 * A_2) \cap P^{-1}(T)\big) \cup (P^{-1}(T))^c\\ &= (A_1 * A_2) \cup P^{-1}(F)\\ &= \{x \in A_1 * A_2 : P(x)\} \cup P^{-1}(F)\\ &\supseteq \{x \in A_1 * A_2 : P(x)\}. \end{aligned}

Part 4: Two predicates, one subset

(This case is fairly obvious by inspection, but for completeness, we'll follow a similar derivation as in part 3 above.)

Define predicates $P:X \rightarrow \{\mathrm{true}, \mathrm{false}\}$ and $Q:X \rightarrow \{\mathrm{true}, \mathrm{false}\}$ and subset $A \subseteq X$. Again, let $T=\{\mathrm{true}\}$ and $F=\{\mathrm{false}\}$.

Expressing sets as preimages (cf. part 3 above):

\begin{aligned} \{x \in A : P(x)\} &= A \cap P^{-1}(T)\\ \{x \in A : Q(x)\} &= A \cap Q^{-1}(T). \end{aligned}

For binary set operation $* \in \{\cup, \cap, \setminus, \triangle\}$ with corresponding logical connective $\star \in \{\lor, \land, \nrightarrow, \oplus\}$:

\begin{aligned} \{x \in A : P(x)\} * \{x \in A : Q(x)\} &= (A \cap P^{-1}(T)) * (A \cap Q^{-1}(T))\\ &= A \cap (P^{-1}(T) * Q^{-1}(T))\\ &= A \cap (\{x \in X : P(x)\} * \{x \in X : Q(x)\})\\ &= A \cap \{x \in X : P(x) \star Q(x)\}\\ &= \{x \in A : P(x) \star Q(x)\}. \end{aligned}

This confirms the hypothesis in the original question above.

Generalization to All Binary Operations

We can extend this result to all 16 binary set operations in a similar way as in part 3 above.

For all 8 Type 1 operations $*$, the above result still holds:

\begin{aligned} \{x \in A : P(x)\} * \{x \in A : Q(x)\} &= A \cap \{x \in X : P(x) \star Q(x)\}\\ &= \{x \in A : P(x) \star Q(x)\}. \end{aligned}

For all 8 Type 2 operations $*$, we have:

\begin{aligned} \{x \in A : P(x)\} * \{x \in A : Q(x)\} &= (A \cap P^{-1}(T)) * (A \cap Q^{-1}(T))\\ &= A^c \cup \Big(A \cap \big(P^{-1}(T) * Q^{-1}(T)\big)\Big)\\ &= (A^c \cup A) \cap (A^c \cup \{x \in X : P(x) \star Q(x)\})\\ &= A^c \cup \{x \in X : P(x) \star Q(x)\}\\ &= \{x \in X : (x \notin A) \lor (P(x) \star Q(x))\}\\ &= \{x \in A : P(x) \star Q(x)\} \cup A^c\\ &\supseteq \{x \in A : P(x) \star Q(x)\}. \end{aligned}

Special case: One Preimage, Two Subsets

Let $A=X$, let $B_1,B_2 \subseteq Y$, and let $f:X \rightarrow Y$. Assume predicates take the form $P(x)=(f(x) \in B_1)$ and $Q(x)=(f(x) \in B_2)$ for all $x \in X$. Then we are simply dealing with preimages of $B_1$ and $B_2$ under $f$. Then, using the results above for Type 1 operations $*$:

\begin{aligned} f^{-1}(B_1) * f^{-1}(B_2) &= \{x \in X : P(x)\} * \{x \in X : Q(x)\}\\ &= \{x \in X : P(x) \star Q(x)\}\\ &= \{x \in X : (f(x) \in B_1) \star (f(x) \in B_2)\}\\ &= \{x \in X : f(x) \in B_1 * B_2\}\\ &= f^{-1}(B_1 * B_2). \end{aligned}

For Type 2 operations $*$, we get the same result:

\begin{aligned} f^{-1}(B_1) * f^{-1}(B_2) &= X^c \cup \{x \in X : P(x) \star Q(x)\}\\ &= \varnothing \cup \{x \in X : (f(x) \in B_1) \star (f(x) \in B_2)\}\\ &= \{x \in X : f(x) \in B_1 * B_2\}\\ &= f^{-1}(B_1 * B_2). \end{aligned}