How does one define a variable in sage and make sure the it's
conjugate is the same as the variable itself?
Thanks,
Mani chandra
Hi,
Mani chandra wrote:
> Hi,
>
> How does one define a variable in sage and make sure the it's
> conjugate is the same as the variable itself?
>
> Thanks,
> Mani chandra
>
> >
>
>
Perhaps I wasn't specific.
sage: var('a')
sage: a.conjugate()
conjugate(a)
What I want is for SAGE to return a, instead of conjugate(a). Does "var"
take any arguments that forces a variable to be real?
Thanking you,
Mani chandra
http://trac.sagemath.org/sage_trac/ticket/6559
Mani chandra
>
> Mani chandra wrote:
>> Hi,
>>
>> How does one define a variable in sage and make sure the it's
>> conjugate is the same as the variable itself?
>>
>> Thanks,
>> Mani chandra
>>
>>>
>>
>>
> Hi,
>
> Perhaps I wasn't specific.
>
> sage: var('a')
> sage: a.conjugate()
> conjugate(a)
>
> What I want is for SAGE to return a, instead of conjugate(a). Does
> "var"
> take any arguments that forces a variable to be real?
You have to invoke simplify for it to look at assumptions.
sage: var('a')
sage: assume(a, 'real')
sage: a.conjugate().simplify()
a
- Robert
On Sat, Aug 22, 2009 at 2:28 PM, Robert
Bradshaw<robe...@math.washington.edu> wrote:
> You have to invoke simplify for it to look at assumptions.
>
> sage: var('a')
> sage: assume(a, 'real')
> sage: a.conjugate().simplify()
> a
I guess, we should be careful here. When you invoke ".simplify()"
the expression is passed to maxima. For maxima, default domain
for variables is *real* where as for pynac it is *complex*.
So you will get above answer without "assume(a, 'real')".
I think, we should forward this issue to sage-devel as it seems
to be a dangerous mixing.
Cheers,
Golam
I thought we used to put maxima in complex mode, do we not do that
anymore? I guess more things got shook up in the symbolic switchover
than I thought.
- Robert
Hmm... guess its a bug (or missunderstanding) in domain: complex.
- Robert
Just wanted to ask, since you're the release manager for the next
release, do you think ticket no. 6559 will make it?
Thanking you,
Mani chandra