I have done a lot of variable replacements in order to simplify equation so that it can be solved by mathematica command. After getting the solution I have to go backwards in Replace All. Is there a short cut for this? For example,
r1=ReplaceAll[expr,a->b];
r2=ReplaceAll[r1,c->d];
r3=ReplaceAll[r2,e->f];
r4=ReplaceAll[r3,g->h];
Solution=Solve[r4];
r5=ReplaceAll[Solution,h->g];
r6=ReplaceAll[r5,f->e];
r7=ReplaceAll[r6,d->c];
answer=ReplaceAll[r7,b->a];
Is there a quick way to go backward in ReplaceAll, something like Evaluate (it does not work)?
Thanks in advance.
expr
. $\endgroup$g->h
followed byh->g
can't be reversed in general because it results in loss of information if the original expression contains bothg
andh
. $\endgroup$