CSC 208-01 (Fall 2023)

Reading: Set Inclusion and Relations

Set Inclusion and Equality

A basic question we can ask about sets is whether one element is contained in a set. For example:

Claim: If \(x \in A \cap B\) then \(x \in A \cup B\).

This claim posits that if an arbitrary element of the intersection of \(A\) and \(B\), it is also in the union of \(A\) and \(B\). Intuitively, we know this is true because the intersection of two sets contains elements that are in both sets whereas the union only demands that the elements are in at least one of the sets.

To formally prove this claim, we will work from our initial assumption that \(x \in A \cap B\) and proceed forwards to our goal that \(x \in A \cup B\). To do so, we will utilize the formal definitions of our operators to justify each step of our reasoning explicitly. Here is a formal proof of the claim above.

Proof. We suppose that \(x \in A\) and show that \(x \in A \cup B\). By the definition of \((\cup)\), we must show that \(x \in A \vee x \in B\). However, we already know that \(x \in A\) by assumption.

Alternatively, we can present the same proof using a two-column style where each row consists of a fact on the left-hand side and a rule on the right-hand side that justifies how the fact is derivable from the fact on the previous row.

  • \(x \in A\) — [assumption]
  • \(x \in A \cup B\) — [def. \((\cup)\)]

(Note: using Markdown, we can’t reliably create two columns, so for the purposes of presentation, we separate columns with a em-dash (---).)

Note that supposing that we have an arbitrary \(x \in A\) is equivalent to proving a claim that is universally quantified (i.e., \(∀\)), over that variable \(x\). Therefore this proof also shows that \(A \subseteq A \cup B\) as the subset proposition is equivalent to:

\[ A \subseteq A \cup B ≡ ∀x \ldotp x \in A \rightarrow x \in A \cup B. \]

Our natural deduction rules tells us that to prove this logical proposition, we:

  1. Assume an arbitrary \(x\) by the left-∀ rule.
  2. Assume that \(x \in A\) by the left-→ rule.
  3. Go on to prove that \(x \in A \cup B\).

This is precisely how our proofs above proceeded! In our prose-based proof, we explicated this reasoning although did not cite natural deduction rules justifying the reasoning. At this higher level of proof, we don’t cite rules of logic although we know that our reasoning is backed by them. Our symbolic, two-column proof avoids this verbiage, leaving the introductory steps of reasoning implicit so that we can focus on the important parts of the proof: the step-by-step manipulation of sets.

In practice, because we will prove membership of an arbitrary element of a set, we will usually state our claims in terms of subset relationships. For example, here is a similar claim and proof to our original one, but utilizing subset notation instead:

Claim: \(A \cap B \subseteq B\)

Proof: Let \(x \in A \cap B\). It suffices to show that if \(x \in A \cap B\) then \(x \in B\). However, we know that \(x \in A \vee x \in B\) by the definition of \((\cap)\), allowing us to conclude that \(x \in B\).

Proving Set Inclusion Claims

In summary, when proving that a set \(S\) is a subset of another set \(T\), we:

  1. Assume that we have an arbitrary element \(x\) of the set \(S\).
  2. Give a proof that shows how we can logically reason step-by-step from this initial assumption to our final goal.
  3. End our proof by showing that \(x\) is an element of \(T\), thereby proving our claim.

In logic, this is called forwards reasoning because we are reasoning from our assumptions and axioms to our final goal. This contrasts with our program correctness and natural deduction proofs where we tended to work from our initial goal and generate new assumptions and refined goals from it, a process called backwards reasoning. Note that both forms of reasoning—from assumptions or from our goal—are valid and can be intermixed in a single proof. Ultimately, whether we operate in a forwards or backwards manner in our proofs is a function of context: the domain of the proof and the particular proof state that we are in.

As with all proofs, our proofs in set theory consist of assumptions and a goal. Our assumptions take on various forms:

Like propositional logic, how we reason about our different set operations depends on whether the operation appears in an assumption (something we already know) or a goal (something we are trying to prove). As an assumption:

All of these rules of inference follow directly from our formal definitions for our operations. Likewise, if these operations instead appear as our goal:

To show these different rules in action, consider the following claim and proof over a more complicated subset relationship:

Claim: \(A × (B \cup C) \subseteq (A × B) \cup (A × C)\)

Proof: Let \((x, y) \in A × (B \cup C)\) with \(x \in A\) and \(y \in B \cup C\). By the definition of \((×)\), it suffices to show that \((x, y) \in (A × B) \cup (A × C)\). And by the definition of \((\cap)\), we know that \(y \in B ∨ y \in C\). Now consider whether \(y \in B\) or \(y \in C\).

  • If \(y \in B\), then by the definition of \((×)\), \((x, y) \in A × B\) and by the definition of \((\cup)\), \((x, y) \in (A × B) \cup (A × C)\).
  • If \(y \in C\), then by the definition of \((×)\), \((x, y) \in A × C\) and by the definition of \((\cup)\), \((x, y) \in (A × B) \cup (A × C)\).

Note several things with this proof:

Equality Proofs

Recall that we defined set equality in terms of subsets:

\[ S = T \stackrel{\mathsf{def}}{=} S \subseteq T ∧ T \subseteq S. \]

Thus, to prove that two sets are equal, we need to perform two subset proofs, one in each direction. In the previous section, we proved that \(A × (B \cup C) \subseteq (A × B) \cup (A × C)\). By showing that \((A × B) \cup (A × C) \subseteq A × (B \cup C)\), we can then conclude that the two sets are indeed equal. Here is a two-column proof of the right-to-left direction of the claim:

Claim: \((A × B) \cup (A × C) \subseteq A × (B \cup C)\).

Proof: Let \(x \in (A × B) \cup (A × C)\).

  • \(x \in (A × B) \cup (A × C)\)—[assumption]. Consider whether \(x \in A × B\) or \(x \in A × C\). Suppose \(x \in A × B\).

    • \(x \in (A × B)\)—[assumption].
    • \(x = (a, b)\), \(a \in A\), \(b \in B\)—[defn (×)].
    • \(b \in B \cup C\)—[defn ()].
    • \((a, b) \in A × (B \cup C)\)—[defn (×)].

    Now suppose \(x \in A × C\).

    • \(x \in (A × C)\)—[assumption].
    • \(x = (a, c)\), \(a \in A\), \(c \in C\)—[defn (×)].
    • \(c \in B \cup C\)—[defn ()].
    • \((a, c) \in A × (B \cup C)\)—[defn (×)].

We call such equality proofs double-inclusion proofs. Double-inclusion or proving “both sides” of the equality is a powerful, alternative technique for showing that two objects are equal. While it is the primary way we show the equality of sets, we can also apply it to other “equality-like” operations. For example:

Empty Sets and Contradiction Proof

Our proof techniques for set inclusion runs into a snag when we consider the empty set. For example, consider the following claim:

Claim: \(A \cap {\overline{A}} = ∅\).

Intuitively, \({\overline{A}}\) contains precisely the elements that are not in \(A\). Thus, we expect the intersection to be empty. To prove this equality, we must show that the left- and right-hand sides are subsets of each other. In one direction, this proof proceeds trivially:

Claim: \(∅ \subseteq A \cap {\overline{A}}\)

Proof. There is no such \(x\) such that \(x \in ∅\), so the claim is vacuously true.

Recall that the definition of subset says that \(A \subseteq B \stackrel{\mathsf{def}}{=} ∀x. \ldotp x \in A → x \in B\). No elements are contained in \(∅\) by definition, so the logical proposition holds trivially, i.e., there are no \(x\) that fulfill \(x \in A\)).

In the other direction, we become stuck with our standard proof machinery:

Claim: \(A \cap {\overline{A}} \subseteq ∅\)

Proof. We assume that \(x \in A \cap \overline{A}\). We must show that \(x \in ∅\). But… .

We begin the proof by assuming \(x \in A \cap {\overline{A}}\). Note that we know this is not possible because the intersection should be empty, but this is precisely what we are trying to prove! However, we encounter a worse problem: our proof requires us to show that \(x \in ∅\) and that is certainly impossible!

Because of this, we need an alternative proof strategy to prove set emptiness—that a set is equivalent to the empty set. Recall when we discussed propositional logic, we introduced the notion of a proof by contradiction. To prove that a proposition \(P\) holds:

  1. We assume \(¬P\) is provable.
  2. We then show how this assumption allows us to prove a contradiction, i.e., \(⊥\) or \(Q ∧ ¬Q\) for some proposition \(Q\).
  3. Because we cannot logically conclude a contradiction holds and our proof proceeds logically, the only thing that could have caused the contradiction was our initial assumption that \(¬P\) holds. Therefore, \(¬P\) must not hold and so \(P\) must hold.

We will apply the technique of proof by contradiction to set emptiness proofs where we show that some set \(S = ∅\) as follows:

  1. First assume for the sake of contradiction that \(x \in S\).
  2. Then we will show a contradiction. In the context of set theory, this usually means showing that some element \(y\) (not necessarily \(x\)) is both in a set and not in a set, e.g., \(y \in U ∧ y ∉ U\).
  3. From this contradiction, we can conclude that our assumption that \(x \in S\) is false and thus \(x ∉ S\) for all \(x\) and thus \(S = ∅\).

Let us use this proof technique to show that our claim above holds directly without the use of subsets.

Claim: \(A \cap \overline{A} = ∅\).

Proof. We prove this claim by assuming that some \(x \in A \cap \overline{A}\) and deriving a contradiction.

  • \(x \in A \cap \overline{A}\)—[assumption]
  • \(x \in A, x \in \overline{A}\)—[defn ()]
  • \(x ∉ A\)—[defn \((\overline{⋅})\)]

\(x \in A\) and \(x ∉ A\) cannot both be true. Our original assumption that there exists an \(x \in A \cap \overline{A}\) must then be false and thus no such \(x\) exists. Therefore, \(A \cap \overline{A} = ∅\).

Exercise (Arr, ‡): Prove the left-to-right direction of DeMorgan’s Law:

Claim: \(\overline{A \cup B} \subseteq \overline{A} \cap \overline{B}\).