In maple there is a function called "algsubs" which allows me to use an expression (usually algebraic) on a given expression. For instance
Code : Tout sélectionner
algsubs(l2^2=1,l2^2+l2^3)
Is there a similar thing in XCas/giac (without going into complex method like grobner basis). For easy conditions this can be done by polynomial remainder, here is a giacpy code
Code : Tout sélectionner
from giacpy import giac, rem
f=giac("l2**2+l2**3")
print rem(f,"l2**2-1","l2")