Computing the unit group of a residue ring I'm interested in understanding why $(\mathbb{Z}[i]/8\mathbb{Z}[i])^*\cong \mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/4\mathbb{Z}\times\mathbb{Z}/2\mathbb{Z}$ (I have confirmed this by looking at element orders). This is of course the group of units in the ring $\mathcal{O}_K/8\mathcal{O}_K$ for $K=\mathbb{Q}(i)$.
The literature on problems like this seems pretty scarce; the only real article I've found is here.
Is there a simple way of understanding the specific example above without resorting to looking at individual element orders? I see that $(\mathbb{Z}[i]/8\mathbb{Z}[i])^*\cong ((\mathbb{Z}/8\mathbb{Z})[i])^*$, but it's not clear how to proceed from there.
 A: @nguyenquangdo,
I haven't bothered to read your post, which seems to make a meal of this simple problem. Obviously "the completion at $2$" refers to the completion at the unique prime above 2. There is nothing global at all about this question. I'm surprised you seem confused by the well-known fact that the group of units in (the ring of integers in) a local field is isomorphic to the roots of unity plus(the abstract group) $\mathbf{Z}^{[L:\mathbf{Q}_p]}_p$. This is a basic and easy statement you can deduce using the p-adic logarithm. I recommend thinking about what I actually wrote a little more instead of assuming I am doing something different. Certainly I am making no false identifications; to find generators $1 + \pi^3$ and $1 + \pi^4$ of the copy of $\mathbf{Z}^2_2$ in $\mathcal{O}^{\times}_{K,\pi}$ requires some basic skills which can be found [say] in Serre's local fields book.
OK, the OP's request: Since i'm typing this with one hand with a baby on the other, I will just give hints for an elementary approach with obscures a little the general argument. Hopefully you can fill in the details for yourself. Let $\pi = 1+i$.


*

*Any element of $(\mathcal{O}/2^m \mathcal{O})^{\times}$ is $1 + \pi^n \bmod \pi^{n+1}$ for some $n$.
Certainly any element of this group is of $2$-power order.

*If $x = 1 + \pi^n \bmod \pi^{n+1}$, then $x^2 = 1 + \pi^{n+2} \bmod \pi^{n+3}$ if $n \ge 3$.

*From 1 and 2 you can easily determine the orders of the elements $1 + \pi^3$ and $1 + \pi^4$ to be $2^{m-1}$ and $2^{m-2}$ respectively, and that they generate distict subgroups.
Slightly more work shows that they generate the entire subgroup of units $1 \bmod \pi^3$. (One approach, given any element $x = 1 + \pi^n \mod \pi^{n+1}$ with $n \ge 3$, show that dividing by the correct power of either $1 + \pi^3$ or $1 + \pi^4$ you can increase the value of $n$.)

*Finally, $i$ has order $4$ for $m \ge 2$, and you can check that $i$ generates $(\mathcal{O}/\pi^3 \mathcal{O})^{\times}$. Then it follows that every element of the original group can be written as a unique power of $i$ times something which is $1 \bmod \pi^3$.  I believe you will find that gives exactly the answer written in my original comments.
A: EDIT : Revised answer after discussion with the OP.
EDIT 2 after "discussion" with @user655377
Here is a direct approach, not appealing to local fields (*). In order to answer also to @Shimrod, let me start with a general imaginary quadratic field $K$ in which the prime $2$ is totally ramified (this is the meaning of the condition "$2$ divides the discriminant"), i.e. $(2)$  is the square of a prime ideal of $\mathfrak O_K=\mathfrak O$, say $(2)=P^2$, so that $\mathfrak O/2^k=\mathfrak O/P^{2k}$ for all $k\ge 1$. The natural surjective ring homomorphism $\mathfrak O/P^{2k}\to \mathfrak O/P^2$ for $k\ge 2$ induces a homomorphism of groups $f_k :(\mathfrak O/P^{2k})^*\to (\mathfrak O/P^2)^*$, and we aim to determine its kernel and cokernel. It will be convenient to write $[a]_k$ for the class of $a$ in $\mathfrak O/P^{2k}$.  
1) Now add the hypothesis that $\mathfrak O$ is a PID (which is the case here with $\mathbf Z[i]$), and denote $P=(\pi)$. Then $[a]_1$ is invertible iff $\pi \nmid a$, iff $[a]_k$ is invertible too (just apply Bezout's thm. in $\mathfrak O$). It follows that $f_k$ is surjective. Besides it is straightforward that Ker$f_k= (1+(\pi^2)/1+(\pi^{2k}),\times)$, and we'll compute its order by introducing the descending filtration $..(\pi^n)> (\pi^{n+1})>...$ and its successive quotients  $(\pi^n)/(\pi^{n+1})$. The map  $x \to x-1$ induces isomorphisms $(1+(\pi^n)/1+(\pi^{n+1}),\times)\cong (\pi^n)/(\pi^{n+1})\cong(\mathbf F_2,+)$, where $\mathbf F_2$ is the residual field  at $(\pi)$ (just check that $(xy-1)-(x-1)-(y-1)$ $=(x-1)(y-1))$.  It follows immediately that  Ker$f_k$ has order $2^{2k-2}$. It remains to compute the order of $(\mathfrak O/\pi^2)^*$ following the same steps: the map $(\mathfrak O/\pi^2)^* \to (\mathfrak O/\pi)^*$ is surjective, but $(\mathfrak O/\pi)^*=\mathbf F_2^*=(1)$, so $(\mathfrak O/\pi^2)^*$ has the same order $2$ as the kernel  $(\pi)/(\pi^2)$, and finally $(\mathfrak O/\pi^{2k})^*$ has order $2^{2k-1}$. So we have an exact sequence of abelian $2$-primary groups $1\to$ Ker$f_k \to (\mathfrak O/\pi^{2k})^* \to (\mathfrak O/\pi^2)^* \to 1$ where the comparison of the orders shows at once that the middle term admits an element of order $2$ not contained in the left kernel, in other words, the sequence splits. 
2) To get hold of the structure of $(\mathfrak O/\pi^{2k})^*$ we need more information on the quadratic field $K$. In your case, $K=\mathbf Q (i)$ and we can take $\pi=1-i$. To simplify notations, denote by $U_n$ the multiplicative group $1+(\pi^n)$. Then our previous Ker$f_k$ is just $U_2/U_{2k}$. For $r\ge 2$ and $x\in U_r - U_{r+1}$, the binomial formula shows that $x^2 \in U_{r+2} - U_{r+3}$. Take in particular $x=5=(2+i)(2-i) \in U_2 - U_3$ and denote by $5_{2k}$ its image in $U_2/U_{2k}$. By repeated application of the binomial formula, $5_{2k}$ has order $2^{k-1}$, and $U_2/U_{2k}=$ Ker$f_k$ has order $2^{2k-2}$ by the calculation  in 1) above. Summarizing, Ker$f_k = <2+i>_{2k} \times <2-i>_{2k}$, where the two factors are permuted by complex conjugation, so that Ker$f_k
 \cong \mathbf Z/2^{k-1} \times \mathbf Z/2^{k-1}$ and we have a split exact sequence $0\to \mathbf Z/2^{k-1} \times \mathbf Z/2^{k-1} \to (\mathfrak O/(\pi^{2k}))^* \to \mathbf Z/2 \to 0$ (see 1) above). In your case here, $(\mathbf Z[i]/2^k)^*\cong \mathbf Z/2 \times \mathbf Z/2^{k-1}\times \mathbf Z/2^{k-1}$. For $k=3$ one recovers your "retro" formula.
WARNING. My solution is erroneous, as shown by @user670344. Errare humanum est, perseverare diabolicum.
