I am not sure where to put this topic, and I am still fairly new to Julia. So I put it in “New to Julia”.
I was playing around with symbolic-utils a little. I like the straight forward rule-based rewriting approach.
But I found no way to introduce new variables in the rewrite rules.
xxx = x*(y_2_3)+Term(y_2_3,x,x)
Replace all cubic polynomials with a quadratic one by introducing a new variable y and an additional Term. Preferably, the new variable name should reflect the variables it did replace.
A simpler example:
x^2+x^2 = (r_1_2)^2
Is there any easy way to do this?