0

I have been searching about the difference between a set and a class. The main definitions I found can be resumed in “all sets are classes, but not all classes are sets. If a class is not a set, then it is a proper class”.

When I was looking at ZF axioms (https://plato.stanford.edu/entries/set-theory/ZF.html), I saw the axiom of union, and then start thinking if the set of natural numbers is a set, since 1, for example, is not a set and it looks to be impossible to apply it in the axiom of union, because $\bigcup\mathbb{N}$ doesn't look to make any sense.

So I ask: is $\mathbb{N}$ a set or a proper class?

P.S.: I also don't doubt that one of my premisses is wrong.

Eric Wofsey
  • 342,377
  • In ZF, everything is a set. One can "inessentially" extend that theory to a theory that allows for proper classes, so that the contents of a proper class are sets but the container itself may not have the same contents as that of some set. But a set such as ${1,2,3}$ is therefore not a proper class (though we can say it is a class). – hardmath Nov 24 '20 at 01:10
  • 2
    "1, for example, is not a set" In $\mathsf{ZFC}$, everything is a set. In particular, $1$ is a set, namely ${\emptyset}$ - or perhaps more accurately, when we implement mathematics in ZFC, the symbol "$1$" becomes shorthand for the set ${\emptyset}$ (more generally, the natural numbers are implemented as the finite von Neumann ordinals). – Noah Schweber Nov 24 '20 at 01:12
  • @NoahSchweber, is it like |a| = 1, that is shorthand for ∃x¬∃y(x∈a ∧ ¬x = y)? I think it is shorthand for that; my memory is failing me. –  Nov 24 '20 at 01:20
  • 1
    @Schilive I'm not sure what you mean, but I think the answer is no: in set theory, the symbol "$1$" refers quite literally to the set ${\emptyset}$. See my answer below. – Noah Schweber Nov 24 '20 at 01:22

2 Answers2

3

There's a gap between how we normally do mathematics as an "informal-but-rigorous" activity and how we formalize mathematics inside $\mathsf{ZF}$ or similar. To get there from here we have to choose some method of implementation of our standard mathematical ideas into the set-theoretic framework. Specifically, $\mathsf{ZF}$ adopts the position that everything is a set, and that means we have to find ways to "encode" the not-really-set-flavored mathematics we do day-to-day in terms of just $\in$.

For the natural numbers this is done via the finite (von Neumann) ordinals - specifically, a "natural number" in the sense of $\mathsf{ZF}$ is an ordinal which is not in bijection with any of its proper subsets. The first few natural numbers in this sense are $$0=\emptyset, 1=\{0\}=\{\emptyset\}, 2=\{0,1\}=\{\emptyset,\{\emptyset\}\}, ..., n+1=\{0,1,...,n\}=n\cup\{n\},...$$

From this we can directly calculate $\bigcup\mathbb{N}$:

It's exactly $\mathbb{N}$ itself! Neat, huh?

There are a few tricks to "set-ifying" mathematics. The above is one of these: the idea to represent natural numbers by finite ordinals "gets us off the ground." Another fundamental point is the observation that we can talk about ordered pairs - and hence relations, functions, etc. - using set theory alone: see here. Note that these aren't axioms (or theorems), but rather methodological choices we make about how to translate mathematics into the narrow language of set theory; the $\mathsf{ZF}$ axioms come into the picture when we prove the desired facts about these implementations. E.g. it's not at all obvious at first how to define addition of natural numbers in terms of set theory alone, but there's a $\mathsf{ZF}$-theorem which does the job (the recursion theorem).

Now one might reasonably object to this "all-things-are-sets" framework for mathematics; see e.g. the discussion here, and more tangentially here. Opinions on the matter vary.


So what does make a class fail to be a set?

Well, in $\mathsf{ZF}$ it's ultimately all down to size. For a class $C$, exactly one of the following holds:

  • There is a surjection from $C$ to the proper class $Ord$ of all ordinals (put another way, $Ord$ is the smallest proper class in a precise sense).

  • $C$ is a set.

(Actually the above is a bit slippery since $\mathsf{ZF}$ can't talk about classes directly, but I'm ignoring this point.)

Noah Schweber
  • 260,658
  • Dumb question: set theory talks only about sets and if something ain't a set, set theory “doesn't care about it”; for example, the set that contains all elements that don't contain itself is just an “impossible set”, something like to say 1 + 1 = 3; and as that ain't a set, “we” name it “class”. Is this right or complete non-sense? Thanks for the answer! –  Nov 24 '20 at 01:35
  • Another dumb question: Is the idea of a class something inexistent in formal set theory? –  Nov 24 '20 at 01:41
  • @Schilive These aren't dumb questions at all. The issue is with the language of set theory: it only has an apparatus to talk about sets, so it's not even that it doesn't care about non-sets, it can't even refer to them directly! Classes can be sorta-kinda treated in $\mathsf{ZF}$, in the sense that if we take "class" to mean "definable class" in the sense of model theory - for which the standard term is "definable set," awkwardly enough in this context - $\mathsf{ZF}$ can prove schemes of theorems about classes. (cont'd) – Noah Schweber Nov 24 '20 at 02:05
  • For example, for each formula $\varphi$ there is another formula $\rho_\varphi$ such that $\mathsf{ZF}$ proves the sentence "If there is no set of all things with property $\varphi$, then $\rho_\varphi$ defines a class surjection from the class of things satisfying $\varphi$ to the ordinals" (appropriately construed). But $\mathsf{ZF}$'s language can't directly express things like "Every proper class surjects onto the ordinals" - we have to do this sort of "case-by-case workaround." (Or shift from $\mathsf{ZF}$ to some class theory like $\mathsf{NBG}$, but whatever.) – Noah Schweber Nov 24 '20 at 02:08
  • 1
    I'm harping on this language issue because it's important to distinguish between linguistic barriers (like the inability of the language of set theory to even consider non-sets) versus axiomatic barriers. In particular, the Russell property makes sense: the formula "$x\not\in x$" is perfectly well-formed and per the above comment corresponds to a (definable) class, and we can what the status of the sentence $$\exists y\forall x(x\in y\leftrightarrow x\not\in x)$$ is (that is, whether the definable class corresponding to the formula "$x\not\in x$" is a in fact a set). (cont'd) – Noah Schweber Nov 24 '20 at 02:10
  • The answer, of course, is that the axioms of $\mathsf{ZF}$ disprove that sentence. So there is no "Russell set." But it's not linguistically incoherent, it's just something we can explicitly prove doesn't exist. Compare e.g. "Blue cheese" and "the multiplicative inverse of $0$" in the context of arithmetic: the latter makes sense but doesn't exist, while the former doesn't even parse. – Noah Schweber Nov 24 '20 at 02:12
  • Thanks! I asked that because the book I am learning set theory with asks me to prove that something ain't a set, but it doesn't explain the difference. –  Nov 24 '20 at 02:31
  • @Schilive What book is this, or can you quote the full exercise? – Noah Schweber Nov 24 '20 at 02:31
  • “Axioms and Set Theory” by Robert André (http://www.math.uwaterloo.ca/~randre/1aaset_theory_140613.pdf), page 21. It does explain indirectly, I think, but it is not like “a class is la-la-la-la”. I may be wrong, because my memory is horrible. –  Nov 24 '20 at 02:40
1

The usual approach in ZF set theory is to implement the natural numbers inductively as sets: $0$ is defined to be the empty set, and for each natural number $n$, we define $n + 1 = n \cup \{n\}$. (So, for example, $2 = \{0, 1\} = \{\{\}, \{\{\}\}\}$.)

The axiom of infinity says that there is a set $S$ that contains the empty set and such that, for all $x \in S$, we have $x \cup \{x\} \in S$. This tells us that the class $\mathbb{N}$ of all natural numbers is in fact a set. So, essentially, $\mathbb{N}$ is a set because one of the axioms of ZF says it's a set. (If we omit the axiom of infinity, there are models of the resulting set theory where all sets are finite, because none of the other axioms requires the existence of an infinite set.)

Daniel Hast
  • 5,284