[proofplan]
We use [quantifier elimination for algebraically closed fields](/theorems/4310) to reduce an arbitrary one-variable definable set to a Boolean combination of polynomial zero sets in one variable. Each such zero set is either all of $K$, when the polynomial is zero, or finite, when the polynomial is nonzero. Finally, the family of finite and cofinite subsets of $K$ is closed under finite Boolean combinations, so the original definable set is finite or cofinite.
[/proofplan]
[step:Reduce the defining formula to polynomial equations in one variable]
Let $X \subseteq K$ be definable over $A$. Then there exist an integer $m \geq 0$, a tuple $a = (a_1,\dots,a_m) \in A^m$, and an $\mathcal{L}_{\mathrm{ring}}$-formula $\varphi(x,a)$ with one free variable $x$ such that
\begin{align*}
X = \{b \in K : K \models \varphi(b,a)\}.
\end{align*}
Let $F \subseteq K$ denote the subfield generated by the prime subfield of $K$ together with the coordinates $a_1,\dots,a_m$. Since $K$ is algebraically closed, it is a model of the complete theory $\mathrm{ACF}_{\operatorname{char} K}$ of algebraically closed fields of characteristic $\operatorname{char} K$. By [Quantifier Elimination for Algebraically Closed Fields](/theorems/???), applied to the one-variable formula $\varphi(x,a)$ with parameters from $F \subseteq K$, the formula $\varphi(x,a)$ is equivalent in $K$ to a quantifier-free Boolean combination of atomic formulas of the form
\begin{align*}
p(x) = 0,
\end{align*}
where $p \in F[T]$ is a polynomial in one indeterminate $T$ with coefficients in $F$.
Thus there exist polynomials $p_1,\dots,p_N \in F[T]$ for some integer $N \geq 0$ and a Boolean expression $B$ in $N$ propositional variables such that, for every $b \in K$,
\begin{align*}
b \in X
\quad \iff \quad
B\bigl(p_1(b)=0,\dots,p_N(b)=0\bigr)
\end{align*}
is true.
[guided]
We first translate model-theoretic definability into a finite algebraic description. Since $X$ is definable over $A$, there is a formula $\varphi(x,a)$ with one free variable $x$ and with parameters $a = (a_1,\dots,a_m)$ from $A$ such that
\begin{align*}
X = \{b \in K : K \models \varphi(b,a)\}.
\end{align*}
The parameters only enter through the smallest field containing them. Define $F \subseteq K$ to be the subfield generated by the prime subfield of $K$ and by $a_1,\dots,a_m$. Then every term in the language of rings with parameters $a$ evaluates to a polynomial expression with coefficients in $F$.
The key model-theoretic input is [Quantifier Elimination for Algebraically Closed Fields](/theorems/???). The field $K$ has some characteristic, either $0$ or a prime number, and as an algebraically closed field it is a model of $\mathrm{ACF}_{\operatorname{char} K}$. Quantifier elimination applies to formulas in the language of rings with parameters from $K$; here the parameters all lie in the subfield $F \subseteq K$. It says that $\varphi(x,a)$ is equivalent over $K$ to a quantifier-free formula. In one free variable, such a quantifier-free formula is a finite Boolean combination of polynomial equations
\begin{align*}
p(x) = 0,
\end{align*}
where $p \in F[T]$.
Therefore there are finitely many polynomials $p_1,\dots,p_N \in F[T]$ and a Boolean expression $B$ such that membership in $X$ is determined only by which of the equations $p_i(b)=0$ hold:
\begin{align*}
b \in X
\quad \iff \quad
B\bigl(p_1(b)=0,\dots,p_N(b)=0\bigr).
\end{align*}
This is the point where algebraic closedness is used: it supplies quantifier elimination, which converts arbitrary first-order definitions into finite Boolean combinations of polynomial equalities.
[/guided]
[/step]
[step:Classify each polynomial zero set as finite or all of $K$]
For each $i \in \{1,\dots,N\}$, define the polynomial evaluation map
\begin{align*}
p_{i,K}: K &\to K \\
b &\mapsto p_i(b).
\end{align*}
Let
\begin{align*}
Z_i := \{b \in K : p_{i,K}(b) = 0\}.
\end{align*}
If $p_i = 0$ in $F[T]$, then $Z_i = K$. If $p_i \neq 0$, let $d_i = \deg p_i$. Since $F[T]$ is a [polynomial ring](/page/Polynomial%20Ring) over a field and $K$ is a [field extension](/page/Field%20Extension) of $F$, a nonzero polynomial of degree $d_i$ has at most $d_i$ roots in $K$. Hence $Z_i$ is finite. Therefore each $Z_i$ is either finite or equal to $K$, and in particular each $Z_i$ is finite or cofinite.
[guided]
For each polynomial appearing after quantifier elimination, we turn the equation $p_i(x)=0$ into an actual subset of $K$. Define
\begin{align*}
p_{i,K}: K &\to K \\
b &\mapsto p_i(b),
\end{align*}
and define its zero set by
\begin{align*}
Z_i := \{b \in K : p_{i,K}(b) = 0\}.
\end{align*}
There are two cases. If $p_i$ is the zero polynomial in $F[T]$, then $p_{i,K}(b)=0$ for every $b \in K$, so
\begin{align*}
Z_i = K.
\end{align*}
If $p_i$ is not the zero polynomial, let $d_i = \deg p_i$. A nonzero polynomial of degree $d_i$ over a field has at most $d_i$ roots in any field extension. This applies because $F$ is a field and $K$ is a field containing $F$. Hence
\begin{align*}
|Z_i| \leq d_i,
\end{align*}
so $Z_i$ is finite.
Thus each atomic equation $p_i(x)=0$ defines either the whole field $K$ or a finite subset of $K$. In both cases it defines a finite or cofinite subset of $K$.
[/guided]
[/step]
[step:Show finite and cofinite subsets are closed under Boolean operations]
Let $\mathcal{C}$ be the collection of all subsets $Y \subseteq K$ such that $Y$ is finite or $K \setminus Y$ is finite. We verify that $\mathcal{C}$ is closed under complement, finite union, and finite intersection.
If $Y \in \mathcal{C}$, then either $Y$ is finite or $K \setminus Y$ is finite, so $K \setminus Y \in \mathcal{C}$. If $Y_1,Y_2 \in \mathcal{C}$, then $Y_1 \cup Y_2 \in \mathcal{C}$: if both $Y_1$ and $Y_2$ are finite, their union is finite; otherwise one of them is cofinite, and the union is cofinite. Since
\begin{align*}
Y_1 \cap Y_2 = K \setminus \bigl((K \setminus Y_1) \cup (K \setminus Y_2)\bigr),
\end{align*}
closure under complement and finite union implies closure under finite intersection.
Therefore every finite Boolean combination of members of $\mathcal{C}$ again belongs to $\mathcal{C}$.
[guided]
We now isolate the set-theoretic closure property needed to pass from atomic polynomial equations to the whole Boolean formula. Let $\mathcal{C}$ be the collection of all subsets $Y \subseteq K$ such that either $Y$ is finite or its complement $K \setminus Y$ is finite.
First consider complements. If $Y \in \mathcal{C}$, then either $Y$ is finite, in which case $K \setminus Y$ is cofinite, or $K \setminus Y$ is finite, in which case $K \setminus Y$ is finite. Hence $K \setminus Y \in \mathcal{C}$.
Next consider finite unions, beginning with two sets. Let $Y_1,Y_2 \in \mathcal{C}$. If both $Y_1$ and $Y_2$ are finite, then $Y_1 \cup Y_2$ is finite because a union of two finite sets is finite. If at least one of them is cofinite, say $K \setminus Y_1$ is finite, then
\begin{align*}
K \setminus (Y_1 \cup Y_2) \subseteq K \setminus Y_1.
\end{align*}
A subset of a finite set is finite, so $K \setminus (Y_1 \cup Y_2)$ is finite. Thus $Y_1 \cup Y_2 \in \mathcal{C}$. Repeating this two-set argument gives closure under finite unions.
Finally, intersections are handled by De Morgan's law. For $Y_1,Y_2 \in \mathcal{C}$,
\begin{align*}
Y_1 \cap Y_2 = K \setminus \bigl((K \setminus Y_1) \cup (K \setminus Y_2)\bigr).
\end{align*}
The complements $K \setminus Y_1$ and $K \setminus Y_2$ lie in $\mathcal{C}$, their union lies in $\mathcal{C}$, and the complement of that union lies in $\mathcal{C}$. Repeating the two-set argument gives closure under finite intersections. Since every finite Boolean expression is built from complements, finite unions, and finite intersections, every finite Boolean combination of members of $\mathcal{C}$ again belongs to $\mathcal{C}$.
[/guided]
[/step]
[step:Apply the Boolean classification to the definable set]
Each atomic set $Z_i = \{b \in K : p_i(b)=0\}$ belongs to $\mathcal{C}$. The set $X$ is obtained from $Z_1,\dots,Z_N$ by the finite Boolean expression $B$. Since $\mathcal{C}$ is closed under finite Boolean combinations, $X \in \mathcal{C}$.
Hence either $X$ is finite or $K \setminus X$ is finite. This proves that every one-variable subset of $K$ definable over parameters is finite or cofinite.
[guided]
We now assemble the algebraic and set-theoretic parts of the proof. For each $i \in \{1,\dots,N\}$, the atomic equation $p_i(x)=0$ defines the set
\begin{align*}
Z_i = \{b \in K : p_i(b)=0\}.
\end{align*}
The preceding polynomial step showed that each $Z_i$ is either finite or all of $K$, so each $Z_i$ lies in the collection $\mathcal{C}$ of finite-or-cofinite subsets of $K$.
The quantifier-elimination step showed that, for every $b \in K$,
\begin{align*}
b \in X
\quad \iff \quad
B\bigl(p_1(b)=0,\dots,p_N(b)=0\bigr)
\end{align*}
is true. This means exactly that $X$ is obtained from the sets $Z_1,\dots,Z_N$ by the finite Boolean expression $B$. Since the previous step proved that $\mathcal{C}$ is closed under finite Boolean combinations, it follows that $X \in \mathcal{C}$.
By the definition of $\mathcal{C}$, the assertion $X \in \mathcal{C}$ says precisely that either $X$ is finite or $K \setminus X$ is finite. Therefore every subset of $K$ definable in one variable over parameters is finite or cofinite.
[/guided]
[/step]