I have been working my way through abstractmath.org, revising the articles and turning them into pure HTML so they will be easier to update. In some cases I am making substantial revisions. In particular, many of the articles need a more modern point of view.

The math community’s understanding of sets and structures has changed because of category theory and will change

because of homotopy type theory.

This post considers some issues and possibilities concerning the chapter on sets.

The references listed at the end of the article include several about homotopy type theory. They provide different viewpoints and require different levels of sophistication.

## A specification of the concept of set

The abmath article Specification of sets specifies what a set is in this way:

A set is a single math object distinct from but completely determined by what its elements are.

I have used this specification for sets since the eighties, first in my Discrete Math lecture notes and then in abstractmath.org. It has proved useful because it is quite simple and the statement implies lots of immediate consequences. *Each of the first four consequences in this list below exposes a confusion that some students have.*

### Consequences of the specification

- A set is a
**math object**. It has the same status as the number “$143$” and the sine function and the real line: they are all objects of math. A set is not merely a typographically convenient way to define a certain collection of things. - A set is a
**single object**. Many beginners seem to have in their head that the set $\{3,4\}$ is*two*things. - A set is
**distinct from its elements**. The set $\{3,4\}$ is not $3$, it is not $4$, it is not a number at all. - The spec implies that
**$\{3,4\}$ is the same set as $\{4,3\}$**. Some students think they understand this but some of their mistakes show that they don’t*really*understand it. - On the other hand, $\{3,5\}$ is a
**different**set from $\{3,4\}$. I haven’t noticed this bothering students but it bothers me. See the discussion on ursets below.

Those consequences make the spec a useful teaching tool. But if a beginning abstract math student gets very far in their studies, some complications come up.

## Defining “set”

In the late nineteenth century, math people started formally defining particular math structures such as groups and various

kinds of spaces. This was normally done by **starting with a set and adding structure**.

You may think that “starting with a set and adding structure” brushes a lot of complications under the rug. Well, don’t look under the rug, at least not right now.

The way they thought about sets was a informal version of what is now called naive set theory. In particular, they freely defined particular sets using what is essentially setbuilder notation, producing sets in a way which (I claim) satisfies my specification.

### Bertrand Russell wakes everyone up

Then along came Russell’s paradox. In the context of this discussion, the paradox implied that **the spec for sets is not a definition**.The spec provides a set of

*necessary conditions for being a set*. But it is not sufficient. You can say “Let $S$ be the set of all sets that…[satisfy some condition]” until you are

**blue in the face,**but there are conditions (including the empty condition) that

**don’t define a set**.

### The Zermelo-Fraenkel axioms

The Zermelo-Fraenkel axioms were designed to provide a definition that didn’t create contradictions. The axioms accomplish this by creating a sort of hierarchy that requires that each set must be defined in terms of sets defined previously. They provide a good way (but not the only one) of providing a way of legitimizing our use of sets in math.

Observe that the “set of all sets” is certainly not “defined” in terms of previously defined sets!

## Sets as a foundation

During those days there was a movement to provide a solid **foundation for mathematics.** After Zermelo-Fraenkel came along, the progress of thinking seemed to be:

- Sets are in trouble.
- Zermelo-Fraenkel solves our set difficulties.
- So let’s require that
**every math object be a set**.

That list is oversimplified. In particular, the development of predicate logic was essential to this approach, but I can’t write about everything at once.

This leads to monsters such as the notorious definition of **ordered pair**:

The ordered pair $(a,b)$ is the set $\{a,\{b\}\}$.

This leads to the ludicrous statement that $a$ is an element of $(a,b)$ but that $b$ is not.

By saying **every math object may be modeled as a set with structure**, ZF set theory becomes a **model of all of math.** This approach gives a useful proof that all of math is as consistent as ZF set theory is.

But many mathematicians jumped to the conclusion that **every math object must be a set with structure**.

*This approach does not match the way mathematicians think about math objects.*In particular, it makes computerized proof assistance hard to use because you have to translate your thinking into sets and first order logic.

## Sets by category theory

“A mathematical object is determined by the role it plays in a category.” — A. Grothendieck

In category theory, you define math structures in terms of how they relate to other math structures. This shifts the emphasis from

What is it?

to

What are its properties?

For example, an ordered pair is a mathematical object $p$ determined by these properties:

- It determines mathematical objects $p_1$ and $p_2$.
- $p$ is completely determined by what $p_1$ is and what $p_2$ is.
- If $p$ and $q$ are ordered pairs and $p_1=q_1$ and $p_2=q_2$ then $p=q$.

### Categorical definition of set

“Categorical” here means “as understood in category theory”. It unfortunately has a very different meaning in model theory (set of axioms with only one model up to isomorphism) and in general usage, as in “My answer is categorically NO” said by someone who is red in the face. The word “categorial” has an entirely different meaning in linguistics. *Sigh*.

William Lawvere has produced an **axiomatization of the category of sets.**

The most accessible introduction to it that I know of is the article Rethinking set theory, by Tom Leinster. This axiomatization defines sets by their relationship with each other and other math objects in much the same way as the categorical definition of (for example) groups gives a definition of groups that works in any category.

### “Set” means two different things

The word set as used informally has **two different meanings**.

- According to my specification of sets, $\{3,4\}$ is a set and so is $\{3,5\}$.
- $\{3,4\}$ and $\{3,5\}$
**are not the same set**because they don’t have the same elements. - But in the category of sets, any two $2$-element sets are isomorphic. (So are any two seven element sets.)
- From a categorical point of view, two isomorphic objects in a category can be be thought of as the same object, with a caveat that you have better make it clear which isomorphism you are thinking of.

One of the great improvements in mathematics that homotopy type theory supplies is a systematic way of keeping track of the isomorphisms, the isomorphisms between the isomorphisms, and so on ad infinitum (literally). But note: *I am just beginning to understand htt*, so regard this remark as something to be suspicious of.

- But $\{3,4\}$ and $\{3,5\}$
*may not be thought of as the same object*according to the spec I gave, because they don’t have the same elements. - This means that the traditional idea of set is
*not the same as the strict categorical idea of set.*

I suggest that we keep the word “set” for the traditional concept and call the strict categorical concept an **urset**.

### A traditional set is a structure on an urset

The traditional set $\{3,5\}$ consists of the unique two-element urset **coindexed** on the integers.

A (ur)set $S$ coindexed by a math structure $A$ is a monic map from $S$ to the underlying set of $A$. In this example, the map has codomain the integers and takes one element of the two-element urset to $3$ and the other to $5$.

Note added 2014-10-05 in response to Toby Bartels’ comment:I am inclined to use the names “abstract set” for “urset” and “concrete set” for coindexed sets when I revise the articles on sets. But most of the time we can get away with just “set”.

There is clearly no isomorphism of coindexed sets from $\{3,4\}$ to $\{3,5\}$, so those two traditional sets are not equal in the category of coindexed sets.

I made up the phrase “coindexed set” to use in this sense, since it is a kind of opposite of indexed set. If terminology for this already exists, lemme know. Linguists will tell you they use the word “coindexed” in a different sense.

## Elements

The concept of “element” in categorical thinking is very different from the traditional idea, where an element of a set can be any mathematical object. In categorical thinking, an element of an object $A$ of a category $\mathbf{C}$ is an arrow $1\to A$ where $1$ is the terminal object. Thus *$4$ as an integer is the arrow $1\to \mathbb{Z}$ whose unique value is the number $4$.*

### An object is an element of only one set

In the usage of category theory, the arrow $1\to\mathbb{R}$ whose value is the *real* number $4$ is a **different math object** from the arrow $1\to\mathbb{Z}$ whose value is the integer $4$.

A category theorist will probably agree that we can identify the integer $4$ with the real number $4$ via the well known **canonical embedding** of the ring of integers into the field of real numbers. But in categorical thinking you have to keep all such embeddings in mind; you don’t say the integer $4$ is the same thing as the real number $4$. (Most computer languages keep them distinct, too.)

This difference is actually not hard to get used to and is in fact an improvement over traditional set theory. When you do category theory you use lots of commutative diagrams. The embeddings show up as monic arrows and are essential in keeping the different objects ($\mathbb{Z}$ and $\mathbb{R}$ in the example) separate.

The paper Relating first-order set theory and elementary toposes, by Awodey, Butz, Simpson and Streicher, introduces a concept of “structural system of inclusions” that appears to me to restore the idea of object being an element of more than one set for many purposes.

Homotopy type theory allows an object to have only one type, with much the same effect as in the categorical approach.

### Variable elements

The arrow $1\to \mathbb{Z}$ that picks out the integer $4$ is a constant function. It is useful to think of *any* arrow $A\to B$ of *any* category as a **variable element** (or **generalized element**) of the object $B$. For example, the function $f:\mathbb{R}\to \mathbb{R}$ defined by $f(x)=x^2$ allows you to

think of $x^2$ as a **variable number with real parameter.** This is another way of thinking about the “$y$” in the equation $y=x^2$, which is commonly called a **dependent variable**.

One way to think about $y$ is that some statements about it are true, some are false, and many statements are neither true nor false.

- $y\geq 0$ is true.
- $y\lt0$ is false.
- $y\leq1$ is neither true nor false.

This way of thinking about variable objects clears up a lot of confusion about variables and deserves to be more widely used in teaching.

The book Category theory for computing science provides some examples of the use of variable elements as a way of thinking about categorical ideas.

### References

- Relating First-Order Set Theories and Elementary Toposes, by Steve Awodey, Carsten Butz, Alex Simpson and Thomas Streicher.
- Voevodsky’s univalence axiom in homotopy type theory, AMS Notices article by Steve Awodey, Álvaro Pelayo, and Michael A. Warren.
- Category theory for computing science, by Michael Barr and Charles Wells.
- Rethinking set theory, by Tom Leinster.
- Homotopy type theory in n-lab.
- Voevodsky’s Mathematical Revolution, by Julie Rehmeyer.
- What is homotopy type theory good for? Article in n-category café by Urs Schreiber.
- (Added 2014-10-05) Concrete and abstract structures. Article in n-category café.
- Paul Bernays Lectures 2014, by Vladimir Voevodsky.
- Representing and thinking about sets. Gyre&Gimble post.
- A mathematical saga. Gyre&Gimble post.
- Mathematical objects.Abmath article
- Mathematical structures. Abmath article.
- Sets.Abmath chapter.
- Sets: specification. Abmath article.

< ![endif]>

This work is licensed under a Creative

Commons Attribution-ShareAlike 2.5

License.