On Wed, 30 Dec 2009 10:56:42 -0800 (PST)
Håkan Granath <[email protected]> wrote:

> When using conjugate() in the symbolic ring some functions seem to
> forget the conjugate:
> 
> ----------------------------------------------------------------------
> | Sage Version 4.3, Release Date: 2009-12-24                         |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: var('z')
> z
> sage: m=z*z.conjugate()
> sage: m
> z*conjugate(z)
> sage: m.factor()
> z^2
> sage: m.simplify()
> z^2

The factor() and simplify() functions call maxima, which by default
assumes the variables are real. This is already in trac as #6862:

http://trac.sagemath.org/sage_trac/ticket/6862

The first comment on the ticket by Karl-Dieter shows a workaround:

sage: var('z')
z
sage: assume(z, 'complex')
sage: t = z*conjugate(z); t
z*conjugate(z)
sage: t.factor()
z*conjugate(z)
sage: t.simplify()
z*conjugate(z)


Happy new year!

Cheers,
Burcin

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to