# Gδ set

In the mathematical field of topology, a G$_δ$ set is a subset of a topological space that is a countable intersection of open sets. The notation originated from the German nouns Gebiet 'open set' and Durchschnitt 'intersection'. Historically G$_δ$ sets were also called inner limiting sets, but that terminology is not in use anymore. G$_δ$ sets, and their dual, F$_𝜎$ sets, are the second level of the Borel hierarchy.

## Definition

In a topological space a G$_δ$ set is a countable intersection of open sets. The G$_δ$ sets are exactly the level Π$^0$ $_2$ sets of the Borel hierarchy.

## Examples

* Any open set is trivially a G$_δ$ set.
* The irrational numbers are a G$_δ$ set in the real numbers $\mathbb {R}$. They can be written as the countable intersection of the open sets $\{q\}^{c}$ (the superscript denoting the complement) where $q$ is rational.
* The set of rational numbers $\mathbb {Q}$ is not a G$_δ$ set in $\mathbb {R}$. If $\mathbb {Q}$ were the intersection of open sets $A_{n}$ each $A_{n}$ would be dense in $\mathbb {R}$ because $\mathbb {Q}$ is dense in $\mathbb {R}$. However, the construction above gave the irrational numbers as a countable intersection of open dense subsets. Taking the intersection of both of these sets gives the empty set as a countable intersection of open dense sets in $\mathbb {R}$, a violation of the Baire category theorem.
* The continuity set of any real valued function is a G$_δ$ subset of its domain (see the "Properties" section for a more general statement).
* The zero-set of a derivative of an everywhere differentiable real-valued function on $\mathbb {R}$ is a G$_δ$ set; it can be a dense set with empty interior, as shown by Pompeiu's construction.
* The set of functions in $C([0,1])$ not differentiable at any point within [0, 1] contains a dense G$_δ$ subset of the metric space $C([0,1])$. (See Weierstrass function § Density of nowhere-differentiable functions.)

## Properties

The notion of G$_δ$ sets in metric (and topological) spaces is related to the notion of completeness of the metric space as well as to the Baire category theorem. See the result about completely metrizable spaces in the list of properties below. $\mathrm {G_{\delta }}$ sets and their complements are also of importance in real analysis, especially measure theory.

### Basic properties

* The complement of a G$_δ$ set is an F$_σ$ set, and vice versa.
* The intersection of countably many G$_δ$ sets is a G$_δ$ set.
* The union of finitely many G$_δ$ sets is a G$_δ$ set.
* A countable union of G$_δ$ sets (which would be called a G$_{δσ}$ set) is not a G$_δ$ set in general. For example, the rational numbers $\mathbb {Q}$ do not form a G$_δ$ set in $\mathbb {R}$.
* In a topological space, the zero set of every real valued continuous function $f$ is a (closed) G$_δ$ set, since $f^{-1}(0)$ is the intersection of the open sets $\{x\in X:-1/n<f(x)<1/n\}$, $(n=1,2,\ldots )$.
* In a metrizable space, every closed set is a G$_δ$ set and, dually, every open set is an F$_σ$ set. Indeed, a closed set $F\subseteq X$ is the zero set of the continuous function $f(x)=d(x,F)$, where $d$ indicates the distance from a point to a set. The same holds in pseudometrizable spaces.
* In a first countable T$_1$ space, every singleton is a G$_δ$ set.
* A subspace of a completely metrizable space $X$ is itself completely metrizable if and only if it is a G$_δ$ set in $X$.
* A subspace of a Polish space $X$ is itself Polish if and only if it is a G$_δ$ set in $X$. This follows from the previous result about completely metrizable subspaces and the fact that every subspace of a separable metric space is separable.
* A topological space $X$ is Polish if and only if it is homeomorphic to a G$_δ$ subset of a compact metric space.

### Continuity set of real valued functions

The set of points where a function $f$ from a topological space to a metric space is continuous is a $\mathrm {G_{\delta }}$ set. This is because continuity at a point $p$ can be defined by a $\Pi _{2}^{0}$ formula, namely: For all positive integers $n,$ there is an open set $U$ containing $p$ such that $d(f(x),f(y))<1/n$ for all $x,y$ in $U$. If a value of $n$ is fixed, the set of $p$ for which there is such a corresponding open $U$ is itself an open set (being a union of open sets), and the universal quantifier on $n$ corresponds to the (countable) intersection of these sets. As a consequence, while it is possible for the irrationals to be the set of continuity points of a function (see the popcorn function), it is impossible to construct a function that is continuous only on the rational numbers.
In the real line, the converse holds as well; for any G$_δ$ subset $A$ of the real line, there is a function $f:\mathbb {R} \to \mathbb {R}$ that is continuous exactly at the points in $A$.

## G$_δ$ space

A G$_δ$ space is a topological space in which every closed set is a G$_δ$ set. A normal space that is also a G$_δ$ space is called perfectly normal. For example, every metrizable space is perfectly normal.