# Question:General `convert/elsymfun` like SymPy's “symmetrize”?

## Question:General `convert/elsymfun` like SymPy's “symmetrize”?

Maple 2023

In an old question, @mbras asked for a "partial" ``convert/elsymfun``. However, SymPy's `sympy.polys.rings.PolyElement.symmetrize` seems to provide more examples that cannot be handled by the program that appeared in that question.
For instance,

```>>> from sympy import var
>>> var('x:z,p:r')
(x, y, z, p, q, r)
>>> from sympy.polys.polyfuncs import symmetrize
>>> symmetrize(x**2-(y**2+2**z),[y,x],formal=True,symbols=[p+p,q*q])[0]
-2**z - 4*p**2 + 2*q**2
>>> symmetrize(x*x*y+y*y*z+z*z*x,[y,x,z],formal=True,symbols=[p,q,r])
(0, x**2*y + x*z**2 + y**2*z, [(p, x + y + z), (q, x*y + x*z + y*z), (r, x*y*z)])```

Though I can execute Python scripts, and return results to Maple, can't the built-in `convert/elsymfun` be generalized to such expressions (in other words, write the polynomial part of input as a symmetric part and a remainder with (named, if need be) elementary symmetric polynomials)?

Besides, since any symmetric polynomial can also be expressed in terms of the complete symmetric polynomials, is there a similar `convert/cosymfun` command in Maple?

﻿