Let $V$ be a real affine variety in $\mathbb R^n$, i.e. the zero set of a real polynomial $p(x_1,\dots,x_n)$. Consider the following three definitions of the dimension of $V$, $dim(V)$.
Definition 1: if $I$ is the ideal of polynomials vanishing on $V$, then $dim(V)$ is the maximum dimension of a coordinate subspace in $V(\langle LT(I)\rangle)$ with a given graded order $>$ on the monomials ($\sum\alpha_i>\sum\beta_i$ implies $x^\alpha>x^\beta$) (see the book "Ideals, Varieties, and Algorithms" chapter 9)
Definition 2: $dim(V)$ is the largest $d$ such that there exists an injective semi-algebraic map from $(0, 1)^d$ to $V$ (see "Algorithms in Real Algebraic Geometry" chapter 5)
Definition 3: $dim(V)$ is the largest $d$ such that there exists a subset of $V$ homeomorphic to $(0, 1)^d$
Are these three definitions, for the case of real affine varieties, pairwise equivalent, or pairwise different, or something else?