Right, but ideally A(i, -i, j) and A(j, -i, i) *wouldn't unify.  *Actually
in this sort of case I suppose that they would because it could be that i
== j.  Generally speaking though unification variables do need match
consistently within a term.  (a, a) does not match to (1, 2).  Perhaps we
could consider all tensor indices on one side to be wild?


On Wed, Apr 2, 2014 at 12:50 PM, F. B. <franz.bona...@gmail.com> wrote:

>
>
> On Wednesday, April 2, 2014 7:35:45 PM UTC+2, Matthew wrote:
>>
>> Yeah, Wild subclasses from Expr, alas.  The logpy solution is to have a
>> dispatched isvar function.
>>
>> It seems to me that the all tensor indices are in some sense wild.
>>  Shouldn't A[i, -i] unify to A[j, -j] ?
>>
>
> Actually not, that was a particular case because A(i, -i) is A(j, -j), and
> this is also equivalent to a scalar (j and -j are summed over). A(i, j)
> instead is equivalent to a matrix. If A has associated components data,
> A(i, j).data is the N x N ndarray, and A(i, -i) is the trace.
>
> Consider A(i, -i, j) and A(j, -i, i), these are not equal and should not
> unify, not even if both i and j are wild. Of course a tensor constructor
> would raise an exception if an index is repeated more than twice.
>
> --
> 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 sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/d7b6882e-d224-48b9-8261-bd5ff81cb84c%40googlegroups.com<https://groups.google.com/d/msgid/sympy/d7b6882e-d224-48b9-8261-bd5ff81cb84c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAJ8oX-HT3JZoytpCALYsB9p91FdjwYfzQ5HF8seM2KgY%3D2Pf-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to