COMP233 · Chapter 6 Interactive Companion

Set Theory

Sets and operations, the element method of proof, the catalogue of set identities, algebraic proofs, and Boolean algebra. Sections 6.1–6.4.
Back to COMP233

About this chapter

Sets are the language the rest of mathematics is written in: relations, functions, sequences, probability, and the formal models of computation are all built from them. Chapter 6 does two things at once. It gives you the vocabulary (subset, union, intersection, complement, power set, product, partition), and it teaches the element method, the single proof technique that settles almost every set fact by reducing it to the logic of Chapters 2 and 3.

The thread that runs through it. A set identity such as (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ is the logical equivalence ¬(p ∨ q) ≡ ¬p ∧ ¬q wearing different clothes. By 6.4 this is made precise: logic, sets, and bits are all the same algebraic structure, a Boolean algebra. That is why the chapter ends where digital hardware begins.

A note on Chapter 5. One result here, that an n-element set has 2ⁿ subsets, is proved in the book by mathematical induction (Chapter 5, not yet covered). This companion gives a complete counting argument for it that needs no induction, and flags the induction proof as a preview.

Section 6.1Set basics

Definitions (Epp §6.1)
A set is a collection of distinct objects; each object is an element (member) of the set. We write a ∈ S for “a is an element of S” and a ∉ S for its negation.
Roster notation: list the elements, S = {1, 2, 3}. Set-builder notation: A = {x ∈ S | P(x)}, “the set of all x in S such that P(x) is true”.

Three facts that the notation hides. (1) Order does not matter: {a, b, c} = {c, a, b}. (2) Repetition does not matter: {a, a, b} = {a, b}, a set has no multiplicities. (3) A set may be an element of another set: {1, {1}} has two elements, 1 and the set {1}. In particular a one-element set is not the same as its element: {a} ≠ a.

A set-builder can be empty: {x ∈ ℝ | 3 < x < 2} = ∅, since no real number is both greater than 3 and less than 2.

6.1.1 Subsets, proper subsets, and equality

Definitions (Epp §6.1)
A ⊆ B (A is a subset of B) means ∀x, (x ∈ A → x ∈ B).
Its negation: A ⊈ B means ∃x such that x ∈ A and x ∉ B.
A is a proper subset of B when A ⊆ B and there is an element of B not in A.
Set equality: A = B if and only if A ⊆ B and B ⊆ A.
Do not confuse with . The symbol relates an element to a set; relates a set to a set.
StatementValueWhy
2 ∈ {1, 2, 3}TRUE2 is one of the listed elements
{2} ∈ {1, 2, 3}FALSEthe element {2} is not listed; only 1, 2, 3 are
{2} ⊆ {1, 2, 3}TRUEevery element of {2}, namely 2, is in the set
2 ⊆ {1, 2, 3}FALSE2 is a number, not a set; ⊆ needs a set on the left
{2} ∈ {{1}, {2}}TRUEthe element {2} is listed
{2} ⊆ {{1}, {2}}FALSE{2}'s element is 2, and 2 is not an element of {{1},{2}}
The element argument for A ⊆ B (Epp §6.1)
To prove A ⊆ B: (1) suppose x is a particular but arbitrarily chosen element of A; (2) show, using definitions, that this x must also be in B.
Worked example (Epp 6.1.2): prove A ⊆ B, where A = {n ∈ ℤ | n = 6r + 12 for some r ∈ ℤ} and B = {n ∈ ℤ | n = 3s for some s ∈ ℤ}
Suppose x ∈ A. [We must show x ∈ B.]
By definition of A, x = 6r + 12 for some integer r.
x = 6r + 12 = 3(2r + 4).
Let s = 2r + 4. Then s is an integer (sums and products of integers are integers), and x = 3s.
So x has the form required by B, hence x ∈ B. Since every element of A is in B, A ⊆ B. ■

6.1.2 Set-operations calculator

Definitions (Epp §6.1)
For sets inside a universe U:
A ∪ B = {x | x ∈ A or x ∈ B} (union)  ·  A ∩ B = {x | x ∈ A and x ∈ B} (intersection)
B − A = {x | x ∈ B and x ∉ A} (difference)  ·  Aᶜ = {x ∈ U | x ∉ A} (complement)
Enter each set as a comma-separated list. The complement is taken inside the universe U. (Worked example, Epp 6.1.5: try U = a,b,c,d,e,f,g, A = a,c,e,g, B = d,e,f,g.)

6.1.2a Seeing the operations: Venn diagrams

A Venn diagram draws the universe U as a rectangle and each set as a circle inside it; you shade the region an operation produces. It is the fastest way to see what an operation means.
A ∪ B AB U A ∩ B AB A − B AB Aᶜ A
Use it, but mind its limit
A Venn diagram is the right starting point: shade both sides of a proposed identity to guess whether it is true, or, when they differ, to hunt for a counterexample (Section 6.3). But a diagram shows one drawn arrangement, not all possible sets, so it suggests, it does not prove. The proof is the element method of Section 6.2.

6.1.2b Intervals are sets of real numbers

Definition (Epp §6.1)
An interval is the set of all real numbers between two endpoints. A round bracket excludes the endpoint (open), a square bracket includes it (closed):
(a, b) = {x ∈ ℝ | a < x < b}  ·  [a, b] = {x ∈ ℝ | a ≤ x ≤ b}  ·  half-open (a, b], [a, b).

Because an interval is a set, the operations ∪, ∩, −, ᶜ apply unchanged; the only care needed is the endpoints. For A = (−1, 0] and B = [0, 1): A ∪ B = (−1, 1), A ∩ B = {0} (only 0 lies in both), and B − A = (0, 1). Drawing them on a number line is the interval version of a Venn diagram. (Worked in full as W2.)

6.1.3 Subset & equality checker

Test the relationships between two sets. The panel reports each containment, equality, and proper-subset status, and gives a witnessing element when a containment fails.

6.1.4 The empty set and partitions

Definitions (Epp §6.1)
The empty set is the set with no elements. Two facts: there is only one empty set (proved in 6.2), and is a subset of every set. Note ∅ ≠ {∅}: the right side has one element.
Two sets are disjoint when A ∩ B = ∅. A collection {A₁, A₂, …} is a partition of A when (1) their union is all of A, and (2) they are pairwise disjoint and non-empty.
Validate a candidate partition. Enter the whole set A, then the blocks separated by a semicolon. Example: A = 1,2,3,4,5,6 with blocks 1,2 ; 3,4 ; 5,6.

6.1.5 Power sets and Cartesian products

Definitions (Epp §6.1)
The power set ℙ(A) is the set of all subsets of A. If A has n elements then ℙ(A) has 2ⁿ elements (proved in 6.3).
An ordered pair (a, b) satisfies (a, b) = (c, d) iff a = c and b = d. The Cartesian product is A × B = {(a, b) | a ∈ A and b ∈ B}, with |A × B| = |A| · |B|.

Practice exercises · Section 6.1

Recommended (Epp 4th ed., §6.1): subsets, prove or disprove 3–7; operations & Venn diagrams 10–14, 17; partitions 27–30; power sets & Cartesian products 31–35. Full taught solutions to a selection are in the Worked solutions section.
Exercise 6.1.A · Epp 6.1 #5
Let C = {n ∈ ℤ | n = 6r − 5 for some r ∈ ℤ} and D = {m ∈ ℤ | m = 3s + 1 for some s ∈ ℤ}. Prove or disprove: (a) C ⊆ D; (b) D ⊆ C.

(a) C ⊆ D is true. Suppose x ∈ C, so x = 6r − 5 for some integer r. Then x = 6r − 6 + 1 = 3(2r − 2) + 1. Let s = 2r − 2, an integer; then x = 3s + 1, so x ∈ D. Hence C ⊆ D.

(b) D ⊆ C is false. Take x = 4 (from s = 1: 3·1 + 1 = 4), so 4 ∈ D. If 4 ∈ C then 4 = 6r − 5, forcing r = 3/2, not an integer. So 4 ∉ C, and this one witness disproves the universal claim.

Exercise 6.1.B · cf. Epp 6.1 #31–35
Find ℙ(∅), ℙ({∅}), and ℙ({a, b}). State the size of each and check it against 2ⁿ.

ℙ(∅) = {∅}: the empty set has exactly one subset, itself. Size 1 = 2⁰. (Note this is not the empty set; it has one element.)

ℙ({∅}) = {∅, {∅}}: the set {∅} has one element, so two subsets. Size 2 = 2¹.

ℙ({a, b}) = {∅, {a}, {b}, {a, b}}. Size 4 = 2².

Section 6.2Properties of sets

The goal of 6.2 is to prove set facts rigorously, not by shading a Venn diagram. A Venn picture is a guide; the proof is the element argument. The engine is a small set of procedural definitions, the rules that turn membership in a compound set into a logical sentence.

Procedural definitions (the proof engine)
x ∈ X ∪ Y ⇔ (x ∈ X) or (x ∈ Y)
x ∈ X ∩ Y ⇔ (x ∈ X) and (x ∈ Y)
x ∈ X − Y ⇔ (x ∈ X) and (x ∉ Y)
x ∈ Xᶜ ⇔ x ∉ X
(x, y) ∈ X × Y ⇔ (x ∈ X) and (y ∈ Y)
Theorem 6.2.1 (some subset relations)
A ∩ B ⊆ A;   A ∩ B ⊆ B;   A ⊆ A ∪ B;   B ⊆ A ∪ B.   Transitivity: if A ⊆ B and B ⊆ C then A ⊆ C.
The move: how to find a set proof
Every set fact reduces to the logic of Chapters 2–3. The recipe never changes:
  1. To prove X ⊆ Y, take an arbitrary x ∈ X.
  2. Translatex ∈ X” into a logical sentence with the procedural definitions: ∪ → or, ∩ → and, ᶜ → not, − → and not.
  3. Reason with that sentence (using logical equivalences such as De Morgan or distributive, named as you go).
  4. Translate back to read off “x ∈ Y”.
  5. To prove X = Y, run this both ways ( and ).
What to look for: the connective each symbol unfolds to is your next step. The Venn diagram tells you what the answer should be; this argument is why it holds.

6.2.1 The set identities (Theorem 6.2.2)

These hold for all subsets A, B, C of a universe U. They are the toolkit for every algebraic proof in 6.3, and each one mirrors a logical equivalence from Chapter 2.
LawStatement
CommutativeA ∪ B = B ∪ A  ·  A ∩ B = B ∩ A
Associative(A ∪ B) ∪ C = A ∪ (B ∪ C)  ·  (A ∩ B) ∩ C = A ∩ (B ∩ C)
DistributiveA ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)  ·  A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
IdentityA ∪ ∅ = A  ·  A ∩ U = A
ComplementA ∪ Aᶜ = U  ·  A ∩ Aᶜ = ∅
Double complement(Aᶜ)ᶜ = A
IdempotentA ∪ A = A  ·  A ∩ A = A
Universal boundA ∪ U = U  ·  A ∩ ∅ = ∅
De Morgan(A ∪ B)ᶜ = Aᶜ ∩ Bᶜ  ·  (A ∩ B)ᶜ = Aᶜ ∪ Bᶜ
AbsorptionA ∪ (A ∩ B) = A  ·  A ∩ (A ∪ B) = A
Complements of U, ∅Uᶜ = ∅  ·  ∅ᶜ = U
Set differenceA − B = A ∩ Bᶜ

6.2.2 Element-method proof walker

Method: proving two sets equal
To prove X = Y, prove both containments: (1) X ⊆ Y and (2) Y ⊆ X. For each, take an arbitrary element of the left side and drive it to the right using the procedural definitions.
Choose an identity to see its element-method proof, written out step by step.

6.2.3 Proving a set is empty

Method (proof by contradiction)
To prove X = ∅: suppose X has an element x, and derive a contradiction. This works because there is only one empty set, so “no elements” forces X = ∅.
Worked example (Epp 6.2.4): prove A ∩ ∅ = ∅
Suppose, for contradiction, that A ∩ ∅ has an element x.
By the procedural definition of intersection, x ∈ A and x ∈ ∅.
But x ∈ ∅ is impossible: the empty set has no elements. Contradiction.
So A ∩ ∅ has no element, hence A ∩ ∅ = ∅. ■

Practice exercises · Section 6.2

Recommended (Epp 4th ed., §6.2): element-argument proofs 5, 7, 8, 9, 11, 13, 14, 15; find the mistake 20, 21, 22; proving a set is empty 27–31. Taught solutions to a selection are in the Worked solutions section.
Exercise 6.2.A · cf. Epp 6.2 #5–15
Prove by the element method that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) (the second distributive law), giving both containments.

(⊆) Suppose x ∈ A ∩ (B ∪ C). Then x ∈ A, and x ∈ B ∪ C, i.e. x ∈ B or x ∈ C.

Case x ∈ B: then x ∈ A and x ∈ B, so x ∈ A ∩ B. Case x ∈ C: then x ∈ A ∩ C. Either way x ∈ (A ∩ B) ∪ (A ∩ C).

(⊇) Suppose x ∈ (A ∩ B) ∪ (A ∩ C). Then x ∈ A ∩ B or x ∈ A ∩ C; in both cases x ∈ A, and x ∈ B or x ∈ C, so x ∈ A and x ∈ B ∪ C, i.e. x ∈ A ∩ (B ∪ C).

Both containments hold, so the two sets are equal. ■

Exercise 6.2.B · Find the mistake · Epp 6.2 #20
Find the mistake in the following “proof” that for all sets A, B, C, if A ⊆ B and B ⊆ C then A ⊆ C.
“Proof.” Suppose A, B, C are sets such that A ⊆ B and B ⊆ C. Since A ⊆ B, there is an element x such that x ∈ A and x ∈ B. Since B ⊆ C, there is an element x such that x ∈ B and x ∈ C. Hence there is an element x such that x ∈ A and x ∈ C, and so A ⊆ C.

The mistake. A ⊆ B is a universal conditional, ∀x, (x ∈ A → x ∈ B), not the existential “there is an x with x ∈ A and x ∈ B.” The flawed proof misreads both subset relations as existential and silently reuses the same x for two unrelated ones. Even a genuine x ∈ A ∩ C would not establish the universal A ⊆ C.

Correct proof. Suppose A ⊆ B and B ⊆ C, and let x be a particular but arbitrarily chosen element of A. Since A ⊆ B, x ∈ B; since B ⊆ C, x ∈ C. As x was arbitrary, every element of A is in C, so A ⊆ C. ■

Section 6.3Disproofs and algebraic proofs

Two new skills. First, disproving a proposed set property: a claim “for all sets A, B, C…” is universal, so one counterexample kills it. Second, the algebraic method: instead of arguing element by element, transform one side into the other using the identities of Theorem 6.2.2, citing one law per step.

Worked disproof (Epp 6.3.1)
Claim: for all sets A, B, C, (A − B) ∪ (B − C) = A − C. Shading a Venn diagram suggests the two sides differ (the left can shade part of B outside A; the right never does). The counterexample A = ∅, B = {3}, C = ∅ settles it: left = ∅ ∪ {3} = {3}, right = ∅, and {3} ≠ ∅.

6.3.1 Counterexample tester

Test the claim (A − B) ∪ (B − C) = A − C on your own sets. The panel computes both sides; if they differ, you have a counterexample.

6.3.2 Counting subsets: |ℙ(X)| = 2ⁿ

Theorem 6.3.1
For every integer n ≥ 0: if a set X has n elements, then ℙ(X) has 2ⁿ elements.

Counting argument (no induction needed). To build a subset of X = {x₁, …, xₙ}, decide for each element independently whether to include it or leave it out: two choices per element, made n times. Distinct sequences of choices give distinct subsets, and every subset arises from exactly one sequence. By the multiplication rule the number of subsets is 2 · 2 · … · 2 = 2ⁿ. Equivalently, subsets of an n-set correspond one-to-one with binary strings of length n (bit i = 1 means “xᵢ is in”), and there are 2ⁿ such strings.

Preview of Chapter 5. Epp proves this by induction on n: the base case n = 0 gives ℙ(∅) = {∅}, one subset = 2⁰; the inductive step pairs each subset of an (k+1)-set by whether it contains a fixed element, doubling the count from 2ᵏ to 2ᵏ⁺¹. We will revisit it once induction is in hand.
Generate every subset and watch the count: try sets of size 0, 1, 2, 3, 4.

6.3.3 Algebraic proofs

An algebraic proof transforms one side into the other, citing one identity of Theorem 6.2.2 per step. The law A − B = A ∩ Bᶜ turns every difference into an intersection with a complement, which is what lets the other laws apply. Choose a worked proof:
The move: how to drive an algebraic proof
  1. Clear the differences first: rewrite every X − Y as X ∩ Yᶜ, so only ∪, ∩, ᶜ remain , the forms the laws are written in.
  2. Push complements inward with De Morgan whenever you see (…)ᶜ, and cancel any double complement.
  3. Look for a law's left-hand side inside your expression: a distributive pattern to factor, an A ∩ Aᶜ that collapses to , an A ∪ ∅ or A ∩ U to drop by identity.
  4. Cite one named law per step, and stop when the two sides match.
When stuck, transform the more complicated side toward the simpler one.

6.3.4 Symmetric difference (enrichment)

Definition (Epp §6.3, enrichment)
The symmetric difference is A △ B = (A − B) ∪ (B − A): the elements in exactly one of A, B (not both). Properties (Epp 6.3 #46–50): A △ B = B △ A, A △ ∅ = A, A △ A = ∅, A △ Aᶜ = U.
It is the set analogue of logical XOR. Compute it on two sets:

Practice exercises · Section 6.3

Recommended (Epp 4th ed., §6.3): find a counterexample 1–4; prove or disprove 5, 6, 7, 9, 10, 13; algebraic proofs (cite each step) 30, 31, 32, 34, 35, 38; simplify an expression 41–43; symmetric difference (enrichment) 46–50. Taught solutions are in the Worked solutions section.
Exercise 6.3.A · cf. Epp 6.3 #41–43 (simplify)
Simplify (A ∩ B) ∪ (A ∩ Bᶜ) to a single set, citing each law.
(A ∩ B) ∪ (A ∩ Bᶜ)
= A ∩ (B ∪ Bᶜ)distributive law
= A ∩ Ucomplement law
= Aidentity law

So (A ∩ B) ∪ (A ∩ Bᶜ) = A: splitting A by whether an element is in B and rejoining recovers all of A.

Section 6.4Boolean algebra

Logic, sets, and bits keep obeying the same laws: commutative, associative, distributive, identity, complement, De Morgan. Boolean algebra is the abstract structure that captures exactly those laws once, so a theorem proved for the abstract structure holds for all three at once.

Definition (Epp §6.4)
A Boolean algebra is a set B with two operations + and ·, a unary complement ̅, and two distinguished elements 0 and 1, satisfying for all a, b, c ∈ B:
Axiomfor +for ·
Commutativea + b = b + aa · b = b · a
Associative(a + b) + c = a + (b + c)(a · b) · c = a · (b · c)
Distributivea + (b · c) = (a + b) · (a + c)a · (b + c) = (a · b) + (a · c)
Identitya + 0 = aa · 1 = a
Complementa + a̅ = 1a · a̅ = 0

The point is not three separate theories but one structure with three readings. Read the table across a row to translate any statement between logic, sets, and digital circuits; a law proved once from the axioms holds in all three at once. This is why De Morgan and the distributive law keep reappearing.

Boolean algebraLogic (Ch 2–3)Sets (this chapter)Bits / gates
a + bp ∨ q (or)A ∪ B (union)OR
a · bp ∧ q (and)A ∩ B (intersection)AND
¬p (not)Aᶜ (complement)NOT
0F (false)∅ (empty set)0
1T (true)U (universe)1

So “De Morgan” is the same fact three times: ¬(p ∨ q) ≡ ¬p ∧ ¬q,  (A ∪ B)ᶜ = Aᶜ ∩ Bᶜ,  and the rule for combining NOR gates. Telling the three apart is just a matter of which symbols are in front of you; the algebra underneath is identical.

6.4.1 The smallest Boolean algebra: B = {0, 1}

With + = OR (max), · = AND (min), and 0̅ = 1, 1̅ = 0, the two-element set {0, 1} is a Boolean algebra: this is the algebra of a single bit, and of a logic gate. Pick values and check the axioms hold.

6.4.2 Duality

The duality principle (Epp §6.4)
If you take any identity that holds in every Boolean algebra and swap + ↔ · and 0 ↔ 1 throughout, the result is also a valid identity (its dual). This is why the axioms and identities always come in pairs.
Worked proof from the axioms: the idempotent law a + a = a
a + a = (a + a) · 1    [identity for ·]
= (a + a) · (a + a̅)    [complement for +]
= a + (a · a̅)    [distributive]
= a + 0    [complement for ·]
= a    [identity for +]
By duality, swapping + ↔ · and 0 ↔ 1 gives the dual law a · a = a for free. ■

Practice exercises · Section 6.4

Recommended (Epp 4th ed., §6.4): Boolean-algebra proofs from the axioms 1–5; work in B = {0, 1} 10, 11. A taught axiom-only proof is in the Worked solutions section.
Exercise 6.4.A · cf. Epp 6.4 #1–5
Prove the universal-bound law a + 1 = 1 using only the five axioms.
a + 1
= (a + 1) · 1identity for ·
= (a + 1) · (a + a̅)complement for +
= a + (1 · a̅)distributive
= a + (a̅ · 1)commutative for ·
= a + a̅identity for ·
= 1complement for +

Its dual, a · 0 = 0, follows by swapping + ↔ · and 0 ↔ 1.

Enrichment appendix · not examinable

Russell's paradox. Let S = {A | A is a set and A ∉ A}, the set of all sets that are not members of themselves. Ask: is S ∈ S? If S ∈ S, then by its defining property S ∉ S; if S ∉ S, then it satisfies the property, so S ∈ S. Both lead to contradiction. The lesson: “the set of all sets satisfying any property” is not always a set, naive set theory needs axioms (ZFC) to forbid such self-membership.

The halting problem. The same self-reference defeats any supposed program H(p, x) that decides whether program p halts on input x. Build D(p) that loops forever if H(p, p) says “halts” and halts otherwise; then D(D) halts iff it does not. No such H can exist. Russell's set and Turing's program are the same trick, applied to sets and to computation.

WorkedTaught solutions to recommended exercises

A selection of the exercises recommended on the slides, solved in full. Several are the textbook's own worked examples re-taught at exam depth; the rest are representative problems of the recommended type. Each cites its Epp section and the recommended item range. Attempt on paper before revealing.

Statements follow Epp, Discrete Mathematics with Applications (4th ed.). Where a single textbook problem number is not reproduced verbatim, the exercise is marked “cf.” and matches the type and difficulty of the recommended range.

W1 · Epp 6.1 #10 (operations)
Let A = {1, 3, 5, 7, 9}, B = {3, 6, 9}, C = {2, 4, 6, 8}. Find A ∪ B, A ∩ B, A ∩ C, A − B, B − A, and B ∩ C.

Read each operation straight off the definitions.

  • A ∪ B = {1, 3, 5, 6, 7, 9} (every element in either set).
  • A ∩ B = {3, 9} (in both).
  • A ∩ C = ∅ (nothing is in both: A is all odd, C all even).
  • A − B = {1, 5, 7} (in A, not in B).
  • B − A = {6} (in B, not in A).
  • B ∩ C = {6} (the only common element).

Note: A ∩ C = ∅ says A and C are disjoint.

W2 · Epp 6.1, intervals (cf. #11, 12)
With A = (−1, 0] and B = [0, 1) as sets of real numbers, find A ∪ B, A ∩ B, and B − A.

A round bracket excludes the endpoint (open); a square bracket includes it (closed).

  • A ∪ B = (−1, 1): every x with −1 < x ≤ 0 or 0 ≤ x < 1, which together cover −1 < x < 1.
  • A ∩ B = {0}: the only real in both is 0 (it is in A since (−1,0] includes 0, and in B since [0,1) includes 0).
  • B − A = (0, 1): in B but not in A; removing 0 from [0,1) leaves (0,1).
W3 · Epp 6.1, partitions (cf. #27–30)
Is {{1, 2}, {3}, {4, 5}} a partition of {1, 2, 3, 4, 5}? Is {{1, 2, 3}, {3, 4, 5}}? Justify.

First: yes. The blocks are non-empty, pairwise disjoint ({1,2}∩{3}=∅, etc.), and their union is {1,2,3,4,5}. Both partition conditions hold.

Second: no. The blocks are not disjoint: {1,2,3} ∩ {3,4,5} = {3} ≠ ∅. The element 3 lies in two blocks, which a partition forbids.

W4 · Epp 6.2, element proof (cf. #5–15) · the distributive law
Prove A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) by the element method, both directions.

(⊆) Suppose x ∈ A ∪ (B ∩ C), so x ∈ A, or x ∈ B ∩ C.

If x ∈ A: then x ∈ A ∪ B and x ∈ A ∪ C, so x is in their intersection. If x ∈ B ∩ C: then x ∈ B (so x ∈ A ∪ B) and x ∈ C (so x ∈ A ∪ C), again in the intersection. So the left side is contained in (A ∪ B) ∩ (A ∪ C).

(⊇) Suppose x ∈ (A ∪ B) ∩ (A ∪ C), so x ∈ A ∪ B and x ∈ A ∪ C. If x ∈ A we are done (x ∈ left side). Otherwise x ∉ A; then from x ∈ A ∪ B we get x ∈ B, and from x ∈ A ∪ C we get x ∈ C, so x ∈ B ∩ C, hence x ∈ A ∪ (B ∩ C).

Both containments hold, so the sets are equal. ■ This is the set form of the logical equivalence p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r).

W5 · Epp 6.2, proving empty (cf. #27–31)
Prove that for all sets A and B, A ∩ (B − A) = ∅.

Suppose, for contradiction, that A ∩ (B − A) has an element x.

By the definition of intersection, x ∈ A and x ∈ B − A. By the definition of difference, x ∈ B − A means x ∈ B and x ∉ A.

So x ∈ A and x ∉ A, a contradiction. Therefore A ∩ (B − A) has no element, hence equals . ■

W6 · Epp 6.3 #1 (counterexample)
Find a counterexample to show the statement is false: for all sets A, B, C, (A ∩ B) ∪ C = A ∩ (B ∪ C).

The claim is universal, so a single counterexample disproves it.

Let A = {1}, B = ∅, C = {2}. Then:

  • Left: (A ∩ B) ∪ C = ∅ ∪ {2} = {2}.
  • Right: A ∩ (B ∪ C) = {1} ∩ {2} = ∅.

Since {2} ≠ ∅, the two sides differ. The identity fails because and do not re-bracket freely; it would hold only when C ⊆ A.

W7 · Epp 6.3, algebraic proof (cf. #29–38)
Prove (A ∪ B) − C = (A − C) ∪ (B − C) algebraically, citing one law of Theorem 6.2.2 per step.
(A ∪ B) − C
= (A ∪ B) ∩ Cᶜset difference law
= Cᶜ ∩ (A ∪ B)commutative for ∩
= (Cᶜ ∩ A) ∪ (Cᶜ ∩ B)distributive law
= (A ∩ Cᶜ) ∪ (B ∩ Cᶜ)commutative for ∩
= (A − C) ∪ (B − C)set difference law

Every step is an equality of sets justified by a single named identity, the hallmark of an algebraic proof. ■

W8 · Epp 6.4, axiom-only proof (cf. #1–5)
In any Boolean algebra, prove the absorption law a + (a · b) = a from the axioms.
a + (a · b)
= (a · 1) + (a · b)identity for ·
= a · (1 + b)distributive for ·
= a · (b + 1)commutative for +
= a · 1universal bound b + 1 = 1 (Exercise 6.4.A)
= aidentity for ·

By duality, a · (a + b) = a holds as well. ■

Recap: Chapter 6

  • A set is a collection of distinct elements, written by roster or by a property. Order and repetition do not matter; {a} ≠ a.
  • Keep (element-to-set) and (set-to-set) apart. A ⊆ B means ∀x, (x ∈ A → x ∈ B); A = B means A ⊆ B and B ⊆ A.
  • The element method proves a set fact by taking an arbitrary element and unfolding the procedural definitions of ∪, ∩, −, ᶜ. To prove equality, prove both containments.
  • To disprove a universal set property, one counterexample is enough. To prove a set empty, assume it has an element and reach a contradiction.
  • The identities of Theorem 6.2.2 let you prove facts algebraically, one law per step; A − B = A ∩ Bᶜ is the bridge that turns differences into intersections.
  • A set with n elements has 2ⁿ subsets (counting argument now; induction proof in Chapter 5).
  • Logic, sets, and bits are all Boolean algebras: one set of axioms, with duality (swap + ↔ ·, 0 ↔ 1) giving every identity a twin. This is the bridge to digital logic.
What's next. Chapter 7 (Functions): a function is a special kind of subset of a Cartesian product A × B, so everything here, products, subsets, the element method, is the groundwork for one-to-one, onto, and inverse functions.