  We obtain several fundamental results on finite index ideals and additive
subgroups of rings as well as on model-theoretic connected components of rings,
which concern generating in finitely many steps inside additive groups of
rings.
  Let $R$ be any ring equipped with an arbitrary additional first order
structure, and $A$ a set of parameters. We show that whenever $H$ is an
$A$-definable, finite index subgroup of $(R,+)$, then $H+RH$ contains an
$A$-definable, two-sided ideal of finite index. As a corollary, we positively
answer Question 3.9 of [Bohr compactifications of groups and rings, J.
Gismatullin, G. Jagiella and K. Krupi\'nski]: if $R$ is unital, then $(\bar
R,+)^{00}_A + \bar R \cdot (\bar R,+)^{00}_A + \bar R \cdot (\bar R,+)^{00}_A =
\bar R^{00}_A$, where $\bar R \succ R$ is a sufficiently saturated elementary
extension of $R$, and $(\bar R,+)^{00}_A$ [resp. $\bar R^{00}_A$] is the
smallest $A$-type-definable, bounded index additive subgroup [resp. ideal] of
$\bar R$. This implies that $\bar R^{00}_A=\bar R^{000}_A$, where $\bar
R^{000}_A$ is the smallest invariant over $A$, bounded index ideal of $\bar R$.
If $R$ is of finite characteristic (not necessarily unital), we get a sharper
result: $(\bar R,+)^{00}_A + \bar R \cdot (\bar R,+)^{00}_A = \bar R^{00}_A$.
We obtain similar results for finitely generated (not necessarily unital) rings
and for topological rings. The above results imply that the simplified
descriptions of the definable (so also classical) Bohr compactifications of
triangular groups over unital rings obtained in Corollary 3.5 of the
aforementioned paper are valid for all unital rings.
  We analyze many examples, where we compute the number of steps needed to
generate a group by $(\bar R \cup \{1\}) \cdot (\bar R,+)^{00}_A$ and study
related aspects, showing "optimality" of some of our main results and answering
some natural questions.
