> [!definition]
>
> Let $X$ be a [[Topological Space|topological space]]. A set $E \subset X$ is **of the first category (meagre)** if it is a countable union of nowhere dense sets, otherwise $E$ is **of the second category**.
>
> A set $E \subset X$ is **residual** of it is the complement of a meagre set.
> [!theoremb] Baire Category Theorem (Complete Metric Space)
>
> Let $X$ be a [[Complete Metric Space|complete metric space]]. If $\seq{U_n}$ is a [[Sequence|sequence]] of [[Open Set|open]] [[Dense|dense]] subsets of $X$, then $\bigcap_{n \in \nat}U_n$ is also dense in $X$.
>
> *Proof*.
>
> Let $\seq{U_n}$ be a sequence of open dense subsets of $X$.
>
> ### Construction
>
> Begin by constructing a sequence of balls of decreasing radius that serves to control *a* possible value of the intersection.
>
> Let $B_0$ be an open set, then there exists a sequence $\seq{B_n}$ of open balls such that
> $
> B_n \subset U_n \cap B_{n - 1} \quad \diam(B_n) \to 0
> $
> *Proof*. Let $n \in \nat$. Since $U_n$ is open and dense, $U_n \cap B_{n - 1}$ is non-empty and open. Choose $x_n \in U_n \cap B_{n - 1}$ and let $r_n > 0$ such that $r_n \le \frac{1}{4}\diam(B_{n - 1})$. Let $B_n = B(x_n, r_n)$, then $B_n \subset U_n \cap B_{n - 1}$.
>
> Since $\diam(B_{n - 1}) = 2r_{n - 1}$, $r_n \le \frac{1}{4}\diam(B_{n - 1})$ yields $r_n \le \frac{1}{2}r_{n - 1}$. Therefore $r_n \to 0$.
>
>
> ### Intersection
>
> For the non-emptiness of the intersection, use the fact that $X$ is complete and construct an element in it.
>
> Let $\seq{B_n}$ be a sequence of nested closed sets such that $\diam(B_n) \to 0$, then $\bigcap_{n \in \nat}B_n \ne \emptyset$.
>
> *Proof*. For each $B_n$ choose $x_n \in B_n$, then for any $\varepsilon > 0$, there exists $N \in \nat$ such that $\diam(B_N) < \varepsilon$ and $d(x_m, x_n) < \varepsilon$ for all $m, n \ge N$. Therefore $\seq{x_n}$ is [[Cauchy Sequence|Cauchy]] and converges to some $x \in X$. As each $B_n$ is closed, we have $x \in B_n$ for all $n \in \nat$.
>
>
> ### Adherent Points
>
> Using the above two properties, we can construct points arbitrarily close to $x$ in the intersection.
>
> Let $x \in X$, then for any $\varepsilon > 0$, there exists $y \in \bigcap_{n \in \nat}U_n$ such that $y \in B(x, \varepsilon)$. Therefore $\bigcap_{n \in \nat}U_n$ is dense in $X$.
>
> *Proof*. Let $B_0 = B(x, \delta)$ for some $\delta < \varepsilon$ such that $\ol{B(x, \delta)} \subset B(x, \varepsilon)$.
>
> Let $\seq{B_n}$ be a sequence of open balls such that $B_n \subset U_n \cap B_{n - 1}$ for all $n \in \nat$ with $\diam(B_n) \to 0$. Then $\bigcap_{n \in \nat}\ol{\diam(B_n)} \ne \emptyset$, and there exists
> $
> y \in \bigcap_{n \in \nat}\ol{\diam(B_n)} \subset \ol{B(x, \delta)} \subset B(x, \varepsilon)
> $
> [!theoremb] Baire Category Theorem (LCH)
>
> Let $X$ be a [[Locally Compact Hausdorff Space|LCH]] space. If $\seq{U_n}$ is a sequence of open dense subsets of $X$, then $\bigcap_{n \in \nat}U_n$ is also dense in $X$.
>
> *Proof*. Locally compact Hausdorff spaces exhibit a very similar intersection property.
>
>
> ### Construction
>
> Leverage the denseness of the family of open subsets to construct a nested sequence of open sets.
>
> Let $V_0$ be an open set. Then there exists a sequence $\seq{V_n}$ of non-empty open sets such that
> $
> V_n \subset U_n \cap V_{n - 1} \quad \forall n \in \nat
> $
> *Proof*. Let $n \in \nat$, then since $U_n$ is open and dense, $U_n \cap V_{n - 1}$ is non-empty and open. Simply take $V_n = U_n \cap V_{n - 1}$.
>
>
> ### Adherent Points
>
> From the finite intersection property, we can find a point in the intersection sufficiently close to the target point.
>
> Let $x \in X$ and $V \in \cn(x)$, then there exists $y \in \bigcap_{n \in \nat}U_n$ such that $y \in V$. Therefore $\bigcap_{n \in \nat}U_n$ is dense in $X$.
>
> *Proof*. Let $K$ be a compact neighbourhood of $x$ such that $x \in K \subset V$. Let $V_0 = K^o$ and take $\seq{V_n}$ such that $V_n \subset U_n \cap V_{n - 1}$ for all $n \in \nat$. Since $\ol{V_n} \subset K$ is closed and $K$ is compact, $\bigcap_{n \in \nat}\ol{V_n} \ne \emptyset$, and there exists
> $
> y \in \bigcap_{n \in \nat}\ol{V_n} \subset K \subset V
> $
> [!theoremb] Baire Category Theorem
>
> Let $X$ be a topological space such that for any sequence $\seq{U_n}$ of open dense sets, $\bigcap_{n \in \nat}U_n$ is also dense in $X$. If $\seq{V_n}$ is a sequence such that $\bigcup_{n \in \nat}V_n = X$, then there exists $n \in \nat$ with $(\ol{U_n})^o \ne \emptyset$. In other words, $X$ is of the second category.
>
> *Proof*. Let $\seq{V_n}$ be a sequence such that $\bigcup_{n \in \nat}V_n = X$, then $\bigcup_{n \in \nat}\ol{V_n} = X$ and $\bigcap_{n \in \nat}\ol{V_n}^c = \emptyset$. Since the intersection is empty, there exists $n \in \nat$ such that $\ol{V_n}^c$ is not dense in $X$. This yields
> $
> \begin{align*}
> \ol{\ol{V_n}^c} &\ne X \\
> \parens{\ol{\paren{\ol{V_n}}^c}}^c &\ne \emptyset \\
> (\ol{V_n})^{cco} &\ne \emptyset\\
> (\ol{V_n})^o &\ne \emptyset
> \end{align*}
> $
>