The ideal class group $\mathrm{Cl}({\cal O}_K)$ and Mazur's deformation ring $R(\overline{\rho})$ for a number field $K$ are said to be similar to each other.

Let ${\Bbb Q}_{\infty}$ be the unique cyclotomic ${\Bbb Z}_p$ extension of $\Bbb Q$ and ${\Bbb Q}_n$ be its $n$-th layer, i.e. ${\mathrm{Gal}}({\Bbb Q}_n/{\Bbb Q}) \cong {\Bbb Z}/p^n{\Bbb Z}$. Beginning from the fixed absolutely irreducible Galois representation $\overline{\rho}_0 \colon G_{\Bbb Q} \to {\mathrm{GL}}_2({\Bbb F}_p)$, we consider its lift to each ${\Bbb Q}_n$ and get $\overline{\rho}_n \colon G_{{\Bbb Q}_n} \to {\mathrm{GL}}_2({\Bbb F}_p)$.

On the other hand, we can associate ideal class group $\mathrm{Cl}({\cal O}_{{\Bbb Q}_n})$ and Mazur's deformation ring $R(\overline{\rho}_n)$ for each ${\Bbb Q}_n$. We take the inverse limits of these as follows:

$\mathrm{Cl}^{\infty} \colon\!= \varprojlim_{n}\mathrm{Cl}({\cal O}_{{\Bbb Q}_n})\{p\} \cong \underset{i=1 \ldots r}{\bigoplus} \Lambda/p^{\mu_i} \oplus \underset{i=1 \ldots s}{\bigoplus} \Lambda/f_j(T)^{m_j}$, where $\Lambda \colon= {\Bbb Z}_p[[T]]$ is the Iwasawa algebra

$R^{\infty} \colon= \varprojlim_{n}R(\overline{\rho}_n) \cong {\Bbb Z}_p[[X_1,...,X_d]]/J$.