Sets and Mathematical Proofs: A Primer

16Complements

In some contexts there is tacitly a domain: a largest set which everything we are discussing belongs to. If we are thinking about sets of real numbers, the domain might be ; if we are doing probability theory, it might be the universal event containing all the possible outcomes.

When a domain U is understood, we write Xc as a shorthand for UX, and we call it simply the complement of X. So the inclusion criterion for Xc is xU and xX. Nothing here is new: Xc is the complement of X in U, with the domain left implicit:

Definition 11 (Complement). Where a domain U is understood and XU, the complement of X is Xc = UX.

XU
Figure 14. The complement Xc, relative to a domain U.

In Figure 14, the rectangle is U and the shaded region is Xc.

Throughout this section, X and Y are subsets of U.

Proposition 30 (a set and its complement exhaust the domain). XXc = U.

We will apply Proposition 1 (double inclusion). For the first inclusion: we have already XU, and it is clear from the definition that XcU. Hence, by Proposition 21 (the union is the smallest set containing both), XXcU.

For the second inclusion: suppose that xU. By the law of excluded middle, either xX or xX. In the former case, xX, hence xXXc by Proposition 15 (each set is a subset of the union). In the latter case, xU and xX, hence xXc, and by Proposition 15 (each set is a subset of the union) xXXc. Therefore UXXc.

Now try and prove the next three propositions yourself:

Proposition 34 (the complement of the domain). Uc = ∅.

Once a domain has been fixed, a relative complement can always be rewritten using the complement.

The next two results are named after the nineteenth-century mathematician Augustus De Morgan. They say that taking a complement turns intersection into union, and union into intersection. The shaded region in Figure 15 is everything outside XY. Reading it as one region gives (XY)c; reading it as everything outside X together with everything outside Y gives XcYc.

Proposition 36 (De Morgan, for intersection). (XY)c = XcYc.

XYU
Figure 15. Proposition 36 (De Morgan, for intersection): the shaded region is both (XY)c and XcYc.

We will prove this by showing that the inclusion criteria are logically equivalent.

The inclusion criterion for the set (XY)c is xU and xXY. Unpacking this further by the definition of intersection, the criterion is that (i) xU and (ii) it is not the case that x is in both X and Y. Equivalently, x is in U and either (i) x is not in X, or (ii) x is not in Y.

The inclusion criterion for the set XcYc is that x is in either Xc or Yc. Thus, either (i) x is in U, but not in X, or (ii) x is in U, but not in Y. Equivalently, x is in U and either (i) x is not in X, or (ii) x is not in Y. But we have seen already that this is the same as the inclusion criterion for (XY)c.

Notice that we tacitly helped ourselves to the corresponding logical De Morgan law here, stating that ¬(XY) is logically equivalent to ¬ X ∨ ¬ Y. This can be broken down and proved from more basic logical steps; see any introductory logic textbook for the details. For our purposes here, since it’s part of classical logic, we can simply make the move in one go without further explanation.

Now see if you can prove the dual De Morgan law yourself:

One more useful fact is that complements reverse the direction of the subset relation.

In Figure 17, Xc is shaded and Yc is shaded twice, so Yc lies inside Xc even though X lies inside Y.

Proposition 38 (complements reverse inclusion). XY if and only if YcXc.

XYU
Figure 17. Proposition 38 (complements reverse inclusion): complements reverse inclusion.

Left to right: suppose that XY. If it were not the case that YcXc, then there would be some x which belongs to Yc but not to Xc. In that case, we would have xX but xY, contradicting that XY.

Right to left: this follows from the previous step of the argument if we apply Proposition 32 (the complement of a complement). (Do you see why?)