Inconsistent behavior when ^ operates on an equation



On 8/9/2013 8:33 AM, Jorge Calvo wrote:
<snip>  (Thanks for being careful and showing the issue)

In summary,  (a=b)^n   "works"   but  n^(a=b)  is unchanged.  (Even if 
n=%e).
Probably not programmed already because ^  takes 2 arguments and mapping
over the arguments could be done various ways.  Presumably this was 
deliberate.

What would you like for (a=b)^(c=d)?

first   a^(c=d) = b^(c=d)  and then ...
( a^c=a^d )   = ( b^c = b^d)  ??
or
first   (a=b)^c = (a=b)^d  and then..
(a^c=b^c)  = (a^d=b^d)  ??

I'm not sure how the expressions (x=y)=(z=w) should
be interpreted,but they do not necessarily mean x=y=z=w...

In any case,

1. The source code file is probably simp.lisp and the function
  simpexpt.  the names pot and gr  are from Swedish, I think.
Something like potenz and grosse   for exponent and base.
The early version of this code dates back to 1963 or so..

2. Or, Try map(exp, a=b) which does what you want.
more generally  map(f, expression) can apply any function f, e.g. 
f(r):=sin(r^3)^2.
It might be nice to show students  map and even lambda.,
e.g.  map (lambda([r],sin(r^3)^2),   expression)

RJF