Specification of ratsubst WAS: Forcing substitution
Subject: Specification of ratsubst WAS: Forcing substitution
From: Stavros Macrakis
Date: Mon, 9 Jun 2008 13:32:30 -0400
ratsubst does indeed solve Owlett's problem.
But I'd be interested to know what exactly the *specification* of ratsubst
is. Consider, for example:
ratsubst( r, a+b, a*2+b ) => r+a
ratsubst( r, a+b, a+b*2 ) => 2*r-a
Why the assymmetry? Presumably something to do with variable ordering, but
I can't get it to act differently if I change ratvars or use CREs with
well-defined variable ordering, e.g. rat(a+b*2,a,b).
-s