Variables and Sets
Learning objectives
- Read and write set-builder notation fluently
- Decide set membership using and over the standard number systems
- Identify the standard number sets and the chain of inclusions between them
- Distinguish free from bound variables and recognize when a formula is a statement
What is a set, and why is it the right starting point for all of mathematics? A set is just a collection of objects, with one rule: any object is either in the set or it is not — no partial memberships, no duplicates. That apparent triviality is the foundation that lets us talk about everything we want to talk about: numbers, points, functions, propositions, even other sets. Once you can write down a set, you can quantify over it, build operations on it, and reason about it precisely. In this section we cover the notation (membership, set-builder, the standard number systems) and the all-important distinction between free and bound variables — a distinction that decides whether a formula is a statement at all.
Membership and set-builder notation
If is a set, we write for " is an element of " and for " is not an element of ." A small set can be listed in roster notation: . Larger or infinite sets are described by a defining property using set-builder notation:
Read aloud: "the set of all such that ." The bar separates the dummy variable from the defining property. Often we restrict the dummy variable to a known set first: is the set of positive integers.
The standard number systems
Four number systems appear so often they get reserved blackboard-bold names:
— the natural numbers. Some authors start at 1; Velleman starts at 0.
— the integers (German Zahlen).
— the rational numbers, ratios with and .
— the real numbers, every point on the number line.
They sit in a tidy chain of inclusions: . Each inclusion is strict: but ; but ; but .
Free vs. bound variables
A variable in a formula is bound if it is captured by a quantifier or by a set-builder; otherwise it is free. In the dummy variable is bound (its scope is the entire set definition) while is free — the meaning of the expression depends on what value of you have in mind. Renaming a bound variable does not change the set: and are exactly the same set.
A formula with no free variables is a statement: it has a definite truth value (true or false). A formula with free variables is sometimes called a predicate or an open sentence — its truth value depends on what values you plug into the free slots. So is not a statement (its truth depends on ), but is a statement (it is true, period).
Pause and think: In the formula , which variable is free and which is bound? If you replaced with the number , would the result be a statement? (Hint: bound variables are absorbed by the quantifier; only free variables show up in the truth-condition.)
Try it
- Before listing: predict how many elements are in . Then write them all out and check your count.
- Classify each by free/bound: in , name the bound variable, the free variable, and decide whether the formula is a statement.
- Predict first: is in ? Is it in ? Is it in ? Now verify by computing .
- Translate into set-builder notation: "all integers whose absolute value is less than 10." Then translate "the set of rational numbers strictly between and ."
- Pick a value of for which is true and one for which it is false. The formula itself is not a statement — explain why.
A trap to watch for
A surprisingly common mistake is treating set-builder notation as if it described a list rather than a set. Sets do not record order or multiplicity: . So when you write , you describe — not five separate items in a particular order, just five members of one set. If a problem cares about order or repetition, you want a sequence or a tuple, not a set; that distinction will matter once you start studying ordered pairs in Chapter 4.
What you now know
You can read and write set-builder notation, navigate the chain , and tell whether a formula is a statement by spotting its free variables. The next section combines pairs of sets with operations — union, intersection, complement — that mirror the logical connectives you learned in §1.1.
References
- Velleman, D. J. (2019). How to Prove It: A Structured Approach (3rd ed.). Cambridge University Press, ch. 1.
- Halmos, P. R. (1960). Naive Set Theory. Van Nostrand, §§1–2.
- Enderton, H. B. (1977). Elements of Set Theory. Academic Press, ch. 2.
- Kunen, K. (2009). The Foundations of Mathematics. College Publications, ch. 1.