We are concerned with the language $\mathcal{L}=\{f\}$, where $f$ is a unary function symbol. I want to find a $\mathcal{L}$-sentence which is satisfiable in some structure with an infinite domain, but false in every structure with a finite domain.
My initial thinking process was that if a function has a finite domain, there exists elements in the domain of the language that are not contained in the domain of the function (For example, on $\mathbb{R}$ and $f(x) = \sqrt{x}$, $x=-1$ is not on the domain of $f$ but does exist in the domain of the language)
Thus I came up with $\phi : \forall x \exists y (y = f(x))$ (Thus using the same example as above, $\not\exists y$ when $x=-1$)
My mathematical intuition tells me this is wrong, but I cant just put my finger onto the exact logical reason as to why. My only guess is that when stating $\phi : \forall x \exists y (y = f(x))$, we only consider values of $x$ that are of valid concern in terms of $f$.
There isnt any information relevant to this information on the sources I have, so any help would greatly be appreciated.