# How to convert a symmetric function into a polynomial on elementary symmetric functions?

By the Fundamental Theory of Symmetric Polynomials every symmetric polynomial in $\mathbb{C}[x_1,…,x_n]$ can be written uniquely in the elementary symmetric functions $e_1,…,e_n$. How can we obtain the expression if we are given a concrete symmetric polynomial on sagemath?

I want to know the value $(x^2-x-2)(y^2-y-2)(z^2-z-2)$ when $x+y+z=0, xy+yz+zx=-3, xyz=-1$.

I asked ChatGPT and searched on asksage , but I was unable to finally find what I was looking for.

The page I saw was for example : https://ask.sagemath.org/question/325...

First create a symmetric function from the polynomial, then convert it to the

`e`

basis. See https://doc.sagemath.org/html/en/refe...The link is too wide. Which command do you intend respectively?