Non-finite abelian extensions of $\mathbb{Q}$ First, given a prime $p$, let us denote
$$\mu(p^\infty)=\{\zeta\in\mathbb{C}:\exists k\in\mathbb{Z}, \zeta^{p^k}=1\}$$
I'm trying to show that, given any set of prime numbers $S$, the decomposition field $\mathbb{Q}^S_{ab}:=\prod_{p\not\in S}\mathbb{Q}(\mu(p^\infty))$ is a maximal abelian extension of $\mathbb{Q}$ that is not ramified in any prime number $\ell\notin S$ and that the Galois group $\text{Gal}(\mathbb{Q}^S_{ab}|\mathbb{Q})$ is isomorphic to
\begin{cases}
      \prod_{p\not\in S}\mathbb{Z}/(p-1)\mathbb{Z}\times\prod_{p\not\in S}\mathbb{Z}_p, & \text{if}\hspace{0.15cm}2\notin S,\\
      \mathbb{Z}/2\mathbb{Z}\times\prod_{p\not\in S}\mathbb{Z}/(p-1)\mathbb{Z}\times\prod_{p\not\in S}\mathbb{Z}_p, &\text{if}\hspace{0.15cm} 2\in S.
   \end{cases}
So far, I've tried to understand why
\begin{cases}
      \mathbb{Z}/(p-1)\mathbb{Z}\times\varprojlim\mathbb{Z}/p^n\mathbb{Z} & p\neq 2,\\
      \mathbb{Z}/2\mathbb{Z}\times\varprojlim\mathbb{Z}/2^n\mathbb{Z} & p=2,
   \end{cases} 
And I can see that the projective limit is due to the bijection between the Galois group of an infinite extension and the projective limit of the Galois group over all finite subextensions, but I don't know where does that $\mathbb{Z}/(p-1)\mathbb{Z}$ come from. With respect to the rest of points, I'm completely lost.
Thanks.
 A: All right, let's take these in turn. Firstly, the maximal abelian extension of $\Bbb Q$ is $\displaystyle\cup_n\Bbb Q(\zeta_n)$, this is just the Kronecker-Weber theorem. Now knowing that if $n=p_1^{e_1}\ldots p_r^{e_r}$ so that $\Bbb Q(\zeta_n) = \displaystyle\prod_{i=1}^r\Bbb Q(\zeta_{p_i^{e_i}})$ and that each $\Bbb Q(\zeta_{p^r})$ is ramified only at $p$ tells us that the field you require which is both an abelian extension of $\Bbb Q$ and unramified for all the primes in $S$ is the stated one.
As for the Galois group, well we know that $\langle\zeta_{p^r}\rangle$ is a cyclic group of order $p^r$, and that the automorphism group of such a group is just

$$(*)\qquad \begin{cases} \Bbb Z/2\times\Bbb Z/2^{r-2} && p = 2 \\ \Bbb Z/(p-1)\times \Bbb Z/p^{r-1} && p > 2\end{cases}$$

the former case being understood to have $r>1$. Now since each pair of integers $m,n$ with $\gcd(m,n)=1$ has the fact that $\Bbb Q(\zeta_n)\cap\Bbb Q(\zeta_m)=\Bbb Q$, we know that

$$\text{Gal}\left(\Bbb Q(\zeta_n)\Bbb Q(\zeta_m)/\Bbb Q\right)\cong \text{Gal}\left(\Bbb Q(\zeta_n)/\Bbb Q\right)\times \text{Gal}\left(\Bbb Q(\zeta_m)/\Bbb Q\right)$$

we can reduce the problem to the product of the Galois groups of each of the $\Bbb Q(\mu(p^\infty))$. But this is where the factor you are confused on shows up, the result $(*)$ is originally due to Gauß and is well known. You can find it in many places, eg. Serre's Course in Arithmetic around page 15 where he talks about the multiplicative group of $\Bbb Q_p$ (which of course boils down to the units of $\Bbb Z_p$ which is what you're looking at in this case). The main intuition is that the $\Bbb Z/(p-1)$ factor comes from the fact that in $\Bbb F_p$, the field with $p$ elements, an automorphism is given by multiplication by a non-zero element, and there are $p-1$ such possibilities. The fact that this is cyclic comes from the existence of a primitive root, which you prove in a first course in number theory typically.
To see the projective limit is actually quite easy, you have $\displaystyle\varprojlim_n\Bbb Z/(p-1)\times\Bbb Z/p^n$ is the object which projects onto every $\Bbb Z/(p-1)\times\Bbb Z/p^n$ in a way consistent with the usual projection maps, but we know by definition $\Bbb Z_p$ is this group for the projective system of $\{\Bbb Z/p^n\}$, and the $\Bbb Z/(p-1)$ factor is constant, so the limit is exactly the stated object with the projection maps being $id\times \phi_n$ where $id$ is the identity map on the first factor and $\phi_n$ is the canonical projection map from $\Bbb Z_p\to\Bbb Z/p^n\cong \Bbb Z_p/p^n$.
