Is the $\sigma$-algebra generated by closed rectangles Borel $\sigma$-algebra? $\newcommand{\norm}[1]{\left\lVert#1\right\rVert}$
Suppose we have rectangles in the form $\{[a_1, b_1]\times[a_2,b_2]\times\cdots\times[a_n,b_n]\}\subset \mathbb{R}^n$. Let $\mathcal{C}$ be the set of all such rectangles. Does $\mathcal{B}^n =\sigma(\mathcal{C})$?
I'm also curious about balls. Let $\mathcal{D}$ be sets of balls in the form of $\{ x\in\mathbb{R}^n|\norm{x-a}<r^2 \}$. Does $\mathcal{B}^n =\sigma(\mathcal{C})$? Let's say all $a,b,r$ are rationals.
Also, is $\sigma(\mathcal{D})=\sigma(\mathcal{C})$ true?
I think the proof could be done by saying balls can be represented by countably union/intersection of rectangles. But I don't know how to write it explicitly?
An answer for the case in dimension $2$ would be appreciated.
 A: Let $(X,\tau)$ be a topological space. $\newcommand\calB{\mathcal{B}}$Let $\calB(X)$ denote the Borel $\sigma$-algebra on $X$, $\sigma(\tau)$. Your question essentially boils down to asking, given $\newcommand\scrB{\mathscr{B}}\scrB$ is a base or even a subbase for the topology on $X$, when does $\sigma(\scrB)=\calB(X)$? Well, clearly we always have $\sigma(\scrB)\subseteq \calB(X)$, so really we just want to know, when is $\calB(X)$ also a subset of $\sigma(\scrB)$. Well $\calB(X)\subseteq \sigma(\scrB)$ if and only if for all $U\in \tau$, $U\in\sigma(\scrB)$.
This already answers your questions. Every open set in $\Bbb{R}^n$ is a union of balls with rational centers and rational radius and every open set in $\Bbb{R}^n $is a union of rectangles with rational endpoints. We use rational centers, radii, and endpoints so that we can guarantee that every open set is a countable union of basic open sets, and therefore in $\sigma(\scrB)$. Thus $\calB(X)=\sigma(\mathcal{C})=\sigma(\mathcal{D})$.
Taking closed rectangles also doesn't really change much, since open rectangles are the countable union of the closed rectangles with rational endpoints contained in the open rectangle.
However, more generally we have the following theorem that implies the statements above.
If $X$ is second countable and $\scrB$ is a base or subbase for the topology on $X$, then $\sigma(\scrB)=\calB(X)$.
Proof:
First we can assume that $\scrB$ is a base, since the set of finite intersections of elements of $\scrB$ is contained in $\sigma(\scrB)$.
Again by the logic in my first paragraph, it suffices to show that every open set $U$ is contained in $\sigma(\scrB)$.
Then if $\scrB$ were countable, then we would be done, since then every open set would be a countable union of elements of $\scrB,$ and hence in $\sigma(\scrB)$. Thus our goal is to find a countable subset of $\scrB$ that is still a base for the topology.
Since $X$ is second countable, let $\newcommand\scrC{\mathscr{C}}\scrC=\{C_n\}_{n\in\Bbb{N}}$ be a countable base for $X$. Now for each $C_n$, since $\scrB$ is a base, $C_n=\bigcup_{\alpha\in J_n} B_{n\alpha}$ for some index set $J_n$. However, every subspace of a second countable space is itself second countable, so every subspace of a second countable space is Lindelöf. In particular $C_n$ is Lindelöf. Thus we can assume that the index set $J_n$ is countable. Thus we have $C_n=\bigcup_{m\in\Bbb{N}} B_{nm}$ for some $B_{nm}\in \scrB$. Hence every element of $\scrC$ is a union of elements of the countable subset of $\scrB$, $\scrB':=\{B_{nm}:n,m\in\Bbb{N}\}$. Thus $\scrB'$ is a base for the topology on $X$ that is also a countable subset of $\scrB$. Hence $\sigma(\scrB)=\calB(X)$.
