X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Fexam_clifford.cpp;h=f713e1c58b8035b3a248fec75e7d6bab262072cb;hb=dd19b7316b6eba5c49b6a4fb3503c504ec6c866a;hp=6262af8ae07fb63b8cfc873f3f3064f476c0c69f;hpb=67467d256b44f5e08498ca81c946d9ffaa25d1e2;p=ginac.git diff --git a/check/exam_clifford.cpp b/check/exam_clifford.cpp index 6262af8a..f713e1c5 100644 --- a/check/exam_clifford.cpp +++ b/check/exam_clifford.cpp @@ -3,7 +3,7 @@ * Here we test GiNaC's Clifford algebra objects. */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,11 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include "ginac.h" -using namespace std; using namespace GiNaC; +#include +using namespace std; + const numeric half(1, 2); static unsigned check_equal(const ex &e1, const ex &e2) @@ -537,6 +538,19 @@ static unsigned clifford_check7(const ex & G, const symbol & dim) return result; } +static unsigned clifford_check8() +{ + unsigned result = 0; + + realsymbol a("a"); + varidx mu(symbol("mu", "\\mu"), 1); + + ex e = clifford_unit(mu, diag_matrix(lst(-1))), e0 = e.subs(mu==0); + result += ( exp(a*e0)*e0*e0 == -exp(e0*a) ) ? 0 : 1; + + return result; +} + unsigned exam_clifford() { unsigned result = 0; @@ -602,6 +616,8 @@ unsigned exam_clifford() result += clifford_check7(indexed(-2*minkmetric(), sy_symm(), xi, chi), dim); cout << '.' << flush; result += clifford_check7(-2*delta_tensor(xi, chi), dim); cout << '.' << flush; + result += clifford_check8(); cout << '.' << flush; + return result; }