$\mathcal{S}$, smallest $\sigma$-algebra on $\mathbb{R}$ containing $\{(r,r+1):r\in\mathbb{Q}\}$, is the set of Borel subsets of $\mathbb{R}$ I have proved the following statement and I would like to know if my proof is correct, thank you.
"$\mathcal{S}$, smallest $\sigma$-algebra on $\mathbb{R}$ containing $\{(r,r+1):r\in\mathbb{Q}\}$, is the set of Borel subsets of $\mathbb{R}$".

DEF. (Borel set): The  smallest $\sigma$-algebra on $\mathbb{R}$ containing  all  open  subsets  of $\mathbb{R}$, $\mathcal{B}$, is called the collection of Borel subsets of $\mathbb{R}$. An element of this $\sigma$-algebra is called a Borel set.
LEMMA (1): Let $x\in\mathbb{R}$: then there exists both a decreasing sequence and an increasing sequence of rational numbers converging to $x$.
LEMMA (2): Every open subset of $\mathbb{R}$ can be written as a countable union of disjoint open intervals.

Let $(a, b), a,b\in\mathbb{R}, a<b$ be an open subset of $\mathbb{R}$. Then by LEMMA (1) there exist a decresing sequence of rational numbers $(a_i)$ such that $a_i\overset{i\to +\infty}{\to} a$ and an increasing sequence of rational numbers $(b_i)$ such that $b_i\overset{i\to +\infty}{\to}b-1$.
Now, since $\mathcal{S}$ is a $\sigma$-algebra we have that:
$[1]\ \mathbb{R}\setminus (a_i,a_i+1)=(-\infty,a_i]\cup [a_i+1,+\infty)\in\mathcal{S}$;
$[2]\ \mathbb{R}\setminus (b_i,b_i+1)=(-\infty,b_i]\cup [b_i+1,+\infty)\in\mathcal{S}$;
$[3]\ \bigcup_{i=1}^{\infty}\mathbb{R}\setminus (a_i,a_i+1)=(-\infty,a]\cup [a+1,+\infty)\in\mathcal{S}$;
$[4]\ \bigcup_{i=1}^{\infty}\mathbb{R}\setminus (b_i,b_i+1)=(-\infty,b-1]\cup [b,+\infty)\in\mathcal{S}$;
$[5]\ (-\infty, b-1]=\bigcup_{k=1}^{\infty} (-k,b-1]\in\mathcal{S}$;
$[6]\ [a+1,+\infty)=\bigcup_{k=1}^{\infty} [a+1, k)\in\mathcal{S}$.
From $[4]$, $[5]$, using the fact that $\sigma$-algebras are closed under differences of sets we get $(-\infty,b-1]\cup [b,+\infty)\setminus (-\infty,b-1]=[b,+\infty)\in\mathcal{S}$ and similarly from $[3]$ and $[6]$ that $(-\infty,a]\cup [a+1,+\infty)\setminus [a+1,+\infty)=(-\infty, a]\in\mathcal{S}$ so it is also $(-\infty,a]\cup [b,+\infty)\in\mathcal{S}$ hence $(a,b)\in\mathcal{S}$.
By LEMMA (2) and the fact that $\sigma$-algebra are closed under unions we have thus proved that the $\sigma$-algebra $\mathcal{S}$ contains every open subset of $\mathbb{R}$ but since by definition $\mathcal{B}$ is the smallest such $\sigma$-algebra it must be $\mathcal{B}\subset\mathcal{S}$. Similarly, since $(r,r+1)\in\mathcal{B}$ for every $r\in\mathbb{Q}$ (they are open sets in $\mathbb{R}$) and by definition $\mathcal{S}$ is the smallest $\sigma$-algebra containing these intervals, it must also be $\mathcal{S}\subset\mathcal{B}$ thus we can conclude that $\mathcal{S}=\mathcal{B}$, as desired.

EDIT: This question is not a duplicate of Show that $\mathcal{J}=\{[a, a+1) \mid a \in \mathbb{R}\}$ generates the Borel set of $\mathbb{R}$
Here the intervals are open intervals with rational end-points, not semi-open intervals with real end-points. This difference leads to different answers. The two questions are related but not duplicate.
 A: There are several variants to this problem. For example, one may consider the family of intervals  $\{[a,a+1): a\in D\}$, $\{(a,a+1]:a\in D\}$ or $\{(a,a+1):a\in D)\}$ where $D$ is some dense set in $\mathbb{R}$. The method to show that each one generates the Borel $\sigma$-algebra in $\mathbb{R}$ is essentially the same.
For the benefit of the OP, let me focus on the family $\mathcal{J}=\{(a,a+1):a\in D\}$, and for convenience let $D=\mathbb{Q}$ ($\mathbb{Q}$ is  closed under addition and multiplication and in turn, midpoints of intervals are also in $\mathbb{Q}$ which make things much easier). Then, for any $a,b\in D$
$$\begin{align}
(a,\infty)&=\bigcup_{n\geq0}\big(a+\frac{n}{2},a+\frac{n}{2}+1\big)\\
(-\infty,b)&=\bigcup_{n\geq0}\big(b-\frac{n}{2}-1,b-\frac{n}{2}\big)
\end{align}
$$
belong to the $\sigma$-algebra $\sigma(\mathcal{J})$ generated by $\mathcal{J}$. From there, the intervals $(a,b)=(-\infty,b)\cap(a,\infty)$
with $a,b\in D$ and $a<b$ also belong to $\sigma(\mathcal{J})$. Since every open set in $\mathbb{R}$ is the countable union of open intervals with endpoints in $D$, we are done!
The last statement follows by density arguments. For example, if $\alpha,\beta\in\mathbb{R}$ and $\alpha<\beta$, choose sequences in $D$ such that $a_n\searrow \alpha$ and $b_n\nearrow \beta$. Then
$$(\alpha,\beta)=\bigcup_n(a_n,b_n)\in\sigma(\mathcal{J})$$
Comment: To show that the other variations to the OP are in essence the same problem,  consider the family $\mathcal{L}=\{(a,a+1]:a\in D\}$, also with $D=\mathbb{Q}$. For any $a\in D$
$$
(a,\infty)=\bigcup_{n\geq0}(a+n,a+n+1]\in\sigma(\mathcal{L})
$$
For any $b\in D$, choose a sequence $b_n$ also in $D$ such that $b_n\nearrow b$. Then
$$
[b,\infty)=\bigcap_n(b_n,\infty)\in\sigma(\mathcal{L})
$$
From there, $(-\infty,b)=\mathbb{R}\setminus[b,\infty)\in\sigma(\mathcal{L})$. Now we can proceed as before and obtain the Borel measurability of $(a,b)$ for $a, b\in D$ with $a<b$, etc.
A: First: This question is not a duplicate of Show that $\mathcal{J}=\{[a, a+1) \mid a \in \mathbb{R}\}$ generates the Borel set of $\mathbb{R}$
In this question, the intervals are open intervals with rational end-points, not semi-open intervals with real end-points. This difference leads to different answers. The two questions are related but not duplicate.
Second : Here is a simpler solution.
Let $\mathcal{S}$ be the smallest $\sigma$-algebra on $\mathbb{R}$ containing $\{(r,r+1):r\in\mathbb{Q}\}$. Then,
Step 1. Given any $a, b\in \Bbb Q$ such that $a \leq b \leq a+1$, take $c= b-1$. Then $c \in  \Bbb Q$ and
$$(a,b) = (c, c+1) \cap (a, a+1) \in \mathcal{S}$$
So $\mathcal{S}$ has all open intervals with rational endpoints and length less or equal $1$.
Step 2. Given any $a, b\in \Bbb Q$ such that $a \leq b$, we can easily write $(a,b)$ as a finite union of (overlapping) open intervals with rational endpoints and length less or equal $1$.
In fact, let $n \in \Bbb N$ be such that $a + n/2 \leq b \leq a +(n+1)/2$, then
$$ (a,b) = \left (a+\frac{n-1}{2},b \right) \cup\bigcup_{k=0}^{n-2} \left (a+\frac{k}{2},a+\frac{k+2}{2} \right ) $$
It is easy to check that all intervals on the right side are open intervals with rational endpoints and length less or equal $1$. So all open intervals with rational endpoints are in $\mathcal{S}$ .
Step 3. Given any $a,b \in [-\infty, \infty]$, we can find a sequence $\{a_n\}$ of rationals in $(a,b)$ such that $a_n \to a$ and a sequence $\{b_n\}$ of rationals in $(a, b)$ such that $b_n \to b$. It is immediate that
$$(a,b) = \bigcup_{n=1}^\infty (a_n,b_n)$$
So $(a,b) \in \mathcal{S}$. Thus, all open intervals are in $\mathcal{S}$.
Step 4. By lemma 2, all open sets are in $\mathcal{S}$ and so $\mathcal{B} \subset \mathcal{S}$. Since, for all $r \in \Bbb Q$, $(r,r+1) \in \mathcal{B}$, we have that $\mathcal{S} \subseteq \mathcal{B}$. So, $\mathcal{S} = \mathcal{B}$.
