On Tuesday, 19 July 2016 20:49:19 UTC+2, Aaron Meurer wrote:
>
> IMHO, has() specifically should operate symbolically (no knowledge of 
> mathematics). 
>
>
Well, it's not really about knowledge of mathematics. It's about matching 
the unapplied element or the element applied with another argument.
 

> This old pull request seems relevant here 
> https://github.com/sympy/sympy/pull/7437. I think having methods for 
> objects to tell how to differentiate themselves is better than hacking 
> around the implementation details of the current implementation.
>
> I think f(x).diff(f(y)) should return 0, for the same reason that 
> x.diff(y) should return 0. We've had some in-depth discussions on what 
> differentiating with respect to a function should mean in SymPy, and the 
> thing we agreed on is that expr.diff(f(x)) should be the same as 
> expr.xreplace({f(x): y}).diff(y).xreplace({y: f(x)}). Specifically, 
> xreplace means it only looks at things structurally. 
>
>
OK, what about extending *Indexed* to support continuous indexing? *Indexed* 
is meant to represent a set of symbols, I think we could add a 
*continuous=True/False 
*option defaulting to *False* and have something like this:

>>> A = Indexed("A")
>>> A[i].diff(A[j])
KroneckerDelta(i, j)
>>> B = Indexed("B", continuous=True)
>>> var("x, y", real=True)
>>> B[x].diff(B[y])
DiracDelta(x - y)

The *KroneckerDelta *is already in the development branch.

Kalevi, I think that generalizing the Dirac delta to complex numbers is a 
bit out of scope. Besides, do SymPy users really need it?

-- 
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/2b2f5dac-01d8-44f3-942c-dfb301757dcd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to