[proofplan]
We prove each of the six properties of a discretely valued field $(K, v_K)$ with uniformizer $\pi$ by building on the fundamental observation that every nonzero element of $\mathcal{O}_K$ factors as $\pi^n u$ with $u \in \mathcal{O}_K^\times$ and $n = v_K(x)$. Part (1) characterizes the ideals of $\mathcal{O}_K$ by selecting a minimal-valuation element. Part (2) is immediate from (1). Part (3) identifies the metric topology with the $\pi$-adic topology by showing the basic open sets coincide. Parts (4) and (5) concern the complete case: (4) follows from (3), and (5) constructs $\pi$-adic expansions by a successive-approximation procedure. Part (6) verifies that the completion inherits the DVF structure and that the quotient rings are preserved.
[/proofplan]
[step:Characterize the nonzero ideals of $\mathcal{O}_K$ as $\pi^n \mathcal{O}_K$ for $n \geq 0$]
Let $I \subseteq \mathcal{O}_K$ be a nonzero ideal. Since $v_K$ takes values in $\mathbb{Z}_{\geq 0}$ on $\mathcal{O}_K \setminus \{0\}$ and $I$ is nonempty, the set $\{v_K(y) : y \in I,\, y \neq 0\}$ is a nonempty subset of $\mathbb{Z}_{\geq 0}$, so it has a minimum. Let $n = \min\{v_K(y) : y \in I,\, y \neq 0\}$ and pick $x \in I$ with $v_K(x) = n$.
We claim $I = \pi^n \mathcal{O}_K$. For the inclusion $I \subseteq \pi^n \mathcal{O}_K$: take any $y \in I$ with $y \neq 0$. Then $v_K(y) \geq n = v_K(x)$, so $v_K(y/x) = v_K(y) - v_K(x) \geq 0$, giving $y/x \in \mathcal{O}_K$. Hence $y = (y/x) \cdot x \in x \mathcal{O}_K$. Since $x = \pi^n u$ for some $u \in \mathcal{O}_K^\times$ (because $v_K(x) = n$), we have $x \mathcal{O}_K = \pi^n \mathcal{O}_K$. So $I \subseteq \pi^n \mathcal{O}_K$.
For the reverse inclusion: $x \in I$ and $x \mathcal{O}_K = \pi^n \mathcal{O}_K$, so $\pi^n = x u^{-1} \in I$. Since $I$ is an ideal, $\pi^n \mathcal{O}_K \subseteq I$.
[guided]
The goal is to show that every nonzero ideal of $\mathcal{O}_K$ is a power of $\pi$. The key idea is that the valuation $v_K$ provides a total ordering on elements of $\mathcal{O}_K$ by "divisibility by $\pi$," and the ideal is generated by any element of minimal valuation.
Let $I \subseteq \mathcal{O}_K$ be a nonzero ideal. The set $\{v_K(y) : y \in I,\, y \neq 0\}$ is a nonempty subset of $\mathbb{Z}_{\geq 0}$, so by the well-ordering principle it has a minimum $n$. Pick $x \in I$ achieving $v_K(x) = n$.
Why does $x$ generate $I$? Take any nonzero $y \in I$. Since $n$ is the minimum valuation in $I$, we have $v_K(y) \geq n$. Then $v_K(y/x) = v_K(y) - v_K(x) \geq 0$, so $y/x \in \mathcal{O}_K$. This gives $y = (y/x) \cdot x \in x\mathcal{O}_K$, so $I \subseteq x\mathcal{O}_K$.
Now we relate $x\mathcal{O}_K$ to $\pi^n \mathcal{O}_K$. Since $v_K(x) = n$, we can write $x = \pi^n u$ where $u \in \mathcal{O}_K$ with $v_K(u) = 0$, i.e., $u \in \mathcal{O}_K^\times$. Therefore $x\mathcal{O}_K = \pi^n u \mathcal{O}_K = \pi^n \mathcal{O}_K$ (since $u$ is a unit). The reverse inclusion $\pi^n \mathcal{O}_K \subseteq I$ holds because $\pi^n = xu^{-1} \in I$ (as $x \in I$ and $u^{-1} \in \mathcal{O}_K$).
[/guided]
[/step]
[step:Conclude that $\mathcal{O}_K$ is a PID with unique prime $\pi$]
By part (1), every nonzero ideal of $\mathcal{O}_K$ is principal, generated by $\pi^n$ for some $n \geq 0$. So $\mathcal{O}_K$ is a principal ideal domain. The maximal ideal is $\mathfrak{m}_K = \pi \mathcal{O}_K$ (the case $n = 1$), which is the unique nonzero prime ideal: if $\pi^n \mathcal{O}_K$ is prime with $n \geq 2$, then $\pi \cdot \pi^{n-1} \in \pi^n \mathcal{O}_K$ forces $\pi \in \pi^n \mathcal{O}_K$ (i.e., $v_K(\pi) \geq n$, contradicting $v_K(\pi) = 1$) or $\pi^{n-1} \in \pi^n \mathcal{O}_K$ (i.e., $n - 1 \geq n$, a contradiction). So the only nonzero prime ideal is $\pi \mathcal{O}_K$, making $\pi$ the unique prime of $\mathcal{O}_K$ up to units.
[/step]
[step:Identify the metric topology with the $\pi$-adic topology]
The metric topology on $\mathcal{O}_K$ has basic open neighborhoods of a point $x$ given by $\{y \in \mathcal{O}_K : |y - x| \leq |\pi|^n\}$ for $n \geq 0$. Since $|y - x| \leq |\pi|^n$ if and only if $v_K(y - x) \geq n$, i.e., $y - x \in \pi^n \mathcal{O}_K$, this set equals $x + \pi^n \mathcal{O}_K$. Similarly, the $\pi$-adic topology has basic open neighborhoods $x + \pi^n \mathcal{O}_K$ for $n \geq 0$. Since both topologies share the same base of open neighborhoods at every point, they coincide.
[guided]
We need to show that two topologies on $\mathcal{O}_K$ agree: the metric topology induced by the absolute value $|\cdot| = |\pi|^{-v_K(\cdot)}$, and the $\pi$-adic topology defined by declaring $\{x + \pi^n \mathcal{O}_K : x \in \mathcal{O}_K,\, n \geq 0\}$ as a base of open sets.
The key observation is that the closed ball of radius $|\pi|^n$ centered at $x$ in the metric topology is exactly the coset $x + \pi^n \mathcal{O}_K$ in the $\pi$-adic topology. To see this: $y \in \mathcal{O}_K$ satisfies $|y - x| \leq |\pi|^n$ if and only if $v_K(y - x) \geq n$ (since $|z| = |\pi|^{-v_K(z)}$ is a decreasing function of $v_K(z)$), which holds if and only if $y - x \in \pi^n \mathcal{O}_K$.
Since the closed balls $\{y : |y - x| \leq |\pi|^n\}$ form a neighborhood base for the metric topology at $x$, and they coincide with the cosets $x + \pi^n \mathcal{O}_K$ that form a neighborhood base for the $\pi$-adic topology at $x$, the two topologies are identical.
[/guided]
[/step]
[step:Prove that completeness of $K$ implies $\pi$-adic completeness of $\mathcal{O}_K$]
If $K$ is complete with respect to $|\cdot|$, then every Cauchy sequence in $K$ converges. A sequence $(x_m)_{m \geq 0}$ in $\mathcal{O}_K$ is $\pi$-adically Cauchy if and only if for every $n \geq 0$ there exists $N$ such that $x_m - x_{m'} \in \pi^n \mathcal{O}_K$ for all $m, m' \geq N$. By part (3), this is equivalent to $|x_m - x_{m'}| \leq |\pi|^n$ for all $m, m' \geq N$, which means $(x_m)$ is Cauchy in the metric on $K$. By completeness of $K$, $(x_m)$ converges to some $x \in K$. Since $|x_m| \leq 1$ for all $m$ and $|x| = \lim |x_m| \leq 1$, the limit $x$ lies in $\mathcal{O}_K$. So $\mathcal{O}_K$ is $\pi$-adically complete.
[/step]
[step:Construct the unique $\pi$-adic expansion in the complete case]
Assume $K$ is complete. Let $S \subseteq \mathcal{O}_K$ be a set of coset representatives for $k_K = \mathcal{O}_K/\mathfrak{m}_K$ containing $0$. We first treat $x \in \mathcal{O}_K$ and then extend to $K$.
**Existence.** Define $a_0 \in S$ by the condition $a_0 \equiv x \pmod{\pi}$, i.e., $a_0$ is the unique representative in $S$ with $x - a_0 \in \pi \mathcal{O}_K$. Write $x_1 = (x - a_0)/\pi \in \mathcal{O}_K$ (since $v_K(x - a_0) \geq 1$). Inductively, given $x_n \in \mathcal{O}_K$, define $a_n \in S$ by $a_n \equiv x_n \pmod{\pi}$ and set $x_{n+1} = (x_n - a_n)/\pi$. Then
\begin{align*}
x - \sum_{i=0}^{n} a_i \pi^i = \pi^{n+1} x_{n+1}.
\end{align*}
This holds by induction: the base case is $x - a_0 = \pi x_1$, and the inductive step uses $x_{n+1} = (x_n - a_n)/\pi$ to get $x - \sum_{i=0}^{n+1} a_i \pi^i = \pi^{n+2} x_{n+2}$. Since $|x_{n+1}| \leq 1$, we have $|x - \sum_{i=0}^{n} a_i \pi^i| = |\pi|^{n+1} |x_{n+1}| \leq |\pi|^{n+1} \to 0$. By completeness (part (4)), the series $\sum_{i=0}^{\infty} a_i \pi^i$ converges to $x$.
**Uniqueness.** Suppose $\sum_{i=0}^{\infty} a_i \pi^i = \sum_{i=0}^{\infty} b_i \pi^i$ with $a_i, b_i \in S$. Then $\sum_{i=0}^{\infty} (a_i - b_i) \pi^i = 0$. If the expansion is not identically zero, let $m$ be the smallest index with $a_m \neq b_m$. Then $0 = \pi^m \sum_{i=0}^{\infty} (a_{m+i} - b_{m+i}) \pi^i$, so $\sum_{i=0}^{\infty} (a_{m+i} - b_{m+i}) \pi^i = 0$. Reducing modulo $\pi$ gives $a_m - b_m \equiv 0 \pmod{\pi}$, i.e., $a_m \equiv b_m \pmod{\mathfrak{m}_K}$. But $a_m$ and $b_m$ are distinct elements of $S$, which is a set of coset representatives, so they cannot be congruent modulo $\mathfrak{m}_K$. Contradiction.
**Extension to $K$.** For $x \in K^\times$, write $n = v_K(x) \in \mathbb{Z}$, so $x = \pi^n u$ with $u \in \mathcal{O}_K^\times$. The element $u$ has an expansion $u = \sum_{i=0}^{\infty} a_i \pi^i$ with $a_0 \neq 0$ (since $u \notin \mathfrak{m}_K$). Then $x = \sum_{i=n}^{\infty} a_{i-n} \pi^i$, giving the expansion with $\inf\{i : a_{i-n} \neq 0\} = n$, and $|x| = |\pi|^{-n}$.
[guided]
The construction of the $\pi$-adic expansion parallels the familiar base-$p$ expansion of $p$-adic integers. The idea is to successively "read off" the leading coefficient of $x$ modulo $\pi$, subtract it, divide by $\pi$, and repeat.
**Why does $a_0$ exist?** The set $S$ contains exactly one representative from each coset of $\mathcal{O}_K/\mathfrak{m}_K$, so there is a unique $a_0 \in S$ with $x - a_0 \in \mathfrak{m}_K = \pi \mathcal{O}_K$. The quotient $x_1 = (x - a_0)/\pi$ is well-defined in $\mathcal{O}_K$ because $v_K(x - a_0) \geq 1$.
**Why does the series converge?** The partial sums $s_n = \sum_{i=0}^{n} a_i \pi^i$ satisfy $|x - s_n| = |\pi|^{n+1} |x_{n+1}| \leq |\pi|^{n+1}$, which tends to $0$ as $n \to \infty$. Since $K$ is complete, $s_n \to x$.
**Why is the representation unique?** The key point is that distinct elements of $S$ represent distinct cosets of $\mathfrak{m}_K$. If two representations agreed, their difference would be a nonzero element of $\mathcal{O}_K$ whose leading coefficient vanishes modulo $\pi$, which contradicts the coset-representative property.
**Why does the formula $|x| = |\pi|^{-\inf\{n : a_n \neq 0\}}$ hold?** If $x = \sum_{i=m}^{\infty} a_i \pi^i$ with $a_m \neq 0$, then $v_K(x) = m$ (the leading term has valuation $m$ and subsequent terms have strictly larger valuations, so by the ultrametric property the valuation of the sum equals the minimum). Hence $|x| = |\pi|^{-m}$.
[/guided]
[/step]
[step:Verify that the completion $\hat{K}$ is a DVF with the same uniformizer and preserved quotient rings]
The completion $\hat{K}$ of $K$ with respect to $|\cdot|$ is a valued field containing $K$ as a dense subfield, with the absolute value extending continuously. Since $\pi \in K \subset \hat{K}$ and $|\pi| < 1$, the element $\pi$ has valuation $v_{\hat{K}}(\pi) = 1$ in $\hat{K}$. The value group $v_{\hat{K}}(\hat{K}^\times)$ contains $\mathbb{Z} = v_K(K^\times)$. To show it equals $\mathbb{Z}$: for any $x \in \hat{K}^\times$, approximate $x$ by $y \in K$ with $|x - y| < |x|$. By the non-archimedean property, $|x| = |y|$ (since $|x - y| < |x|$ forces $v_{\hat{K}}(x) = v_K(y)$), so $v_{\hat{K}}(x) = v_K(y) \in \mathbb{Z}$. Thus $\hat{K}$ is a DVF with uniformizer $\pi$.
For the quotient isomorphism: define
\begin{align*}
\varphi_n: \mathcal{O}_K/\pi^n \mathcal{O}_K &\to \mathcal{O}_{\hat{K}}/\pi^n \mathcal{O}_{\hat{K}}
\end{align*}
by sending $x + \pi^n \mathcal{O}_K$ to $x + \pi^n \mathcal{O}_{\hat{K}}$. This is well-defined (if $x - y \in \pi^n \mathcal{O}_K \subseteq \pi^n \mathcal{O}_{\hat{K}}$) and injective (if $x - y \in \pi^n \mathcal{O}_{\hat{K}} \cap K = \pi^n \mathcal{O}_K$, since $v_K(x - y) \geq n$ is determined by the absolute value). For surjectivity: given $z \in \mathcal{O}_{\hat{K}}$, approximate $z$ by $x \in K$ with $|z - x| \leq |\pi|^n$. Then $|x| \leq \max(|z|, |z - x|) \leq 1$, so $x \in \mathcal{O}_K$, and $z - x \in \pi^n \mathcal{O}_{\hat{K}}$. Hence $\varphi_n$ is an isomorphism.
[/step]