Chapter 3Elementary Discrete Mathslides.en.pdf:148

Set Representations

Four ways to write a set down

Def 1.1Representations of Sets
Concept

A set is a collection of distinct objects. There are four common ways to
write one down:

  • Enumeration (explicit list): {1,2,3}\{1, 2, 3\}
  • Characteristic function: f(x)=1f(x) = 1 if xSx \in S, else 00
  • Set-builder / comprehension: {xP(x)}\{x \mid P(x)\} — "the set of all xx with property PP"
  • Recursive definition: {0}{s(n)nN}\{0\} \cup \{s(n) \mid n \in \mathbb{N}\}

We assume we can write down any set — this is the (controversial) axiom
of comprehension
: every set we can describe exists. (Naïve set theory ignores
the Russell paradox.)

The elements of a set are unordered and unique: {1,2,3}={3,2,1}\{1, 2, 3\} = \{3, 2, 1\}.

Animation — set ops venn
Transcript — click a line to jump7 cues
  1. 0.0sVenn Diagrams
  2. 1.2sCircle A appears in cyan, circle B in amber, they overlap
  3. 3.4sFour region labels: A cap B, A cup B, A minus B, B minus A
  4. 6.5sThe two-circle diagram slides left to make room
  5. 7.4sA green circle C joins the picture
  6. 9.2sA violet highlight marks the A cap B cap C region
  7. 11.2sVenn diagrams visualise set operations on a universe
Binding expressions

Some expressions introduce new variables that range over a domain:

  • Universal quantification x.P(x)\forall x.\, P(x) — 'PP holds for every xx'.
  • Existential quantification x.P(x)\exists x.\, P(x) — 'there exists an xx such that P(x)P(x)'.
  • Function definition f(x):=x2+1f(x) := x^2 + 1 — 'ff of xx is defined as x2+1x^2 + 1'.

The introduced variable xx is bound by its binder (,,:=\forall, \exists, :=). The scope of the binding is the smallest enclosing formula. A variable occurrence is free if it is not bound.

Examples:
- x.x+1>x\forall x.\, x + 1 > xxx bound by \forall, holds for every number.
- x.x2=2\exists x.\, x^2 = 2xx bound by \exists, 2\sqrt{2} exists.
- 01x2dx\int_0^1 x^2 \, dxxx bound by the integral sign.

Renaming bound variables preserves meaning: x.P(x)y.P(y)\forall x.\, P(x) \equiv \forall y.\, P(y).

Practice — score 100% to advance
Multiple choice
Q1
Which is NOT a valid set representation?
Q2
How many representations of a set are commonly used?
Q3
{1,2,3}={3,1,2}\{1, 2, 3\} = \{3, 1, 2\}?
Q4
The axiom of comprehension says…
Q5
Recursive definition: N={0}{s(n)nN}\mathbb{N} = \{0\} \cup \{s(n) \mid n \in \mathbb{N}\}. This relies on…
Q6
In x.y.x<y\forall x.\, \exists y.\, x < y, the variable yy is:
Fill in the blank
Q1
A variable occurrence that is not bound by any enclosing binder is ___.
Loading…