From: Christian Bauer Date: Wed, 24 Jul 2002 20:18:33 +0000 (+0000) Subject: added a check for that canonicalize() bug X-Git-Tag: release_1-0-10~1 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=a9de0af1ab89fe64f9f159ee6d7ef88158d74e33;hp=a360ba32232288819c58fbec464666a993e78274 added a check for that canonicalize() bug --- diff --git a/check/exam_indexed.cpp b/check/exam_indexed.cpp index 4d09bdff..23362a83 100644 --- a/check/exam_indexed.cpp +++ b/check/exam_indexed.cpp @@ -148,6 +148,11 @@ static unsigned epsilon_check(void) return result; } +DECLARE_FUNCTION_2P(symm_fcn) +REGISTER_FUNCTION(symm_fcn, set_symmetry(sy_symm(0, 1))); +DECLARE_FUNCTION_2P(anti_fcn) +REGISTER_FUNCTION(anti_fcn, set_symmetry(sy_anti(0, 1))); + static unsigned symmetry_check(void) { // check symmetric/antisymmetric objects @@ -190,6 +195,10 @@ static unsigned symmetry_check(void) 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)); + result += check_equal(symm_fcn(0, 1) + symm_fcn(1, 0), 2*symm_fcn(0, 1)); + result += check_equal(anti_fcn(0, 1) + anti_fcn(1, 0), 0); + result += check_equal(anti_fcn(0, 0), 0); + return result; }