On Tuesday, December 15, 2015 at 2:06:44 PM UTC-8, vdelecroix wrote:
>
> Now if I restart a new Sage session and start with a failing maxima 
> command then the behavior is different 
>
> sage: var('k', 'n') 
> sage: sum(binomial(n-k,k), k, 0, n) 
> Traceback (most recent call last): 
> ... 
>
> ValueError: ...
> sage: assumptions() 
> [] 
> sage: bool(n >= 0) 
> False 
> sage: assume(n, 'integer') 
> sage: assumptions() 
> [n is integer] 
> sage: bool(n >= 0)   # WTF!? 
> True 
> sage: assume(n >= 0) 
> Traceback (most recent call last): 
> ... 
>
 I can confirm. This might have to do with the following:

sage: var("n,k");
sage:  maxima_calculus("properties(_SAGE_VAR_n);")
[]
sage: sum(binomial(n-k,k), k, 0, n)
ValueError: ...
sage:  maxima_calculus("properties(_SAGE_VAR_n);")
[\"databaseinfo\",_SAGE_VAR_n>=g2451]

So something in sage's "sum" command causes maxima to store a property on 
"n". It is possible we're triggering an error in maxima here: Maxima does 
have a "scoping" system for assumptions that should allow it to temporarily 
make assumptions for the benefit of local simplfications and then later 
restore the original assumptions database state. It could be that we're 
calling code in maxima that should use that machinery but doesn't.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to