Let $\Bbb F$ be a finite field of size a prime number $q$, and let $\Bbb K$ be a degree $m$ extension of $\Bbb F$. Let $R$ be the polynomial ring $\Bbb K[x_1,\ldots, x_n]$.
Let $f\in\Bbb F[x_1,\ldots,x_n]$, then $f(a_1,\ldots,a_n)\in \Bbb F$ for all $(a_1,\ldots,a_n)\in \Bbb F^n$. My question is about the converse of that statement:
Suppose that $f\in R$ is such that $f(a_1,\ldots,a_n)\in \Bbb F$ for all $(a_1,\ldots,a_n)\in \Bbb F^n$, is it true that $f\in\Bbb F[x_1,\ldots,x_n]$?
My thoughts so far
If $f(a_1,\ldots,a_n)\in \Bbb F$ for all $(a_1,\ldots,a_n)\in \Bbb F^n$ then $f(a_1,\ldots,a_n) = (f(a_1,\ldots,a_n))^q$ so $f(x_1,\ldots,x_n))^q - f(x_1,\ldots,x_n)$ defines the zero function on $\Bbb F^n$, therefore it belongs to the ideal over $R$ generated by $x_j^q-x_j$ for $j=1,\ldots,n$. However, I don't see how to use this to show that to show that the coefficients of $f$ are in $\Bbb F$.
By the way, I don't even know if that claim is true, but I couldn't come up with a counter example.
Any insights about this problem will be very much appreciated!
I managed to solve my question in a very simple manner, at least in the case in which the characteristic $q$ is large enough.
We know that if the degree of the polynomial is $d$, then we need about $\lambda =O(n^d)$ coefficients to represent it. If $\lambda < q^n$, we can treat the coefficients as unknowns and plug into the polynomial a number of tuples $(a_1,\ldots,a_n)\in\Bbb F^n$ that is larger than $\lambda$. By doing this we will get a linear system of equations whose solutions (the coefficients) lie in the field $\Bbb F$.