Improved dummy index renaming -> clifford exam fails
Dear Vladimir,
CD> Here one CD> clearly sees that neither contractiong g~mu~mu nor g.mu.mu makes CD> any sense.
The mentioned expression indexed(squared_metric, alpha, alpha) did not stand for a contractions, it was simply an abbreviation for pow(e.alpha,4)=pow(g.alpha.alpha,2). However I will rewrite clifford.cpp without this sort of "optimisation".
Yes, the this interpretation was never in agreement with other code that has been in GiNaC for ages. The question has to be asked how you can guarantee that this alpha is not to be summed over? What if somewhere else in the expression there is a v~alpha? Then we would have an Einstein summation convention involving three indices, however, GiNaC always had the convention that dummy indices were to be contracted over in pairs. Also not that B~mu~mu + 1 has yielded an exception as long as I can remember when, for instance, asked what its free indices are. If you decide to go with the idea of interpreting a matrix that is given as metric to clifford objects as really being the metric in the sense as is common in physics, I have an even better optimisation for you. And it doesn't even depend on the metric being anti-commuting or not. Realizing that in that case the metric with up-indices is the inverse of the metric with down-indices, we arive at the identity e~mu e~alpha e.mu = (2 - dim) * e~alpha, where dim is the number of row/columns of the metric.
CD> This is why I was wondering in an CD> earlier email whether we should even allow matrices to carry CD> indices with a variance. If g is the metric tensor g with up CD> indices should be the inverse of g with down indices.
Why not use the agreement from the second sentence to make sense for the first one.
That certainly is a possibility. However, If I create M = [[2, 0], [0, 2]] then one of M.1.1 and M~1~1 should evaluate into 2 and the other into 1/2. Which of the two? Seems a bit arbitrary and confusing to me. Besides that, what I just wrote is not even true. It is only true if M is considered to be the metric. Not all matrices are the metric... And who says what matrix is the metric and what matrix is not... IMO it would be much less problematic to simply disallow varidxes as indices of matrices. Or maybe GiNaC should have the possibility to globally set what the metric is considered to be. Not that I would be very much in favour of that. It makes one think "global variable... blech...".
CD> If g is the metric tensor, it automatically obeys g.i~j = CD> delta.i~j. Actually, this simplification is done automatically CD> in GiNaC. It is in the function ex CD> tensmetric::eval_indexed(const basic & i) const.
So I only need take care on it if metric is given by a matrix?
Well, if you are really set on giving clifford units with a matrix as metric varidxes, I suppose the answer is yes. Best wishes, Chris
"CD" == Chris Dams <Chris.Dams@mi.infn.it> writes: CD> pairs. Also not that B~mu~mu + 1 has yielded an exception as CD> long as I can remember when, for instance, asked what its free CD> indices are.
Taking all that in account I am deleting the entire "anticommuting" portion from the clifford.cpp. It looks like the performance is not seriously affected by this. CD> the metric with up-indices is the inverse of the metric with CD> down-indices, we arive at the identity CD> e~mu e~alpha e.mu = (2 - dim) * e~alpha, CD> where dim is the number of row/columns of the metric. I saw this rule in the diracgamma contraction but have doubts that it will be simple as that for generic Clifford units with metric diag_matrix(1,-1,0) for example. Best, -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
Dear Vladimir, On Mon, 14 Aug 2006, Vladimir Kisil wrote:
CD> the metric with up-indices is the inverse of the metric with CD> down-indices, we arive at the identity CD> e~mu e~alpha e.mu = (2 - dim) * e~alpha, CD> where dim is the number of row/columns of the metric.
I saw this rule in the diracgamma contraction but have doubts that it will be simple as that for generic Clifford units with metric diag_matrix(1,-1,0) for example.
Let us take that to be the metric for down-indices for definiteness. Now we are going to run into trouble if we ask what the result is if it is given up-indices. That should be the inverse... not such a good idea. Furthermore, from e.mu = g.mu.nu e~nu it follows that e.3 = 0, no matter what the e~mu are (it is actually rather unclear what e~3 would/should be in this case). Maybe it just wasn't your intention to take varidxes to mean the same as is common among physicists. This is why I also mentioned the possibility that clifford objects with a matrix as metric should take normal idxes instead of varidxes. Or even the possibility that matrices should only take normal indices and not varidxes. Best wishes, Chris
Dear All, I am including a patch (in fact a surgery ;-) which eliminates "anticommuting" property from clifford.cpp and all related code. As a result exam_clifford is working again.
"CD" == Chris Dams <Chris.Dams@mi.infn.it> writes: CD> same as is common among physicists. This is why I also mentioned CD> the possibility that clifford objects with a matrix as metric CD> should take normal idxes instead of varidxes.
This is now permitted but is not mandatory. Thus it is up to a user to chose a correct one in a particular case. Best wishes, Vladimir -- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk -- www: http://maths.leeds.ac.uk/~kisilv/
participants (2)
-
Chris Dams
-
Vladimir Kisil