On Fri, Nov 20, 2009 at 7:11 AM, Robert Dodier <[email protected]> wrote:
> On Nov 19, 5:31 pm, Mike Witt <[email protected]> wrote:
>
>> sage: assume(n, 'odd')
>> sage: assumptions()
>> [n is odd]
>> sage: foo=sin((-1)*n*pi)
>> sage: foo.simplify()
>> 0
>> sage: forget(n, 'odd')
>> sage: assumptions()
>> []
>> sage: foo=sin((-1)*n*pi)
>> sage: foo.simplify()
>> 0
>
> I'm guessing that Sage punts to Maxima for this stuff.
> For better or worse (mostly worse) there are different ways
> to declare & undeclare stuff in Maxima.
> For the "odd" declaration, it's declare(n, odd) and remove(n, odd).
> I guess assume(n, 'odd') was translated to declare(n, odd) but
> forget(n, 'odd') was not translated to remove(n, odd).
> I don't know much about Sage so I could be way off here.
I think you're exactly 100% on target here, actually. I think this
partly because I co-wrote the Sage assumptions-on-top-of-maxima, and
"remove(n,odd)" looks like something I've never heard of.
> A long-range goal for me anyway is to unify various declarations.
> I see a couple of possibilities. One is FOO(P(x)) where P is some
> predicate e.g. x is an integer, x is odd, x is less than 10, ...
> (and FOO is a suitable imperative like "assume", "let", or "declare").
> The other is FOO(x in A) where A is a set, which could be a symbol
> like Z, R, or C, or a description like {x s.t. x < 10} or an
> enumerated set.
> i guess both could be recognized but I wonder whether one or the other
> should be the canonical representation. (I wouldn't be surprised if a
> lot
> of ink has been spilled about this problem but I am pretty naive.)
> If anyone has an opinion about it I would be interested to hear it.
>
> FWIW
>
> Robert Dodier
> (a Maxima developer)
Thanks!
William
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org