- g~mu_mu contraction returns Dim for general Lorentz indices and Dim-dimP
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 21 Feb 2001 18:40:15 +0000 (18:40 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 21 Feb 2001 18:40:15 +0000 (18:40 +0000)
  for orthogonal-only indices

ginac/lortensor.cpp
ginac/simp_lor.cpp

index f9d5f44a8196be1eadbfce0c064f7cab21c33ccf..e8f4f87312d9070d5e2b826affbeddb40f60bf37 100644 (file)
@@ -321,7 +321,10 @@ ex lortensor::eval(int level) const
                                return _ex0();
                        }
                } else if (idx1.is_symbolic() && idx1.is_co_contra_pair(idx2)) {
-                       return Dim();
+                       if (idx1.is_orthogonal_only())
+                               return Dim() - idx1.get_dim_parallel_space();
+                       else
+                               return Dim();
                }
        }
        return this -> hold();
index 3454b5a0166eb011b506eb3488f2aef69c0ab917..ed79d7535746b3bc65ac3e2d0ae42cced4931f3c 100644 (file)
@@ -233,9 +233,11 @@ ex simp_lor::eval(int level) const
                                // at least one off-diagonal
                                return _ex0();
                        }
-               } else if (idx1.is_symbolic() &&
-                          idx1.is_co_contra_pair(idx2)) {
-                       return Dim() - 2;
+               } else if (idx1.is_symbolic() && idx1.is_co_contra_pair(idx2)) {
+                       if (idx1.is_orthogonal_only())
+                               return Dim() - idx1.get_dim_parallel_space();
+                       else
+                               return Dim();
                }
        }