Help with an exercise in Shimura's book Exercise 3.26(B) in Shimura's book Introduction to the Arithmetic Theory of Automorphic functions says the following. 
Let $\Gamma=SL_n(\mathbb{Z})$ and $G=GL_n(\mathbb{Q})$. Let $R^{(n)}_p$ denote the ring of Hecke operators generated by elements of the type $\Gamma\alpha\Gamma$ where $\alpha$ is a diagonal matrix of the type $diag(p^{a_1},p^{a_2}\cdots,p^{a_n})$ with $a_1\leq a_2\leq \ldots\leq a_n$. Shimura defines a map $\Phi:R^{(n)}_p\to \mathbb{Z}[X_1,X_2,\ldots,X_n]$ as follows. Write a coset $\Gamma\alpha\Gamma$ as a disjoint union $\coprod_{i=1}^d \Gamma \alpha_i$, where each $\alpha_i$ is a lower triangular matrix (this can be done because of part (A) of the same exercise). Let $L$ denote the group $\mathbb{Z}^n$ with standard basis $e_1,e_2,\ldots, e_n$ and let $L_\nu$ denote the subgroup spanned by the elements $e_1,e_2,\ldots,e_\nu$.
Observe that $L_\nu\alpha_i\subset L_\nu$ and that $L_\nu\cap L\alpha_i=
L_\nu\alpha_i$. Define numbers $a_\nu$ by the relation $[L_\nu:L_\nu\cap L\alpha_i]=p^{a_\nu}$ and define $\lambda(L\alpha_i)=\prod_{i=1}^nX_i^{a_i-a_{i-1}}$ (here $a_0=0$). Finally, define $\Phi(\Gamma\alpha\Gamma)=\sum_{i=1}^d\lambda(L\alpha_i)$.
The exercise is to show that $\Phi$ is a ring isomorphism. 
It is easy to check that $\Phi(\Gamma (pId)\Gamma)=X_1X_2\ldots X_n$. Now if $\Phi$ were a ring isomorphism, then it would follow that 
$R^{(n)}_p/\langle \Gamma (pId)\Gamma\rangle$ is isomorphic to $\mathbb{Z}[X_1,X_2,\ldots,X_n]/\langle X_1X_2\ldots X_n\rangle$. However, the former is isomorphic to $R^{(n-1)}_p$ which is again a polynomial ring over $\mathbb{Z}$ while that latter cannot be isomorphic to a polynomial ring since it is not even a domain.
Could someone point out to me whether I am making a mistake or if the question is wrong. In case the question is wrong, I am curious to know if $\Phi$ is an inclusion and if so, what is its image. Thanks.
 A: I didn't read through all the notation, but there is a general theorem (the Satake isomorphism) describing the local Hecke algebra at a prime $p$.  In the case of $GL_n$, it says that the Hecke algebra should be isomorphic to
$\mathbb Z[X_1^{\pm 1}, X_2,\ldots,X_n].$  Concretely, the $\pm 1$ on the first variable should arise from the Hecke operator given by the diagonal matrix
$(p,\ldots,p)$, which is invertible.
This is described carefully in Gross's article with Satake isomorphism in 
the title.  (He considers the case of a general group $G$, but then does the case
of $GL_n$ fairly explicitly.  You should be able to compare it with Shimura's exercise to figure out what is going on in the latter.)

Just looking at your question again, the product $X_1\ldots X_n$ (in your notation) corresponds to $X_1$ in my notation (it is the Hecke operator coming
form the scalar matrix $p Id$).  So it should be invertible, so that taking the quotient you write down just gives the zero ring.  This may resolve some apparent contradictions.
