A Topology such that the continuous functions are exactly the polynomials I was wondering which fields $K$ can be equipped with a topology such that a function $f:K \to K$ is continuous if and only if it is a polynomial function $f(x)=a_nx^n+\cdots+a_0$. Obviously, the finite fields with the discrete topology have this property, since every function $f:\Bbb F_q \to \Bbb F_q$ can be written as a polynomial.
So what is with infinite fields. Does anyone see any field $K$ where such a topology can be found? If there is no such field, can anyone supply a proof that finding such a topology is impossible. I would even be satisfied if one could prove this nonexistence for only one special field (say $\Bbb Q, \Bbb R,\Bbb C$ or $  \Bbb F_q^\text{alg} $). I suspect that there is no such topology, but I have no idea how to prove that.
$$ $$
(My humble ideas on the problem: Assume that you are given such a field $K$ with a topology $\tau$. Then for $a,b \in K$ , $a \ne 0$, $x \mapsto ax+b$ is a continuous function with continuous inverse, hence a homeomorphism. Thus $K$ is a homogenous space with doubly transitive homeomorphism group. Since $\tau$ cannot be indiscrete, there is an open set $U$, and $x,y \in K$ with $x \in U,y \not\in U$. Now for every $a \in K$, $a*(U-y)/x$ includes $a$ but not $0$, and thus $K\setminus\{0\}=\bigcup_{a \in K^\times}a*(U-y)/x$, is an open subset. Thus $K$ is a T1 space, i. e. every singleton set $\{x\}$ is closed. Also $K$ is connected: Otherwise, there would be a surjective continuous function $f:K \to \{0,1\} \subset K$, which is definitely not a polynomial.)
EDIT: This question asks the analogous question with polynomials replaced by holomorphic functions. Feel free to post anything which strikes you as a remarkable property of such a hypothetical topology.
 A: In a comment on the original post, Jim Belk proposed the topology on $\mathbb{R}$ with a subbasis given by the collection of all sets of the form $\mathbb{R}\setminus p^{-1}(\mathbb{Z})$, where $p\in\mathbb{R}[x]$.
Alas, this topology does not work.  In particular, I claim that the function $f(x)=\arctan x$ is continuous w.r.t. this topology.
Proof: As pointed out in another answer here, a polynomial takes only finitely many integer values on any bounded set.  So $p^{-1}(\mathbb{Z})\cap(-\pi/2,\pi/2)$ is finite for any polynomial $p$.  It follows that for any proper closed set $C$, we have that $f^{-1}(C)$ is a finite set and therefore closed (because this topology is $T_1$).  Q.E.D.
Note: We can avoid this difficulty by using, say, the rationals, or the dyadic rationals, in lieu of the integers.
A: Currently, this is more an elongated comment than an answer ...
Consider the case $K=\mathbb R$.
Such a topology $\mathcal T$ has to be invariant under translations, scaling, and reflection because $x\mapsto ax+b$ with $a\ne 0$ is a homeomorphism.
(cf. JimBelks comments above) Assume there is a nonempty open set $U$ bounded from below, then wlog. (by translation invariance) $U\subseteq (0,\infty)$ and hence $(0,\infty)=\bigcup_{r>0}rU$ is open. By reflection, also $(-\infty,0)$ is open and by the pasting lemma, $x\mapsto|x|=\begin{cases}x&\text{if }x\ge0\\-x&\text{if }x\le 0\end{cases}$ is continuous, contradiction.
Therefore all nonempty open sets are unbounded from below, and by symmetry also unbounded from above.
Especially, all nonempty open sets are infinite. Let $U$ be a nonempty open neighbourhood of $0$. Let $I$ be a standard-open interval, i.e. of the form$I=(-\infty,a)$, $I=(a,\infty)$, or $I=(a,b)$.
Assume $|U\cap I|<|\mathbb R|$ and $0\notin I$. Then the set $\{\frac xy\mid x,y\in U\cap I\}$ does not cover all of $(0,1)$, hence for suitable $c\in(0,1)$, the open set $U\cap cU$ is disjoint from $I$ and nonempty (contains $0$). If $I$ itself is unbounded this contradicts the result above.
Therefore (by symmetry) $$|U\cap(a,\infty)|=|U\cap(-\infty,a)|=|\mathbb R|$$ for all nonempty open $U$ and $a\in\mathbb R$.
However, if $I=(a,b)$ is bounded and $U\cap I=\emptyset$, then 
$\bigcup_{ca+d<a\atop cb+d>b} (cU+d) =(-\infty,a)\cup (b,\infty)$ is open.
Taking inverse images under a suitable cubic, one sees that all sets of the form $(-\infty,a)\cup c,d)\cup (b,\infty)$ are open and ultimately all open neighbourhoods (in the standard topology!) of the point at infinity in the one-point compactification of $\mathbb R$ are open. A topology containing only these sets would describe "continuity at infinity" and make polynomials continuous - but also many other functions. Anyway we have: 

$|U\cap (a,b)|=|\mathbb R|$ for all nonempty $U$ and bounded intervals $(a,b)$, or all (standard) open neighbourhoods of $\infty$ are open.

Since $x\mapsto |x|$   is continuous under the indiscrete topology, there exists an open set $\emptyset\ne U\ne \mathbb R$. Wlog. $0\notin U$. Then $\bigcup_{c>0}cU=K\setminus\{0\}$ is open, hence

points are closed.

So $\mathcal T$ is coarser than the cofinite topology. Since $x\mapsto |x|$   is continuous under the cofinite topology, it is strictly coarser, i.e.  there exists an open set $U\ne \emptyset $ such that $\mathbb R\setminus U$ is infinite.
A: Some hopefully-correct thoughts about Jim Belk's proposal for the real numbers:
Polynomials in that topology are continuous, because for polynomials $p$ and $q$, $q^{-1}(p^{-1}(\Bbb Z))=(p\circ q)^{-1}(\Bbb Z)$.
The topology is coarser than the usual one, so the space is connected. It's also $T_1$, because $\Bbb Z+x$ and $\pi \Bbb Z+x$ are closed for each $x$. So it at least meets the basic requirements we've laid out already.
Since the preimage of each integer under a given polynomial is finite, each sub-basic closed set is countable, so in fact every closed set is countable.
We know then, that the topology must be somewhere between cofinite and cocountable. It is easy to see that it must be strictly between, because
the nonconstant continuous functions in the cofinite (cocountable) topology are those which take no value more than finitely (countably) often.
Moreover, a polynomial takes only finitely many integer values on any bounded set, so in fact the subspace topology on any bounded set is cofinite. This also means that any nontrivial closed set is order-isomorphic to a subset of
$\mathbb{Z}$.
We can also conclude, since any two nonempty subsets have nonempty intersection, that it is hyperconnected, therefore not $T_2$, and thus not a
topological group under any operation. Furthermore, no finite collection of
closed sets covers any nonempty open set, so in the absence of a locally finite
closed cover, even the strongest form of the pasting lemma does not apply.
A: Below I am showing a property that will show how "big" open sets must be in this topology.
For $K=\mathbb{R}$. If $v\not=0$ and $U$ is an open neighbourhood of $v$, then there exists $v'\in U$, such that $vv'<0$.
Proof. Let $f(x)=|x|$. Since $x\mapsto -x$ is homeomorphism, for any open $V$, $-V$ is open. For any open neighbourhood $V$ of $0$, $0\in V\cap-V$ and $f(V\cap-V)\subset V$. Thus $f$ is continuous at $0$. But $f$ is discontinuous. Let $z$ be a point of discontinuity of $f$. We know that $z\not=0$. Take any open neighbourhood $G$ of $f(z)$. Notice that if all elements of $G$ has the same sign as $z$, then (for $z>0$:$f(G)=G$ and $z\in G$) or (for $z < 0$:$f(-G)=G$ and $z\in -G$). From that observation follows that if there exists an neighbourhood of $z$ whose elements have the same sign, then $f$ is continuous at $z$. So each open neighborhood of $z$ must contain an element that is of opposite sign. Now, take any $v\not=0$, let $\alpha=\frac{z}{v}$. Keep in mind that $x\mapsto \alpha x$ is a homeomorphism. Take any open neighbourhood $U$ of $v$. Note that $z\in \alpha U$. Thus there is $e\in \alpha U$ such that $ez<0$. But then $\frac{e}{\alpha}\in U$ and $\frac{ez}{\alpha^2} = \frac{e}{\alpha}v < 0$. So put $v'= \frac{e}{\alpha}$. This completes the proof.
And I think that because of $x\mapsto x + b$ and $x\mapsto -x$ are homeomorphisms we can easily extend this to the following:
For $K=\mathbb{R}$. For any $v$ and any $M>0$, each neighbourhood of $v$ contains point $v'$ for which $v'-v > M$.
A: I thought I’d assemble some of the thoughts so far, plus add a few more.
Suppose that $F$ is a field, and that $\mathcal{T}$ is a topology on $F$ such that the set of continuous functions from $F$ to $F$ equals the set of polynomial functions with coefficients in $F$.
Then, as noted elsewhere on this page:

*

*$F$ is not discrete.


*$F$ is $T_1$.


*Some infinite proper subset of $F$ is closed.


*Every nonempty open set is infinite.


*If $F=\mathbb{Q}$ or $F=\mathbb{R}$, then every nonempty open set is unbounded.


*$F$ is bihomogeneous.


*The homeomorphism group of $F$ is $\{ax+b\;|\;a,b\in F\}$.


*$F$ is connected.
Also:

*

*$F$ is crowded.  In other words, $F$ has no isolated points.  (Proof: Otherwise $F$ would be discrete.)


*If $S$ is a finite subset of $F$, then $F\setminus S$ is connected.  (Proof: If $S$ is empty, this follows because $F$ is connected.  Otherwise, suppose $U\cup V$ is a disconnection of $F\setminus S$.  Let $p(x)=(x-s_1)\cdots(x-s_n)$, where $S=\{s_1,\dots,s_n\}$.  The function which equals $0$ on $U$ and on $S$ but equals $p$ on $V$ is continuous by the pasting lemma.)


*If $F=\mathbb{R}$, then $F$ is not compact Hausdorff.  (Proof #1: Suppose $F$ is compact Hausdorff.  Then $[a,\infty)$ is closed, being the image of the compact set $F$ under the map $x^2+a$.  The collection of these closed sets has the finite intersection property and therefore has nonempty intersection, which is a contradiction.)  (Proof #2: The set $[0,\infty)$ being closed contradicts $(0,\infty)$ being dense---see the last bullet point, below.)  (Proof #3: The function $f(x)=x^3$ is continuous and bijective, but not a homeomorphism, because its inverse function is not continuous.)  Note that the logic of the first two proofs applies not just to $\mathbb{R}$ but to any ordered field in which every positive element is a square.


*Regarding $F$ as a group under addition, the closure of any subgroup is a subgroup.  (Idea of proof: Use that translations are homeomorphisms, as is the function $f(x)=-x$.)  Many statements of this form hold, for example, replacing “closure” with interior or replacing “subgroup” with “set closed under multiplication,” etc.


*Again regarding $F$ as a group under addition, every nonempty open set generates $F$.  (Proof: Otherwise, let $U$ be an open set.  The subgroup $H$ generated by $U$ is a union of open sets.  If $H$ is a proper subgroup, then, considering the cosets of $H$, we see that this violates the connectivity of $H$.)


*Every subgroup of $F$ is either dense or nowhere dense.  (Proof: Follows from the last item.)


*If $F$ is an ordered field, then every open set containing $0$ contains both positive and negative elements.  (Proof: Let $U$ be an open set containing $0$.  We know $0$ is not an isolated point, so $U$ contains some other point $a$.  If $U$ contains only non-negative elements, then $[0,\infty)$ is the union of the sets $U+b$ where $b\geq 0$ and is therefore open.  But then $(-\infty,0)$ is a union of the open sets $(-\infty,c]$.  This contradicts $F$ being connected.  Similarly if $U$ contains only non-positive elements.)


*If $F$ is an ordered field, then $A=(0,\infty)$ is dense in $F$.  (Proof: From the last item, we see that $0$ is in $\overline{A}$, the closure of $A$.  But $[0,\infty)$ cannot be closed, else $F\setminus\{0\}$ is disconnected.  So $\overline{A}$ contains a negative element $b$.  But then $\overline{A}=F$, because $A$, and therefore $\overline{A}$, is closed under multiplication.)
