1. LG511 Basic Ideas of Set Theory, Relations, and Functions
Doug Arnold
University of Essex
doug@essex.ac.uk
1 Set Theory: Sets and Membership
1.1 Sets
A set is a collection of things, (with some clear criterion for membership).
Sets are defined by their members — two sets are different if and only if (iff) they have different
members. Hence:
i. {a, b, c} = {c, b, a}
ii. {a, b, c} = {a, a, a, a, a, b, c, c}
iii. there is only one empty set, written {}, or ∅
iv. Suppose LS and HoD are one and the same, then:
{LS , RMA, DJA} = {HoD, RMA, DJA}
1.2 Specifying Sets
Sets can be specified:
i. Extensionally:
A = {1 , a, Noam Chomsky, lg517 }
ii. Intensionally:
A = {x : x is greater than 4 }
{x |x > 4 }
{x : x > 4 }
{x : x > 2 + 2 }
{y : y <= 5 }
etc.
1.3 Membership
i. a is a member (or element) of {a, b, c}, written: a ∈ {a, b, c};
ii. a is not a member of {b, c, d }, written: a ∈ {b, c, d }
iii. The empty set has no members
iv. A singleton set has exactly one member
1.4 Cardinality
Suppose A = {a, b, c}, then
i. |A| = | {a, b, c} | = 3
ii. | {x : x > 4 } | = inf
1
2. 1.5 Sets as Individuals
Sets are things — individuals — and so can be members of sets:
i. A = {a, {b, c}, lg517 , AR}
ii. B = {a, b, c, lg517 , AR}
iii. |A| = 4
iv. |B| = 5
v. {} = {{}}
vi. | {} | = 0
vii. | {{}} | = 1
1.6 Relations between Sets
1.6.1 Equality
Sets A and B are equal, written A = B, iff they have the same members.
Suppose A = {a, b, c, d }, B = {d , c, b, a}, and C = {y : y > 4 } then:
i. A = B
ii. C = A
1.6.2 Subset
Set A is a subset of set B, written A ⊆ B, iff every member of A is a member of B.
B is a superset of A, written B ⊇ A, iff A ⊆ B
i. {a, b} ⊆ {a, b, c}
ii. {a, b, c} ⊇ {a, b}
iii. {a, b, c} ⊆ {a, b, c}
iv. A ⊆ A
v. {} ⊆ A
Note:
i. a ∈ {a, b, c}
ii. a ⊆ {a, b, c}
iii. {a} ⊆ {a, b, c}
iv. {a} ∈ {a, b, c}
v. {a} ∈ {{a} , b, c}
1.6.3 Proper Subset
A is a proper (or strict) subset of B, written A ⊂ B, iff A ⊆ B and A = B
B is a proper (strict) superset of A, written B ⊃ A, iff B ⊇ A and B = A
i. {a, b} ⊂ {a, b, c}
ii. {a, b, c} ⊂ {a, b, c}
iii. {a, b, c} ⊆ {a, b, c}
1.7 Power Set
The power set of set A, written Pow (A) or P(A), is the set consisting of all subsets of A:
{S : S ⊂ A}
Example: Suppose A = {a, b, c}, then
2
3.
{}
{a}
{b}
{c}
Pow (A) =
{a, b}
{a, c}
{b, c}
{a, b, c}
Note:
i. |Pow (A)| = 2|A|
ii. |Pow ({a, b})| = 2|{a,b}| = 22 = 4
iii. |Pow ({a, b, c})| = 2|{a,b,c}| = 23 = 8
1.8 Operations on Sets
1.8.1 Venn Diagrams
Venn diagrams provide a very convenient and intuitive way of picturing relations between, and
operations on, sets.
U
B
A
Figure 1: Venn Diagram
1.8.2 Complement
The complement of set A, written A− or A, is the set of elements not in A:
A = {x : x ∈ A}
U
A
Figure 2: A set A and its Complement
indicates the set A
indicates the Complement of A: (A− or A = U − A)
3
4. 1.8.3 Union
The union of sets A and B, written A ∪ B, is the set consisting of all members of A and all members
of B, i.e. every element that is in A or B:
A ∪ B = {x : x ∈ A or x ∈ B }
Example:
{a, b} ∪ {b, c} = {a, b, c}
U
B
A
Figure 3: Union of sets A and B
indicates A ∪ B, the Union of A and B
1.8.4 Intersection
The intersection of sets A and B, written A ∩ B, is the set consisting of the elements that are in A
and in B, i.e.
A ∩ B = {x : x ∈ A and x ∈ B }
Example: {a, b, c} ∩ {b, c, d } = {b, c}
U
B
A
Figure 4: Intersection of sets A and B
indicates A ∩ B, the intersection of A and B
1.8.5 Difference
The set-difference of sets A and B, written A − B, is the set of elements in A, but not in B:
A − B = {x : x ∈ A and x ∈ B }
Example: {a, b, c, d } − {c, d } = {a, b}
1.9 Properties of Operations
For a pair of operations ⊕ and ⊗:
i. ⊕ is commutative iff A ⊕ B ≡ B ⊕ A
ii. ⊕ and ⊗ are associative iff A ⊕ (B ⊗ C) ≡ (A ⊕ B) ⊗ C and A ⊗ (B ⊕ C) ≡ (A ⊗ B) ⊕ C
iii. ⊕ and ⊗ are distributive iff A ⊕ (B ⊗ C) ≡ (A ⊕ B) ⊗ (A ⊕ C) and A ⊗ (B ⊕ C) ≡ (A ⊗ B) ⊕ (A ⊗ C)
4
5. U
B
A
Figure 5: Difference of sets A and B
indicates A − B, the difference of A and B
Examples:
i. arithmetic +, − (plus, minus) are:
Commutative : 2 + 3 = 3 + 2
Associative : 2 + (9 − 5) = (2 + 9) − 5
Non-distributive : 2 + (9 − 5) = (2 + 9) − (2 + 5)
ii. set-theoretic ∩ and ∪ are:
Commutative (A ∩ B) = (B ∩ A)
Associative ((A ∩ B) ∩ C) = (A ∩ (B ∩ A))
Distributive (A ∪ (B ∩ C)) = ((A ∪ B) ∩ (B ∪ C))
2 Ordered Pairs and Tuples
pair : a, b
3-tuple : a, b, c
n-tuple : a1 , a2 , a3 , . . . , an
Compare: {a, b} = {b, a} but a, b = b, a
Note: a1 , a2 = b1 , b2 iff a1 = b1 , and a2 = b2
2.1 Cartesian Product
A × B = { a, b : a ∈ A and b ∈ B } (the set of ordered pairs a, b st. a is a member of A, and b is
a member of B)
Example: {a, b, c} × {1 , 2 } =
a, 1 a, 2
b, 1 b, 2
c, 1 c, 2
Note: |A × B| = |A| × |B|
3 Relations and Functions
3.1 Relations
A relation is a regular association of ‘inputs’ (from a domain) and ‘outputs’ (from a range).
i.e. a set of ordered pairs.
Example: let L = {a, b, c} and N = {1 , 2 , 3 }, and the relation R ⊂ L × N be as follows:
5
6.
a, 1
b, 1
c, 2
We could also write either of the following:
aR1 R(a, 1)
bR1 R(b, 2)
cR2 R(c, 2)
Note: Relations are defined by their I/Os R1 = R2 just in case they are the same sets of ordered
pairs, e.g. R1 : Children × Mothers = R2 : Children × Mothers of siblings
3.2 Properties of Relations
3.2.1 Reflexivity
A relation R is
reflexive iff for all x, xRx
Examples: is the same height as, ⊆, =
irreflexive iff for all x, not xRx
Examples: father of, ∈
nonreflexive iff neither reflexive nor irreflexive
Example: likes
3.2.2 Symmetry
A relation R is:
symmetric iff for all x y, xRy implies yRx
Example: is related to
asymmetric iff for all x y, xRy implies not yRx
Example: mother of
nonsymmetric iff for all x y, xRy implies neither yRx nor ¬yRx
antisymmetric iff for all x y, xRy and yRx implies y = x
Example: less than or equal to
3.2.3 Transitivity
A relation R is:
transitive iff for all x,y,z xRy and yRz implies xRz
Examples: is greater than, is in, is a subset of
intransitive iff for all x,y,z xRy and xRz implies not xRz
Example: is immediately to the left of
nontransitive iff neither transitive nor intransitive
Equivalence Relations are reflexive, symmetric, and transitive;
Examples: set theoretic equality; is the same age as.
3.3 Functions
A function is a special kind of relation: one which takes (‘maps’) arguments (members of the domain)
to values (unique members of the range).
6
7. (functions are ‘unambiguous’ relations).
Recall that a relation is just a set (of ordered pairs) — hence a function is just a special kind of set
(of ordered pairs).
Examples
i. the following function f0 that maps elements of L to elements of N : f0 : L → N :
a, 1
f0 = b, 1
c, 2
f0 (a) = 1
f0 (b) = 1
f0 (c) = 2
ii. f1 : People → Birthdays
iii. f2 : People → Biological Fathers
The following relations are not functions:
i. { a, 1 , a, 2 , ...}
ii. relation between birthdays and people
iii. relation between fathers and their children
iv. relation between numbers and their square roots
3.4 Properties of Functions
i. Functions have (not necessarily functional) inverses (the inverse of f is written f −1 ).
ii. Functions can be partial, or total.
iii. Functions can be onto, into, etc., 1:1, many:1, etc.
3.5 Characteristic Functions
The Characteristic Function of a set A is a function f : A → {0 , 1 }, such that for all x:
i. f (x) = 1 if x ∈ A, and
ii. f (x) = 0 otherwise.
Sets and their characteristic functions are 1:1.
4 Reading
Partee et al. (1990, Part A) is a good introduction to set theory.
References
Barbara H. Partee, Alice ter Meulen, and Robert E. Wall. Mathematical Methods in Linguistics.
Kluwer Academic Publishers, Dordrecht, 1990.
7