# Revision history [back]

### Canonical maps between iterated polynomial rings

I have a very basic question, but I'm hoping to learn the "right" way to handle things before getting too far into a project.

I'm considering the following spaces.

R = PolynomialRing(QQ,2,'s')
P2 = ProjectiveSpace(2,R,'x')
TotalSpace = ProductProjectiveSpaces([2,1],QQ,names=['x','s'])


The coordinate ring of P2 is: "Multivariate Polynomial Ring in x0, x1, x2 over Multivariate Polynomial Ring in s0, s1 over Rational Field", whereas the coordinate ring of TotalSpace is "Multivariate Polynomial Ring in x0, x1, x2, s0, s1 over Rational Field". There is an obvious map P2.coordinate_ring() -> TotalSpace.coordinate_ring() (which is a map of QQ-algebras, but not R-algebras). How do I get my hands on this thing in Sage? The problem is that P2.coordinate_ring().gens() has only three elements (the xi's), and I'm not sure how to specify the images of the si's.

In general, is it correct to declare multiple rings like this, with the same names for the generators, if I would like the generators to be identified with each other? Or do I need to start with one and get the rest by adjoining things to that? How do I handle the "inject_variables()" commands in this situation?