Coordinates on a compactified dimension in bosonic string theory In the simple case of compactification on the circle of radius $R$, $S^1_R$, most sources on string theory, e.g. here (Kevin Wray, An Introduction to String Theory, page 197), it is stated that the boundary condition for the closed string is
\begin{align}
X^{25}(\tau, \sigma + \pi) = X^{25}(\tau, \sigma) + 2\pi R W,
\end{align}
where $X^{25}$ is the compactified coordinate, and $W$ is the winding number.
Conceptually, I understand what is meant to be going on. However, I don't quite understand some of the mathematical structure.
I'm not quite clear on how the coordinate is defined. I would have thought that these coordinates would be 'effectively' restricted to some range $[0, 2\pi R)$, but for arbitrary $W\in \mathbb{Z}$ this doesn't seem to be the case. Could anyone explain how this treated a bit more rigorously?
 A: So I guess we should first ask what compactification does for us? In string theory, specifically bosonic string theory to be in line with your example, you have $D=26$ dimensions of spacetime which are fixed by a set of consistency conditions. This occurs when you try to quantise the theory, so for all intents and purposes, this feature of additional spacetime dimensions is really only needed at very small scales. At large scales, we want the theory to be $D=4$ spacetime dimensions.
Compactification is a geometric approach to get such a result. The idea is that instead of working in $\mathbb{R}^{1,25}$, you postulate that in actuality, you work over a manifold of the form $\mathbb{R}^{1,3}\times K$, where $K$ is a compact manifold whose effects are manifest only when scales are sufficiently small. So for very small scales, $\mathcal{M}$ (the spacetime manifold you are working in) looks like your $26$ dimensional spacetime, but for large scales, $\mathcal{M}$ looks like your typical $4$-dimensional Minkowski spacetime $\mathbb{R}^{1,3}$. This way, you satisfy all the necessary consistency conditions and have a theory that in principle, describes our reality.
A very nice starting point in trying to understand compactification is the example you mentioned - the compactification around a circle $S^1_R$ of radius $R$. If we try to think what this space looks like, it could be useful to go to $\mathbb{R}^{1,2}\times S^1_R$ for simplicity:

So you can imagine at every point $(X^0,X^1,X^2)$, you have attached an $S^1_R$. Now this does two things for us. Firstly, when $R$ is sufficiently small, our space looks like $\mathbb{R}^{1,2}$, which corresponds to large scales. When $R$ is sufficiently large, the space has an additional spatial dimension to satisfy consistency conditions. Secondly, this fixes the size of the extra dimension, which in turn fixes the physical properties of the string. The boundary condition$$X^3(\tau,\sigma+\pi)=X^3(\tau,\sigma)+2\pi RW$$is a statement that the additional spatial degree of freedom of a closed string is solely contained in $S^1_R$, or more generally, all the additional spatial degrees of freedom are contained solely in the compact space $K$. So this procedure essentially lumps all the additional spatial degrees of freedom into the compact space $K$ and so, the physical features of the strings now depend purely on the geometry of $K$.
Now there is nothing in the boundary condition that fixes the actual physical extent of the string. For coordinates $X^0,X^1,X^2$, changing $\sigma$ from say $0$ to $\pi$ just gets us back to our original point on the string. But for $X^3$, although we do end up on the same point on $S^1_R$ by going round the string once, the actual length of the string can of course be greater than $\pi$. This is what the winding number tells us! Of course $W\in\mathbb{Z}$ since the string is closed, so it better loop all the way around $S^1_R$, but we can just as easily take $\sigma=2\pi$, which loops the string around $S^1_R$ twice!, or $\sigma=n\pi$, which loops the string around $n$-times! The number of times the string loops around $S^1_R$ is related to its momentum, which then fixes the string mass etc. This goes back to the point I made about the physical features of the string being contained (or determined) by the geometry of $K$. Note that by changing $R$ in our $S^1_R$ compactification, we change the physical properties of the string.
From a more mathematical point of view$$S^1_R\cong\mathbb{R}/2\pi R\mathbb{Z}.$$So $S^1_R$ is nothing but the quotient space: The real line $\mathbb{R}$ modulo $2\pi R\mathbb{Z}$. So topologically speaking, $X^3\in S^1_R=[0,2\pi R]$, i.e., $X^3\in [0,2\pi R]$. But we know that $[X^3]=X^3+2\pi R\mathbb{Z}$ which is the set of points of the form $X^3+2\pi Rn$ with $n\in\mathbb{Z}$. Now the boundary condition imposes that $X^3(\tau,\sigma+\pi)=X^3+2\pi RW$ with $W\in\mathbb{Z}$, so $\sigma\in[0,\infty)$, i.e., the physical length of the string can be in principle, arbitrarily large, but for any $\sigma\in [0,\infty)$, $X^3\in [0,2\pi R]$. Now we know that the physical length of the string is proportional to the string tension, which is proportional to the string mass. So the wrapping number $W=n$ is just used to encode that. Finally$$\lim_{R\rightarrow 0}(S^1_R)=\{X^3\},$$and so$$\lim_{R\rightarrow 0}\left(\mathbb{R}^{1,2}\times S^1_R\right)=\mathbb{R}^{1,2}\times\{X^3\}\cong\mathbb{R}^{1,2}.$$Of course there are many more mathematical details and the entire theory is quite involved, I just outlined some basic ideas. Please feel free to correct me on any points! I hope I gave a decent explanation.
