You are on page 1of 6

Sets Describing

a Set: 1) by enumeration
— A set is an unordered collection of objects. — S = {a,b,c,d}
— the students in this class
— the chairs in this room
— The objects in a set are called the elements, or members
of the set. A set is said to contain its elements.
— The notation a ∈ A denotes that a is an element of the
set A.
— If a is not a member of A, write a ∉ A

(Enumeration Method eg) Some Important Sets


— Set of all vowels in the English alphabet: N = natural numbers = {0,1,2,3….}
V = {a,e,i,o,u} Z = integers = {…,-3,-2,-1,0,1,2,3,…}
— Set of all odd positive integers less than 10: Z⁺ = positive integers = {1,2,3,…..}
O = {1,3,5,7,9} R = set of real numbers
— Set of all positive integers less than 100: R+ = set of positive real numbers
S = {1,2,3,……..,99} C = set of complex numbers.
— Set of all integers less than 0: Q = set of rational numbers
S = {…., -3,-2,-1}
Describing a set : 2) Set-Builder
Universal Set and Empty Set
Notation
— The universal set U is the set containing everything
— Specify the property or properties that all members must currently under consideration.
satisfy: — Sometimes implicit
S = {x | x is a positive integer less than 100} — Sometimes explicitly stated.
Venn Diagram
O = {x | x is an odd positive integer less than 10} — Contents depend on the context.
O = {x ∈ Z⁺ | x is odd and x < 10} — The empty set is the set with no U
— A predicate may be used:
elements. Symbolized ∅, but
S = {x | P(x)} V aei
ou
{} also used.
e.g.: S1 = {x | Prime(x)} S2={ x | Posint(x) ∧ Odd(x) ∧ x<10)
— Positive rational numbers:
Q+ = {x ∈ R | x = p/q, for some positive integers p,q} In this case U =English
Q+ = {x ∈ R |∃ p,q. PosInt(x) ∧ Posint(y) → x = p/q, } Letters is reasonable

Some things to remember Predicates on sets: membership


— Sets can be elements of sets. Definition: x S if x is one of the elements of S
{{1,2,3},a, {b,c}} (Notation: we could have just as well have used the
binary predicate notation: isIn(x,S), or infix english
— The empty set is different from a set containing the x in S )
empty set. e.g. 1 {3, 5, 1}
∅ ≠ { ∅ } Definition: x S if x is not one of the elements of S
(In regular predicate logic this might be isNotIn(x,S)
e.g. 4 {3, 5, 1}
NOTE: is the negation of , so it is not strictly
necessary: isNotIn(x,S) ≡ ¬ isIn(x,S)
So we can say that x S is “defined as” ¬ (x S)
Predicates on sets: subset Predicates on sets: equality
Definition: Set A is subset of set B (written as A B) Definition: Two sets A and B are equal (written A=B)
if and only if every element of A is an element of B. if and only if they have the same elements.
In logical notation In logic: A=B =def
A B =def x. ((x ∈ A) → (x ∈ B)) Proposition: (A=B) ⟷ (A B B A)
— E.g.,
{1,5,5,5,3,3,1} {1,3,5,6} Alternative definition:
(A = B) =def A B B A
Proposition: (A=B) ⟷

— E.g. {1,5,5,5,3,3,1} = {1,3,5}

Set theory and First Order Logic


Section Summary Union
— Set Operations
— Union — Definition: Let A and B be sets. The union of the sets
— Intersection A and B, denoted by A ∪ B, is the set:
— Complementation
— Difference
— Proving Set Identities and Theorems
Alternative statement in FOL:
x.( x ∈ (A ∪ B) ⟷ ( (x A) (x B) ) )
Intersection Difference
— Definition: The intersection of sets A and B, denoted — Definition: Let A and B be sets. The difference of A
by A ∩ B, is and B, denoted by A – B, is the set containing the
elements of A that are not in B. The difference of A and
B is also called the complement of A with respect to B.
— Alternative First Order Logic statement: A – B = {x | x ∈ A ∧ x ∉ B}
x.( x ∈ (A ∩ B) ⟷ ( (x ∈ A) (x ∈ B) ) ) What is the alternate logical formula defining difference?

U Venn Diagram for A − B


A
B

Complement Proving Set Identities


Definition: If A is a set, then the complement of the A — Different ways to prove set identities:
(with respect to U), denoted by Ā is the set U - A 1. Prove that each set (side of the identity) is a
Ā = {x ∈ U | x ∉ A} subset of the other.
(The complement of A is sometimes denoted by Ac .) a. Ordinarily
b. (Super-formally using FOL rules of inference)
Alternate formulation of definition in FOL: 2. Use set builder notation and propositional
x.( x ∈ Ā ⟷ ( (x ∈ U) ¬(x ∈ A) ) ) logic.
Venn Diagram for Complement
U
Ā
A
Proof of Second De Morgan Law Proof of
Example: Prove that (Rosen, Fig.1o, Sec.2.2 formalized a bit)
Solution A: We prove this identity by showing that:
(Where did x come from?)

1) and

defn on non-membership

2)

Continued on next slide à

Proof of in FOL NatDen (gory


details ) this once! Nevermore! Proof of
assume (for →I) for
1
arbitrary g
2 (g U) ¬(g A ∩ B ) definition of compl.
3 g U simplification 2
4 ¬ (g A ∩ B) simplif 2
5 ¬ (g A g b) Def. of intersection 4
6 ¬ (g A) ¬ (g B) deMorgan 5
7 (g U) {¬ (g A) ¬ (g B)} Addition 3,6
8 {(g U) ¬(g A) {(g U) ¬(g B)} distrib
9 by def of complement
10 by def of union
11 → Intro 1,10
12 UG: g was arbitrary
Set-Builder Notation Proof of
(Figure 11, Sec 2.2)

The proof here consists mostly of applying definitions and


propositional equivalences inside inside the set. Because of the
use of equivalences, we do not need to show subset in both
directions.