I'm trying to make a scheme out of an affine variety $V\subset k^n$, when the base field $k$ is not algebraically closed. I wonder if $V$ is the spectrum of its ring of regular functions $\mathcal{O}(V)$, ie functions $f:V\to k$ such that for any point $p\in V$, there exists a neighborhood $U$ of $p$ and two polynomials $Q,R\in k[X_1,\dots,X_n]$ such that $R$ has no zeros on $U$ and $f=\frac{Q}{R}$ on $U$. For example if $V=k=\mathbb{R}$ then $f(x)=\frac{(x−1)(x+2)}{x^2+1}$ is regular on $\mathbb{R}$, but not invertible because it has zeros in 1 and -2.
So unlike the coordinate ring $A(V)=k[X_1,\dots,X_n] / I(V)$, functions in $\mathcal{O}(V)$ have polynomial denominators (without zeros), because $k$ is not algebraically closed.
I don't manage to prove that
a maximal ideal $m$ of $\mathcal{O}(V)$ corresponds to a point of $V$. The denominators ensure that all elements of $m$ have zeros, but not necessarily a unique common zero.
a prime ideal $p$ of $\mathcal{O}(V)$ corresponds to an irreducible subvariety of $V$.
if there are more points or subvarieties in Spec $\mathcal{O}(V)$, such as the zero ideal, prove those extra points are generic, i.e. that their topological closure contains $V$.
I understand 2 and 3 are harder, I originally only asked 1 :)
Thanks, Vincent
Now that OP has precised is definition of regular functions, I believe that this result is not true since for $k^n$, $(0)$ is a prime ideal for the set of regular functions,