Lang's definition of generated subring (?) 
Let $A$ be a subring of a ring $B$. Let $S$ be a subset of $B$
commuting with $A$; in other words we have $as=sa$ for all $a\in A$
and $s\in S$. We denote by $A[S]$ the set of all elements $$\sum
 a_{i_1\ldots i_n}s_1^{i_1}\ldots s_n^{i_n}$$ the sum ranging over
finite number of $n$-tuples $(i_1,\ldots i_n)$ of integers $\geq0$, and
$a_{i_1,\ldots,i_n}\in A$, $s_1,\ldots,s_n\in S$.

How can I describe this set in terms of the set-builder notation? (What is this set called? I don't think "generated subring" is correct.)
 A: I'm not sure what your objection to this definition is; it's a fine definition and it indeed defines the subring of $B$ generated by $A$ and $S$. It's common, for example, to use notation such as $k[x^2, x^3]$ to denote the subring of $k[x]$ generated by $k$ and $x^2, x^3$. An equivalent definition (this requires a bit of proof) is
$$A[S] = \bigcap_{A \subseteq C \subseteq B, S \subseteq C} C$$
or in words, $A[S]$ is the intersection of all subrings of $B$ containing both $A$ and $S$. In set-builder notation we just have
$$A[S] = \{ b \in B : \exists i_1, i_2, \dots i_n \in \mathbb{Z}_{\ge 0}, a_{i_1 \dots i_n} \in A, s_i \in S \text{ s.t. } b = \sum a_{i_1 \dots i_n} \prod s_j^{i_j} \}$$
which is just the same thing but with a bunch of quantifiers. Is it clearer now? Note that we need the elements of $S$ to commute with $A$ to guarantee that this subset is closed under multiplication as written.
A: The definition is indeed confusing, even as it can be interpreted correctly. The notation $a_{i_1\ldots i_n}$ suggests that the coefficient in front of $s_1^{i_1} \cdots s_n^{i_n}$  depends only on the exponents $i_1, i_2, \ldots, i_n$ but not on the elements $s_1, s_2, \ldots, s_n$; this is not the case. @QiaochuYuan's suggested formalization does not improve this.
There is a perfectly good way to rewrite the definition in a cleaner form if one takes the time to actually try (which Lang doesn't seem to have done). The key is to proceed in several steps:

*

*Define an $S$-monomial to be a product of finitely many elements of $S$. (This includes the empty product $1$.)


*If $U$ is a subset of $B$, then define a left $A$-linear combination of elements of $U$ to be an element of the form $\sum_{i=1}^k a_i u_i$, where $k$ is a nonnegative integer and where $a_1, a_2, \ldots, a_k \in A$ and $u_1, u_2, \ldots, u_k \in U$.


*Define $A\left[S\right]$ to be the set of all left $A$-linear combination of $S$-monomials.
Note that the only purpose of the word "left" here is generality; in our specific case, it does not matter whether we put the factors on the left or on the right, since every element of $A$ commutes with every element of $S$ and thus (by induction) also with every $S$-monomial.
A: While it is true that there is a completely accepted/acceptable tradition of saying things like "all expressions... of lengths $n$, for variable $n$...", and/or "anything expressible as...", there is potential ambiguity here, or at least a requirement of some cooperation from the reader, I think. :)  That's not necessarily a bad thing, but, while we may argue that this style of "definition" is fairly intuitive for many of us, it can be criticized.
In the example at hand, with rings $A\subset B$ and $S\subset C$, a formally very clear, but intuitively murky, definition of $A[S]$, "the subring of $B$ generated by $A$ and $S$", is as the intersection of all subrings of $B$ which contain both $A$ and $S$. No comment about what sort of expressions appear, nor necessarily any comment about whether elements of $S$ need commute with elements of $A$. It is perfectly well-defined, though.
Note that there was no mandate to have two things, $A$ and $S$. It would have sufficed to take any subseet $A\cup S$. The details do affect the expressibility.
A better-known analogue that has the same features is "subgroup $\langle S\rangle$ of group $G$ generated by $S\subset G$". It is perhaps most intuitive to say that this subgroup is the collection of all "words" involving elements of $S$ and their inverses. There is a minor notational/philosophical issue of what "words" are... Then one has to prove that this is a subgroup. Oppositely, the subgroup can be characterized as the intersection of all subgroups of $G$ containing the subset $S$. This characterization removes ambiguity and dependence on notation...
