On Nov 25, 2008, at 11:46 PM, Tim Lahey wrote:

> On Nov 26, 2008, at 2:14 AM, Robert Bradshaw wrote:
>
>>
>> Yes, there is.
>>
>> sage: var('a')
>> sage: assume(a>=0)
>> sage: sqrt(a^2)
>> a
>>
>
> Thanks.
>
> Is there a way to do this for just a single call?
> Or is one supposed to just clear the assumption after the
> fact (I think the latter is done with forget() if I read
> the documentation correctly)?

No, one needs to use forget. This really should be made into a  
context, so one could do

with a > 0:
        print sqrt(a^2)
# here the assumption is forgotten



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to