$\DeclareMathOperator\Var{Var}$Let $k$ be any field and let $K_0(\Var_k)$ be the Grothendieck ring of $k$-algebraic varieties (i.e. algebraic varieties up to cut-and-paste relations). Given an algebraic variety $X$, the corresponding class $[X] \in K_0(\Var_k)$ will be called the virtual class of $X$.
Question: Does the virtual class of a variety $X$ on $K_0(\Var_k)$ determine the dimension of $X$? In other words, if $[X]=[Y]$ then is it true that $\dim X = \dim Y$?
Obviously, some hypotheses are needed in the field. For instance, if $k$ is a finite field, then $[X]$ is a bunch of points so any two varieties with the same number of points have (potentially) the same virtual classes.
If $k = \mathbb{C}$ (or a subfield of it) then this can be easily proven using the virtual Poincaré polynomial (or, with more machinery, the E-polynomial of the mixed Hodge structure).
However, I would like to get a similar proof for positive characteristic (say, for separably closed fields). When $k$ is separably closed, then étale cohomology says something, since $H_c^{2{\dim X}}(X, \mathbb{Q}_\ell(d))$ has positive dimension (see Corollary 7.5.21 of Poonen - Rational points on varieties). However, I don't know how to pack these cohomology groups into a “virtual Poincaré polynomial in positive characteristic” (is the naïve definition even additive?). I guess some additive function should do the job, but my knowledge of these guys in positive characteristic is quite limited (virtual motives, maybe?).
Edit: As pointed out in the comments, the dimension can also be read in the case of finite fields by looking at finite field extensions. For instance, the zeta function $$ \zeta_X(s) = \sum_{m \geq 1} |X(\mathbb{F}_{q^m})|q^{-ms} $$ encodes the dimension of $X$ (say, in its functional equation).
\dim X
behaves better than $\textrm{dim}\,X$\textrm{dim}\,X
. For non-pre-defined commands like\Var
, you can use\DeclareMathOperator\Var{Var}
, as @YCor did in an edit. I have edited accordingly. $\endgroup$