Given a polynomial algebra in some variables, say Q[x1,x2,x3,x4], I'd like to define certain subalgebras that are generated by elements, e.g. x4, x23−x2x4. So I'd like to define Q[x4,x23−x2x4]. As this uses the variables of the bigger space, I assume it needs to be defined as a subalgebra. But I could not seem to find a way of doing so.
I'm actually just interested in the dimensions of the degree-graded spaces of the subalgebra if that makes it easier.