a^n*b^n => (ab)^n



> You could experiment with something like the untested:

A crunch that catches more cases:

crunch(l) := block([x,n,q:1,inflag : true],
  l : map('args, l),
  l : map(lambda([s], if orderlessp(second(s),-second(s)) then [1/first(s), -second(s)] else s), l),
  l : sort(l, lambda([a,b], orderlessp(second(a),second(b)))),
  while l # [] do (
     [x,n]: pop(l),
     while l # [] and second(first(l))=n do (
        x : x * first(pop(l))),
      q : q * ratsimp(x)^n),
   q)$


Example:

(%i6) combine_powers(-%pi * x^a* y^a / (2013 * z^a * w^-a));
(%o6) -(%pi*((w*x*y)/z)^a)/2013

--Barton