I have three variables pw,pi,pf. I want to construct a matrix whose entries are members are rational polynomials in these variables and perform computations with this matrix (ultimately diagonalize it and obtain a general formula for its n-th power). But I want to do this computation symbolically, treating the three variables as transcendental elements adjoined to Q. How an I do this?