Inconsistent behavior when ^ operates on an equation



Maybe a simple utility would be a workaround:

(%i33) distribute_power(e) := subst("^" = lambda([a,b], if ?mequalp(a) then map(lambda([s], s^b), a) else funmake("^",[a,b])), e)$

  (%i34) distribute_power((a=-b)^z);
  (%o34) a^z=(-b)^z

  (%i35) distribute_power((p=q)/b);
  (%o35) p/b=q/b

Possibly distribute_power should locally set the value of inflag--not sure.

--Barton