On Tuesday, 26 September 2017 18:08:07 UTC-4, Aaron Meurer wrote:
>
> For free_symbols, I'm not so sure. It seems to me that the correct 
> free_symbols should be {A[i], i}. i is indeed free in the expression.


https://github.com/sympy/sympy/pull/13360


> This is perhaps a bit confusing for Order since it isn't a continuous 
> variable, but consider something like a summation. 


Now I get:
In [5]: Order(A[i])
Out[5]: O(A[i], A, i, A[i])

I think we need a variation of *free_symbols* that stops at *A[i]* without 
going further into *{A, i}*.



> I don't know if it's worth having a separate free_symbols, since 
> free_symbols is already a mathematically defined concept.


Well, the question is how to behave in case of composite objects, that is 
when you reach an object that is itself a free symbol, but contains other 
free symbols inside of it.

The fact 
> that a summation or integration variable is not free is a mathematical 
> property, not a property of the expression tree. Could we just make it 
> so that A[i].free_symbols returns {A[i], i}?
>

We need to make it return *{A[i], A, i} *as *A* may be an array.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/270865d9-77c5-47fd-b7bf-a0d41cb62a2f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to