]> www.ginac.de Git - ginac.git/blobdiff - check/exam_indexed.cpp
- The dimension of indices is now treated as a kind of "effective" dimension
[ginac.git] / check / exam_indexed.cpp
index 4ba1794bcdba507b2bb00e5f0ba57cb6211ea514..4d09bdff625303e7badfb2427b9c2dc30e8ee312 100644 (file)
@@ -155,7 +155,7 @@ static unsigned symmetry_check(void)
        unsigned result = 0;
 
        idx i(symbol("i"), 3), j(symbol("j"), 3), k(symbol("k"), 3), l(symbol("l"), 3);
-       symbol A("A"), B("B");
+       symbol A("A"), B("B"), C("C");
        ex e;
 
        result += check_equal(indexed(A, sy_symm(), i, j), indexed(A, sy_symm(), j, i));
@@ -187,6 +187,9 @@ static unsigned symmetry_check(void)
        result += check_equal(symmetrize(e), 0);
        result += check_equal(antisymmetrize(e), e);
 
+       e = (indexed(A, sy_anti(), i, j, k, l) * (indexed(B, j) * indexed(C, k) + indexed(B, k) * indexed(C, j)) + indexed(B, i, l)).expand();
+       result += check_equal_simplify(e, indexed(B, i, l));
+
        return result;
 }
 
@@ -337,7 +340,7 @@ static unsigned spinor_check(void)
 
 static unsigned dummy_check(void)
 {
-       // check dummy index renaming
+       // check dummy index renaming/repositioning
 
        unsigned result = 0;
 
@@ -356,6 +359,15 @@ static unsigned dummy_check(void)
        e = indexed(p, mu, mu.toggle_variance()) - indexed(p, nu, nu.toggle_variance());
        result += check_equal_simplify(e, 0);
 
+       e = indexed(p, mu.toggle_variance(), nu, mu) * indexed(q, i)
+         - indexed(p, mu, nu, mu.toggle_variance()) * indexed(q, i);
+       result += check_equal_simplify(e, 0);
+
+       e = indexed(p, mu, mu.toggle_variance()) - indexed(p, nu.toggle_variance(), nu);
+       result += check_equal_simplify(e, 0);
+       e = indexed(p, mu.toggle_variance(), mu) - indexed(p, nu, nu.toggle_variance());
+       result += check_equal_simplify(e, 0);
+
        return result;
 }