I was experimenting with some basic math and wanted to see if the Kernel would evaluate the following correctly:
a^(p/q) == Power[a^p, q^-1]
It returns unevaluated, then I tried:
a^(p/q) === Power[a^p, q^-1]
it returns False.
So what is the Kernel needing to evaluate True. Btw, should I have used Surd??
Needed to use Assuming?? Elements? I would have thought after 20+ yrs this powers relation be a simple thing to symbolically confirm.
Correct, but Whoa, why need to use that? Kernel need to expand both sides internally before testing the lhs/rhs are the same? I would have thought the internal pattern matching over the past decades would have understood what am seeking not needing to expand anything. Is this a limitation of design? Thanks
There are some assumptions that one needs to make to have your statement be true. Those assumptions (and consequences) are listed in the documentation for PowerExpand. And to show that assumptions about a and p make things work consider the following:
Simplify[Power[a^p, q^-1], Assumptions -> {a > 0, p > 0}]
Simplify[Power[a^p, q^-1], Assumptions -> {a > 0, p < 0}]
Simplify[Power[a^p, q^-1], Assumptions -> {a > 0, p < 0 || p > 0}]
with all of those resulting in a^(p/q). Also writing you own rules works:
Cool, and very instructive, thank you; much to study. However, I was expecting the kernel to understand the original statement without the deep contextualizing used. I wanted to take a simple high school math relationship and confirm its truth within Mathematica.
Note:
Nope again. And it appears SameQ does not understand Assumptions (Assuming ref nb). Should I had to have read PowerExpand or Simplify before proving that the comparison is true? Am asking a larger question for those expecting Mathematica to just get it right without the deep understanding of how Mathematica works. Translating from a standard textbook on math appears much harder than I realized.
The “simple high school math” uses unstated simplifying assumptions. Mathematica assumes (generally) that all variables could be complex numbers and therefore doesn’t always simplify as one would expect from simple high school math.
Right. Understand better. So testing for SameQ requires spelling out the assumptions to prove the lhs===rhs. But from my reading SameQ does not use Assuming/Assumptions; or did I misunderstand.
I and others have wanted better tools for proofs and proving within Mathematica for a long time. I would have expected by now the pattern some of the high school math states be parsed better in Mathematica. PowerExpand was out of left field for proving; there are no examples of using it for proving. Learned a cool insight.
I always tell my students that it is very dangerous to elevate a negative basis to a non-integer exponent, because the familiar algebraic rules break down. Is seems to be a little-known issue.
So this returns evaluated but still not True. But notice the slight change in the typesetting when its evaluate, could that prevent the failure. I tried various Assumptions, nothing works.
So from what I read about Surds, I should use that instead of Power? Since it gives real-valued nth root of x.
Oh! back to the negative raised… Thats what I started out with. So what Mathematica gave via copy as plaintext and pasted was correct all along? Suggestions on a workflow going forward?
well, it still gives False even with PowerExpand. I guess only visually symbolically I state its true. Is it my poor understanding using Mathematica or Mathematica can’t really do it at this time? Or need to load up on a long list of assumptions?
Thank you all for sharing my wrestling with Mma stating the basics, at least for now on Roots.
I put a notebook together to study. Suggestions and corrections welcomed.
I understand once you move into typeset statements, it can get dicey how Mma understands the statements; FullForm versions are often the best way.
The ref nb on PowerExpand needs to have examples of using it in proofs/proving.
One of my fav teachers told me, you should back to re-study the basics every 5 or 10 yrs.
I still think mma should have understood my truth testing without having a deep knowledge of other functions.