On Thu, Feb 17, 2011 at 1:30 PM, Jeff <mailjeffw...@googlemail.com> wrote: > To be consistent with the assumption, though, I think that iimag(a) > should return zero. > > Can anyone comment?
Unfortunately, the assumptions system (still) is not well integrated with the Pynac code. When you do assume(a, 'real'), it sends that assumption to Maxima, and Sage/Pynac does not really know anything about it. In order for it to be "in effect", you have to send the expression to Maxima and ask it to simplify it: sage: var('a') a sage: assume(a, 'real') sage: imag(a) imag_part(a) sage: imag(a).simplify() 0 Additionally, you can specify the "domain" (complex, real, positive) of a variable within Pynac directly by doing sage: a = var('a', domain=RR) sage: imag(a) 0 However, this does not create the corresponding assumption within Maxima. --Mike -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org