| 1 | initial version |
You will have to struggle with wildcards, see examples on the page:
https://doc.sagemath.org/html/en/reference/calculus/sage/symbolic/expression.html#sage.symbolic.expression.Expression.match
If the substitution involves both right-hand side and left-hand side of the equation expr, first put everything on a single side:
e = expr.rhs() - expr.lhs() == 0
or
e = expr.rhs() / expr.lhs() == 1
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.