- g~mu_mu contraction returns Dim for general Lorentz indices and Dim-dimP
[ginac.git] / ginac / simp_lor.cpp
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();
                }
        }