* Here we test GiNaC's Clifford algebra objects. */
/*
- * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 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
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;
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;
}