]> www.ginac.de Git - ginac.git/blobdiff - check/exam_clifford.cpp
- use initializers in exception class pole_error.
[ginac.git] / check / exam_clifford.cpp
index bea0a219f1d0cb045adf9737950bed8fa1a3905f..fc97ac02447fb81a89d6c71e500f4720d04a5ff9 100644 (file)
@@ -107,7 +107,7 @@ static unsigned clifford_check3(void)
 
        symbol dim("D"), m("m"), q("q"), l("l"), ldotq("ldotq");
        varidx mu(symbol("mu"), dim), nu(symbol("nu"), dim), rho(symbol("rho"), dim),
 
        symbol dim("D"), m("m"), q("q"), l("l"), ldotq("ldotq");
        varidx mu(symbol("mu"), dim), nu(symbol("nu"), dim), rho(symbol("rho"), dim),
-              sig(symbol("sig"), dim), kap(symbol("kap"), dim), lam(symbol("lam"), 4);
+              sig(symbol("sig"), dim), kap(symbol("kap"), dim), lam(symbol("lam"), dim);
        ex e;
 
        e = dirac_gamma(mu);
        ex e;
 
        e = dirac_gamma(mu);
@@ -173,6 +173,17 @@ static unsigned clifford_check3(void)
        e = dirac_trace(e).simplify_indexed(sp);
        result += check_equal(e, 4*(2*ldotq*ldotq + q*q*ldotq - q*q*l*l + q*q*m*m).expand());
 
        e = dirac_trace(e).simplify_indexed(sp);
        result += check_equal(e, 4*(2*ldotq*ldotq + q*q*ldotq - q*q*l*l + q*q*m*m).expand());
 
+       // stuff that had problems in the past
+       ex prop = dirac_slash(q, dim) - m * dirac_ONE();
+       e = dirac_slash(l, dim) * dirac_gamma5() * dirac_slash(l, dim) * prop;
+       e = dirac_trace(dirac_slash(q, dim) * e) - dirac_trace(m * e)
+         - dirac_trace(prop * e);
+       result += check_equal(e, 0);
+
+       e = (dirac_gamma5() + dirac_ONE()) * dirac_gamma5();
+       e = dirac_trace(e);
+       result += check_equal(e, 4);
+
        return result;
 }
 
        return result;
 }
 
@@ -250,7 +261,7 @@ unsigned exam_clifford(void)
        result += clifford_check3();  cout << '.' << flush;
        result += clifford_check4();  cout << '.' << flush;
        result += clifford_check5();  cout << '.' << flush;
        result += clifford_check3();  cout << '.' << flush;
        result += clifford_check4();  cout << '.' << flush;
        result += clifford_check5();  cout << '.' << flush;
-       
+
        if (!result) {
                cout << " passed " << endl;
                clog << "(no output)" << endl;
        if (!result) {
                cout << " passed " << endl;
                clog << "(no output)" << endl;