1 | initial version |
I think I was 90% of the way to the answer. Instead of defining equations by eq = pol1 == pol2
, I simply defined pol1
and pol2
as separate variables as
var('k1', latex_name=r'\kappa_1')
var('k2', latex_name=r'\kappa_2')
var('k3', latex_name=r'\kappa_3')
var('k4', latex_name=r'\kappa_4')
F.<eta_x,eta_y,D_x,D_y> = FreeAlgebra(SR,4)
pol1 = (k1*D_x^2 + k2*D_y^2)*eta_x + (k3*D_x*D_y + k4*D_y*D_x)*eta_y
pol2 = eta_x
I could then substitute new non-commuting variables by making another FreeAlgebra and substituting in all the generators by
G.<eta_p,eta_m,D_p,D_m> = FreeAlgebra(SR,4)
pol2_subs = pol2.subs(eta_x = (eta_p + eta_m)/sqrt(2))
pol1_subs = pol1.subs(eta_x = (eta_p + eta_m)/sqrt(2), eta_y = I*(-eta_p + eta_m)/sqrt(2), D_x = (D_p + D_m)/(q*sqrt(2)), D_y = I*(-D_p + D_m)/(q*sqrt(2))
I defined several equations by defining more polynomial expressions and was able to add and subtract them in the normal way. The only problem I had was that I now wasn't able to substitute the normal k1
variables for some reason. But I was able to solve my problem through this method anyway.