Set Builder Notation

Set builder notation is also known as set comprehension

Set Builder Notation, V1

Definition

Describes the set consisting of all objects such that

  • is an element of (universe), and
  • is true

Note: when dealing with divisibility, may be used in place of for the "such that" clause, e.g

The above set can be written as

Set Builder Notation, V2

Definition

Describes the set consisting of all objects of the form such that

  • 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 such that

  • 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:

  1. Natural numbers that are divisors of 10
    • Set enumeration:
    • Set builder notation:
  2. Students from Shrek's Swamp attending lecture
    • Set enumration:
    • Set bulder notation:

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

  1. We can write:as:which can be shortened to:
  2. describes the set assuming

Example

Describe these sets using set builder notation:

  1. People who live in YMH
  2. 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
Axiom - Set Comprehension