X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_indexed.cpp;h=e1ee1eb1c8977e84c6b269acd632247db6073e41;hp=bbbbf4278f388718b29f580549a81f41fea0a441;hb=8a5bcc703e54153669eb60ff4d2c3bd64cd2af0c;hpb=66e09ce332d6945430e8bb5e17277cdfe62e59e2 diff --git a/check/exam_indexed.cpp b/check/exam_indexed.cpp index bbbbf427..e1ee1eb1 100644 --- a/check/exam_indexed.cpp +++ b/check/exam_indexed.cpp @@ -307,6 +307,26 @@ static unsigned spinor_check(void) return result; } +static unsigned dummy_check(void) +{ + // check dummy index renaming + + unsigned result = 0; + + symbol p("p"), q("q"); + idx i(symbol("i"), 3), j(symbol("j"), 3), n(symbol("n"), 3); + ex e; + + e = indexed(p, i) * indexed(q, i) - indexed(p, j) * indexed(q, j); + result += check_equal_simplify(e, 0); + + e = indexed(p, i) * indexed(p, i) * indexed(q, j) * indexed(q, j) + - indexed(p, n) * indexed(p, n) * indexed(q, j) * indexed(q, j); + result += check_equal_simplify(e, 0); + + return result; +} + unsigned exam_indexed(void) { unsigned result = 0; @@ -321,6 +341,7 @@ unsigned exam_indexed(void) result += scalar_product_check(); cout << '.' << flush; result += edyn_check(); cout << '.' << flush; result += spinor_check(); cout << '.' << flush; + result += dummy_check(); cout << '.' << flush; if (!result) { cout << " passed " << endl;