# $G$-invariant divisor in affine space

Suppose we have a linearly reductive group $$G$$ acting on $$X=\mathbb{A}^n_{\mathbb{C}}$$ and we have a closed subvariety $$Z=V(f_1,...,f_k)$$, where $$f_i$$ are $$G$$-invariant functions. If we further know that $$Z$$ is in fact a divisor, $$Z=V(f)$$ and $$(f)=(f_1,...,f_k)$$, can we conclude that $$f$$ itself can be chosen to be $$G$$-invariant?

I don't even know if it is possible to rule out the case where $$f$$ is a relative $$G$$-invariant, that is $$f(gx)=\chi (g) f(x)$$ for all $$g \in G, x \in X$$ and a character $$\chi$$ of $$G$$.

• I'm a bit confused about the question: are you requiring that the ideal generated by $f$ be equal to the ideal generated by $f_1,\dots,f_k$, as in the third line of your question, or are you only asking Supposing $Z$ is a $G$-stable divisor in affine space, is there a $G$-invariant polynomial with zero set $Z$? Commented Oct 11, 2019 at 13:36
• Now that I think about that, the latter would be good enough for me, because I am really interested in $\mathcal{O}^*(X-Z)$. Commented Oct 11, 2019 at 16:04
• I suppose you must also assume that there is some set of $G$-invariant polynomials with common zero set $Z$. Commented Oct 11, 2019 at 17:02