Build a basis for S consisting of b1 through bn. The embeddings of E into the algebraic closure of Q define, and are defined by, the images of the basis. Such an embedding can be followed by conjugation in the complex plane, giving another embedding. These embeddings coincide iff the image of each bi is real. Thus the embeddings can be partitioned into r1 real embeddings and r2 pairs of conjugate embeddings in the complex plane.
Galois theory tells us the number of embeddings equals the dimension, hence r1+2r2 = n.
The number of embeddings of E into real space does not depend on the basis. Thus both r1 and r2 are basis invariant.
Let M be the matrix that runs basis elements through their images in the complex plane. Thus Mi,j = ci(bj) for the embeddings ci(S). Multiply M by a column vector of integers on the right to get a lattice. The first coordinate takes on the values of S while the remaining coordinates track the images of S under the various embeddings.
The matrix M implements a transformation from the rectilinear latttice in Rn onto a lattice that lives in n dimensional complex space. Of course the first r1 dimensions may as well be real, since the first r1 rows of M are real. But the remaining 2r2 rows are complex.
Let u be the determinant of this matrix. This gives the covolume of the lattice, which is the volume of the base cell. Of course the lattice is an n dimensional Z module, living in a space that has n+2r2 dimensions. This because each complex dimension is two real dimensions put together. Let's see if we can pull this down to Rn.
For each pair of complex rows, add the second row to the first, then subtract half the first from the second. This separates the real and imaginary components of the two rows, and does not change the determinant of M. Divide the purely imaginary rows by i, and cut the real rows (from the complex pairs) in half. This gives the real and imaginary components of the complex embeddings, as separate real vectors in Rn. I will call the original map, as shown by the original matrix, the "standard" embedding of S into complex space, and the revised map, with M adjusted, is the "component" embedding of S into real space.
Let v be det(M) in real space. Ignoring the factors of i, v = u/2r2.
Remember that the field homomorphisms from E into the algebraic closure of Q are linearly independent. Therefore M, which is a matrix in E, is nonsingular, with a nonzero determinant. In other words, u is a nonzero real number, and so is v. The revised matrix, that maps the rectilinear lattice into real space, produces an n dimensional lattice in Rn.
An ideal H in S maps to a sublattice in real space, having covolume v*|H|. If H is principal, generated by x, x*b1 through x*bn form a linearly independent set. If they didn't, we could cancel x in the integral domain, and b1 through bn would not be independent. Thus H is an n dimensional sublattice, along with its image. If H is not principal it contains a principal ideal, and the same result holds.
Now let H be a fractional ideal in S, so that d*H lies in S. Build a superlattice around the integer lattice, based on the multiples of 1/d. Apply our transformation and find a superlattice in Rn, containing the image of S. One can give this a covolume of v/d. Let H have an index of x inside this superlattice. Relative to the original lattice, H has an index of x/d, and its image has a covolume of vx/d. The covolume is a rational number, but that just means we need a finer lattice to contain both H and S.
A subring of S is also a lattice, with a certain covolume. If the subring contains n independent vectors, it is an n dimensional sublattice with a nonzero covolume.