On Wed, Sep 4, 2013 at 2:54 PM, Ondřej Čertík <[email protected]> wrote: > On Wed, Sep 4, 2013 at 2:40 PM, F. B. <[email protected]> wrote: >> >> On Wednesday, September 4, 2013 5:34:32 AM UTC+2, Ondřej Čertík wrote: >>> >>> Here is another idea, but maybe it does not work for some reason. >>> Why cannot we represent the gamma matrices as 4x4 symbolic matrices? >>> Then the whole expression is just matrix multiplication and at the end >>> you end up with a 4x4 symbolic matrix (with possibly complicated entries). >>> >>> This means that intermediate expressions will necessarily be >>> complex/unreadable. >>> But the end expression which typically involves a trace might be ok. >>> Though >>> I am aware that many times you end up with contracted vectors like >>> momentum, >>> and we might get a messy formula instead. >>> >> >> Well, why? The first part in abstract handling of spinors (gamma matrix >> reduction) has been done. > > Right now, you can only simplify gamma matrices themselves: > > https://github.com/Upabjojr/sympy/blob/c0d86e204541f303d287deba39d5d102f67e7d7a/sympy/physics/hep/tests/test_gamma_matrices.py > > so we still need to implement cases when the gamma matrices are > contracted with vectors or partial derivatives. > Doing 4x4 matrices would handle those automatically. > >> I tried some months ago to implement matrix-based implementation of spinors, >> following Schroeder's textbook, but it was a complete mess, simplify( ) was >> unable to simplify expressions (they were too complex :( ). > > Yes, I had the same experience when I played with it. And one solution > is to remove > the freedom in the definition of the 4x4 matrices (i.e. there are many > equivalent representations) by using the commutation relations. > As you did. > >> >> Abstract gamma matrices can be easily traced-out to Minkowski products (just >> a recursion relation). What we need is to solve the bugs in the tensor >> module, consider that 0*A(i0) == 0 returns False instead of True. There are >> serious issues in the tensor module. > > Ok, let's fix it. > >> >>> >>> > What should be done now >>> > >>> > Make the tensor module SymPy-compliant, and have the test_args work. If >>> > this >>> > step is not completed, it is hard to create algorithms to handle >>> > expressions >>> > of mixed tensor types. >>> >>> It sounds good to me. Do you know how to get it done, or did you get >>> stuck at some issue in your PR? >> >> >> I have a clear plan in my mind, but Krastanov (who was following my PRs), is >> temporarily not available, so I am not able to merge them to the master >> branch. > > Please ping me --- I just redid my notification handling, so I should receive > notifications whenever you do any work. Please ping me anytime there > is something to merge/review. I am very excited about this work and > want to get this in. > >> >> Basically, what I did: >> >> I wrote a first PR to make the tensor module test_args compliant, it >> succeeded, but the code was a real mess. Here is the link: >> https://github.com/sympy/sympy/pull/2177 > > This needs rebase. > >> The problem is that there are two kinds of tensor representations, external >> representation (which should be in *args) and internal (which is just a >> useful representation for internal algorithms, it is not human readable). >> All code is messed up, sometimes it uses the internal repr, sometimes the >> external. >> To solve this issue, I created a new object: TIDS. This object has to store >> all algorithms concerning tensor indices (contraction, sorting and so on). >> TIDS uses the internal repr, while the already-existing TensExpr will use >> the external repr, with a link to a TIDS instance. Here the PR: >> https://github.com/sympy/sympy/pull/2338 >> This should is partial work, I was waiting for some project admin to >> review/merge. > > This also needs rebase. I am reviewing it now and leave comments on the PR.
This is in. Franz, what should be the next step? Ondrej > >> >> I stopped working because there was no one following, in any case if you can > > I really apologize. Let's get this done and please ping me if I don't respond > within 24h. > >> assist me, I can easily complete this PR. Unfortunately issues are not >> solved by this PR, it should be followed by another PR based on #2177, >> shortly after merging. >> >> I think it is urgent to fix issues on the tensor module, otherwise it blocks >> all my projects to go on with QFT. Just consider that .subs( ) does not >> correctly work on tensors... > > Let's get it fixed. > > Ondrej -- 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 http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
