TITLE: Computing with ideals:  over $K$ or over $\mathbb{Q}\subseteq K$? does it matter?
QUESTION [4 upvotes]: I'm beginning to learn to use SINGULAR, the computer algebra system (CAS) for commutative algebra.
NOTATION: If $K$ is a field of characteristic $0$, then $\mathbb{Q}\subseteq K$; otherwise $\mathbb{Z}_p\!\subseteq\!K$ for some prime $p\!=\!\mathrm{char}\,K$. 
If $S\subseteq\mathbb{Q}[x_1,\ldots,x_n]\!=\!\mathbb{Q}[\mathbf{x}]\subseteq K[x_1,\ldots,x_n]\!=\!K[\mathbf{x}]$, let $\langle S\rangle_{\mathbb{Q}[\mathbf{x}]}$ denote the ideal in $\mathbb{Q}[\mathbf{x}]$ generated by polinomials from $S$; and let $\langle S\rangle_{K[\mathbf{x}]}$ denote the ideal in $K[\mathbf{x}]$ generated by polinomials from $S$. 
From what I understand, CASs are able to carry out computations in $K[\mathbf{x}]$ only when $K$ is either $\mathbb{Q}$ or finite (and some other special cases).
QUESTION: when doing the standard operations with a CAS on ideals, such as intersection, multiplication, addition, intersection with subrings (elimination of variables), etc. within $\mathbb{Q}[\mathbf{x}]$, how much can we deduce about the corresponding ideals in $K[\mathbf{x}]$? 
More concretely:

does $\langle S_1\rangle_{\mathbb{Q}[\mathbf{x}]}=\langle S_2\rangle_{\mathbb{Q}[\mathbf{x}]}$ imply $\langle S_1\rangle_{K[\mathbf{x}]}=\langle S_2\rangle_{K[\mathbf{x}]}$?
does $\langle S_1\rangle_{\mathbb{Q}[\mathbf{x}]}\cap\langle S_2\rangle_{\mathbb{Q}[\mathbf{x}]}=\langle S\rangle_{\mathbb{Q}[\mathbf{x}]}$ imply $\langle S_1\rangle_{K[\mathbf{x}]}\cap\langle S_2\rangle_{K[\mathbf{x}]}=\langle S\rangle_{K[\mathbf{x}]}$?
does $\langle S_1\rangle_{\mathbb{Q}[\mathbf{x}]}\;\cdot\;\langle S_2\rangle_{\mathbb{Q}[\mathbf{x}]}=\langle S\rangle_{\mathbb{Q}[\mathbf{x}]}$ imply $\langle S_1\rangle_{K[\mathbf{x}]}\;\cdot\;\langle S_2\rangle_{K[\mathbf{x}]}=\langle S\rangle_{K[\mathbf{x}]}$?
does $\langle S_1\rangle_{\mathbb{Q}[\mathbf{x}]}+\langle S_2\rangle_{\mathbb{Q}[\mathbf{x}]}=\langle S\rangle_{\mathbb{Q}[\mathbf{x}]}$ imply $\langle S_1\rangle_{K[\mathbf{x}]}+\langle S_2\rangle_{K[\mathbf{x}]}=\langle S\rangle_{K[\mathbf{x}]}$?
for $f\!\in\!\mathbb{Q}[\mathbf{x}]$, does $f\!\in\!\langle S\rangle_{\mathbb{Q}[\mathbf{x}]}\Leftrightarrow f\!\in\!\langle  S\rangle_{K[\mathbf{x}]}$ hold?
etc. (Elimination of variables, Zariski Closure of the Image, Solving Polynomial Equations, Radical Membership, Quotient of Ideals, ...)

Basically what I'm asking is how can we use Singular (and other CASs) for computation in  polynomial rings over an arbitrary field (but all polynomials have coefficients in $\mathbb{Q}$).
My main literature is A Singular Introduction to Commutative Algebra (the authors of the book are the developers of Singular). I would think these questions would be adressed somewhere in that book, but I was not able to find such propositions (I just began reading it). Anyone know where to look?
P.S. if $S\!\subseteq\!R'\!\leq\!R$, where $R',R$ are commutative rings with 1, does $\langle S\rangle_{R'}=\langle S\rangle_R\cap R'$ hold?

REPLY [3 votes]: EDIT Proof of the implications in the original question. 
(1), (3) and (4) come from definitions. Namely, let $I=\langle S\rangle_{\mathbb Q|x}$. 

$\langle S\rangle_{K|x}=I K[\bf{x}]$ is the ideal of $K[{\bf x}]$ generated by $I\subset K[{\bf x}]$. So $I_1=I_2$ implies that $I_1 K[{\bf{x}}]=I_2 K[\bf{x}]$. This is (1).
$I_1\cdot I_2$ is the ideal generated by the elements of the form $s_1.s_2$ with $s_i\in S_i$. Similarly, $I_1K[{\bf{x}}]\cdot I_1K[{\bf{x}}]$ is the ideal of $K[{\bf{x}}]$ generated by the same elements, but in $K[{\bf{x}}]$. 
The ideal $(I_1\cdot I_2)K[{\bf{x}}]$ is generated by as well by the same elements. This implies that $I_1K[{\bf{x}}]\cdot I_1K[{\bf{x}}]=(I_1\cdot I_2)K[{\bf{x}}]$.
Similarly, $I_1+I_2$ is generated by $S_1\cup S_2$ and one can follow the same reasonning as above. 

For (2), we have the exact sequence 
$$ 0 \to I_1\cap I_2 \to I_1\times I_2 \to I_1+I_2 \to 0$$ 
of $\mathbb Q[{\bf x}]$-modules. It remains exact when tensored with $K[{\bf x]}$ because the latter is free over $\mathbb Q[{\bf x}]$. Now the new exact sequence is 
$$ 0\to (I_1\cap I_2)K[{\bf x}]\to I_1 K[{\bf x}]\times I_2 K[{\bf x}] \to I_1 K[{\bf x}]+ I_2 K[{\bf x}]\to 0.$$
Compare with the canonical exact sequence
$$ 0 \to I_1K[{\bf x}]\cap I_2K[{\bf x}] \to I_1K[{\bf x}]\times I_2K[{\bf x}] \to I_1K[{\bf x}]+I_2K[{\bf x}] \to 0$$ 
then you get $(I_1\cap I_2)K[{\bf x}]=I_1K[{\bf x}]\cap I_2K[{\bf x}]$. This is (2). 
Below is the old part showing the inverse implications. 
For any ideal $I$ of $\mathbb Q[{\bf x}]$ (your $\langle S\rangle_{\mathbb Q|x}$), denote by $I_K$ the ideal of $K[\bf{x}]$ generated by the elements of $I\subseteq K[\bf{x}]$. This is your $\langle S\rangle_{K|x}$. 

Claim: If $I_K=J_K$ for two ideals of $\mathbb Q[\bf{x}]$. Then $I=J$. 

Proof: Let $\{ e_i \}_i$ be a basis of $K$ over $\mathbb Q$ (as vector space). We can suppose that one of them, $e_{i_0}=1$. Then $K[\bf {x}]$ is the direct sum of $\mathbb Q[\bf{x}]$ and the $e_i\mathbb Q[\bf{x}]$, $i\ne i_0$. This implies that $I_K=I\oplus (\oplus_{i\ne i_0} Ie_i)$. Hence 
$$I_K\cap \mathbb Q[{\bf x}]=I.$$
In particular, $I_K=J_K$ implies $I=J$. 
The claim implies (1). For (2), note that 
$$(I_K\cap J_K)\cap \mathbb Q[{\bf{x}}] = (I_K\cap \mathbb Q[{\bf{x}}]) \cap (J_K\cap \mathbb Q[{\bf{x}}])=I\cap J.$$
For (3) and (4),  note that $I_K\cdot J_K=(I\cdot J)_K$. For (5), you are looking for the equality $f\mathbb Q[{\bf{x}}]+I=I$, it is enough to apply (4). 
A deep reason for all of this is $K$ is "faithfully flat" over $\mathbb Q$. For your PS, the equality holds if $R'\to R$ is faithfully flat.
When you are dealing with $\mathbb F_p$ (field with $p$ elements), the result is false. For example, $I=p\mathbb Z[x]$ is equal to $0$ in $\mathbb F_p[x]$ but $I\ne 0$.  Misreading. 
The same arguments apply for any field extensions, in particular if $\mathbb Q$ is replaced by a finite field.  
More on the PS If $R'\to R$ is faithfully flat, then $\langle S \rangle_R\cap R'=\langle S\rangle_{R'}$. 
Proof: Let $I=\langle S\rangle_{R'}$. Then $\langle S \rangle_R$ is equal to the ideal of $R$ generated by $I$, usually denoted by $IR$. Obviously $I\subseteq IR\cap R'$. Consider the $R'$-module $(IR\cap R')/I$ and tensor it by $R$ over $R'$. Then you get $0$. By definition of faithful flatness, this implies that $(IR\cap R')/I=0$, so $IR\cap R'=I$. 
Note that flatness is not enough: consider $R'=\mathbb Z$, $R=\mathbb Q$ and $I=2\mathbb Z$ (cf. Mariano's comment).
{"set_name": "stack_exchange", "score": 4, "question_id": 78797}