Question: Is it possible in Maple to name variables according to their content?

Hello everybody,

I'm a newbie in Maple, but as far as I read so far this does not seem to be a trivial question.

I have a very large symbolic expression in Maple, where several terms in the form


appear, with  i = 1, ... , 5 and j = 1, ..., 5. This means that there will appear x*yx^2*yx*y^2, ..., x^5*y^5. For each possible combination (i,j) of powers, I would like to have a separate variable whose name depends on those powers, e.g., m_ij. 

Is there a way to do that in a single-line definition, without explicitly define 25 different variables?

If this is not possible, assuming I define all 25 variables I need in advance, would it be possible  substitute them in my large expression, wherever they occur? E.g., assuming to have the following expressions

w = x^3*y^2 + x^2*y^3

m_32 = x^3*y^2

m_23 = x^2*y^3

I would like to get the following

w = m_23 + m_32


Thank you in advance for your replies!

Please Wait...