问题内容: In Mathematica, I can do expression replacement like x^2 -> x which changes power 2 of x into x. I wonder if there are any similar functionalities in sage? R = PolynomialRing(ZZ, 2, "a") a = R.gens() (a[0] + a[1])^2 Out[173]: a0^2 + 2*a0*a1 […]