# What Are People Asking About COVID-19?
A Question Classification Dataset

Jerry Wei♠ Chengyu Huang${}^{\vardiamondsuit}$ Soroush
Vosoughi${}^{\varheartsuit}$ Jason Wei${}^{\varheartsuit}$
♠ProtagoLabs ${}^{\vardiamondsuit}$International Monetary Fund
${}^{\varheartsuit}$Dartmouth College
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>

###### Abstract

We present Covid-Q, a set of 1,690 questions about COVID-19 from 13 sources,
which we annotate into 15 question categories and 207 question clusters. The
most common questions in our dataset asked about transmission, prevention, and
societal effects of COVID, and we found that many questions that appeared in
multiple sources were not answered by any FAQ websites of reputable
organizations such as the CDC and FDA. We post our dataset publicly at
https://github.com/JerryWei03/COVID-Q.

For classifying questions into 15 categories, a BERT baseline scored 58.1%
accuracy when trained on 20 examples per category, and for a question
clustering task, a BERT + triplet loss baseline achieved 49.5% accuracy. We
hope Covid-Q can help either for direct use in developing applied systems or
as a domain-specific resource for model evaluation.

##  1 Introduction

A major challenge during fast-developing pandemics such as COVID-19 is keeping
people updated with the latest and most relevant information. Since the
beginning of COVID, several websites have created frequently asked questions
(FAQ) pages that they regularly update. But even so, users might struggle to
find their questions on FAQ pages, and many questions remain unanswered. In
this paper, we ask—what are people really asking about COVID, and how can we
use NLP to better understand questions and retrieve relevant content?

Other (6)Symptoms (7)Having COVID (9)Nomenclature (5)Testing (9)Comparison
(10)Individual Response (12)Economic Effects (11)Speculation (9)Treatment
(12)Origin (10)Reporting (16)Societal Response (22)Prevention (20)Societal
Effects (23)Transmission
(27)$188$$100$$81$$79$$68$$67$$51$$50$$49$$47$$45$$42$$36$$36$$26$$20$Unique
Questions Figure 1: Question categories in Covid-Q, with number of question
clusters per category in parentheses.

We present Covid-Q, a dataset of 1,690 questions about COVID from 13 online
sources. We annotate Covid-Q by classifying questions into 15 general
_question categories_ 111We do not count the “other” category. (see Figure 1)
and by grouping questions into question clusters, for which all questions in a
cluster ask the same thing and can be answered by the same answer, for a total
of 207 clusters. Throughout $\S$2, we analyze the distribution of Covid-Q in
terms of question category, cluster, and source.

Covid-Q facilitates several question understanding tasks. First, the question
categories can be used for a vanilla text classification task to determine the
general category of information a question is asking about. Second, the
question clusters can be used for retrieval question answering (since the
cluster annotations indicate questions of same intent), where given a new
question, a system aims to find a question in an existing database that asks
the same thing and returns the corresponding answer Romeo et al. (2016);
Sakata et al. (2019). We provide baselines for these two tasks in $\S$3.1 and
$\S$3.2. In addition to directly aiding the development of potential applied
systems, Covid-Q could also serve as a domain-specific resource for evaluating
NLP models trained on COVID data.

| Questions |  |
---|---|---|---
Source | Total | Multi-q-cluster | Single-q-cluster | Answers | Questions Removed
Quora | 675 | 501 (74.2$\%$) | 174 (25.8$\%$) | 0 | 374
Google Search | 173 | 161 (93.1$\%$) | 12 (6.9$\%$) | 0 | 174
github.com/deepset-ai/COVID-QA | 124 | 55 (44.4$\%$) | 69 (55.6$\%$) | 124 | 71
Yahoo Search | 94 | 87 (92.6$\%$) | 7 (7.4$\%$) | 0 | 34
∗Center for Disease Control | 92 | 51 (55.4$\%$) | 41 (44.6$\%$) | 92 | 1
Bing Search | 68 | 65 (95.6$\%$) | 3 (4.4$\%$) | 0 | 29
∗Cable News Network | 64 | 48 (75.0$\%$) | 16 (25.0$\%$) | 64 | 1
∗Food and Drug Administration | 57 | 33 (57.9$\%$) | 24 (42.1$\%$) | 57 | 3
Yahoo Answers | 28 | 13 (46.4$\%$) | 15 (53.6$\%$) | 0 | 23
∗Illinois Department of Public Health | 20 | 18 (90.0$\%$) | 2 (10.0$\%$) | 20 | 0
∗United Nations | 19 | 18 (94.7$\%$) | 1 (5.3$\%$) | 19 | 6
∗Washington DC Area Television Station | 16 | 15 (93.8$\%$) | 1 (6.2$\%$) | 16 | 0
∗Johns Hopkins University | 11 | 10 (90.9$\%$) | 1 (9.1$\%$) | 11 | 1
Author Generated | 249 | 249 (100.0$\%$) | 0 (0.0$\%$) | 0 | 0
Total | 1,690 | 1,324 (78.3$\%$) | 366 (21.7$\%$) | 403 | 717
Table 1: Distribution of questions in Covid-Q by source. The reported number
of questions excludes vague and nonsensical questions that were removed.
Multi-q-cluster: number of questions that belonged to a question cluster with
at least two questions; Single-q-cluster: number of questions that belonged to
a question cluster with only a single question (no other question in the
dataset asked the same thing). ∗ denotes FAQ page sources.

##  2 Dataset Collection and Annotation

Data collection. In May 2020, we scraped questions about COVID from thirteen
sources: seven official FAQ websites from recognized organizations such as the
Center for Disease Control (CDC) and the Food and Drug Administration (FDA),
and six crowd-based sources such as Quora and Yahoo Answers. Table 1 shows the
distribution of collected questions from each source. We also post the
original scraped websites for each source.

Data cleaning. We performed several pre-processing steps to remove unrelated,
low-quality, and nonsensical questions. First, we deleted questions unrelated
to COVID and vague questions with too many interpretations (e.g., “Why
COVID?”). Second, we removed location-specific and time-specific versions of
questions (e.g., “COVID deaths in New York”), since these questions do not
contribute linguistic novelty (you could replace “New York” with any state,
for example). Questions that only targeted one location or time, however, were
not removed—for instance, “Was China responsible for COVID?” was not removed
because no questions asked about any other country being responsible for the
pandemic.

Question Cluster $[\\#$Questions$]$ (Category) |
---|---
Example Questions
Pandemic Duration | “Will COVID ever go away?”
$[$28$]$ | “Will COVID end soon?”
(Speculation) | “When COVID will end?”
Demographics: General | “Who is at higher risk?”
$[$26$]$ | “Are kids more at risk?”
(Transmission) | “Who is COVID killing?”
Survivability: Surfaces | “Does COVID live on surfaces?”
$[$24$]$ | “Can COVID live on paper?”
(Transmission) | “Can COVID live on objects?”
Table 2: Most common question clusters in Covid-Q.

Finally, to minimize occurrences of questions that trivially differ, we
removed all punctuation and replaced synonymous ways of saying COVID, such as
“coronavirus,” and “COVID-19” with “covid.” Table 1 also shows the number of
removed questions for each source.

Data annotation. We first annotated our dataset by grouping questions that
asked the same thing together into question clusters. The first author
manually compared each question with existing clusters and questions, using
the definition that two questions belong in the same cluster if they have the
same answer. In other words, two questions matched to the same question
cluster if and only if they could be answered with a common answer. As every
new example in our dataset is checked against all existing question clusters,
including clusters with only one question, the time complexity for annotating
our dataset is $O(n^{2})$, where $n$ is the number of questions.

After all questions were grouped into question clusters, the first author gave
each question cluster with at least two questions a name summarizing the
questions in that cluster, and each question cluster was assigned to one of 15
question categories (as shown in Figure 1), which were conceived during a
thorough discussion with the last author. In Table 2, we show the question
clusters with the most questions, along with their assigned question
categories and some example questions. Figure 2 shows the distribution of
question clusters.

$0$$5$$10$$15$$20$$25$$30$$0$$20$$40$$60$$80$Questions per Question
clusterQuestion clusters Figure 2:  Number of questions per question cluster
for clusters with at least two questions. All questions in a question cluster
asked roughly the same thing. 120 question clusters had at least 3 questions
per cluster, 66 clusters had at least 5 questions per cluster, and 22 clusters
had at least 10 questions per cluster.

Annotation quality. We ran the dataset through multiple annotators to improve
the quality of our annotations. First, the last author confirmed all clusters
in the dataset, highlighting any questions that might need to be relabeled and
discussing them with the first author. Of the 1,245 questions belonging to
question clusters with at least two questions, 131 questions were highlighted
and 67 labels were modified. For a second pass, an external annotator
similarly read through the question cluster labels, for which 31 questions
were highlighted and 15 labels were modified. Most modifications involved
separating a single question cluster that was too broad into several more
specific clusters.

For another round of validation, we showed three questions from each of the 89
question clusters with $N_{cluster}\geq 4$ to three Mechanical Turk workers,
who were asked to select the correct question cluster from five choices. The
majority vote from the three workers agreed with our ground-truth question-
cluster labels 93.3% of the time. The three workers unanimously agreed on
58.1% of the questions, for which 99.4% of these unanimous labels agreed with
our ground-truth label. Workers were paid $\$0.07$ per question.

Finally, it is possible that some questions could fit in several categories—of
207 clusters, 40 arguably mapped to two or more categories, most frequently
the transmission and prevention categories. As this annotation involves some
degree of subjectivity, we post formal definitions of each question category
with our dataset to make these distinctions more transparent.

Single-question clusters. Interestingly, we observe that for the CDC and FDA
frequently asked questions websites, a sizable fraction of questions (44.6%
for CDC and 42.1% for FDA) did not ask the same thing as questions from any
other source (and therefore formed single-question clusters), suggesting that
these sources might want adjust the questions on their websites to question
clusters that were seen frequently in search engines such as Google or Bing.
Moreover, 54.2% of question clusters that had questions from at least two non-
official sources went unanswered by an official source. In the Supplementary
Materials, Table 7 shows examples of these questions, and conversely, Table 8
shows CDC and FDA questions that did not belong to the same cluster as any
other question.

##  3 Question Understanding Tasks

We provide baselines for two tasks: question-category classification, where
each question belongs to one of 15 categories, and question clustering, where
questions asking the same thing belong to the same cluster.

As our dataset is small when split into training and test sets, we manually
generate an additional author-generated evaluation set of $249$ questions. For
these questions, the first author wrote new questions for question clusters
with 4 or 5 questions per cluster until those clusters had 6 questions. These
questions were checked in the same fashion as the real questions. For clarity,
we only refer to them in $\S$3.1 unless explicitly stated.

###  3.1 Question-Category Classification

The question-category classification task assigns each question to one of 15
categories shown in Figure 1. For the train-test split, we randomly choose 20
questions per category for training (as the smallest category has 26
questions), with the remaining questions going into the test set (see Table
3).

Question Categories | 15
---|---
Training Questions per Category | 20
Training Questions | 300
Test Questions (Real) | 668
Test Questions (Generated) | 238
Table 3: Data split for question-category classification.

We run simple BERT Devlin et al. (2019) feature-extraction baselines with
question representations obtained by average-pooling. For this task, we use
two models: (1) SVM and (2) cosine-similarity based $k$-nearest neighbor
classification ($k$-NN) with $k=1$. As shown in Table 4, the SVM marginally
outperforms $k$-NN on both the real and generated evaluation sets. Since our
dataset is small, we also include results from using data augmentation Wei and
Zou (2019). Figure 4 (Supplementary Materials) shows the confusion matrix for
BERT-feat: SVM + augmentation for this task.

Model | Real Q | Generated Q
---|---|---
BERT-feat: $k$-NN | 47.8 | 52.1
\+ augmentation | 47.3 | 52.5
BERT-feat: SVM | 52.2 | 53.4
\+ augmentation | 58.1 | 58.8
Table 4: Performance of BERT baselines (accuracy in %) on question-category
classification with 15 categories and 20 training examples per category.

###  3.2 Question Clustering

Of a more granular nature, the question clustering task asks, given a database
of known questions, whether a new question asks the same thing as an existing
question in the database or whether it is a novel question. To simulate a
potential applied setting as much as possible, we use all questions clusters
in our dataset, including clusters containing only a single question. As shown
in Table 5, we make a 70%–30% train–test split by class.222For clusters with
two questions, one question went into the training set and one into the test
set. 70% of single-question clusters went into the training set and 30% into
the test set.

Training Questions | 920
---|---
Training Clusters | 460
Test Questions | 437
Test Clusters | 320
Test Questions from multi-q-clusters | 323
Test Questions from single-q-clusters | 114
Table 5: Data split for question clustering.

In addition to the $k$-NN baseline from $\S$3.1, we also evaluate a simple
model that uses a triplet loss function to train a two-layer neural net on
BERT features, a method introduced for facial recognition Schroff et al.
(2015) and now used in NLP for few-shot learning Yu et al. (2018) and answer
selection Kumar et al. (2019).

| Accuracy (%)
---|---
Model | Top-1 | Top-5
BERT-feat: $k$-NN | 39.6 | 58.8
\+ augmentation | 39.6 | 59.0
BERT-feat: triplet loss | 47.7 | 66.9
\+ augmentation | 49.5 | 69.4
Table 6: Performance of BERT baselines on question clustering involving 207
clusters.

For evaluation, we compute a single accuracy metric that requires a question
to be either correctly matched to a cluster in the database or to be correctly
identified as a novel question. Our baseline models use thresholding to
determine whether questions were in the database or novel. Table 6 shows the
accuracy from the best threshold for both these models, and Supplementary
Figure 3 shows their accuracies for different thresholds.

##  4 Discussion

Use cases. We imagine several use cases for Covid-q. Our question clusters
could help train and evaluate retrieval-QA systems, such as covid.deepset.ai
or covid19.dialogue.co, which, given a new question, aim to retrieve the
corresponding QA pair in an existing database. Another relevant context is
query understanding, as clusters identify queries of the same intent, and
categories identify queries asking about the same topic. Finally, Covid-q
could be used broadly to evaluate COVID-specific models—our baseline
(Huggingface’s bert-base-uncased) does not even have COVID in the vocabulary,
and so we suspect that models pre-trained on scientific or COVID-specific data
will outperform our baseline. More related areas include COVID-related query
expansion, suggestion, and rewriting.

Limitations. Our dataset was collected in May 2020, and we see it as a
snapshot in time of questions asked up until then. As the COVID situation
further develops, a host of new questions will arise, and the content of these
new questions will potentially not be covered by any existing clusters in our
dataset. The question categories, on the other hand, are more likely to remain
static (i.e., new questions would likely map to an existing category), but the
current way that we came up with the categories might be considered
subjective—we leave that determination to the reader (refer to Table 9 or the
raw dataset on Github). Finally, although the distribution of questions per
cluster is highly skewed (Figure 2), we still provide them at least as a
reference for applied scenarios where it would be useful to know the number of
queries asking the same thing (and perhaps how many answers are needed to
answer the majority of questions asked).

## References

  * Abdul-Mageed et al. (2020) Muhammad Abdul-Mageed, AbdelRahim Elmadany, Dinesh Pabbi, Kunal Verma, and Rannie Lin. 2020.  Mega-cov: A billion-scale dataset of 65 languages for covid-19.  _ArXiv_ , abs/2005.06012.  https://arxiv.org/pdf/2005.06012.pdf.
  * Chen et al. (2020) Emily Chen, Kristina Lerman, and Emilio Ferrara. 2020.  Covid-19: The first public coronavirus twitter dataset.  _ArXiv_ , abs/2003.07372.  https://arxiv.org/pdf/2003.07372.pdf.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  BERT: Pre-training of deep bidirectional transformers for language understanding.  In _Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)_ , pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics.  https://www.aclweb.org/anthology/N19-1423.pdf.
  * Gao et al. (2020) Zhiwei Gao, Shuntaro Yada, Shoko Wakamiya, and Eiji Aramaki. 2020.  Naist covid: Multilingual covid-19 twitter and weibo dataset.  _ArXiv_ , abs/2004.08145.  https://arxiv.org/pdf/2004.08145.pdf.
  * Huang et al. (2020) Ting-Hao Huang, Chieh-Yang Huang, Chien-Kuang Cornelia Ding, Yen-Chia Hsu, and C. Lee Giles. 2020.  Coda-19: Reliably annotating research aspects on 10, 000+ cord-19 abstracts using non-expert crowd.  _ArXiv_ , abs/2005.02367.  https://arxiv.org/pdf/2005.02367.pdf.
  * Kleinberg et al. (2020) Bennett Kleinberg, Isabelle van der Vegt, and Maximilian Mozes. 2020.  Measuring emotions in the covid-19 real world worry dataset.  _ArXiv_ , abs/2004.04225.  https://arxiv.org/pdf/2004.04225.pdf.
  * Kumar et al. (2019) Sawan Kumar, Shweta Garg, Kartik Mehta, and Nikhil Rasiwasia. 2019.  Improving answer selection and answer triggering using hard negatives.  In _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_ , pages 5911–5917. Association for Computational Linguistics.  "https://www.aclweb.org/anthology/D19-1604".
  * Romeo et al. (2016) Salvatore Romeo, Giovanni Da San Martino, Alberto Barrón-Cedeño, Alessandro Moschitti, Yonatan Belinkov, Wei-Ning Hsu, Yu Zhang, Mitra Mohtarami, and James Glass. 2016.  Neural attention for learning to rank questions in community question answering.  In _Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers_ , pages 1734–1745, Osaka, Japan. The COLING 2016 Organizing Committee.  https://www.aclweb.org/anthology/C16-1163.pdf.
  * Sakata et al. (2019) Wataru Sakata, Tomohide Shibata, Ribeka Tanaka, and Sadao Kurohashi. 2019.  FAQ retrieval using query-question similarity and bert-based query-answer relevance.  _CoRR_ , abs/1905.02851.  https://arxiv.org/pdf/1905.02851.pdf.
  * Sarker et al. (2020) A. Sarker, S. Lakamana, William E. Hogg, Allen Xie, Mohammed Ali Al-garadi, and Yc Yang. 2020.  Self-reported covid-19 symptoms on twitter: An analysis and a research resource.  In _medRxiv_.  https://www.medrxiv.org/content/10.1101/2020.04.16.20067421v3.full.pdf.
  * Schroff et al. (2015) Florian Schroff, Dmitry Kalenichenko, and James Philbin. 2015.  Facenet: A unified embedding for face recognition and clustering.  _CoRR_ , abs/1503.03832.  http://arxiv.org/abs/1503.03832.
  * Wei and Zou (2019) Jason Wei and Kai Zou. 2019.  EDA: easy data augmentation techniques for boosting performance on text classification tasks.  _Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP)_.  http://dx.doi.org/10.18653/v1/D19-1670.
  * Yu et al. (2018) Mo Yu, Xiaoxiao Guo, Jinfeng Yi, Shiyu Chang, Saloni Potdar, Yu Cheng, Gerald Tesauro, Haoyu Wang, and Bowen Zhou. 2018.  Diverse few-shot text classification with multiple metrics.  In _Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers)_ , pages 1206–1215. Association for Computational Linguistics.  https://www.aclweb.org/anthology/N18-1109.
  * Zarei et al. (2020) Koosha Zarei, Reza Farahbakhsh, Noel Crespi, and Gareth Tyson. 2020.  A first instagram dataset on covid-19.  _ArXiv_ , abs/2004.12226.  https://arxiv.org/pdf/2004.12226.pdf.

##  5 Supplementary Materials

###  5.1 Question Clustering Thresholds

For the question clustering task, our models used simple thresholding to
determine whether a question matched an existing cluster in the database or
was novel. That is, if the similarity between a question and its most similar
question in the database was lower than some threshold, then the model
predicted that it was a novel question. Figure 3 shows the accuracy of the
$k$-NN and triplet loss models at different thresholds.

BERT-feat: $k$-NN

$0.7$$0.8$$0.9$$1$$0.3$$0.4$$0.5$$0.6$ThresholdAccuracytop-5top-1

BERT-feat: triplet loss

$0.4$$0.6$$0.8$$1$$0.4$$0.6$ThresholdAccuracytop-5top-1

Figure 3:  Question clustering accuracy for $k$-NN and triplet loss models at
different thresholds. If a given test question had a similarity that was less
than the threshold, then it was classified as a novel question (i.e., not in
the database of known questions). When the threshold was too high, performance
dropped because too many questions were classified as novel. When the
threshold was too low, performance dropped because the model attempted to
match too many test questions to existing clusters in the database.

###  5.2 Question-Category Classification Error Analysis

Figure 4 shows the confusion matrix for our SVM classifier on the question-
category classification task on the test set of real questions. Categories
that were challenging to distinguish were _Transmission_ and _Having COVID_
(34% error rate), and _Having COVID_ and _Symptoms_ (33% error rate).

###  5.3 Further Dataset Details

Question mismatches. Table 7 shows example questions from at least two non-
official sources that went unanswered by an official source. Table 8 shows
example questions from the FDA and CDC FAQ websites that did not ask the same
thing as any other questions in our dataset.

Question Cluster | $N_{cluster}$ | Example Questions
---|---|---
Number of Cases | 21 | “Are COVID cases dropping?”
“Have COVID cases peaked?”
“Are COVID cases decreasing?”
Mutation | 19 | “Has COVID mutated?”
“Did COVID mutate?”
“Will COVID mutate?”
Lab Theory | 18 | “Was COVID made in a lab?”
“Was COVID manufactured?”
“Did COVID start in a lab?”
Table 7: Questions appearing in multiple sources that were unanswered by
official FAQ websites.

Example questions. Table 9 shows example questions from each of the 15
question categories.

Corresponding answers. The FAQ websites from reputable sources (denoted with ∗
in Table 1) provide answers to their questions, and so we also provide them as
an auxiliary resource. Using these answers, 23.8% of question clusters have at
least one corresponding answer. We caution against using these answers in
applied settings, however, because information on COVID changes rapidly.

Additional data collection details. In terms of how questions about COVID were
determined, for FAQ websites from official organizations, we considered all
questions, and for Google, Bing, Yahoo, and Quora, we searched the keywords
“COVID” and “coronavirus.”

As for synonymous ways of saying COVID, we considered “SARS-COV-2,”
“coronavirus,” “2019-nCOV,” “COVID-19,” and “COVID19.”

Other COVID-19 datasets. We encourage researchers to also explore other
COVID-19 datasets: tweets streamed since January 22 Chen et al. (2020),
location-tagged tweets in 65 languages Abdul-Mageed et al. (2020), tweets of
COVID symptoms Sarker et al. (2020), a multi-lingual Twitter and Weibo dataset
Gao et al. (2020), an Instagram dataset Zarei et al. (2020), emotional
responses to COVID Kleinberg et al. (2020), and annotated research abstracts
Huang et al. (2020).

Figure 4: Confusion matrix for BERT-feat: SVM predictions on the question-
category classification task. Food and Drug Administration
---
Question | Closest Matches from BERT
“Can I donate convalescent plasma?” | “Why is convalescent plasma being investigated to treat COVID?”
“Can I make my own hand sanitizer?”
“What are suggestions for things to do in the COVID quarantine?”
“Where can I report websites selling fraudulent medical products?” | “What kind of masks are recommended to protect healthcare workers from COVID exposure?”
“Where can I get tested for COVID?”
“How do testing kits for COVID detect the virus?”
Center for Disease Control
Question | Closest Matches from BERT
“What is the difference between cleaning and disinfecting?” | “How effective are alternative disinfection methods?”
“Why has Trump stated that injecting disinfectant will kill COVID in a
minute?”
“Should I spray myself or my kids with disinfectant?”
“How frequently should facilities be cleaned to reduce the potential spread of COVID?” | “What is the survival rate of those infected by COVID who are put on a ventilator?”
“What kind of masks are recommended to protect healthcare workers from COVID
exposure?”
“Will warm weather stop the outbreak of COVID?”
Table 8: Questions from the Food and Drug Administration (FDA) and Center for Disease Control (CDC) FAQ websites that did not ask the same thing as any questions from other sources. Category | Example Questions
---|---
Transmission | “Can COVID spread through food?”
“Can COVID spread through water?”
“Is COVID airborne?”
Societal Effects | “In what way have people been affected by COVID?”
“How will COVID change the world?”
“Do you think there will be more racism during COVID?”
Prevention | “Should I wear a facemask?”
“How can I prevent COVID?”
“What disinfectants kill the COVID virus?”
Societal Response | “Have COVID checks been issued?”
“What are the steps that a hospital should take after COVID outbreak?”
“Are we blowing COVID out of proportion?”
Reporting | “Is COVID worse than we are being told?”
“What is the COVID fatality rate?”
“What is the most reliable COVID model right now?”
Origin | “Where did COVID originate?”
“Did COVID start in a lab?”
“Was COVID a bioweapon?”
Treatment | “What treatments are available for COVID?”
“Should COVID patients be ventilated?”
“Should I spray myself or my kids with disinfectant?”
Speculation | “Was COVID predicted?”
“Will COVID return next year?”
“How long will we be on lockdown for COVID?”
Economic Effects | “What is the impact of COVID on the global economy?”
“What industries will never be the same because of COVID?”
“Why are stock markets dipping in response to COVID?”
Individual Response | “How do I stay positive with COVID?”
“What are suggestions for things to do in the COVID quarantine?”
“Can I still travel?”
Comparison | “How are COVID and SARS-COV similar?”
“How can I tell if I have the flu or COVID?”
“How does COVID compare to other viruses?”
Testing | “How COVID test is done?”
“Are COVID tests accurate?”
“Should I be tested for COVID?”
Nomenclature | “Should COVID be capitalized?”
“What COVID stands for?”
“What is the genus of the SARS-COVID?”
Having COVID | “How long does it take to recover?”
“How COVID attacks the body?”
“How long is the incubation period for COVID?”
Symptoms | “What are the symptoms of COVID?”
“Which COVID symptoms come first?”
“Do COVID symptoms come on quickly?”
Table 9: Sample questions from each of the 15 question categories.


[labelstyle=]

# What is the real category of sets?

Samuele Maschio

Abstract
According to Kreisel, category theory provides a powerful tool to organize
mathematics. A sample of this descriptive power is given by the categorical
analysis of the practice of ”classes as shorthands” in ZF set theory. In this
case category theory provides a natural way to describe the relation between
mathematics and metamathematics: if metamathematics can be described by using
categories (in particular syntactic categories), then the mathematical level
is represented by internal categories. Through this two-level interpretation
we can clarify the relation between classes and sets in ZF and, in particular,
we can present two equivalent categorical notions of definable set. Some
common sayings about set theory will be interpreted in the light of this
representation, emphasizing the distinction between naive and rigorous
sentences about sets and classes.

##  1 The spiny relation between categories and sets

The relation between sets and categories is a spiny topic. The set theoretical
foundations of category theory were discussed by many mathematicians, e.g. by
Feferman [5], Engler [4] and [12]. Viceversa, the categorical foundation of
set theory is not a clear matter. Categorical logic allows us to speak about
categorical models of mathematical theories and in particular about
categorical models of set theories, as for example $IZF$, $CZF$, $ZF$. In 1995
Joyal and Moerdijk in their _Algebraic Set Theory_ proposed a new technique to
guarantee the existence of internal models of $ZF$ and $IZF$ in a category.
Before their work, all proposed categorical models of set theory were based on
categories built starting from some standard models of set theory. Joyal and
Moerdijk’s approach has two main advantages:

  1. 1.

it allows to prove the existence of an internal model of $IZF$ by simply
checking some purely categorical properties of a class of arrows;

  2. 2.

it works for (relatively) arbitrary categories.

Their book gave rise to a large spread of works. It looked as algebraic set
theory could give not only a useful tool to mathematics, but also something
that could be interesting for foundational studies.

There is maybe nothing more suggestive and more imprecise than the claim that
_Category theory provides a foundation for mathematics_. We don’t mean that
this is not true, but we must come to an agreement on what is the meaning of
the words _foundation for mathematics_. Kreisel observed that category theory
provides a powerful tool to organize mathematics, and this is the way in which
most mathematicians involved in category theory think about category theory as
a foundation. There are also some attempts to use category theory to build a
based-on-functions theory of sets on which it is possible to found the entire
mathematical building; these are, for example, the axiomatic systems proposed
by Lawvere [11] and recalled by [16]. In this paper we adopt the attitude to
go in accordance with the first vision of _category theory as foundation_. We
think that category theory _describes_ mathematics in a very effective way. In
the following pages this descriptive power will be exemplified by using
category theory to clarify the role of classes in the practice of $ZF$ set
theory. Category theory (in both its usual and internal version) will be used
to give an account of the relation between mathematics and metamathematics.

##  2 Classes and ZF

Set theory is mainly $ZF$ (or better most of the set theorists studies $ZF$),
that is the classical first-order theory with equality whose language has
(countably many) individual variables, no functional symbols and a binary
relational symbol $\in$, and whose specific axioms are the following

  1. 1.

$\forall x\forall y(\forall t(t\in x\leftrightarrow t\in y)\rightarrow x=y)$;

  2. 2.

for every formula $P$ with free variables $p_{1},...,p_{k},t$,

$\forall p_{1}...\forall p_{k}\forall x\exists y\forall t(t\in
y\leftrightarrow(t\in x\wedge P));$

  3. 3.

$\forall x\forall y\exists z\forall t(t\in z\leftrightarrow(t=x\vee t=y))$;

  4. 4.

$\forall x\exists z\forall t(t\in z\leftrightarrow\exists y(t\in y\wedge y\in
x))$;

  5. 5.

$\forall y\exists z\forall x(x\in z\leftrightarrow x\subseteq y)$;

  6. 6.

for every formula $F$ with free variables $p_{1},..,p_{k},x,y$,

$\forall p_{1}...\forall p_{k}\forall z(\forall x(x\in
z\rightarrow\exists!yF)\rightarrow\exists z^{\prime}\forall x(x\in
z\rightarrow\exists y(y\in z^{\prime}\wedge F)));$

  7. 7.

$\exists x(0\in x\wedge\forall t(t\in x\rightarrow\sigma(t)\in x))$;

  8. 8.

$\forall x(x\neq 0\rightarrow\exists z(z\in x\wedge\forall t(t\in x\rightarrow
t\notin z)))$;

where as usual $x\subseteq y$ is a shorthand for $\forall t(t\in x\rightarrow
t\in y)$ and $\sigma(t)$ stays for $t\cup\left\\{t\right\\}$.

Set theorists work with sets, but they speak also about classes. However
classes don’t exist in $ZF$. The practice of set theorists consist in
considering classes as shorthands or formal writings. If $P$ is a formula with
a distinguished variable $x$, then a class is a formal writing
$\left\\{x|P(x)\right\\}$ and the expression

$t\in\left\\{x|P(x)\right\\}$

is simply a shorthand for $P[t/x]$. For example set theorists write $t\in{\cal
V}$, as a shorthand for $t\in\left\\{x|x=x\right\\}$, that is a shorthand for
$t=t$. They also write $t\in{\cal ON}$ as a shorthand for
$t\in\left\\{x|ON(x)\right\\}$, that is a shorthand for $ON(t)$ where $ON(x)$
is the formula that expresses the fact that $x$ is an ordinal, that is

$\forall s\forall s^{\prime}\forall s^{\prime\prime}((s\in t\wedge
s^{\prime}\in t\wedge s^{\prime\prime}\in t\wedge s\in s^{\prime}\wedge
s^{\prime}\in s^{\prime\prime})\rightarrow s\in s^{\prime\prime})\wedge$
$\wedge\forall s\forall s^{\prime}((s\in t\wedge s^{\prime}\in t\wedge s\neq
s^{\prime})\rightarrow(s\in s^{\prime}\vee s^{\prime}\in s))\wedge\forall
s(s\in t\rightarrow s\subseteq t).$

What is clear, per se, is the fact that classes are not mathematical, but
metamathematical objects. However these shorthands enjoy some of the
properties that are enjoyed by sets. I can give a meaning to the notion of
intersection of classes or to that of subclass. This accidental fact makes
some confusion breaking into! The metamathematical level and the mathematical
one are confused giving rise to impressive, but heavily incorrect sentences
like

$\textrm{"Sets are exactly those classes for which comprehension axiom is
true".}(*)$

It doesn’t matter the fact that sentences like these can be used as some sort
of _convincing argument_ to make students having an intuition of the notion of
set, these sentences look more dangerous, than useful.

The ease with which set theorists use classes (that are formal objects) as
some quasi-sets is due to the dual fact that their syntactical structure (and
in particular the use of connectives and quantifiers), as we have already
seen, allows this for many operations and that they know that there exists a
theory of classes (NBG) that is a conservative extension of ZFC. However
classes are _nothing more than syntactical objects_.

In the next sections we will see how the use of category theory can help us to
describe the relation between metamathematics and mathematics, and to
distinguish between real sentences about sets and external (naive) sentences
about sets.

##  3 The syntactic category of ZF

We proceed now defining the syntactic category of $ZF$, that we will denote
with $\mathbb{ZF}$. Its objects are formulas in context, i.e. formal writing
as

$\left\\{x_{1},..,x_{n}|P\right\\},$

where $x_{1},...,x_{n}$ is a (possibly empty) list of distinct variables and
$P$ is a formula with all free variables among $x_{1},...,x_{n}$. An arrow
from a formula in context $\left\\{\textbf{x}|P\right\\}$ to another
$\left\\{\textbf{y}|Q\right\\}$ is an equivalence class of formulas in context

$[\left\\{\textbf{x'},\textbf{y'}|F\right\\}]_{\equiv},$

where x’ is a list of variables that have the same lenght as x, and y’ is a
list of variables that has the same lenght as y, for which

  1. 1.

$F\vdash_{ZF}P[\textbf{x}^{\prime}/\textbf{x}]\wedge
Q[\textbf{y}^{\prime}/\textbf{y}]$;

  2. 2.

$F\wedge F[\textbf{y''}/\textbf{y'}]\vdash_{ZF}\textbf{y'}=\textbf{y''}$;

  3. 3.

$P[\textbf{x}^{\prime}/\textbf{x}]\vdash_{ZF}\exists\textbf{y'}F$.

The equivalence relation is given by

$\left\\{\textbf{x'},\textbf{y'}|F\right\\}\equiv\left\\{\textbf{x''},\textbf{y''}|F^{\prime}\right\\}\textrm{
iff }\vdash_{ZF}F\leftrightarrow
F^{\prime}[\textbf{x'}/\textbf{x''},\textbf{y'}/\textbf{y''}].$

For composition it is sufficient to consider arrows
$[\left\\{\textbf{x'},\textbf{y'}|F\right\\}]_{\equiv}$ and
$[\left\\{\textbf{y'},\textbf{z'}|F^{\prime}\right\\}]_{\equiv}$ with all
distinct variables (this doesn’t determine a loss of generality). In this case
the composition is given by

$[\left\\{\textbf{x'},\textbf{z'}|\exists\textbf{y'}(F\wedge
F^{\prime})\right\\}]_{\equiv}.$

The category we obtain is regular and Boolean (see Johnstone [7] for a proof).
In particular we recall the fact that

$\left\\{\textbf{x}|P\right\\}\times\left\\{\textbf{y}|Q\right\\}\cong\left\\{\textbf{x},\textbf{y}|P\wedge
Q\right\\},$

where we supposed (without loss of generality) that all involved variables are
distinct. Moreover terminal objects are given for example by

$\left\\{\;|\forall x(x=x)\right\\},\;\left\\{x|\forall t(t\notin
x)\right\\}.$

We can also easily prove that $\mathbb{ZF}$ is extensive, thanks to the fact
that

$\vdash_{ZF}0\neq 1.$

Initial objects are given for example by

$\left\\{\;|\exists x(x\neq x)\right\\},\;\left\\{x|x\neq x\right\\}.$

$\mathbb{ZF}$ is also an exact category; the proof is based on _Scott’s trick_
(see Rosolini [18], Maschio [15]). Finally $\mathbb{ZF}$ has also a subobject
classifier that is given by

$[\left\\{x,x^{\prime}|x=0\wedge
x^{\prime}=1\right\\}]:\left\\{x|x=0\right\\}\rightarrow\left\\{x|x=0\vee
x=1\right\\}.$

##  4 Definable classes

The category of definable classes of $ZF$, that we denote with
$\mathbb{DCL}[ZF]$, is the full subcategory of $\mathbb{ZF}$ determined by all
those objects that have list of variables of lenght $1$. It is clear that this
is the category of classes, as they are intended in the practice of $ZF$.

The meaningful fact about $\mathbb{DCL}[ZF]$ is the fact that, although it is
a subcategory of $\mathbb{ZF}$, it is provable to be equivalent to it. This
result comes from the fact that in $ZF$ there is an available representation
for ordered pairs:

$x=<x_{1},x_{2}>\equiv^{def}x=\left\\{\left\\{x_{1}\right\\},\left\\{x_{1},x_{2}\right\\}\right\\}.$

Every object of $\mathbb{ZF}$, $\left\\{x_{1},..,x_{n}|P\right\\}$, is
isomorphic to

$\left\\{x|\exists x_{1}...\exists
x_{n}(x=<<...<x_{1},x_{2}>,...>,x_{n}>\wedge P)\right\\},$

where $x$ is a variable distinct from $x_{1},...,x_{n}$.

##  5 The categorical side of class operations

Before going on, we want to spend some words giving an example of the
categorical interpretation of the practice of operations between classes. This
is done to justify the adequacy of $\mathbb{DCL}[ZF]$ for the aim of
describing the category of formal classes. For this purpose we focus on
intersection. We consider two definable classes $\left\\{x|P\right\\}$ and
$\left\\{y|Q\right\\}$ (we can suppose $x$ and $y$ to be distinct without loss
of generality); we usually take their intersection to be $\left\\{x,|P\wedge
Q[x/y]\right\\}$. However this operation can be expressed in purely
categorical terms. In fact $\left\\{x|P\wedge Q[x/y]\right\\}$ is isomorphic
in $\mathbb{DCL}[ZF]$ to the object we obtain by considering the following
pullback.

##  6 Definable sets

Let’s now consider the full subcategory $\mathbb{DST}[ZF]$ of
$\mathbb{DCL}[ZF]$ determined by the objects $\left\\{x|P\right\\}$ for which

$\vdash_{ZF}\exists z\forall x(x\in z\leftrightarrow P).$

This is the category of sets we have in mind, when we think sentence $(*)$ is
true.

We have the following result:

######  Theorem 6.1.

$\mathbb{DST}[ZF]$ is a topos.

###### Proof.

Finite limits are exactly finite limits in $\mathbb{ZF}$: a terminal object is
given by $\left\\{x|x=0\right\\}$, equalizers are exactly equalizers in
$\mathbb{ZF}$, while the product of two definible sets $\left\\{x|P\right\\}$,
$\left\\{y|Q\right\\}$ is given by

$\left\\{z|\exists x\exists y(z=<x,y>\wedge P\wedge Q)\right\\}$

with the obvious projections (we are assuming $x$ and $y$ to be distinct
without loss of generality). Subobject classifier is exactly the subobject
classifier of $\mathbb{ZF}$, while exponentials
$\left\\{y|Q\right\\}^{\left\\{x|P\right\\}}$ are given by

$\left\\{f|Fun(f)\wedge\forall s(s\in dom(f)\leftrightarrow P(s))\wedge\forall
s^{\prime}(s^{\prime}\in ran(f)\rightarrow Q(s^{\prime}))\right\\},$

with evaluation arrow given by

$[\\{F,y|\exists f\exists x(F=<f,x>\wedge Fun(f)\wedge\forall s(s\in
dom(f)\leftrightarrow P(s))\wedge$ $\wedge\forall s^{\prime}(s^{\prime}\in
ran(f)\rightarrow Q(s^{\prime}))\wedge<x,y>\in f)\\}]_{\equiv}.$

∎

##  7 A system of axioms for algebraic set theory

In this section we present a list of axioms for algebraic set theory proposed
by Simpson [19]. Every axiomatization of algebraic set theory is based on a
pair $(\mathbb{C},{\cal S})$ in which $\mathbb{C}$ is a category and ${\cal
S}$ is a family of arrows of $\mathbb{C}$ (called family of _small maps_). The
following are the axioms:

  1. 1.

$\mathbb{C}$ is a regular category;

  2. 2.

The composition of two arrows in ${\cal S}$ is in ${\cal S}$;

  3. 3.

Every mono is in ${\cal S}$;

  4. 4.

(STABILITY) If $f\in{\cal S}$ and $f^{\prime}$ is a pullback of $f$, then
$f^{\prime}\in{\cal S}$;

  5. 5.

(REPRESENTABILITY) For every $X$, there exists an object ${\cal P}_{\cal
S}(X)$ and an arrow $e_{X}:\in_{X}\rightarrow X\times{\cal P}_{\cal S}(X)$
with $\pi_{2}\circ e_{X}\in{\cal S}$ so that, for every $\psi:R\rightarrow
X\times Z$ with $\pi_{2}\circ\psi\in{\cal S}$, there exists a unique arrow
$\rho:Z\rightarrow{\cal P}_{\cal S}(X)$ that fits in a pullback as follows;

  6. 6.

(POWERSET) $\sqsubseteq_{X}:\subseteq_{X}\rightarrow{\cal P}_{\cal
S}(X)\times{\cal P}_{\cal S}(X)$ satisfies
$\pi_{2}\circ\sqsubseteq_{X}\in{\cal S}$,

where $\sqsubseteq_{X}$ is determined by the following property:

_An arrow $f=<f_{1},f_{2}>:Z\rightarrow{\cal P}_{\cal S}(X)\times{\cal
P}_{\cal S}(X)$ factorizes through $\sqsubseteq_{X}$ if and only if,
considering the following couple of pullbacks_,  _the arrow $\pi$ factorizes
through_ $\pi^{\prime}$.

We want also to recall some definitions:

######  Definition 7.1.

An object $U$ in a category $\mathbb{C}$ is _universal_ , if for every object
$X$ in $\mathbb{C}$, there exists a mono $j:X\rightarrow U$.

######  Definition 7.2.

An object $U$ in a regular category $\mathbb{C}$ with a class of small maps
${\cal S}$ is a _universe_ if there exists a mono $j:{\cal P}_{\cal
S}(U)\rightarrow U$.

######  Definition 7.3.

A $ZF$-_algebra_ for a regular category $\mathbb{C}$ with a class of small
maps ${\cal S}$ is an internal sup-semilattice $(U,\subseteq)$ together with
an arrow $\sigma:U\rightarrow U$, so that for every $\lambda:B\rightarrow U$
and for every $j:B\rightarrow A\in{\cal S}$, there exists
$sup_{j}(\lambda):A\rightarrow U$ so that for any
$j^{\prime}:B^{\prime}\rightarrow A$ and
$\lambda^{\prime}:B^{\prime}\rightarrow U$, once we consider the following
pullback,  we have that

$sup_{j}(\lambda)\circ j^{\prime}\subseteq\lambda^{\prime}\textrm{ if and only
if }\lambda\circ\pi_{2}\subseteq\lambda^{\prime}\circ\pi_{1}.$

_Morphisms_ of $ZF$-algebras are morphisms between internal sup-semilattices
that preserve $sup_{j}(\lambda)$ along $j\in{\cal S}$ and commute with the
arrows $\sigma$. An _initial_ $ZF$-algebra is an initial object in the
category of $ZF$-algebras and morphisms between them.

##  8 Small maps

We now want to define a class of small maps in $\mathbb{DCL}[ZF]$: the class
${\cal S}$. An arrow  is in ${\cal S}$ if and only if

$\vdash_{ZF}\forall y\exists z\forall x(F(x,y)\leftrightarrow x\in z).$

The class ${\cal S}$ is a class of small maps in the sense of Simpson [19]:

######  Lemma 8.1.

Every mono is in ${\cal S}$.

###### Proof.

This is obtained using axiom 2. to obtain the existence of an empty set and
axiom 3. to prove the existence of singletons. ∎

######  Lemma 8.2.

Compositions of arrows in ${\cal S}$ are in ${\cal S}$.

###### Proof.

This is obtained using axioms 6. and 4. ∎

######  Lemma 8.3.

The stability axiom is true for ${\cal S}$.

###### Proof.

This is obtained using axiom 6. ∎

######  Lemma 8.4.

The representability axiom is satisfied by ${\cal S}$.

###### Proof.

Fix a definible class $X=\left\\{x|P\right\\}$. The definible class ${\cal
P}_{\cal S}(X)$ is given by

$\left\\{y|\forall x(x\in y\rightarrow P)\right\\},$

while the definible class $\in_{X}$ is given by

$\left\\{z|\exists x\exists y(z=<x,y>\wedge\forall t(t\in y\rightarrow
P(t))\wedge x\in y)\right\\}$

and the arrow $e_{X}:\in_{X}\rightarrow X\times{\cal P}_{\cal S}(X)$ is given
by

$[\left\\{z,z^{\prime}|\exists x\exists y(z=<x,y>\wedge\forall t(t\in
y\rightarrow P(t))\wedge x\in y)\wedge z=z^{\prime}\right\\}]_{\equiv}.$

Now if the following arrow  is so that $R(x,y)\vdash_{ZF}P(x)\wedge Q(y)$ and
$\vdash_{ZF}\forall y\exists y^{\prime}\forall x(R(x,y)\leftrightarrow x\in
y^{\prime})$, that means that it represents (without loss of generality) a
relation which has second component in ${\cal S}$, then its representing arrow
from $\left\\{y|Q\right\\}$ to ${\cal P}_{\cal S}(X)$ is given by

$[\left\\{y,y^{\prime}|Q\wedge\forall x(R(x,y)\leftrightarrow x\in
y^{\prime})\right\\}]_{\equiv}.$

∎

######  Lemma 8.5.

The powerset axiom is verified by ${\cal S}$.

###### Proof.

The subset relation for $\left\\{x|P\right\\}$ is given by the following arrow

${[\left\\{z,z^{\prime}|\exists y\exists y^{\prime}(z=<y,y^{\prime}>\wedge
y\subseteq y^{\prime}\wedge\forall x(x\in y^{\prime}\rightarrow P(x)))\wedge
z=z^{\prime}\right\\}]_{\equiv}}$

from $\left\\{z|\exists y\exists y^{\prime}(z=<y,y^{\prime}>\wedge y\subseteq
y^{\prime}\wedge\forall x(x\in y^{\prime}\rightarrow P(x)))\right\\}$ to
${\cal P}_{\cal S}(X)\times{\cal P}_{\cal S}(X)$.
This relation is in ${\cal S}$ by virtue of axiom 5. ∎

We now have that small definible classes are exactly those classes
$\left\\{x|P\right\\}$ for which the unique arrow to $1$, that is
$[\left\\{x,y|P\wedge y=0\right\\}]$, is small. This means that

$\vdash_{ZF}\forall y\exists z\forall x(x\in z\leftrightarrow(P(x)\wedge
y=0)).$

Now we know that

$\vdash_{ZF}\exists y(y=0)$

and so the previous condition is equivalent to say that

$\vdash_{ZF}\exists z\forall x(x\in z\leftrightarrow P(x)).$

This means that small definible classes are exactly definible sets. We have
also that $\left\\{x|N(x)\right\\}$ is a small definible class, where $N(x)$
is the formula saying that $x$ is a finite ordinal: this follows from axioms
7. and 2.

We finally have that $\left\\{x|x=x\right\\}$ is a universal definible class
(and so also a universe), because, for every definible class
$\left\\{x|P\right\\}$, the arrow $[\left\\{x,x^{\prime}|P\wedge
x=x^{\prime}\right\\}]_{\equiv}$ is a mono from it to
$\left\\{x|x=x\right\\}$.

To conclude note that we have an explicit (and obvious) representation for an
initial $ZF$-algebra: this is given by

$(\left\\{x|x=x\right\\},\sqsubseteq_{\left\\{x|x=x\right\\}},[\left\\{x,z|z=\left\\{x\right\\}\right\\}]_{\equiv}).$

If

$[\left\\{z,z^{\prime}|F(z,z^{\prime})\right\\}]_{\equiv}:\left\\{z|P\right\\}\rightarrow\left\\{z^{\prime}|Q\right\\}$

is small in $\mathbb{DCL}[ZF]$, and
$[\left\\{z,x|\lambda(z,x)\right\\}]_{\equiv}$ is an arrow from
$\left\\{z|P\right\\}$ to $\left\\{x|x=x\right\\}$, then

$sup_{[\left\\{z,z^{\prime}|F(z,z^{\prime})\right\\}]}([\left\\{z,x|\lambda(z,x)\right\\}]_{\equiv})$

is given by the arrow

$[\left\\{z^{\prime},x|Q\wedge\forall t(t\in x\leftrightarrow\exists
z(F(z,z^{\prime})\wedge\lambda(z,t)))\right\\}]_{\equiv}.$

##  9 Internal category theory

The notion of internal category is the generalization of the notion of small
category. Although we can define what is an internal category in an arbitrary
category, we prefer to consider a category $\mathbb{C}$ with all finite
limits. We have the following

######  Definition 9.1.

An _internal category_ of $\mathbb{C}$ is a sestuple

$(C_{0},C_{1},\delta_{0},\delta_{1},ID,\Box)$

in which $C_{0},C_{1}$ are objects of $\mathbb{C}$ and
$\delta_{0},\delta_{1}:C_{1}\rightarrow C_{0}$, $ID:C_{0}\rightarrow C_{1}$,

$\Box:C_{1}\times_{\Box}C_{1}\rightarrow C_{1}$

are arrows of $\mathbb{C}$, where the following is a pullback,  that satisfy
the following requests

  1. 1.

$\delta_{1}\circ ID=\delta_{0}\circ ID=id_{C_{0}}$;

  2. 2.

$\delta_{0}\circ\Box=\delta_{0}\circ p_{0}$ and
$\delta_{1}\circ\Box=\delta_{1}\circ p_{1}$;

  3. 3.

$\Box\circ\lceil ID\circ\delta_{0},id_{C_{1}}\rceil=\Box\circ\lceil
id_{C_{1}},ID\circ\delta_{1}\rceil=id_{C_{1}}$;

  4. 4.

$\Box\circ\lceil\Box\circ p_{0},p_{1}\rceil=\Box\circ\lceil p_{0},\Box\circ
p_{1}\rceil\circ\lceil p_{0}\circ p_{0},\lceil p_{1}\circ
p_{0},p_{1}\rceil\rceil:(C_{1}\times_{\Box}C_{1})\times_{\Box}C_{1}\rightarrow
C_{0}$,

where we denote with $\lceil f,f^{\prime}\rceil$ the unique arrows that exist
for the definitions of pullback and where
$(C_{1}\times_{\Box}C_{1})\times_{\Box}C_{1}$ is the pullback of
$\delta_{1}\circ\Box$ and $\delta_{0}$.

Before going to the next section we show a way to externalize internal
categories. This is done in a very natural way by means of global elements.

######  Proposition 9.2.

If ${\cal C}=(C_{0},C_{1},\delta_{0},\delta_{1},ID,\Box)$ is an internal
category of $\mathbb{C}$, then the following is a category:

$\Gamma({\cal
C}):=(Hom(1,C_{0}),Hom(1,C_{1}),\delta_{0}\circ(-),\delta_{1}\circ(-),ID\circ(-),\Box\circ\lceil(-)_{1},(-)_{2}\rceil)$

###### Proof.

Every point of the definition of category follows immediately because of the
relative point in the definition of internal category. The proof is
straightforward. ∎

##  10 The real category of sets: ${\cal SET}$

We will now define an internal category of $\mathbb{ZF}$ (or equivalently of
$\mathbb{DCL}(ZF)$), called ${\cal SET}$. This category is given by the
following assignments:

  1. 1.

${\cal SET}_{0}:=\left\\{x|x=x\right\\}$;

  2. 2.

${\cal SET}_{1}:=\left\\{F|\exists f\exists z(F=<f,z>\wedge Fun(f)\wedge
ran(f)\subseteq z)\right\\}$;

  3. 3.

$\delta_{0}:=[\left\\{F,x|\exists f\exists z(F=<f,z>\wedge Fun(f)\wedge
ran(f)\subseteq z\wedge dom(f)=x)\right\\}]_{\equiv}$;

  4. 4.

$\delta_{1}:=[\left\\{F,z|\exists f(F=<f,z>\wedge Fun(f)\wedge ran(f)\subseteq
z)\right\\}]_{\equiv}$;

  5. 5.

$ID:=[\left\\{x,F|\exists f(F=<f,x>\wedge\forall t(t\in
f\leftrightarrow\exists s(s\in x\wedge t=<s,s>)))\right\\}]_{\equiv}$

  6. 6.

$\Box:=[\\{J,G|\exists f\exists f^{\prime}\exists z\exists
f^{\prime\prime}(J=<f,<f^{\prime},z>>\wedge Fun(f)\wedge Fun(f^{\prime})$
$\wedge ran(f)\subseteq dom(f^{\prime})\wedge ran(f^{\prime})\subseteq z\wedge
G=<f^{\prime\prime},z>\wedge$ $\wedge\forall t(t\in
f^{\prime\prime}\leftrightarrow(\exists s\exists s^{\prime}\exists
s^{\prime\prime}(<s,s^{\prime}>\in f\wedge<s^{\prime},s^{\prime\prime}>\in
f^{\prime}\wedge t=<s,s^{\prime\prime}>))))\\}]_{\equiv},$

once we easily realized that the object of composable arrows is given by

$\\{J|\exists f\exists f^{\prime}\exists z(J=<f,<f^{\prime},z>>\wedge
Fun(f)\wedge$ $\wedge Fun(f^{\prime})\wedge ran(f)\subseteq
dom(f^{\prime})\wedge ran(f^{\prime})\subseteq z)\\}.$

We have that

######  Theorem 10.1.

${\cal SET}$ is an internal category.

###### Proof.

This is a straightforward proof. ∎

We have also that this is an internal topos, as every construction for a topos
can be done in $\mathbb{ZF}$, as one can see (this is given by a well written
formal proof of the fact that sets and functions form a topos).

##  11 Global elements: names for sets

Now we have an internal category ${\cal SET}$; we want to study the category
$\Gamma({\cal SET})$. As follows directly from the definition we have that the
objects of $\Gamma({\cal SET})$ are the equivalence classes
$[\left\\{x|P(x)\right\\}]_{\equiv}$ of definable classes so that
$\vdash_{ZF}\exists!xP(x)$. Arrows of $\Gamma({\cal SET})$ are classes of
equivalence $[\left\\{f|P(f)\right\\}]_{\equiv}$ so that
$\vdash_{ZF}\exists!fP(f)$, and

$P(f)\vdash_{ZF}\exists f^{\prime}\exists z(f=<f^{\prime},z>\wedge
Fun(f^{\prime})\wedge ran(f^{\prime})\subseteq z).$

We have the following

######  Theorem 11.1.

$\mathbb{DST}(ZF)$ and $\Gamma({\cal SET})$ are equivalent.

###### Proof.

Consider the following functors:

  1. 1.

$\textbf{P}:\mathbb{DST}(ZF)\rightarrow\Gamma({\cal SET})$ is given by
$\textbf{P}(\left\\{x|P(x)\right\\}):=[\left\\{z|\forall x(x\in
z\leftrightarrow P(x))\right\\}]_{\equiv}$
$\textbf{P}([\left\\{x,y|F(x,y)\right\\}]_{\equiv}):=$
$:=[\\{f^{\prime}|\exists f\exists z(f^{\prime}=<f,z>\wedge\forall t(t\in
f\leftrightarrow\exists x\exists y(t=<x,y>\wedge F(x,y)))\wedge$
$\wedge\forall y(y\in z\leftrightarrow Q(y)))\\}]_{\equiv}$
$\textbf{P}(\left\\{y|Q(y)\right\\}):=[\left\\{z|\forall y(y\in
z\leftrightarrow Q(y))\right\\}]_{\equiv}$.

  2. 2.

$\textbf{P'}:\Gamma({\cal SET})\rightarrow\mathbb{DST}[ZF]$ is given by
$\textbf{P'}([\left\\{z|P(z)\right\\}]_{\equiv}):=\left\\{x_{0}|\exists
z(P(z)\wedge x_{0}\in z)\right\\}$
$\textbf{P'}([\left\\{f^{\prime}|Q(f^{\prime})\right\\}]_{\equiv}):=[\left\\{x,x^{\prime}|\exists
f^{\prime}(Q(f^{\prime})\wedge\exists z\exists
f(f^{\prime}=<f,z>\wedge<x,x^{\prime}>\in f))\right\\}]_{\equiv}$
$\textbf{P'}([\left\\{z|P^{\prime}(z)\right\\}]_{\equiv}):=\left\\{x_{0}|\exists
z(P^{\prime}(z)\wedge x_{0}\in z)\right\\}$,
where $x_{0}$ is a fixed variable (we can think of it as the first variable if
we consider variables of $ZF$ to be presented in a countable list).

It is immediate to see that $\textbf{P}\circ\textbf{P'}$ is the identity
functor for $\Gamma({\cal SET})$, while there is an natural isomorphism from
the identity functor of $\mathbb{DCL}[ZF]$ to $\textbf{P'}\circ\textbf{P}$,
that is given by the arrows

$[\left\\{x,x^{\prime}|P(x)\wedge
x=x^{\prime}\right\\}]_{\equiv}:\left\\{x|P(x)\right\\}\rightarrow\left\\{x_{0}|\exists
z(x_{0}\in z\wedge\forall x(x\in z\leftrightarrow P(x)))\right\\}$

∎

##  12 Final remarks

In our attempt to clarify the relation between (formal) classes and sets,
between metamathematics and mathematics, by means of a unique mathematical
structure, we started by introducing the syntactical category $\mathbb{ZF}$
(that we proved to be equivalent to the category of definable classes of
$ZF$). This category corresponds to the metamathematical level: its objects
are classes as are usually introduced in the set theorists’ practice. Moreover
this category has a full subcategory of some importance: the category of
definable sets, that is the category whose objects are those definable classes
$\left\\{x|P\right\\}$ for which

$\vdash_{ZF}\exists z\forall x(x\in z\leftrightarrow P).$

This is the naive category of sets. Obviously this is _not_ the real category
of sets. The _real_ category of sets is ${\cal SET}$. But this is not a
category: it is an _internal category_ in $\mathbb{ZF}$. The relation between
metamathematics and mathematics is exactly the relation between categories and
internal categories. Mathematical concepts are represented through internal
categories, external (or metamathematical) concepts are expressed at the
categorical level. The most interesting result shown in the previous sections
is that showing the equivalence of the two more natural ways to give an
external account of the notion of set. We proved that the category of
definable sets is equivalent to the category obtained by global sections on
${\cal SET}$: _classes that satisfy comprehension axiom are exactly those to
which I can give a name_.

## References

  * [1] S.Awodey, C.Butz, A.Simpson, T.Streicher.  Relating topos theory and set theory via categories of classes.  Bulletin of Symbolic Logic, 13(3): 340-358, 2007.
  * [2] Y.Bar-Hillel, A.A.Fraenkel, A.Levy.  Foundations of Set Theory.  North Holland, 1973.
  * [3] E. Casari.  Questioni di filosofia della matematica.  Feltrinelli, 1964.
  * [4] H.R.E.Engler.  On the Problem of Foundations of Category Theory.  Dialectica, 3(1), 1969.
  * [5] S.Feferman.  Categorial foundations and foundations of category theory.  Logic, foundations of mathematics and computability theory: 149-169, 1977.
  * [6] T.Jech.  Set theory. The third millennium edition.  Springer-Verlag, 2003.
  * [7] P.Johnstone.  Sketches of an elephant: a topos theory compendium, vol.2.  Oxford University Press, 2002.
  * [8] A.Joyal, I.Moerdijk,  Algebraic Set Theory.  Cambridge Unviersity Press, 1995.
  * [9] G.Kreisel.  Observations of popular discussions on foundations.  Axiomatic Set Theory, American Mathematical Society: 183-190, 1971
  * [10] K.Kunen  Set Theory: An introduction to Independence Proofs.  North Holland, 1983.
  * [11] F.W.Lawvere.  An elementary theoy of the category of sets (long version) with commentary.  Reprints in Theory and Applications of Categories, 11: 1-35, 2005
  * [12] G.Lolli.  Categorie, universi e principi di riflessione.  Bollati Boringhieri,1977
  * [13] S.MacLane.  Category theory for the working mathematicians.  Springer-Verlag,1972
  * [14] M.Makkai, G.E.Reyes.  First order categorical logic.  Springer, 1977.
  * [15] S.Maschio.  Aspects of internal set theory.  PhD thesis, 2012.
  * [16] C.McLarty.  Exploring categorical structuralism.  Philosophia Mathematica (3) Vol.12: 37-53, 2004.
  * [17] G.Rosolini  Una teoria di classi e insiemi.  Lecture notes, 2008
  * [18] G.Rosolini.  La categoria delle classi definibili in IZF è un modello di AST.  XXIV incontro di logica AILA, 2011.
  * [19] A.Simpson.  Elementary axioms for category of classes.  Logic in Computer Science, pp. 77-85, 1999.