I think it's an easy question, but I can't find how to do it correctly.
substpol
works almost as I need, but doubles the polynomial degree.
For example, with :
G(z)=1+2*z+3*z^2+O(z^5)
I got:
substpol(1+2*z^2+3*z^3 + O(z^5),z,z^2)
%20 = 1 + 2*z^4 + 3*z^6 + O(z^10)
but I would like to keep the result in O(z^5):
1 + 2*z^4 + O(z^5)