We improve the bound of the g-invariant of the ring of integers of a totally real number field, where the g-invariant g(r) is the smallest number of squares of linear forms in r variables that is required to represent all the quadratic forms of rank r that are representable by the sum of squares. Specifically, we prove that the gO K (r) of the ring of integers OK of a totally real number field K is at most gO F ([K : F ]r) for any subfield F of K. This yields a sub-exponential upper bound for g(r) of each ring of integers (even if the class number is not 1). Further, we obtain a more general inequality for the lattice version G(r) of the invariant and apply it to determine the value of G( 2) for all but two real quadratic fields.
√ 2+ε) √n ) due to Beli, Chan, Icaza and Liu [BCIL]. The g-invariant can be generalised to g R ( • ) of an arbitrary ring R in an obvious way, simply replacing forms over Z by forms over R. In particular, the value P(R) = g R (1) is the Pythagoras number of R, much examined both for arbitrary fields (see, for example, [Le])