Improving the function 'at'



We have the following bug reports:

ID: 1184718 - AT needs some basic simplifications
ID: 2014941 - composition of 'at'
ID: 2556133 - "at" should do parallel substitutions
ID: 2998227 - spurious at(0,A=0)
ID: 2996106 - at(diff(f(x,y),x,1,y,1),[x=a,y=b]) is wrong

I have tried an implementation to overcome these reported bugs. The main
extension is a simplifying function simp-%at.

1. Basic simplifications:

(%i1) 'at(2,x=a);
(%o1) 2

(%i2) 'at(%pi,x=a);
(%o2) %pi

2. Compositon of 'at':

(%i3) at(diff(f(x),x),[x=b]);
(%o3) 'at('diff(f(x),x,1),[x = b])
(%i4) at(%,b=y);
(%o4) 'at('diff(f(x),x,1),[x = y])

3. More simplifications:

(%i5) diff(f(z),z);
(%o5) 'diff(f(z),z,1)
(%i6) at(%,x=1);
(%o6) 'diff(f(z),z,1)

4. Equations are sorted and are eliminated:

(%i7) diff(f(x,y),x,1,y,1);
(%o7) 'diff(f(x,y),x,1,y,1)
(%i8) at(%,[x=a,y=b]) - at(%,[y=b,x=a]);
(%o8) 0

(%i9) 'at(x*y,[y=b,x=a,z=c]);
(%o9) 'at(x*y,[x = a,y = b])

5. Parallel substitution:

(%i11) at(atan2(y^2+1,x),[y=%i,x=0]);
atan2: atan2(0,0) is undefined.
 -- an error. To debug this try: debugmode(true);

(%i12) at(atan2(y^2+1,x),[x=0,y=%i]);
atan2: atan2(0,0) is undefined.
 -- an error. To debug this try: debugmode(true);

The code can be further improved. The first implementation solves the
known problems. We have no problems with the testsuite and one new
correct result for the share_testsuite.

Any comments? Is the parallel substitution the desired behavior of at?
Is it of interest to have the reported types of simplifications?

Dieter Kaiser