The concept of dimension is surprisingly subtle. The mathematics invented by Georg Cantor and his contemporaries famously showed that, contrary to intuition, it is possible to specify a point in $2$-dimensional space using only a single real number. To make this precise, we need the concept of a bijective function. What Cantor's mathematics shows is that, contrary to intuition, there exist (many) bijections $$\mathbb{R} \rightarrow \mathbb{R} \times \mathbb{R}.$$
In some sense, this is saying that the set $\mathbb{R} \times \mathbb{R}$ is (rather paradoxically) "no bigger" than $\mathbb{R}$.
To make matters worse, Giuseppe Peano (born 13 years after Cantor) managed to construct a space-filling curve; a continuous function $$[0,1] \rightarrow [0,1] \times [0,1]$$ that, rather miraculously, manages to be surjective.
What this all means is that, like I said, the concept of dimension is rather subtle. One might speculate that fundamentally, this concept actually makes no sense. The good news is that, in fact, the concept of dimension does make sense. The bad news is that the definition is pretty complicated, and needs to be built up in two stages.
In the first stage, we establish the concept of dimension in linear algebra.
We need the following notions:
The definition is:
Proposition 0. Let $V$ denote a vector space. Then $V$ has a basis, and every two bases of $V$ have the same number of elements, and (Definition.) we call this number the dimension of $V$.
Example. The dimension of the vector space $\mathbb{R}^n$ is $n$.
Note that, in full generality, the dimension of $V$ is a cardinal number, a concept invented by Cantor to tame the chaos of infinite sets. However, for the purposes of basic geometry, we can usually assume that $V$ is finite-dimensional, in which case the dimension of $V$ will always be a natural number.
In the second stage, we establish the concept of dimension in differential geometry. This part is much more complicated.
We'll need the following concepts:
Definition. Let $M$ denote a smooth manifold and $x$ denote an element of $M$. Then the dimension of $M$ at $x$ is, by definition, the dimension of the tangent space of $M$ at $x$, viewed as a vector space.
It turns out that
Proposition 1. Let $M$ denote a manifold. If $M$ is connected, then there exists a natural number $n$ such that for all points $x$ in $M$, the dimension of $M$ at $x$ equals $n$, and (Definition.) we call $n$ the dimension of $M$.
Example. The dimension of the manifold $\mathbb{R}^n$ is $n$.
To finally answer your question, we'll need two more concepts:
Now:
- the open interval $A=(0,1)$ can be viewed as a submanifold of $\mathbb{R}$
- the open square $B=(0,1) \times (0,1)$ can be viewed as a submanifold of $\mathbb{R}^2$
- the unit circle $C = \{x \in \mathbb{R}^2 : \|x\|=1\}$ can viewed as a submanifold of $\mathbb{R}^2$.
This implies that each of $A,B$ and $C$ can be viewed as manifolds in their own right. Further to this, they turn out to be connected; and, hence, they have a well-defined dimension; namely, $1,2$ and $1$ (respectively). The first two of these numbers is easy to obtain; since $A$ and $B$ are open subsets of $\mathbb{R}$ and $\mathbb{R}^2$ respectively, hence they have dimension $1$ and $2$ respectively. The dimension of $C$ is a little harder to find, because its not an open subset of $\mathbb{R}^2$. But your intuition is generally pretty trustworthy when it comes to these things; if your brain tells you that the dimension of $C$ is $1$, then the dimension of $C$ is probably $1$. Perhaps this partly explains why it took mathematics so long to give the concept of dimension a proper and rigorous treatment; perhaps its because intuition alone is usually enough to get you the right answer, even if you don't really know what that answer means in a precise, technical sense.
Let $I=(f_1,\dots,f_n)$ be an ideal of $\mathbb{Z}[x_1,\dots,x_n]$ and $J$ the corresponding ideal in $\mathbb{Q}[x_1,\dots,x_n]$. In other words, $J=I\otimes_{\mathbb{Z}}\mathbb{Q}$.
Let $G$ be a (strong and reduced) Groebner basis for $I$. Note that $G$ is a Groebner basis for $J$ as well: Let $g\in J$, then $g=\sum h_i f_i$ where $h_i\in\mathbb{Q}[x_1,\dots,x_n]$. For a large enough $N\in\mathbb{Z}$, $Ng = \sum (Nh_i)f_i$ is in $I$ since $Nh_i\in \mathbb{Z}[x_1,\dots,x_n]$. Thus, the leading monomials of both $I$ and $J$ are the same.
If any $f\in G$ has nontrivial content (that is, the $\gcd$ of the leading coefficients), then $J\cap\mathbb{Z}[x_1,\dots,x_n]\not=I$, by dividing through by the content. On the other hand, if all the leading coefficients of elements of $G$ are $1$'s, then $J\cap\mathbb{Z}[x_1,\dots,x_n]=I$. In particular, the division algorithm will never produce a fractional coefficient and the algorithm will be identical in both $I$ and $J$.
In your examples, graded-reverse-lex Groebner bases (as computed by Macaulay2) have Groebner bases with every leading coefficient $1$, so the intersection is an equality.
Note: In the case where the Groebner basis elements have leading coefficient not equal to $1$, but are content free, the situation is more complicated: $(2x+y)$ has the desired property, but $(2x+y,3y+2z)$ does not have the desired property. There are content-free Groebner bases for both ideals, but the leading coefficients are not $1$ in this case.
Best Answer
One way of interpreting this question is as follows:
The Lie group $\mathbb R^n$ acts effectively and transitively on the smooth manifold $\mathbb R^n$; each of these is $n$-dimensional. The special orthogonal group $SO(n+1)$ acts effectively and transitively on $S^n$; the former has dimension $n(n+1)/2$, and $S^n$ has dimension $n$.
Can we improve this? Are there, for instance, $n(n-1)(n-2)/6$-dimensional groups that act on $n$-dimensional manifolds?
If the group $G$ is compact, the answer is a firm no. It is a result of Montgomery and Zippin that a compact topological group acting effectively and transitively on a manifold of dimension $n$ must have dimension at most $n(n+1)/2$. If you want $G$ to be a Lie group acting smoothly, this is easier: first prove it if $G$ acts by isometries on a Riemannian manifold by induction; then if you have a transitive effective action on $M$, average the metric over $G$ to get a $G$-invariant metric on $M$, hence an action by isometries. That $G$ is compact is important here!
I don't know what bounds one has in the case that $G$ is non-compact - I'd like to hear from somebody if they do.