I want to define a function $F$ described as follows:
The input of $F$ is a polynomial such as
m*u*x^4*y + n*v*x^2*y^3
where $m$ and $n$ are constants, and $u$, $v$, $x$ and $y$ are variables.
Assume that $F$ receives a monomial. Then $F$ counts the number of exponents of $x$ and $y$ in the following way.
F(x^k*y^l) = (k, k+l).
F(m*u*x^k*y^l) = m*(k, k+l).
Here the constant $m$ is multiplied in front of the 2-tuple, while we ignore the variable $u$ because we just want to count the exponents of $x$ and $y$ only. Hence it holds that for instance
F(x^4) = (4,4) F(x^2y^3) = (2,5)
F(2xy^2) = 2(1,3).
Finally, suppose that $F$ receives a polynomial. In this case,
F(mux^4*y + nvx^2*y^3) = m*(4,5) + n*(2,5).
As a matter of fact, I prefer not to compute the result $m*(4,5) + n*(2,5)$ so that it becomes $(4m+2n, 5m+5n)$.
Could you help me in defining this function? Thank you in advance!