# A domain with only a (non-zero) prime ideal

What is an example of a domain $A$ such that Spec$A=\{(0),\mathfrak p\}$? For instance one could find a principal ideal domain that is also a local ring but I can't imagine such a ring.

-

Let $p$ be a prime number and let $\mathbb{Z}_{(p)} = \{ x \in \mathbb{Q} : p \text{ does not divide the denominator of } x \}$. This is a local ring and a principal ideal domain, with maximal ideal $p \mathbb{Z}_{(p)}$.

-

Generally, given any domain, if you localize it on the complement of a prime ideal, minimal over $(0)$, you get exactly that.

-

If $\cal C$ is an algebraic curve and $P\in \cal C$ a regular point, the ring ${\cal O}_P$ of the rational functions on $\cal C$ defined at $P$ is a domain whose only non prime ideal is that of functions vanishing at $P$.

A somewhat related example is that of Dedekind domains: the localization of a Dedekind domain at any of its maximal ideals is a domain with a unique non-zero prime ideal.

-

Note that, by the very definition, $\mathfrak p$ has to be a maximal ideal. Thus, you are asking for a local ring of Krull dimension 1.

A very well-known characterization of discrete valuation rings says they are all (and the only) the PIDs with a unique non-zero prime (hence maximal) ideal.

The beautiful exemple of Zhen Lin can be far generalized: let $A$ be an Dedekind domain and $\mathfrak p \in \text{Spec}(A)\setminus \{(0)\}$. Then the localization of $A$ at $\mathfrak p$, i.e., $A_{\mathfrak p}$, is a discrete valuation ring. (Of course, $\mathbb Z$ is a Dedekind domain $(p)$ is a non-zero prime ideal for every prime number $p \in \mathbb Z$).

-