Dear all, As discussed in ginac-list the function expand_dummy_sum is broken. A fix is now in CVS. The code was also rather horrible, so I fixed that too. I will also port this change to the 1.3-branch. I guess that there are no binary compatibility issues involved in making STLT protected, as explained below? Otherwise somebody has to complain and then I can remove the "protected:"-line again. Another thing: What is the idea of the answer to the question "I wish to mix matrices and indexed objects. How can that be done?"? I see a very strange expression there with three indices that are apparently contracted. However, we don't want to encourage our users to start typing that kind of garbage, do we? More changes: * Removed the remark from the tutorial that scalar_products can be used for tensors of a rank greater then one. * Made the declaration of STLT in container.h protected. It can be quite useful to have access to this when writing derived types. * Improved comments and an error message. Best wishes, Chris
On Sat, 29 Jul 2006, Chris Dams wrote:
Another thing: What is the idea of the answer to the question "I wish to mix matrices and indexed objects. How can that be done?"? I see a very strange expression there with three indices that are apparently contracted. However, we don't want to encourage our users to start typing that kind of garbage, do we?
I see that this remark is was very clear. I was refering to the Mini-FAQ on the site.
Chris Dams wrote:
Another thing: What is the idea of the answer to the question "I wish to mix matrices and indexed objects. How can that be done?"? I see a very strange expression there with three indices that are apparently contracted. However, we don't want to encourage our users to start typing that kind of garbage, do we?
I see that this remark is was very clear. I was refering to the Mini-FAQ on the site.
CC'ing Sheplyakov Alexei since I'm not sure if he is on this list: <http://www.ginac.de/pipermail/ginac-list/2005-July/000697.html> -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Hello! On Sat Jul 29 00:36:24 CEST 2006, Chris Dams wrote:
Another thing: What is the idea of the answer to the question "I wish to mix matrices and indexed objects. How can that be done?"?
My idea was to explain that tensors (`indexed') and matrices/arrays are fundamentally different. People don't seem to realize that, see, e.g. http://www.ginac.de/pipermail/ginac-list/2005-June/000667.html http://www.cebix.net/pipermail/ginac-list/2004-December/000576.html
I see a very strange expression there with three indices that are apparently contracted. However, we don't want to encourage our users to start typing that kind of garbage, do we?
But even GiNaC developers *do* write such things, see: http://thep.physik.uni-mainz.de/pipermail/ginac-list/2005-April/000638.html Best regards, Alexei. -- All science is either physics or stamp collecting.
Dear Alexei, On Sun, 30 Jul 2006, Sheplyakov Alexei wrote:
But even GiNaC developers *do* write such things, see: http://thep.physik.uni-mainz.de/pipermail/ginac-list/2005-April/000638.html
Yes, unfortonately they do :-(. Also in code that went into GiNaC :-(. See http://www.ginac.de/pipermail/ginac-devel/2006-July/000985.html . IIRC it was also Vladimir who submitted the first patch to start doing automatic index renaming. However, if we start doing that we also should be careful that our indexed expressions make sense. This means that symbols in indices should occur once or twice in a product of indexed objects and if they occur twice in a varidx it should be in an up/down pair. For everything else there can be no guarantee whatsoever. It doesn't mean anyting. We shouldn't be showing that kind of stuff on our webpage. Best, Chris
On Sun, Jul 30, 2006 at 03:26:08PM +0200, Chris Dams wrote:
But even GiNaC developers *do* write such things, see: http://thep.physik.uni-mainz.de/pipermail/ginac-list/2005-April/000638.html
Yes, unfortonately they do :-(. Also in code that went into GiNaC :-(. See http://www.ginac.de/pipermail/ginac-devel/2006-July/000985.html . IIRC it was also Vladimir who submitted the first patch to start doing automatic index renaming.
However, if we start doing that we also should be careful that our indexed expressions make sense. This means that symbols in indices should occur once or twice in a product of indexed objects and if they occur twice in a varidx it should be in an up/down pair. Unfortunatelly, the `matrix' class does not follow the same rule :(.
For everything else there can be no guarantee whatsoever. It doesn't mean anyting. We shouldn't be showing that kind of stuff on our webpage.
OK, here is better (?) variant of FAQs: Q1: I am wondering how to convince GiNaC that the following to expressions are equal: [[-1,0],[0,1]~mu~mu * a~mu [[-1,0],[0,1].nu~mu * a~nu A: Actually, these expressions are meaningless. Indexed objects are tensors. Thus, symbols in indices should occur once or twice in a product of indexed objects and if they occur twice in a varidx it should be in an up/down pair. Q2: I'd like to know if is it possible to unroll indexed objects. As example, I would like to do something like this a_i a~i = (a_1)^2 + (a_2)^2 + (a_3)^2 + ... A: The indexed class (and most derived classes) is intended for tensor manipulation without referring to a particular basis. Thus, the indexed class is well suited for calculations involving (formally defined) tensor algebra of non-integer-dimensional space. This is particularly useful for evaluation of Feynman integrals in the framework of dimensional regularization. In that framework, unrolling a_i a^i to a_1^2 + a_2^2 + a_3^2 +... is not possible, since the dimension is not integer! Q3: I wish to mix matrices and indexed objects. How can that be done? A: The indexed class (and most derived classes) is intended for tensor manipulation without referring to a particular basis. On the other hand, the `matrix' class is _not_ treated as a tensor, so mixing matrices with indexed objects typically gives meaningless result. See also Q2. Best regards, Alexei. P.S.: There is no need to CC me, I read the list. -- All science is either physics or stamp collecting.
Dear all, As far as I know there are no operations in GiNaC that work for indexed objects in general dimensions but no longer if one imagines that they really are the standard tensors of finite dimension that everybody knows and loves. Because of this I do not see any problem with allowing users to interpret indexed expressions either way. We are not the Coq-project where the meaning of everything has to be defined and nailed down. Also, at the moment there is code in GiNaC to expand indexed expressions as in a.i[2]*b.i[2] -> a.1*b.1 + a.2*b.2. I even have to admit that I myself recently patched that code in CVS the 1.4 and have the intention to backport it to 1.3. I don't think that there is anything wrong with that kind of code. One simply shouldn't call it if one wants to do dimensional regularization. What I do have doubts about is giving varidxes to matrices. After all, if the varidxes are numeric the matrix that carries them will evaluate to the same matrix element no matter whether they are up or down. This is clearly strange and it begs the question what a varidx given to a matrix is useful for anyway. So, I would not object to the idea of forbidding giving varidxes to matrices. As for Vladimirs Q5 in ginac-list, I think it is just fine to use idxes in this case. The Einstein summation convention is very much meaningful in GiNaC, however, all index renaming code that I have written and/or patched assumes the restrictions that I mentioned before. If one wants to use A~mu*A.mu withous summing over mu, I suggest one defines a symbolic function nosum and uses A~nosum(mu)*A.nosum(mu). If one wants A.i*B.i*C.i with summing over indices, then Vladimirs idea of "labels" in combination with some class to be able to write something like sum(j, 0, n, A_j*B_j*C_j) should probably be useful. Best wishes, Chris
participants (3)
-
Chris Dams
-
Richard B. Kreckel
-
varg@theor.jinr.ru