Skip to content

The Grammar of Mathematics: Reading and Writing Sets and Logic

Raw
  • Mathematical prose is written using only two vocabularies: sets and logic. These are not separate subjects. The correspondences ∩\cap with “and”, ∪\cup with “or”, and ⊆\subseteq with “implies” are exact.
  • A proof of a set equality A=BA = B can always be split into the two inclusions A⊆BA \subseteq B and B⊆AB \subseteq A (Proposition 3.4). Whenever you are unsure how to begin a proof, return to this.
  • ”PP implies QQ” is not a statement of causation. If PP is false, the implication is true. This convention is what allows a sentence such as “every element of the empty set exceeds 2\sqrt{2}” to be handled without contradiction (Proposition 3.6).
  • De Morgan’s laws wear three faces — one in propositional logic, one for sets, one for quantifiers — but there is only one law underneath (Lemma 4.3, Theorem 4.4, Corollary 5.6).
  • Negating ∀\forall and ∃\exists is the mechanical operation of pushing the negation sign inward while interchanging ∀\forall and ∃\exists (Theorem 5.3). The negation of an ε\varepsilon-δ\delta statement is produced by this procedure alone.
  • “Sufficient condition” and “necessary condition” merely name the two directions of an arrow, and they say exactly what an inclusion of truth sets says (Proposition 6.3).

1. Motivation — what to rely on when intuition breaks

Section titled “1. Motivation — what to rely on when intuition breaks”

If the conventions of mathematical language are taught as mere etiquette, it is impossible to see why so much care is needed. This section gives one episode in which the need actually arose.

Until the first half of the nineteenth century, a function was something one pictured as a graph. “A continuous function admits a tangent line except at scattered points” was, to the mathematicians of that era, beyond doubt. Then in 1872 Weierstrass showed that a function of the form

W(x)=∑n=0∞ancos⁡(bnπx)W(x) = \sum_{n=0}^{\infty} a^{n} \cos(b^{n} \pi x)

(with 0<a<10 < a < 1, with bb an odd natural number, and with ab>1+32πab > 1 + \tfrac{3}{2}\pi) is continuous at every real xx and yet differentiable at no point whatsoever. Something that cannot be drawn stood there as a formula. At that moment it became necessary to fix the meanings of “continuous” and “differentiable” by sentences rather than by pictures.

Around the same time Cantor began comparing the sizes of infinite sets, and the word “set” itself came under pressure to be made precise. By the end of the nineteenth century a style had been established: write a mathematical assertion as a finite string of symbols, and decide its truth from the written form alone. The vocabulary used in that style is the vocabulary of sets and logic.

By the end of this article you will be able to answer questions as elementary as the following.

  1. In a class containing no students at all, is “every student in the class is at least three metres tall” true or false?
  2. “If x=2x = 2 then x2=4x^2 = 4” is true, yet its converse is false. Why? What exactly is x2=4x^2 = 4 to x=2x = 2?
  3. “For every real number there is a larger real number” and “there is a real number larger than every real number” — where, written in symbols, do these differ?

Definition 2.1(Proposition)

A proposition is an assertion that is determined to be exactly one of true or false. When a proposition PP is true we say that its truth value is T\mathrm{T}; when it is false, that its truth value is F\mathrm{F}.

The phrase “determined to be exactly one of” is doing real work. “This sentence is false” is contradictory whether taken as true or as false, so it is not a proposition. "x+1=3x + 1 = 3" is not a proposition either, since its truth is undetermined until we say what xx is; assertions containing variables are treated as predicates in Definition 5.1.

Remark 2.2

Strictly speaking, describing a proposition as “an assertion determined to be true or false” is not a complete definition, since it does not explain what an assertion is. Mathematical logic first defines formulas as strings of symbols by finitely many rules, and then separately specifies a procedure that assigns truth values to them. This article works at the practical level just short of that. The move into formalization itself is discussed in Incompleteness theorems.

Definition 2.3(Logical connectives)

Given propositions PP and QQ, we define the new propositions ¬P\lnot P (not PP), P∧QP \land Q (PP and QQ), P∨QP \lor Q (PP or QQ), P  ⟹  QP \implies Q (if PP then QQ), and P  ⟺  QP \iff Q (PP and QQ are equivalent) by the following table.

PPQQ¬P\lnot PP∧QP \land QP∨QP \lor QP  ⟹  QP \implies QP  ⟺  QP \iff Q
TTFTTTT
TFFFTFF
FTTFTTF
FFTFFTT

This table is the definition. The meaning of a connective is fixed by these four rows and not by the nuances of ordinary speech. Two points in particular depart from everyday usage.

  • “Or” is not exclusive. If PP and QQ are both true, then P∨QP \lor Q is true. This is unlike the everyday choice “coffee or tea”. To say that both cannot hold, write (P∨Q)∧¬(P∧Q)(P \lor Q) \land \lnot(P \land Q).
  • “Implies” is not causal. If PP is false, then P  ⟹  QP \implies Q is true whatever QQ may be. “If 2<12 < 1 then Mount Fuji is at sea level” is, in the mathematical sense, a true proposition.

Discomfort at the second point is natural. Read   ⟹  \implies not as asserting a connection between PP and QQ, but as asserting only that the situation ”PP holds while QQ fails” does not occur. Indeed, as Proposition 2.4 shows, P  ⟹  QP \implies Q has the same meaning as ¬(P∧¬Q)\lnot(P \land \lnot Q). Adopting this reading, we automatically obtain the convenient convention that an assertion about all members of a collection is true when the collection has no members (Proposition 3.6).

Proposition 2.4(Reformulations of implication)

For all propositions PP and QQ, the following three propositions always take the same truth value.

P  ⟹  Q,¬P∨Q,¬Q  ⟹  ¬P.P \implies Q, \qquad \lnot P \lor Q, \qquad \lnot Q \implies \lnot P .

The third is called the contrapositive of P  ⟹  QP \implies Q. Moreover, ¬(P  ⟹  Q)\lnot(P \implies Q) and P∧¬QP \land \lnot Q always take the same truth value.

Proof(Proposition 2.4)

Following the table in Definition 2.3, we write out all four combinations of truth values of PP and QQ.

PPQQP  ⟹  QP \implies Q¬P∨Q\lnot P \lor Q¬Q  ⟹  ¬P\lnot Q \implies \lnot PP∧¬QP \land \lnot Q¬(P  ⟹  Q)\lnot(P \implies Q)
TTTTTFF
TFFFFTT
FTTTTFF
FFTTTFF

We check each row. In row 1, PP is true and QQ is true, so P  ⟹  QP \implies Q is T by row 1 of the table; ¬P\lnot P is F, so ¬P∨Q=F∨T=T\lnot P \lor Q = \mathrm{F} \lor \mathrm{T} = \mathrm{T}; and ¬Q\lnot Q is F and ¬P\lnot P is F, so ¬Q  ⟹  ¬P\lnot Q \implies \lnot P is F  ⟹  F=T\mathrm{F} \implies \mathrm{F} = \mathrm{T}. In row 2, PP is true and QQ is false, so P  ⟹  QP \implies Q is F, ¬P∨Q=F∨F=F\lnot P \lor Q = \mathrm{F} \lor \mathrm{F} = \mathrm{F}, and ¬Q  ⟹  ¬P\lnot Q \implies \lnot P is T  ⟹  F=F\mathrm{T} \implies \mathrm{F} = \mathrm{F}. In rows 3 and 4, PP is false, so P  ⟹  QP \implies Q is T; ¬P\lnot P is true, so ¬P∨Q\lnot P \lor Q is T; and ¬Q  ⟹  ¬P\lnot Q \implies \lnot P is T because its conclusion ¬P\lnot P is true.

Thus the three columns P  ⟹  QP \implies Q, ¬P∨Q\lnot P \lor Q and ¬Q  ⟹  ¬P\lnot Q \implies \lnot P agree in all four rows. The column P∧¬QP \land \lnot Q likewise agrees with the column ¬(P  ⟹  Q)\lnot(P \implies Q) in all four rows.

The availability of the contrapositive pays off directly in the practice of proof. Proving “if n2n^2 is even then nn is even” head-on is awkward, but the contrapositive “if nn is odd then n2n^2 is odd” requires only setting n=2k+1n = 2k+1 and computing n2=4k2+4k+1=2(2k2+2k)+1n^2 = 4k^2 + 4k + 1 = 2(2k^2+2k)+1. (For how this lemma is used in the proof that 2\sqrt{2} is irrational, see if a square is even so is its root(Lemma 7.4)[Techniques of Proof].)

Example 2.5(Converse, inverse and contrapositive)

Let xx be a real number, let PP be "x=2x = 2", and let QQ be "x2=4x^2 = 4".

  • P  ⟹  QP \implies Q is true, since x=2x = 2 gives x2=22=4x^2 = 2^2 = 4.
  • The converse Q  ⟹  PQ \implies P is false. Taking x=−2x = -2 makes x2=4x^2 = 4 true and x=2x = 2 false, which is row 2 of the table in Definition 2.3, so Q  ⟹  PQ \implies P is F.
  • The inverse ¬P  ⟹  ¬Q\lnot P \implies \lnot Q is also false, since for x=−2x = -2 the antecedent ¬P\lnot P is true while ¬Q\lnot Q is false.
  • The contrapositive ¬Q  ⟹  ¬P\lnot Q \implies \lnot P is true: if x2≠4x^2 \ne 4 then xx cannot be 22. As Proposition 2.4 guarantees, this is the same as the truth of P  ⟹  QP \implies Q.

The converse and the inverse are contrapositives of each other, so, as we have just seen, they share their truth value.

Definition 3.1(Set and element)

A set is a collection of objects such that, for any object xx, whether or not xx belongs to it is uniquely determined. We write x∈Ax \in A to say that xx belongs to the set AA, and call xx an element (or member) of AA. Non-membership is written x∉Ax \notin A.

There are two ways to specify a set: by listing all its elements, as in A={1,2,3}A = \{1, 2, 3\}, and by comprehension, that is by carving it out with a condition, as in A={x∈N∣x≤3}A = \{x \in \mathbb{N} \mid x \le 3\}. Here N={1,2,3,…}\mathbb{N} = \{1, 2, 3, \ldots\}, and we do not include 00.

Axiom 3.2(Principle of extensionality)

For sets AA and BB we stipulate

A=B  ⟺  ∀x (x∈A  ⟺  x∈B).A = B \iff \forall x\,(x \in A \iff x \in B).

That is, a set is determined by nothing but which elements it has.

This is a stipulation, not a theorem. From it, it follows that a set has neither order nor repetition. Indeed {1,2}\{1, 2\} and {2,1,1}\{2, 1, 1\} both satisfy ”xx belongs precisely when xx is 11 or 22”, so they are equal sets by Axiom 3.2.

Definition 3.3(Subset)

For sets AA and BB we define

A⊆B:⟺∀x (x∈A  ⟹  x∈B)A \subseteq B \quad :\Longleftrightarrow \quad \forall x\,(x \in A \implies x \in B)

and say that AA is a subset of BB. If moreover A⊆BA \subseteq B and A≠BA \ne B, we say that AA is a proper subset of BB and write A⊊BA \subsetneq B.

The symbols ∈\in and ⊆\subseteq are different things: ∈\in expresses membership, ⊆\subseteq expresses inclusion. For A={1,2}A = \{1, 2\}, the statement 1∈A1 \in A is true while 1⊆A1 \subseteq A is meaningless (11 is not a set); and {1}⊆A\{1\} \subseteq A is true while {1}∈A\{1\} \in A is false, because the elements of AA are 11 and 22, not {1}\{1\}.

Proposition 3.4(Set equality is double inclusion)

For sets AA and BB,

A=B  ⟺  (A⊆B and B⊆A).A = B \iff (A \subseteq B \ \text{and}\ B \subseteq A).
Proof(Proposition 3.4)

By Axiom 3.2, A=BA = B is equivalent to “for every xx, x∈A  ⟺  x∈Bx \in A \iff x \in B”. It therefore suffices to see that, for each xx,

(x∈A  ⟺  x∈B)and((x∈A  ⟹  x∈B) and (x∈B  ⟹  x∈A))(x \in A \iff x \in B) \quad\text{and}\quad \bigl((x \in A \implies x \in B) \ \text{and}\ (x \in B \implies x \in A)\bigr)

take the same truth value. Put PP for x∈Ax \in A and QQ for x∈Bx \in B and consult the table in Definition 2.3: P  ⟺  QP \iff Q is T exactly in row 1 (both T) and row 4 (both F). On the other hand (P  ⟹  Q)∧(Q  ⟹  P)(P \implies Q) \land (Q \implies P) is F in row 2, where P  ⟹  QP \implies Q is F, and F in row 3, where Q  ⟹  PQ \implies P is F, while in rows 1 and 4 both implications are T and so the conjunction is T. Hence the two agree in all four rows.

Consequently “for every xx, x∈A  ⟺  x∈Bx \in A \iff x \in B” is equivalent to “for every xx, x∈A  ⟹  x∈Bx \in A \implies x \in B” together with “for every xx, x∈B  ⟹  x∈Ax \in B \implies x \in A”. By Definition 3.3 this is precisely A⊆BA \subseteq B and B⊆AB \subseteq A.

This proposition supplies the proof pattern used most often not only in this article but in all of mathematics. On seeing a set equality, split it into two inclusions and write each in the form “assume x∈x \in left-hand side and derive x∈x \in right-hand side”. This is called element chasing.

Definition 3.5(Empty set and power set)

A set with no elements at all is called the empty set and is written ∅\emptyset; that is, x∉∅x \notin \emptyset for every xx.

For a set AA, the set

P(A)={X∣X⊆A}\mathcal{P}(A) = \{X \mid X \subseteq A\}

consisting of all subsets of AA is called the power set of AA.

Proposition 3.6(Basic properties of the empty set)

(1) For every set AA we have ∅⊆A\emptyset \subseteq A.
(2) The empty set is unique: if EE and E′E' are sets with no elements, then E=E′E = E'.

Proof(Proposition 3.6)

(1) By Definition 3.3, what must be shown is “for every xx, x∈∅  ⟹  x∈Ax \in \emptyset \implies x \in A”. Take xx arbitrary; by Definition 3.5, x∈∅x \in \emptyset is false. Looking at the table in Definition 2.3, in the rows with a false antecedent (rows 3 and 4) the value of   ⟹  \implies is T. Hence x∈∅  ⟹  x∈Ax \in \emptyset \implies x \in A is true regardless of xx, and ∅⊆A\emptyset \subseteq A holds.

(2) Suppose EE and E′E' both have no elements. The same argument as in (1) gives E⊆E′E \subseteq E' and E′⊆EE' \subseteq E: since x∈Ex \in E is always false, x∈E  ⟹  x∈E′x \in E \implies x \in E' is always true, and likewise x∈E′  ⟹  x∈Ex \in E' \implies x \in E is always true. By Proposition 3.4, E=E′E = E'.

An assertion that is automatically true because its antecedent never holds — as in the proof of (1) — is said to be vacuously true. The claim mentioned at the outset, that in a class with no students every student is at least three metres tall, has the same structure and is true: since not a single student can be produced as a counterexample, there is no way to make the assertion false.

Example 3.7(Writing out a power set)

Let A={1,2,3}A = \{1, 2, 3\}. We enumerate the subsets exhaustively, grouped by their number of elements.

  • 00 elements: ∅\emptyset
  • 11 element: {1},{2},{3}\{1\}, \{2\}, \{3\}
  • 22 elements: {1,2},{1,3},{2,3}\{1,2\}, \{1,3\}, \{2,3\}
  • 33 elements: {1,2,3}\{1,2,3\}

Therefore

P(A)={ ∅, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3} }\mathcal{P}(A) = \bigl\{\, \emptyset,\ \{1\},\ \{2\},\ \{3\},\ \{1,2\},\ \{1,3\},\ \{2,3\},\ \{1,2,3\} \,\bigr\}

and the number of elements of P(A)\mathcal{P}(A) is 1+3+3+1=8=231 + 3 + 3 + 1 = 8 = 2^{3}. Note that ∅\emptyset occurs by part (1) of Proposition 3.6, and that AA itself occurs because A⊆AA \subseteq A.

Theorem 3.8(Cardinality of a power set)

If AA is a finite set with nn elements, then P(A)\mathcal{P}(A) has 2n2^{n} elements.

Proof(Theorem 3.8)

Label the elements of AA as a1,a2,…,ana_1, a_2, \ldots, a_n (so that ai≠aja_i \ne a_j whenever i≠ji \ne j). Let

S={(ε1,…,εn)∣each εi is 0 or 1}S = \{(\varepsilon_1, \ldots, \varepsilon_n) \mid \text{each } \varepsilon_i \text{ is } 0 \text{ or } 1\}

be the set of all 00-11 strings of length nn. Define a map χ\chi from P(A)\mathcal{P}(A) to SS by setting, for X⊆AX \subseteq A,

χ(X)=(ε1,…,εn),εi={1(ai∈X)0(ai∉X)\chi(X) = (\varepsilon_1, \ldots, \varepsilon_n), \qquad \varepsilon_i = \begin{cases} 1 & (a_i \in X) \\ 0 & (a_i \notin X) \end{cases}

For each ii exactly one of ai∈Xa_i \in X and ai∉Xa_i \notin X holds (Definition 3.1), so χ(X)\chi(X) is uniquely determined.

We show that χ\chi is injective. Suppose X,Y⊆AX, Y \subseteq A satisfy χ(X)=χ(Y)\chi(X) = \chi(Y). Every x∈Ax \in A equals aia_i for some ii, and since the ii-th entries agree, "ai∈Xa_i \in X" and "ai∈Ya_i \in Y" either both hold or both fail. For x∉Ax \notin A, the inclusions X⊆AX \subseteq A and Y⊆AY \subseteq A give x∉Xx \notin X and x∉Yx \notin Y. Hence x∈X  ⟺  x∈Yx \in X \iff x \in Y for every xx, and Axiom 3.2 yields X=YX = Y.

We show that χ\chi is surjective. Given (ε1,…,εn)∈S(\varepsilon_1, \ldots, \varepsilon_n) \in S, put X={ai∣εi=1}X = \{a_i \mid \varepsilon_i = 1\}. Then X⊆AX \subseteq A, and by construction ai∈Xa_i \in X holds exactly when εi=1\varepsilon_i = 1, so χ(X)=(ε1,…,εn)\chi(X) = (\varepsilon_1, \ldots, \varepsilon_n).

Therefore P(A)\mathcal{P}(A) and SS have the same number of elements. The elements of SS are formed by choosing each entry independently from 22 possibilities, so there are 2×2×⋯×2=2n2 \times 2 \times \cdots \times 2 = 2^{n} of them. Hence P(A)\mathcal{P}(A) has 2n2^{n} elements.

Remark 3.9

Even when AA is infinite, one can prove that P(A)\mathcal{P}(A) is “strictly larger” than AA (Cantor's theorem(Theorem 7.1)[濃度と無限]). This is the counterpart of 2n>n2^n > n in the finite case, but its proof rests on the diagonal argument rather than on counting. See Cardinality and infinity for details. An alternative proof of Theorem 3.8 by induction on nn is treated as an example in Proof techniques.

4.1. Definitions and their correspondence with connectives

Section titled “4.1. Definitions and their correspondence with connectives”

From here on we fix a set UU containing all objects under consideration and call it the universal set. Every set we handle is a subset of UU.

Definition 4.1(Union, intersection, difference, complement)

For A,B⊆UA, B \subseteq U we define

A∪B={x∈U∣x∈A or x∈B}(union)A∩B={x∈U∣x∈A and x∈B}(intersection)A∖B={x∈U∣x∈A and x∉B}(difference)Ac={x∈U∣x∉A}(complement)\begin{aligned} A \cup B &= \{x \in U \mid x \in A \ \text{or}\ x \in B\} &&(\text{union}) \\ A \cap B &= \{x \in U \mid x \in A \ \text{and}\ x \in B\} &&(\text{intersection}) \\ A \setminus B &= \{x \in U \mid x \in A \ \text{and}\ x \notin B\} &&(\text{difference}) \\ A^{c} &= \{x \in U \mid x \notin A\} &&(\text{complement}) \end{aligned}

When A∩B=∅A \cap B = \emptyset we say that AA and BB are disjoint.

As the definitions make plain, the operations on sets are restatements of the logical connectives. The following table of correspondences is the backbone of the whole article.

SetsCondition on xxLogic
A∩BA \cap Bx∈Ax \in A and x∈Bx \in B∧\land
A∪BA \cup Bx∈Ax \in A or x∈Bx \in B∨\lor
A∖BA \setminus Bx∈Ax \in A and x∉Bx \notin B∧\land with ¬\lnot
AcA^{c}x∉Ax \notin A¬\lnot
A⊆BA \subseteq Bif x∈Ax \in A then x∈Bx \in B  ⟹  \implies
A=BA = Bx∈Ax \in A and x∈Bx \in B are equivalent  ⟺  \iff

Because of this correspondence, each identity proved in logic hands us an identity about sets. We carry out that procedure explicitly below.

UAB①②③④
Two sets A and B inside a universal set U. The four regions cut out by the boundaries are numbered.

The four regions of the figure are: ① is A∖BA \setminus B, ② is A∩BA \cap B, ③ is B∖AB \setminus A, and ④ is Ac∩BcA^{c} \cap B^{c}. Any x∈Ux \in U lies in exactly one of these four, according to the combination of whether x∈Ax \in A and whether x∈Bx \in B.

Theorem 4.2(Distributive law)

For A,B,C⊆UA, B, C \subseteq U,

A∩(B∪C)=(A∩B)∪(A∩C).A \cap (B \cup C) = (A \cap B) \cup (A \cap C).
Proof(Theorem 4.2)

By Proposition 3.4 we prove two inclusions.

(⊆\subseteq) Let x∈A∩(B∪C)x \in A \cap (B \cup C). By Definition 4.1, x∈Ax \in A and x∈B∪Cx \in B \cup C. From the latter, x∈Bx \in B or x∈Cx \in C.

  • Case x∈Bx \in B: combined with x∈Ax \in A this gives x∈A∩Bx \in A \cap B, hence x∈(A∩B)∪(A∩C)x \in (A \cap B) \cup (A \cap C).
  • Case x∈Cx \in C: combined with x∈Ax \in A this gives x∈A∩Cx \in A \cap C, hence x∈(A∩B)∪(A∩C)x \in (A \cap B) \cup (A \cap C).

In either case x∈(A∩B)∪(A∩C)x \in (A \cap B) \cup (A \cap C), so A∩(B∪C)⊆(A∩B)∪(A∩C)A \cap (B \cup C) \subseteq (A \cap B) \cup (A \cap C).

(⊇\supseteq) Let x∈(A∩B)∪(A∩C)x \in (A \cap B) \cup (A \cap C). Then x∈A∩Bx \in A \cap B or x∈A∩Cx \in A \cap C.

  • Case x∈A∩Bx \in A \cap B: here x∈Ax \in A and x∈Bx \in B. From x∈Bx \in B we get x∈B∪Cx \in B \cup C, so x∈A∩(B∪C)x \in A \cap (B \cup C).
  • Case x∈A∩Cx \in A \cap C: here x∈Ax \in A and x∈Cx \in C. From x∈Cx \in C we get x∈B∪Cx \in B \cup C, so x∈A∩(B∪C)x \in A \cap (B \cup C).

In either case x∈A∩(B∪C)x \in A \cap (B \cup C), so (A∩B)∪(A∩C)⊆A∩(B∪C)(A \cap B) \cup (A \cap C) \subseteq A \cap (B \cup C).

Both inclusions being established, Proposition 3.4 gives the equality.

The other distributive law, A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C), is proved by the same pattern. So that you can work it through yourself, it has been left to Exercise 7.2.

Lemma 4.3(De Morgan's laws (propositional form))

For all propositions PP and QQ, the propositions ¬(P∨Q)\lnot(P \lor Q) and ¬P∧¬Q\lnot P \land \lnot Q always take the same truth value. Likewise ¬(P∧Q)\lnot(P \land Q) and ¬P∨¬Q\lnot P \lor \lnot Q always take the same truth value.

Proof(Lemma 4.3)

Following the table in Definition 2.3, we write out the four cases.

PPQQP∨QP \lor Q¬(P∨Q)\lnot(P \lor Q)¬P∧¬Q\lnot P \land \lnot QP∧QP \land Q¬(P∧Q)\lnot(P \land Q)¬P∨¬Q\lnot P \lor \lnot Q
TTTFFTFF
TFTFFFTT
FTTFFFTT
FFFTTFTT

For instance in row 2, PP is T and QQ is F, so P∨QP \lor Q is T and its negation is F; on the other side ¬P\lnot P is F, so ¬P∧¬Q\lnot P \land \lnot Q is F, and the two agree. In the same row P∧QP \land Q is F, its negation is T, and ¬P∨¬Q=F∨T=T\lnot P \lor \lnot Q = \mathrm{F} \lor \mathrm{T} = \mathrm{T}, so these agree as well. The remaining three rows are as tabulated.

The column ¬(P∨Q)\lnot(P \lor Q) agrees with the column ¬P∧¬Q\lnot P \land \lnot Q, and the column ¬(P∧Q)\lnot(P \land Q) agrees with the column ¬P∨¬Q\lnot P \lor \lnot Q, in all four rows.

Theorem 4.4(De Morgan's laws (set form))

For A,B⊆UA, B \subseteq U,

(A∪B)c=Ac∩Bc,(A∩B)c=Ac∪Bc.(A \cup B)^{c} = A^{c} \cap B^{c}, \qquad (A \cap B)^{c} = A^{c} \cup B^{c}.
Proof(Theorem 4.4)

We prove the first identity. Take x∈Ux \in U arbitrary and put PP for the proposition "x∈Ax \in A" and QQ for "x∈Bx \in B". Using the definitions in Definition 4.1, and Lemma 4.3 at the fourth line, the following equivalences hold in turn.

x∈(A∪B)c  ⟺  x∉A∪B(definition of complement)  ⟺  ¬(x∈A or x∈B)(definition of union)  ⟺  ¬(P∨Q)  ⟺  ¬P∧¬Q(De Morgan, propositional form)  ⟺  x∉A and x∉B  ⟺  x∈Ac and x∈Bc(definition of complement)  ⟺  x∈Ac∩Bc(definition of intersection).\begin{aligned} x \in (A \cup B)^{c} &\iff x \notin A \cup B && (\text{definition of complement}) \\ &\iff \lnot(x \in A \ \text{or}\ x \in B) && (\text{definition of union}) \\ &\iff \lnot(P \lor Q) \\ &\iff \lnot P \land \lnot Q && (\text{De Morgan, propositional form}) \\ &\iff x \notin A \ \text{and}\ x \notin B \\ &\iff x \in A^{c} \ \text{and}\ x \in B^{c} && (\text{definition of complement}) \\ &\iff x \in A^{c} \cap B^{c} && (\text{definition of intersection}). \end{aligned}

Since x∈(A∪B)c  ⟺  x∈Ac∩Bcx \in (A \cup B)^{c} \iff x \in A^{c} \cap B^{c} for every x∈Ux \in U, Axiom 3.2 gives (A∪B)c=Ac∩Bc(A \cup B)^{c} = A^{c} \cap B^{c}.

The second identity is proved by the same chain: x∈(A∩B)c  ⟺  ¬(P∧Q)x \in (A \cap B)^{c} \iff \lnot(P \land Q), and by the second half of Lemma 4.3 we have ¬(P∧Q)  ⟺  ¬P∨¬Q\lnot(P \land Q) \iff \lnot P \lor \lnot Q, which says x∈Acx \in A^{c} or x∈Bcx \in B^{c}, that is x∈Ac∪Bcx \in A^{c} \cup B^{c}. Hence Axiom 3.2 gives (A∩B)c=Ac∪Bc(A \cap B)^{c} = A^{c} \cup B^{c}.

The first half of Theorem 4.4 can also be checked using the four regions of the figure following Definition 4.1. Tabulating, for each region, whether a point lies in each side, we obtain the following (○ means “belongs”, × means “does not belong”).

Regionx∈Ax \in Ax∈Bx \in BA∪BA \cup B(A∪B)c(A \cup B)^{c}AcA^{c}BcB^{c}Ac∩BcA^{c} \cap B^{c}
①○×○××○×
②○○○××××
③×○○×○××
④×××○○○○

The column (A∪B)c(A \cup B)^{c} agrees with the column Ac∩BcA^{c} \cap B^{c} in all four rows. What makes this check a proof is that the four regions exhaust UU.

Example 4.5(Checking with concrete sets)

Let U={1,2,3,4,5,6,7,8,9,10}U = \{1,2,3,4,5,6,7,8,9,10\}, let AA be the set of even numbers in UU, and let BB the set of multiples of 33 in UU; that is,

A={2,4,6,8,10},B={3,6,9}.A = \{2,4,6,8,10\}, \qquad B = \{3,6,9\}.

First compute the left-hand side. Since A∪B={2,3,4,6,8,9,10}A \cup B = \{2,3,4,6,8,9,10\},

(A∪B)c={1,5,7}.(A \cup B)^{c} = \{1,5,7\}.

Now the right-hand side. We have Ac={1,3,5,7,9}A^{c} = \{1,3,5,7,9\} and Bc={1,2,4,5,7,8,10}B^{c} = \{1,2,4,5,7,8,10\}, so picking out the common elements,

Ac∩Bc={1,5,7}.A^{c} \cap B^{c} = \{1,5,7\}.

The two agree. Reading off the meaning: the numbers that are neither even nor multiples of 33 are not “the primes up to 66 together with 11 and 77” but, correctly, “the natural numbers at most 1010 divisible by neither 22 nor 33”, namely 1,5,71, 5, 7.

Remark 4.6

Not every operation shares the properties of arithmetic. Set difference is not associative. Taking A=B=C={1}A = B = C = \{1\},

(A∖B)∖C=∅∖{1}=∅,A∖(B∖C)={1}∖∅={1},(A \setminus B) \setminus C = \emptyset \setminus \{1\} = \emptyset, \qquad A \setminus (B \setminus C) = \{1\} \setminus \emptyset = \{1\},

and these differ. Hence the unparenthesized notation A∖B∖CA \setminus B \setminus C is not permissible. The analogy ”∪\cup and ∩\cap are associative, so ∖\setminus must be too” breaks down here.

Definition 5.1(Predicate)

Fix a set XX. If for each a∈Xa \in X a proposition P(a)P(a) is determined, then PP is called a predicate (or condition) on XX, and XX is called the domain of PP.

"x+1=3x + 1 = 3" becomes a predicate on N\mathbb{N} once we fix N\mathbb{N} as the domain: P(2)P(2) is true, P(5)P(5) is false, and so on — truth is decided only after a value is substituted for xx. Note that leaving the domain unstated changes the truth value. “There exists xx with x2=2x^2 = 2” is false with domain Q\mathbb{Q} (irrationality of the square root of 2(Theorem 7.5)[Techniques of Proof]) and true with domain R\mathbb{R} (existence of √2(Theorem 5.6)[What Is a Number? From the Naturals to the Reals, and Why 1 = 0.999… Is True]).

Definition 5.2(Universal and existential quantifiers)

For a predicate PP on XX we define the following two propositions.

  • ∀x∈X, P(x)\forall x \in X,\ P(x): true if and only if P(a)P(a) is true for every element aa of XX.
  • ∃x∈X, P(x)\exists x \in X,\ P(x): true if and only if there is at least one a∈Xa \in X for which P(a)P(a) is true.

We call ∀\forall the universal quantifier and ∃\exists the existential quantifier, and refer to them collectively as quantifiers.

Let us record the values when the domain is empty. If X=∅X = \emptyset, then ∀x∈∅, P(x)\forall x \in \emptyset,\ P(x) is true: were it false, there would have to be some a∈∅a \in \emptyset with P(a)P(a) false, but ∅\emptyset has no elements. On the other hand ∃x∈∅, P(x)\exists x \in \emptyset,\ P(x) is false: before asking whether P(a)P(a) is true, there is no aa with a∈∅a \in \emptyset at all. This is a restatement of the vacuous truth seen in Proposition 3.6.

Theorem 5.3(Negation of quantifiers)

Let XX be a set and PP a predicate on XX. Then

¬(∀x∈X, P(x))  ⟺  ∃x∈X, ¬P(x),\lnot\bigl(\forall x \in X,\ P(x)\bigr) \iff \exists x \in X,\ \lnot P(x),¬(∃x∈X, P(x))  ⟺  ∀x∈X, ¬P(x).\lnot\bigl(\exists x \in X,\ P(x)\bigr) \iff \forall x \in X,\ \lnot P(x).
Proof(Theorem 5.3)

We prove the first equivalence.

(⟹\Longrightarrow) Suppose ¬(∀x∈X,P(x))\lnot(\forall x \in X, P(x)) is true. Assume for contradiction that the conclusion ∃x∈X, ¬P(x)\exists x \in X,\ \lnot P(x) is false. By Definition 5.2, this says that there is no a∈Xa \in X making ¬P(a)\lnot P(a) true. Then for every a∈Xa \in X the statement ¬P(a)\lnot P(a) is false, that is, P(a)P(a) is true. By Definition 5.2 this means ∀x∈X,P(x)\forall x \in X, P(x) is true, contradicting the assumption ¬(∀x∈X,P(x))\lnot(\forall x \in X, P(x)). Hence ∃x∈X, ¬P(x)\exists x \in X,\ \lnot P(x) is true.

(⟸\Longleftarrow) Suppose ∃x∈X, ¬P(x)\exists x \in X,\ \lnot P(x) is true, and pick an element a∈Xa \in X with ¬P(a)\lnot P(a) true. If ∀x∈X,P(x)\forall x \in X, P(x) were true, then since a∈Xa \in X we would get that P(a)P(a) is true, contradicting the truth of ¬P(a)\lnot P(a). Hence ∀x∈X,P(x)\forall x \in X, P(x) is false, that is, ¬(∀x∈X,P(x))\lnot(\forall x \in X, P(x)) is true.

The second equivalence follows by applying the first to the predicate ¬P\lnot P. Indeed, the first gives ¬(∀x∈X,¬P(x))  ⟺  ∃x∈X,¬¬P(x)\lnot(\forall x \in X, \lnot P(x)) \iff \exists x \in X, \lnot\lnot P(x), and since ¬¬P(x)\lnot \lnot P(x) and P(x)P(x) take the same truth value (applying ¬\lnot twice in the table of Definition 2.3 returns the original value), we obtain ¬(∀x∈X,¬P(x))  ⟺  ∃x∈X,P(x)\lnot(\forall x \in X, \lnot P(x)) \iff \exists x \in X, P(x). Negating both sides and removing the double negation again yields ∀x∈X,¬P(x)  ⟺  ¬(∃x∈X,P(x))\forall x \in X, \lnot P(x) \iff \lnot(\exists x \in X, P(x)).

Combining this theorem with the last assertion of Proposition 2.4 (¬(P  ⟹  Q)\lnot(P \implies Q) is P∧¬QP \land \lnot Q) lets us push a negation mechanically inward through a formula of any length. There are only three steps.

  1. Change a leading ∀\forall into ∃\exists and a leading ∃\exists into ∀\forall, moving the ¬\lnot one step inward.
  2. Replace ¬(P∧Q)\lnot(P \land Q) by ¬P∨¬Q\lnot P \lor \lnot Q, and ¬(P∨Q)\lnot(P \lor Q) by ¬P∧¬Q\lnot P \land \lnot Q (Lemma 4.3).
  3. Replace ¬(P  ⟹  Q)\lnot(P \implies Q) by P∧¬QP \land \lnot Q (Proposition 2.4).
Forming the negation of an ε-δ statement. At each stage the negation sign moves one step inward and a quantifier is interchanged.

Example 5.4(Negating the definition of continuity)

A real-valued function ff is continuous at a point aa when

∀ε>0, ∃δ>0, ∀x∈R, (∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε)\forall \varepsilon > 0,\ \exists \delta > 0,\ \forall x \in \mathbb{R},\ \bigl(|x - a| < \delta \implies |f(x) - f(a)| < \varepsilon\bigr)

holds. We form the negation by the three steps above, using Theorem 5.3 in the first three stages and Proposition 2.4 in the last.

¬(∀ε>0, ∃δ>0, ∀x, (∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε))  ⟺  ∃ε>0, ¬(∃δ>0, ∀x, (⋯ ))(negation of a quantifier)  ⟺  ∃ε>0, ∀δ>0, ¬(∀x, (⋯ ))(negation of a quantifier)  ⟺  ∃ε>0, ∀δ>0, ∃x, ¬(∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε)(negation of a quantifier)  ⟺  ∃ε>0, ∀δ>0, ∃x, (∣x−a∣<δ ∧ ∣f(x)−f(a)∣≥ε)(negation of an implication).\begin{aligned} &\lnot\Bigl(\forall \varepsilon > 0,\ \exists \delta > 0,\ \forall x,\ (|x-a| < \delta \implies |f(x)-f(a)| < \varepsilon)\Bigr) \\ &\iff \exists \varepsilon > 0,\ \lnot\Bigl(\exists \delta > 0,\ \forall x,\ (\cdots)\Bigr) && (\text{negation of a quantifier}) \\ &\iff \exists \varepsilon > 0,\ \forall \delta > 0,\ \lnot\Bigl(\forall x,\ (\cdots)\Bigr) && (\text{negation of a quantifier}) \\ &\iff \exists \varepsilon > 0,\ \forall \delta > 0,\ \exists x,\ \lnot\bigl(|x-a| < \delta \implies |f(x)-f(a)| < \varepsilon\bigr) && (\text{negation of a quantifier}) \\ &\iff \exists \varepsilon > 0,\ \forall \delta > 0,\ \exists x,\ \bigl(|x-a| < \delta \ \land\ |f(x)-f(a)| \ge \varepsilon\bigr) && (\text{negation of an implication}). \end{aligned}

Put into words: there exists some ε>0\varepsilon > 0 such that, however small one takes δ>0\delta > 0, one can find a point xx lying within distance δ\delta of aa whose value nevertheless deviates by at least ε\varepsilon.

Let us use this. We show that

f(x)={0(x≤0)1(x>0)f(x) = \begin{cases} 0 & (x \le 0) \\ 1 & (x > 0) \end{cases}

is not continuous at a=0a = 0. Take ε=12\varepsilon = \tfrac{1}{2}. Let δ>0\delta > 0 be arbitrary and choose x=δ/2x = \delta/2. Then ∣x−0∣=δ/2<δ|x - 0| = \delta/2 < \delta, and since x>0x > 0 we have f(x)=1f(x) = 1 while f(0)=0f(0) = 0, so

∣f(x)−f(0)∣=∣1−0∣=1≥12=ε.|f(x) - f(0)| = |1 - 0| = 1 \ge \tfrac{1}{2} = \varepsilon .

As δ\delta was arbitrary, the negation above holds. Hence ff is not continuous at 00.

Remark 5.5(The order must not be interchanged)

When a ∀\forall and an ∃\exists follow one another, their order changes the meaning. With domain R\mathbb{R}:

  • ∀x∈R, ∃y∈R, y>x\forall x \in \mathbb{R},\ \exists y \in \mathbb{R},\ y > x is true, because yy may be chosen after xx is given; take y=x+1y = x + 1.
  • ∃y∈R, ∀x∈R, y>x\exists y \in \mathbb{R},\ \forall x \in \mathbb{R},\ y > x is false, because yy must be fixed first, and then choosing x=yx = y makes y>xy > x fail. Using Theorem 5.3, its negation is ∀y, ∃x, y≤x\forall y,\ \exists x,\ y \le x, and x=yx = y indeed satisfies the condition.

The same phenomenon occurs for the continuity of Example 5.4. In continuity, δ\delta may be chosen in response to both ε\varepsilon and the point aa; but moving ∀a\forall a inside ∃δ\exists \delta to obtain

∀ε>0, ∃δ>0, ∀a, ∀x, (∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε)\forall \varepsilon > 0,\ \exists \delta > 0,\ \forall a,\ \forall x,\ \bigl(|x-a| < \delta \implies |f(x)-f(a)| < \varepsilon\bigr)

forbids δ\delta to depend on aa. This is the definition of uniform continuity, a stronger condition than continuity at each point. A single difference in the order of symbols produces an entirely different notion.

Corollary 5.6(De Morgan's laws (for families of sets))

Let Λ\Lambda be a non-empty set and suppose that for each λ∈Λ\lambda \in \Lambda a set Aλ⊆UA_{\lambda} \subseteq U is given. Defining

⋃λ∈ΛAλ={x∈U∣∃λ∈Λ, x∈Aλ},⋂λ∈ΛAλ={x∈U∣∀λ∈Λ, x∈Aλ},\bigcup_{\lambda \in \Lambda} A_{\lambda} = \{x \in U \mid \exists \lambda \in \Lambda,\ x \in A_{\lambda}\}, \qquad \bigcap_{\lambda \in \Lambda} A_{\lambda} = \{x \in U \mid \forall \lambda \in \Lambda,\ x \in A_{\lambda}\},

we have

(⋃λ∈ΛAλ)c=⋂λ∈ΛAλc,(⋂λ∈ΛAλ)c=⋃λ∈ΛAλc.\Bigl(\bigcup_{\lambda \in \Lambda} A_{\lambda}\Bigr)^{c} = \bigcap_{\lambda \in \Lambda} A_{\lambda}^{c}, \qquad \Bigl(\bigcap_{\lambda \in \Lambda} A_{\lambda}\Bigr)^{c} = \bigcup_{\lambda \in \Lambda} A_{\lambda}^{c}.
Proof(Corollary 5.6)

We prove the first identity. Take x∈Ux \in U arbitrary. At the second line we use the second half of Theorem 5.3 (the one turning ¬∃\lnot \exists into ∀¬\forall \lnot).

x∈(⋃λAλ)c  ⟺  ¬(∃λ∈Λ, x∈Aλ)(definitions of union and complement)  ⟺  ∀λ∈Λ, ¬(x∈Aλ)(negation of a quantifier)  ⟺  ∀λ∈Λ, x∈Aλc(definition of complement)  ⟺  x∈⋂λ∈ΛAλc(definition of intersection).\begin{aligned} x \in \Bigl(\bigcup_{\lambda} A_{\lambda}\Bigr)^{c} &\iff \lnot\bigl(\exists \lambda \in \Lambda,\ x \in A_{\lambda}\bigr) && (\text{definitions of union and complement}) \\ &\iff \forall \lambda \in \Lambda,\ \lnot(x \in A_{\lambda}) && (\text{negation of a quantifier}) \\ &\iff \forall \lambda \in \Lambda,\ x \in A_{\lambda}^{c} && (\text{definition of complement}) \\ &\iff x \in \bigcap_{\lambda \in \Lambda} A_{\lambda}^{c} && (\text{definition of intersection}). \end{aligned}

Since the equivalence holds for every x∈Ux \in U, the two sides are equal by Axiom 3.2. The second identity is obtained by using, at the second line of the same chain, the first half of Theorem 5.3 (the one turning ¬∀\lnot \forall into ∃¬\exists \lnot).

The case where Λ\Lambda has two elements is Theorem 4.4. Thus Lemma 4.3, Theorem 4.4 and Corollary 5.6 are three manifestations of a single rule, which fits into one sentence: negation interchanges ∧\land with ∨\lor, ∀\forall with ∃\exists, and ∩\cap with ∪\cup.

6. Necessary conditions, sufficient conditions, equivalence

Section titled “6. Necessary conditions, sufficient conditions, equivalence”

Definition 6.1(Necessary and sufficient conditions)

For propositions PP and QQ such that P  ⟹  QP \implies Q is true, we say that

  • PP is a sufficient condition for QQ, and
  • QQ is a necessary condition for PP.

When both P  ⟹  QP \implies Q and Q  ⟹  PQ \implies P are true, that is when P  ⟺  QP \iff Q is true, we say that PP is a necessary and sufficient condition for QQ, and that PP and QQ are equivalent.

The way to remember this is: the side the arrow leaves is sufficient, the side it enters is necessary. Since asserting PP alone already yields QQ, the condition PP is “sufficient”; and since PP cannot hold if QQ fails (the contrapositive, Proposition 2.4), the condition QQ is “necessary”.

Example 6.2(Numbers whose square is 4)

Consider three conditions on a real number xx. PP: x=2x = 2; QQ: x2=4x^2 = 4; RR: ∣x∣=2|x| = 2.

  • PP is a sufficient condition for QQ, since x=2x = 2 gives x2=4x^2 = 4. It is not a necessary one: x=−2x = -2 satisfies QQ but not PP, so Q  ⟹  PQ \implies P is false.
  • QQ is a necessary condition for PP. This is nothing but a restatement of the truth of P  ⟹  QP \implies Q, read as: in order for x=2x = 2, one must at least have x2=4x^2 = 4.
  • RR is a necessary and sufficient condition for QQ. If ∣x∣=2|x| = 2 then x2=∣x∣2=4x^2 = |x|^2 = 4. Conversely, if x2=4x^2 = 4 then x2−4=(x−2)(x+2)=0x^2 - 4 = (x-2)(x+2) = 0, so x=2x = 2 or x=−2x = -2, and in either case ∣x∣=2|x| = 2.

Note that the sentence ”x=2x = 2 is a sufficient condition for x2=4x^2 = 4” treats the condition x=2x = 2 as the stronger one. A strong condition (one satisfied by few numbers) is a sufficient condition; a weak condition (one satisfied by many) is a necessary condition. The next proposition makes this intuition exact.

Proposition 6.3(Truth sets and their correspondence with logic)

Let XX be a set and let PP, QQ be predicates on XX. Define the truth set

[P]={x∈X∣P(x) is true}[P] = \{x \in X \mid P(x) \ \text{is true}\}

(taking XX as the universal set). Then the following hold.

(1)(∀x∈X, (P(x)  ⟹  Q(x)))  ⟺  [P]⊆[Q],(2)[P∧Q]=[P]∩[Q],[P∨Q]=[P]∪[Q],[¬P]=[P]c.\begin{aligned} &\text{(1)}\quad \bigl(\forall x \in X,\ (P(x) \implies Q(x))\bigr) \iff [P] \subseteq [Q], \\ &\text{(2)}\quad [P \land Q] = [P] \cap [Q], \quad [P \lor Q] = [P] \cup [Q], \quad [\lnot P] = [P]^{c}. \end{aligned}
Proof(Proposition 6.3)

(1) By Definition 3.3, [P]⊆[Q][P] \subseteq [Q] means “for every xx, x∈[P]  ⟹  x∈[Q]x \in [P] \implies x \in [Q]”. By the definition of a truth set, x∈[P]x \in [P] is equivalent to ”x∈Xx \in X and P(x)P(x) is true”, and x∈[Q]x \in [Q] is equivalent to ”x∈Xx \in X and Q(x)Q(x) is true”. Restricting the domain to XX makes x∈Xx \in X automatic, so the condition coincides with “for every x∈Xx \in X, P(x)  ⟹  Q(x)P(x) \implies Q(x)”.

(2) Take x∈Xx \in X arbitrary. By definition, x∈[P∧Q]x \in [P \land Q] says ”P(x)∧Q(x)P(x) \land Q(x) is true”, that is ”P(x)P(x) is true and Q(x)Q(x) is true” (Definition 2.3), which is equivalent to x∈[P]x \in [P] and x∈[Q]x \in [Q], that is to x∈[P]∩[Q]x \in [P] \cap [Q] (Definition 4.1). Since the equivalence holds for every x∈Xx \in X, Axiom 3.2 gives [P∧Q]=[P]∩[Q][P \land Q] = [P] \cap [Q]. The claims for ∨\lor and ¬\lnot follow by exactly the same procedure, since ∨\lor is the very definition of ∪\cup and ¬\lnot that of the complement.

By (1), ”PP is a sufficient condition for QQ” is the same as "[P]⊆[Q][P] \subseteq [Q]". In Example 6.2 we have [P]={2}[P] = \{2\} and [Q]={2,−2}[Q] = \{2, -2\}, so [P]⊊[Q][P] \subsetneq [Q], and the conclusion that PP is sufficient but not necessary is visible at a glance as an inclusion. The slogan “a sufficient condition is a small set, a necessary condition a large one” refers to exactly this inclusion.

Remark 6.4(The limits of naive set theory)

If, as in Definition 3.1, one supposes that writing down a condition produces a set, the theory collapses. Suppose we form the set

R={x∣x∉x}R = \{x \mid x \notin x\}

from the condition "x∉xx \notin x". If R∈RR \in R, then RR satisfies the condition, so R∉RR \notin R. Conversely, if R∉RR \notin R, then RR satisfies the condition, so R∈RR \in R. Either way we get a contradiction (Russell, 1901).

Modern axiomatic set theory (ZFC) abandons the principle that a set may be formed from an arbitrary condition, and permits only carving out a subset of an already existing set AA by a condition (the axiom schema of separation). This is why comprehension has always been written in the form {x∈U∣⋯ }\{x \in U \mid \cdots\} in this article, with the domain UU made explicit. The question of what an axiom system does and does not guarantee leads on to Incompleteness theorems (the first incompleteness theorem(Theorem 5.1)[ゲーデルの不完全性定理]). And how far back one must define the meanings of the symbols before an equation such as "0.999…=10.999\ldots = 1" is settled is taken up in What is a number?.

Exercise 7.1Easy

Let A={∅,{∅}}A = \{\emptyset, \{\emptyset\}\}.

(1) Write out P(A)\mathcal{P}(A) and check that the number of its elements agrees with Theorem 3.8.
(2) Decide, with reasons, whether each of the following four assertions is true or false: ∅∈A\emptyset \in A, ∅⊆A\emptyset \subseteq A, {∅}∈A\{\emptyset\} \in A, {∅}⊆A\{\emptyset\} \subseteq A.

Solution

(1) The elements of AA are ∅\emptyset and {∅}\{\emptyset\}, two in number. Listing the subsets by their number of elements: with 00 elements, ∅\emptyset; with 11 element, {∅}\{\emptyset\} and {{∅}}\{\{\emptyset\}\}; with 22 elements, {∅,{∅}}=A\{\emptyset, \{\emptyset\}\} = A. Hence

P(A)={ ∅, {∅}, {{∅}}, {∅,{∅}} }\mathcal{P}(A) = \bigl\{\, \emptyset,\ \{\emptyset\},\ \{\{\emptyset\}\},\ \{\emptyset, \{\emptyset\}\} \,\bigr\}

which has 4=224 = 2^{2} elements, in agreement with Theorem 3.8.

(2)

  • ∅∈A\emptyset \in A is true, since ∅\emptyset is listed as an element of AA.
  • ∅⊆A\emptyset \subseteq A is true, since by part (1) of Proposition 3.6 the empty set is a subset of every set.
  • {∅}∈A\{\emptyset\} \in A is true, since the second element of AA is {∅}\{\emptyset\}.
  • {∅}⊆A\{\emptyset\} \subseteq A is true: the only element of {∅}\{\emptyset\} is ∅\emptyset, and ∅∈A\emptyset \in A holds, so the condition of Definition 3.3 is met.

All four come out true in this example, but only because of the special circumstance that ∅\emptyset is both “an element of AA” and “the content of a set all of whose elements belong to AA”. In general, regard ∈\in and ⊆\subseteq as unrelated.

Exercise 7.2Standard

For A,B,C⊆UA, B, C \subseteq U, prove

A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)

by element chasing.

Solution

Following Proposition 3.4, we prove two inclusions.

(⊆\subseteq) Let x∈A∪(B∩C)x \in A \cup (B \cap C). By Definition 4.1, x∈Ax \in A or x∈B∩Cx \in B \cap C.

  • Case x∈Ax \in A: from x∈Ax \in A we get x∈A∪Bx \in A \cup B and x∈A∪Cx \in A \cup C, hence x∈(A∪B)∩(A∪C)x \in (A \cup B) \cap (A \cup C).
  • Case x∈B∩Cx \in B \cap C: then x∈Bx \in B and x∈Cx \in C. From x∈Bx \in B we get x∈A∪Bx \in A \cup B, and from x∈Cx \in C we get x∈A∪Cx \in A \cup C. Hence x∈(A∪B)∩(A∪C)x \in (A \cup B) \cap (A \cup C).

In either case xx lies in the right-hand side, so A∪(B∩C)⊆(A∪B)∩(A∪C)A \cup (B \cap C) \subseteq (A \cup B) \cap (A \cup C).

(⊇\supseteq) Let x∈(A∪B)∩(A∪C)x \in (A \cup B) \cap (A \cup C), that is x∈A∪Bx \in A \cup B and x∈A∪Cx \in A \cup C. We split according to whether x∈Ax \in A.

  • Case x∈Ax \in A: then immediately x∈A∪(B∩C)x \in A \cup (B \cap C).
  • Case x∉Ax \notin A: from x∈A∪Bx \in A \cup B and x∉Ax \notin A it follows that x∈Bx \in B (by the definition of ∨\lor, if x∈Ax \in A is false then x∈Bx \in B is true). Likewise x∈A∪Cx \in A \cup C and x∉Ax \notin A give x∈Cx \in C. Hence x∈B∩Cx \in B \cap C, and so x∈A∪(B∩C)x \in A \cup (B \cap C).

In either case xx lies in the left-hand side, so (A∪B)∩(A∪C)⊆A∪(B∩C)(A \cup B) \cap (A \cup C) \subseteq A \cup (B \cap C).

From the two inclusions, Proposition 3.4 gives the equality.

Exercise 7.3Standard

A real sequence (an)n∈N(a_n)_{n \in \mathbb{N}} converges to a real number α\alpha when

∀ε>0, ∃N∈N, ∀n∈N, (n≥N  ⟹  ∣an−α∣<ε)\forall \varepsilon > 0,\ \exists N \in \mathbb{N},\ \forall n \in \mathbb{N},\ \bigl(n \ge N \implies |a_n - \alpha| < \varepsilon\bigr)

holds.

(1) Write the negation of this assertion with all quantifiers brought to the front.
(2) Show that the sequence defined by an=(−1)na_n = (-1)^{n} converges to no real number α\alpha.

Solution

(1) We use Theorem 5.3 three times, then Proposition 2.4 once.

¬(∀ε>0, ∃N, ∀n, (n≥N  ⟹  ∣an−α∣<ε))  ⟺  ∃ε>0, ∀N∈N, ∃n∈N, ¬(n≥N  ⟹  ∣an−α∣<ε)  ⟺  ∃ε>0, ∀N∈N, ∃n∈N, (n≥N ∧ ∣an−α∣≥ε).\begin{aligned} &\lnot\bigl(\forall \varepsilon > 0,\ \exists N,\ \forall n,\ (n \ge N \implies |a_n - \alpha| < \varepsilon)\bigr) \\ &\iff \exists \varepsilon > 0,\ \forall N \in \mathbb{N},\ \exists n \in \mathbb{N},\ \lnot\bigl(n \ge N \implies |a_n - \alpha| < \varepsilon\bigr) \\ &\iff \exists \varepsilon > 0,\ \forall N \in \mathbb{N},\ \exists n \in \mathbb{N},\ \bigl(n \ge N \ \land\ |a_n - \alpha| \ge \varepsilon\bigr). \end{aligned}

(2) Let α\alpha be an arbitrary real number and take ε=1\varepsilon = 1. Let N∈NN \in \mathbb{N} be arbitrary. Assume, for contradiction, that ∣an−α∣<1|a_n - \alpha| < 1 holds for every nn with n≥Nn \ge N.

Let n0n_0 be an even number at least NN and m0m_0 an odd number at least NN (one of N,N+1N, N+1 is even and the other odd, so both exist). By assumption ∣an0−α∣<1|a_{n_0} - \alpha| < 1 and ∣am0−α∣<1|a_{m_0} - \alpha| < 1. The triangle inequality gives

∣an0−am0∣≤∣an0−α∣+∣α−am0∣<1+1=2.|a_{n_0} - a_{m_0}| \le |a_{n_0} - \alpha| + |\alpha - a_{m_0}| < 1 + 1 = 2 .

But an0=(−1)n0=1a_{n_0} = (-1)^{n_0} = 1 and am0=(−1)m0=−1a_{m_0} = (-1)^{m_0} = -1, so ∣an0−am0∣=∣1−(−1)∣=2|a_{n_0} - a_{m_0}| = |1 - (-1)| = 2, and we arrive at the contradiction 2<22 < 2.

Hence the assumption fails, and there exists nn with n≥Nn \ge N and ∣an−α∣≥1|a_n - \alpha| \ge 1. Since NN was arbitrary, the negation from (1) holds and (an)(a_n) does not converge to α\alpha. Since α\alpha was arbitrary too, this sequence converges to no real number.

Exercise 7.4Hard

For A,B⊆UA, B \subseteq U define the symmetric difference by A△B=(A∖B)∪(B∖A)A \bigtriangleup B = (A \setminus B) \cup (B \setminus A). Show that for A,B,C⊆UA, B, C \subseteq U,

(A△B)△C=A△(B△C).(A \bigtriangleup B) \bigtriangleup C = A \bigtriangleup (B \bigtriangleup C).
Solution

We first prove, as a lemma, that for x∈Ux \in U,

x∈A△B  ⟺  exactly one of x∈A and x∈B holds.x \in A \bigtriangleup B \iff \text{exactly one of }x \in A\text{ and }x \in B\text{ holds}.

By Definition 4.1, x∈A∖Bx \in A \setminus B says ”x∈Ax \in A and x∉Bx \notin B”, while x∈B∖Ax \in B \setminus A says ”x∈Bx \in B and x∉Ax \notin A”. By the definition of union, x∈A△Bx \in A \bigtriangleup B says that one of these two holds, that is, that xx belongs to AA only or to BB only, which is the same as “exactly one”.

Next, write k(x)∈{0,1,2,3}k(x) \in \{0,1,2,3\} for the number of the sets AA, BB, CC to which xx belongs, and prove the assertion

x∈(A△B)△C  ⟺  k(x) is odd.x \in (A \bigtriangleup B) \bigtriangleup C \iff k(x) \ \text{is odd}.

Applying the lemma to A△BA \bigtriangleup B and CC, the statement x∈(A△B)△Cx \in (A \bigtriangleup B) \bigtriangleup C says that exactly one of "x∈A△Bx \in A \bigtriangleup B" and "x∈Cx \in C" holds. We split according to whether x∈Cx \in C.

  • Case x∈Cx \in C: the condition becomes x∉A△Bx \notin A \bigtriangleup B, which by the lemma says that x∈Ax \in A and x∈Bx \in B either both hold or both fail. Then the number of AA, BB containing xx is 22 or 00, hence even, and adding 11 for CC makes k(x)k(x) odd. Conversely, if k(x)k(x) is odd and x∈Cx \in C, the number of AA, BB containing xx is even, so the condition holds.
  • Case x∉Cx \notin C: the condition becomes x∈A△Bx \in A \bigtriangleup B, that is, the number of AA, BB containing xx is 11. The contribution of CC is 00, so k(x)=1k(x) = 1, which is odd. Conversely, if k(x)k(x) is odd and x∉Cx \notin C, the number of AA, BB containing xx is k(x)k(x) itself, which is odd and at most 22, hence 11, so the condition holds.

The equivalence holds in both cases, which proves the assertion.

Now apply the same argument to A△(B△C)A \bigtriangleup (B \bigtriangleup C). By the lemma applied to AA and B△CB \bigtriangleup C, the statement x∈A△(B△C)x \in A \bigtriangleup (B \bigtriangleup C) says that exactly one of "x∈Ax \in A" and "x∈B△Cx \in B \bigtriangleup C" holds. We split according to whether x∈Ax \in A.

  • Case x∈Ax \in A: the condition becomes x∉B△Cx \notin B \bigtriangleup C, so the number of BB, CC containing xx is 22 or 00, hence even. Adding 11 for AA makes k(x)k(x) odd. The converse holds similarly.
  • Case x∉Ax \notin A: the condition becomes x∈B△Cx \in B \bigtriangleup C, so the number of BB, CC containing xx is 11. The contribution of AA is 00, so k(x)=1k(x) = 1, which is odd. The converse holds similarly.

Hence x∈A△(B△C)  ⟺  k(x)x \in A \bigtriangleup (B \bigtriangleup C) \iff k(x) is odd as well.

Therefore, for every x∈Ux \in U,

x∈(A△B)△C  ⟺  k(x) is odd  ⟺  x∈A△(B△C),x \in (A \bigtriangleup B) \bigtriangleup C \iff k(x) \ \text{is odd} \iff x \in A \bigtriangleup (B \bigtriangleup C),

so the two sets are equal by Axiom 3.2.

  • Kazuo Matsuzaka, Shugo, Iso Nyumon (in Japanese), Iwanami Shoten, 1968 — Chapter 1, “Sets and maps”. A standard Japanese introduction, careful with proofs of set identities.
  • Masahiko Saito, Sugaku no Kiso: Shugo, Su, Iso (in Japanese), University of Tokyo Press, 2002 — Chapter 1. Shows clearly the path from set theory to the construction of the real numbers.
  • Shoichi Nakajima, Shugo, Shazo, Ronri: Sugaku no Kihon o Manabu (in Japanese), Kyoritsu Shuppan, 2012 — devotes considerable space to reading and writing formulas and to handling quantifiers.
  • Shoji Maehara, Kigo Ronri Nyumon (in Japanese), Nippon Hyoron Sha, 1967 (reissued 2005) — a standard introduction treating propositional and predicate logic formally.
  • P. R. Halmos, Naive Set Theory, Van Nostrand, 1960 — Chapters 1 to 5. A short classic bridging naive and axiomatic set theory.

Appendix: A list of frequently used equivalences

Section titled “Appendix: A list of frequently used equivalences”

Consult this when a proof stalls. Here PP, QQ, RR are propositions and AA, BB, CC are subsets of UU; only in the last two rows (negation of quantifiers) is PP a predicate on a domain XX. That the two sides always take the same truth value (or, for sets, denote the same set) can be verified by a truth table or by element chasing.

NameLogical formSet form
Double negation¬¬P\lnot \lnot P and PP(Ac)c=A(A^{c})^{c} = A
De Morgan¬(P∧Q)\lnot(P \land Q) and ¬P∨¬Q\lnot P \lor \lnot Q(A∩B)c=Ac∪Bc(A \cap B)^{c} = A^{c} \cup B^{c}
De Morgan¬(P∨Q)\lnot(P \lor Q) and ¬P∧¬Q\lnot P \land \lnot Q(A∪B)c=Ac∩Bc(A \cup B)^{c} = A^{c} \cap B^{c}
DistributionP∧(Q∨R)P \land (Q \lor R) and (P∧Q)∨(P∧R)(P \land Q) \lor (P \land R)A∩(B∪C)=(A∩B)∪(A∩C)A \cap (B \cup C) = (A \cap B) \cup (A \cap C)
DistributionP∨(Q∧R)P \lor (Q \land R) and (P∨Q)∧(P∨R)(P \lor Q) \land (P \lor R)A∪(B∩C)=(A∪B)∩(A∪C)A \cup (B \cap C) = (A \cup B) \cap (A \cup C)
AbsorptionP∧(P∨Q)P \land (P \lor Q) and PPA∩(A∪B)=AA \cap (A \cup B) = A
Unfolding implicationP  ⟹  QP \implies Q and ¬P∨Q\lnot P \lor QA⊆BA \subseteq B and Ac∪B=UA^{c} \cup B = U
ContrapositionP  ⟹  QP \implies Q and ¬Q  ⟹  ¬P\lnot Q \implies \lnot PA⊆BA \subseteq B and Bc⊆AcB^{c} \subseteq A^{c}
Negation of implication¬(P  ⟹  Q)\lnot(P \implies Q) and P∧¬QP \land \lnot QA⊈BA \nsubseteq B and A∩Bc≠∅A \cap B^{c} \ne \emptyset
Negation of a quantifier¬∀x P(x)\lnot \forall x\, P(x) and ∃x ¬P(x)\exists x\, \lnot P(x)—
Negation of a quantifier¬∃x P(x)\lnot \exists x\, P(x) and ∀x ¬P(x)\forall x\, \lnot P(x)—

Of these, only absorption is not treated in the body, so we record how to check it. If x∈A∩(A∪B)x \in A \cap (A \cup B) then x∈Ax \in A (the first half of the definition of intersection). Conversely, if x∈Ax \in A then also x∈A∪Bx \in A \cup B, so x∈A∩(A∪B)x \in A \cap (A \cup B). Hence the two are equal by Proposition 3.4.

not audited

Report an error in this article ・Operated by: Mugen Giken LLC ・Pricing ・Terms ・Legal notice

© 2026 夢現技研合同会社 ・Code samples are MIT licensed.