Re: confused about asserting variable is element of
- To: mathgroup at smc.vnet.net
- Subject: [mg103089] Re: [mg103084] confused about asserting variable is element of
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Tue, 8 Sep 2009 05:54:45 -0400 (EDT)
- Reply-to: hanlonr at cox.net
funcs = {Simplify, FullSimplify, Refine}; Use Assuming Assuming[{Element[a, Reals]}, #[Im[a]]] & /@ funcs {0,0,0} Use the Assumptions option #[Im[a], Assumptions -> Element[a, Reals]] & /@ funcs {0,0,0} Use the Assumptions option short form #[Im[a], Element[a, Reals]] & /@ funcs {0,0,0} Or add your assumption to $Assumptions $Assumptions = Element[a, Reals]; #[Im[a]] & /@ funcs {0,0,0} Bob Hanlon ---- dushan <dushanm at spinn.net> wrote: ============= I'm still learning Mathematica (using 7.0.1) and don't understand Mathematica's response. After finally finding out how to assert that a variable is real, I tried to verify this by asking Mathematica to show me that it knew the imaginary part of the variable is zero. But I couldn't find a way to do that.. Here're my instructions: In[1]:= a (ESC)el(ESC) Reals Out[1]:= a (the element-of symbol) Reals In[2]:= ##Im[a] Out[2]:= Im[a] where '##' is any of {null, Refine[, Simplify[, FullSimplify[}. I also tried some other combinations, such as 'a^2 - Re[a]^2', but these didn't help either. What am I doing wrong? How do I verify such things? Thanks. - Dushan Mitrovich