For a multivariate polynomial with symbolic coefficients such as

p = a*x + b*x^2*y + c*x*y

I require in my code to be able to use functions similar to those in MultivariatePolynomials such as length(p), degree(p,x), coefficient(p), terms(p) etc however I am struggling to do this. So far i have tried:

using AbstractAlgebra

S, (a,b,c) = PolynomialRing(QQ, [“a”,“b”,“c”])

T, (x,y) = PolynomialRing(S, [“x”,“y”])

p = a*x + b*x^2*y + c*x*y

However I cant get any of the equivalent functions in AbstractAlgebra to work. Any help would be greatly appreciated!