P-primary Monomial Ideal Let $P=(x_{1},...,x_{r})\subset S=K[x_{1},...,x_{n}].$ Show that a monomial ideal $Q$ is $P$-primary if and only if there exists a monomial ideal $Q'\subset T=K[x_{1},...,x_{r}]$ such that dim$_{K}T/Q'<\infty$ and $Q=Q'S.$ 
I have proved the implication $(\Leftarrow)$. I need help in proving $(\Rightarrow)$. Let $Q$ is $P$-primary, it follows that Ass$(S/Q)=\{P\}$. Thus there exists a monomial $w\in S\setminus Q$ such that $P=Q:w$. Hence $x_{i}w\in Q$ for all $i=1,...,r$. Now how to prove the existance of $Q'$. Any help please?
 A: If $Q$ is $P$-primary, then $\sqrt Q=(x_{1},...,x_{r})$, so there exist $k_i\ge 1$ minimal with the property that $x_i^{k_i}\in Q$. This shows that $x_i^{k_i}$ belongs to the minimal system of generators of $Q$. Now let's see what's going on with the others generators from the minimal system: if $m$ is such a generator, then if $x_j\mid m$ for $j>r$ we must have $x_j\in(x_1,\dots,x_r)$, a contradiction. This shows that the generating monomials of $Q$ contains only the first $r$ variables and denote by $Q'$ the ideal of $k[x_1,\dots,x_r]$ generated by the minimal system of generators of $Q$. Then $Q=Q'S$ and $\dim_{K}T/Q'<\infty$ (since $x_i^{k_i}\in Q'$ for all $i=1,\dots,r$). 
Edit. If $x_j\mid m$, then $m=x_jm'$ and since $m\in Q$ there are two possibilities: $m'\in Q$ or $m'\notin Q$ and then $x_j\in\sqrt Q$. If $m'\in Q$, then $m$ can't be part of the minimal system of generators of $Q$, since in the monomial case minimal means minimal with respect to divisibility (see Herzog and Hibi, Monomial Ideals, Proposition 1.1.6.). 
