Set Builder Notation
Set builder notation is also known as set comprehension
Set Builder Notation, V1
Definition
Note: when dealing with divisibility,
The above set can be written as
Set Builder Notation, V2
Definition
Describes the set consisting of all objects of the form
is an element of
This is the definition we learned in MR TALOR's math class
Set Builder Notation, V3
Definition
The sets
both describe the set consisting of all objects of the form
is an element of , and is true
Set Builder Notation Generally
Definition
A set is defined by a well-formed formula:
Our WFF can be any Predicate Logic or formula with quantifiers and whatnot.
Example
specifies the set of numbers:
assuming
Example
Formalize the following sets using set builder notation:
- Natural numbers that are divisors of 10
- Set enumeration:
- Set builder notation:
- Set enumeration:
- Students from Shrek's Swamp attending lecture
- Set enumration:
- Set bulder notation:
- Set enumration:
Z-Notation for Set Builder Notation
Definition
where:
- A
is a term in predicate logic. We can omit this if it's just a variable and we have a - A
lists the variables used in and their types. If we are not using types, then we can omit the signature, but we must include the - The
is any WFF in predicate logic with the variables used in as free variables in the formula. We can omit the WFF if we want it to alway s be true.
Example
- We can write:
as: which can be shortened to: describes the set assuming
Example
Describe these sets using set builder notation:
- People who live in YMH
- Set of numbers each of which is the double of some number between 5 and 10 exclusive
{ \op{age}(x) \cdot x: \text{Student} \mid \op{attend}(x, \text{UW}) }
Set Builder Notation Formally
Axiom - Set Comprehension
(see if and only if)
Axiom - Set Comprehension