Intrinsic characterisation of a class of rings This may be well known, but I was unable to find an answer browsing literature. Let us temporarily call a commutative (unital) ring $R$ an O-ring if there exists an integer $n \ge 1$, a local field of zero characteristic (that is, a finite extension of $ \mathbb{Q}_p$ for some prime $p$) with ring of integers $ \mathcal{O}$ and the unique maximal ideal $\mathfrak{p}$ such that $R$ is isomorphic (as a ring) to $ \mathcal{O}/\mathfrak{p}^n$. Now, it is clear that an O-ring is a finite local ring. It is also easy to see that not all local rings arise in this way. My question is: is there a purely ring-theoretic way of characterising O-rings, without making any reference to local fields at all? I would appreciate any reference to the literature as well.
 A: The following criterion came up when I was writing this answer (but I did not end up using it there):

Lemma. Let $R$ be a commutative ring. Then $R$ is of the form $\mathcal O_K/\mathfrak p^n$ for a finite extension $\mathbf Q_p \subseteq K$ and $n \in \mathbf Z_{>0}$ if and only if $R$ is finite, local, and $\dim_{R/\mathfrak m} \mathfrak m/\mathfrak m^2 \leq 1$.

Proof. Clearly any $R$ of the form $\mathcal O_K/\mathfrak p^n$ is finite, local, and has $\dim_{R/\mathfrak m}\mathfrak m/\mathfrak m^2 \leq 1$ (with equality if and only if $n > 1$). Conversely, suppose $R$ is finite, local, and has $\dim_{R/\mathfrak m} \mathfrak m/\mathfrak m^2 \leq 1$. Write $k = R/\mathfrak m$, and set $p = \operatorname{char} k$ and $q = |k|$, so that $k = \mathbf F_q$ with $q = p^r$ for some $r \in \mathbf Z_{>0}$. Write $\mathbf Z_q = W(\mathbf F_q)$ for the Witt vectors (the unique unramified extension of $\mathbf Z_p$ of degree $r$), which is a Cohen ring for $k$.
If $t \in \mathfrak m$ is a generator, then (the proof of) the Cohen structure theorem (Tag 032A) constructs a surjection
$$\phi \colon \mathbf Z_q[[t]] \to R$$
taking $t$ to $t$. Let $n = \operatorname{length}(R)$, so that $R \supsetneq \mathfrak m \supsetneq \ldots \supsetneq \mathfrak m^n = 0$, where $\mathfrak m^i$ is generated by $t^i$ for all $i$. Let $e \in \{1,\ldots,n\}$ be the integer such that $(p) = \mathfrak m^e$. Then there exists $u \in \mathbf Z_q^\times$ such that $\phi(up) = \phi(t^e)$, i.e. $t^e-up \in \ker\phi$. Thus, $\phi$ factors through
$$\mathbf Z_q[[t]] \twoheadrightarrow \mathbf Z_q\big[\sqrt[e\ \ ]{up}\big] \twoheadrightarrow R,$$
which realises $R$ as $\mathcal O_K/\mathfrak p^n$ where $K = \mathbf Q_q\big(\sqrt[e\ \ ]{up}\big)$ (and $n = \operatorname{length}(R)$ as above). $\square$
Remark. So in fact, it sufficies to take $K$ of the form $\mathbf Q_q\big(\sqrt[e\ \ ]{up}\big)$.
