What subsets of $\Bbb R$ are closed under countable sums? More precisely:

Definition.
A subset $S \subset \Bbb R$ is called good if the following hold:

*

*if $x, y \in S$, then $x + y \in S,$ and

*if $(x_n)_{n = 1}^\infty \subset S$ is a sequence in $S$ and $\sum_{n = 1}^\infty x_n$ converges, then $\sum_{n = 1}^\infty x_n \in S$.


In other words, a good subset is closed under finite sums and countable sums whenever the sum does exist.

Question: What are all the good subsets of $\Bbb R$?


Origin
This question was asked recently and Conifold had commented how the only subsets of $\Bbb R$ closed under countable summations are $\varnothing$ and $\{0\}$. It was then natural to ask "closed under countable summation, assuming it exists".

My thoughts
Here are some examples of familiar sets which are good: $\varnothing$, $\{0\}$, $\Bbb Z_{\geq 0}$, $\Bbb Z_{> 0}$, $\Bbb Z$, $n\Bbb Z$, $\Bbb R$.
We even have the following:
$$r \Bbb Z := \{rn : n \in \Bbb Z\},$$
where $r$ is any real number.
But the examples apart from $\Bbb R$ are good for a trivial reason: Those are sets that are closed under finite summation and have the property that they are discrete enough so that the only convergent sums are those where the terms are eventually $0$. (In the case of $\Bbb Z_{> 0}$, there is no such sum.)
On the same note, intervals of the form $[a, \infty)$ and $(a, \infty)$ are good for $a > 0$.
In general, suppose that $S$ satisfies the following: $S$ is closed under finite sums and there exists $\epsilon > 0$ such that $|s| > \epsilon$ for all $s \in S$. Then, $S$ and $S \cup \{0\}$ are good.
Another example: $[0, \infty)$ and $(0, \infty)$ are good and do not follow the criteria above.

The following are some examples of not good sets: $\Bbb Q$, $\Bbb R \setminus \Bbb Q$, $\Bbb R \setminus \Bbb Z$, a proper cofinite subset of $\Bbb R$, any bounded set apart from $\{0\}$ and $\varnothing$. In fact, excluding $\Bbb Q$, the other ones are not even closed under finite sums.
In the same vein as $\Bbb Q$, we also have the set of real algebraic numbers which is not good (but is indeed closed under finite sums).
Here's a nontrivial one: Consider the set $$B = \left\{\frac{1}{2^k} : k \in \Bbb Z_{> 0}\right\}.$$ Then, any countable subset of $\Bbb R$ that contains $B$ is not good.
Proof. $(0, 1]$ is uncountable and every element in it can be written as a sum of elements of $B$. (Binary expansions.) $\Box$
A bit more thought actually shows that more is true: Since $(0, 1]$ is contained in the set of all possible sums, any good set containing $B$ must contain all of $(0, \infty)$.
Another one: let $(a_n)_{n \ge 1}$ be any real sequence such that $\sum a_n$ converges conditionally. Then, the only good subset containing $\{a_n\}_{n \ge 1}$ is $\Bbb R$, by the Riemann rearrangement theorem.

Additional comments
There are some variants that come to mind. Not sure if any of them are any more interesting. But I'd be happy with an answer that answers only one of the following variants as well.

*

*What if I exclude point 1. from my definition? Let's call such a set nice.
In that case, the set $\{1\}$ is nice but not good. (Of course, if $0 \in S$, then nice is equivalent to good.) What are the nice subsets of $\Bbb R$? What are the nice subsets which are not good?

*What if I consider only those sums which have converge absolutely?


More observations
(These are edits, which I'm adding later)
Here are some additional observations:

*

*Arbitrary intersection of good sets is good and $\Bbb R$ is good. Thus, it makes sense to talk about the smallest good set containing a given subset of $\Bbb R$.
So, given a subset $A \subset \Bbb R$, let us call this smallest good set to be the good set generated by $A$ and notationally denote it as $\langle A \rangle$.
(In particular, $A$ is good iff $A = \langle A \rangle$.)

*$A \subset B \implies \langle A \rangle \subset \langle B \rangle$.

*$\langle (0, \epsilon) \rangle = (0, \infty)$ and similar symmetric results.

*Suppose $S \subset (0, \infty)$ is dense in $(0, \infty)$, then $\langle S \rangle = (0, \infty)$.
Indeed, pick $a_0 \in (0, \infty)$.
Then, there exists $s_1 \in (a_0/2, a_0)$.
Put $a_1 := a - s_1$. Then, $a_1 \in (0, a_0/2)$.
Now pick $s_2 \in (a_1/2, a_1)$ and so on. Then, $\sum s_n = a_0$.
Symmetric results apply. In particular, the only dense good subset of $\Bbb R$ (or $\Bbb R^+$ or $\Bbb R^-$) is the whole set.

*Suppose $S \subset (0, \infty)$ contains arbitrarily small elements (i.e., $S \cap (0, \epsilon) \neq \varnothing$ for all $\epsilon > 0)$), then $\langle S \rangle = (0, \infty)$.
To see this, let $a > 0$ be arbitrary. Pick $s_1 \in (0, a)$.
Let $n_1$ be the largest positive integer such that $n_1 s_1 < a$.
Then pick $s_2 \in (0, a - n_1s_1)$. Let $n_2$ be the largest such $n_2s_2 < a - n_1s_1$ and so on.
Then, $$\underbrace{s_1 + \cdots + s_1}_{n_1} + \underbrace{s_2 + \cdots + s_2}_{n_2} + \cdots = a.$$
 A: Not quite what you want, but too long for a comment:

Proposition. If $S$ is a subgroup, then $S$ is good iff it is closed.

Proof. Suppose that $S$ is good and consider a
converging sequence $s_n \to s$ with each $s_n \in S$; setting $t_n :=
s_{n+1}-s_n \in S$ we obtain
$$S \ni \sum_{n \geq 1}t_n = \lim_{n\to \infty}s_{n+1} = s-s_1.$$
Thus $s = (s-s_1) + s_1 \in S$. Conversely, suppose that $S$ is good and take a converging series $\sum_{n \geq 1}s_n$ with terms belonging to $S$. Since each partial sum is in $S$, the series is a limit point of $S$ (and thus belongs to $S$). $\square$
A closed subgroup of $\Bbb R$ is of the form $\alpha \Bbb Z$ for some $\alpha > 0$, $\Bbb R$ or $\{0\}$, see here.
Also, a remark: by Riemann's rearranging theorem any good subset that contains a sequence whose series is conditionally convergent must be $\Bbb R$.
Maybe if we consider the subgroup generated by a good subset $S$ we can get some more information. It is not obvious to me whether this remains to be a good subset, though.
A: Write $S^{\times} = S\setminus\{0\}$. Then we will prove the following claim:

Claim. A subset $S$ of $\mathbb{R}$ is good if and only if $S$ satisfies one of the following options:

*

*$S$ is one of $\varnothing$, $\{0\}$, $(0, \infty)$, $[0, \infty)$, $(-\infty, 0)$, $(-\infty, 0]$, or $\mathbb{R}$.

*$S^{\times}$ is a semigroup contained in $[r, \infty)$ for some $r > 0$.

*$S^{\times}$ is a semigroup contained in $(-\infty, -r]$ for some $r > 0$.

*$S = \alpha \mathbb{Z}$ for some $\alpha > 0$.


Proof. It is obvious that a set $S$ satisfying one of the above options is always good. For the opposite direction, let $S$ be a good subset of $\mathbb{R}$. Then both $S^+ = S \cap (0, \infty)$ and $S^- = S \cap (-\infty, 0)$ are good, since they are intersections of good sets. Then we have the following trichotomy for $S^+$:
\begin{equation*}
S^+ = \varnothing,
\quad\text{or}\quad
S^+ = (0, \infty),
\quad\text{or}\quad
\inf S^+ > 0,
\end{equation*}
and similarly for $S^-$:
\begin{equation*}
S^- = \varnothing,
\quad\text{or}\quad
S^- = (-\infty, 0),
\quad\text{or}\quad
\sup S^- < 0.
\end{equation*}
Now let us examine all the nine possibilities:
$$ \begin{array}{c|ccc}
& S^+ = \varnothing & S^+ = (0, \infty) & \inf S^+ > 0 \\
\hline
S^- = \varnothing & S^{\times} = \varnothing & S^{\times} = (0, \infty) & \text{Option 2} \\
S^- = (-\infty, 0) & S^{\times} = (-\infty, 0) & S = \mathbb{R} & \text{impossible} \\
\sup S^- < 0 & \text{Option 3} & \text{impossible} & \text{Option 4} \\
\end{array} $$
Here we only cover non-trivial cases:

*

*Suppose $S^+ = (0, \infty)$ and $\sup S^- < 0$. Then by picking $a > 0$ so that $-a \in S^-$, we find that $(-a, \infty) = (-a) + S^{+} \subseteq S$. This contradicts $\sup S^- < 0$.


*Suppose $\inf S^+ > 0$ and $\sup S^- < 0$. In this case, we claim:

Claim. Whenever $a \in S^+$ and $b \in S^-$, we have $a/b \in \mathbb{Q}$.

Let us first check that this claim implies the assertion in Option 4. For any $a \in S^+$ and $b \in S^-$, write $a/b = -p/q$ for some $p, q \in \mathbb{Z}^{>0}$ in lowest term and write $g = a/p = -b/q$. Then by the Bezout's identity, we can find integers $x, y$ such that $xp - yq = 1$. By replacing $x$ and $y$ by $x+qk$ and $y+pk$ if necessary, we may assume that both $x$ and $y$ are positive. Then $xa + yb = g \in S$. A similar reasoning also shows that $-g \in S$. So the good set generated by $\{a, b\}$ is precisely $g\mathbb{Z}$.
Next, it is easy to see that the claim implies that both $S^+$ and $S^-$ are countable. So we may enumerate them by $S^+ = \{a_1, a_2, \dots\}$ and $S^- = \{ b_1, b_2, \dots\}$. Then the above observation yields
$$\langle \{a_1, b_1, a_2, b_2, \dots, a_n, b_n\}\rangle = g_n \mathbb{Z}$$
for some $g_n > 0$ such that $g_n/g_{n+1} \in \mathbb{Z}$ for all $n$. Moreover, the assumption tells that $(g_n)_{n\geq 1}$ eventually stabilizes with some value $\alpha > 0$. Therefore $S = \alpha \mathbb{Z}$.
So it remains to prove the claim. Suppose otherwise. Then there exist $a \in S^+$ and $b \in S^-$ such that $a/b \notin \mathbb{Q}$. Write $\xi = -a/b$ and note that $\xi$ is irrational. So by the Dirichlet approximation theorem, for any $\epsilon > 0$ we can find positive integers $x, y$ such that $0 < \left| x \xi - y \right| < \epsilon/|b|$. This then implies that $0 < \left| xa + yb \right| < \epsilon$, hence contradicts the assumption that $\inf S^+ > 0$ and $\sup S^- < 0$. Therefore the claim must be true.
A: Maybe this'll add to the classification.
Let $S$ be a good set such that there exist atleast one series $\sum\limits_{n=1}^{\infty} x_n$ which converges.
As mentioned in the above answers, if $\sum x_n$ is conditionally convergent, then by  Riemann's rearranging theorem , $S = \mathbb{R}$.
So, lets consider positive series only (equivalently negative series may be considered).
We prove that under the given properties of $S$, we can make sure that every positive real belongs to $S$. WLOG, lets prove that $1 \in S$, and same procedure can be used for any positive real.
Let $\sum\limits_{n=1}^{\infty} x_n$ be convergent to some positive value. This implies that we can chose the tail of the sequence, $\sum\limits_{n=k}^{\infty} x_n $(let be $\epsilon$), whose value is less than $\frac{1}{2^a}$, where $a$ is a positive integer. Since $\epsilon$ is less then 1, we can add $\epsilon$ some finite '$l$' times, so that $0 \leq 1- l*\epsilon \leq \frac{1}{2^a}$. Now, from our original series, we chose a tail whose value is less than $ \frac{1}{2^b}$ ( $< 1 - l*\epsilon$) for some positive integer $'b'$. Let the value of the tail be $\epsilon$'. Adding $\epsilon$' some finite $l'$ times, we can get $0 \leq 1 - l*\epsilon - l' *\epsilon ' \leq \frac{1}{2^b}$. In this way, we keep adding terms to get as close to $1$ as we want. The series that we produce in this way, sums to $1$.
Thus, $1 \in S$. But we could have done this procedure for any positive real. Hence, if any positive series converges in $S$, then $(0,\infty) \subseteq S$.
Now, suppose that we could find one such convergent series of positive reals. If $S$ contains atleast one negative real, then adding the multiples of that one negative value with $(0,\infty)$, we can generate the whole $\mathbb{R}$.
Hence, if the good set $S$, do indeed follow the second property (and exhibits at least one such series in itself), then $S$ is : $\mathbb{R}$, $(0,\infty), (-\infty,0), [0,\infty), (-\infty,0]$.
Otherwise, $S$ can be considered closed under addition only. And then it is a semi group with addition.
