- more clifford checks
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Fri, 4 May 2001 23:46:52 +0000 (23:46 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Fri, 4 May 2001 23:46:52 +0000 (23:46 +0000)
- archive checks has a symbol with a LaTeX name

check/exam_archive.cpp
check/exam_clifford.cpp

index 2b8862ccf480a8decd89fc7e295b7796049378e3..4911a76ac78e962c66002d0b8838828269e96e64 100644 (file)
@@ -31,7 +31,7 @@ unsigned exam_archive(void)
        cout << "examining archiving system" << flush;
        clog << "----------archiving system:" << endl;
 
-       symbol x("x"), y("y"), mu("mu"), dim("dim");
+       symbol x("x"), y("y"), mu("mu"), dim("dim", "\\Delta");
        ex e, f;
 
        // This expression is complete nonsense but it contains every type of
index 8eee701337931fd94fab5e3f79c4d77812f0d034..ec305c65aeeda710fc4e1a0c0eec6c7cef9ff0ec 100644 (file)
@@ -51,7 +51,7 @@ static unsigned clifford_check1(void)
        unsigned result = 0;
 
        symbol dim("D");
-       varidx mu(symbol("mu"), dim), nu(symbol("nu"), dim);
+       varidx mu(symbol("mu"), dim), nu(symbol("nu"), dim), rho(symbol("rho"), dim);
        ex e;
 
        e = dirac_ONE() * dirac_ONE();
@@ -72,6 +72,11 @@ static unsigned clifford_check1(void)
            dirac_gamma(mu.toggle_variance()) * dirac_gamma(nu.toggle_variance());
        result += check_equal_simplify(e, 2*dim*dirac_ONE()-pow(dim, 2)*dirac_ONE());
 
+       e = dirac_gamma(nu.toggle_variance()) * dirac_gamma(rho.toggle_variance()) *
+           dirac_gamma(mu) * dirac_gamma(rho) * dirac_gamma(nu);
+       e = e.simplify_indexed().collect(dirac_gamma(mu));
+       result += check_equal(e, pow(2 - dim, 2).expand() * dirac_gamma(mu));
+
        return result;
 }
 
@@ -171,6 +176,40 @@ static unsigned clifford_check3(void)
        return result;
 }
 
+static unsigned clifford_check4(void)
+{
+       // simplify_indexed()/dirac_trace() cross-checks
+
+       unsigned result = 0;
+
+       symbol dim("D");
+       varidx mu(symbol("mu"), dim), nu(symbol("nu"), dim), rho(symbol("rho"), dim),
+              sig(symbol("sig"), dim), lam(symbol("lam"), dim);
+       ex e, t1, t2;
+
+       e = dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(rho) * dirac_gamma(mu.toggle_variance());
+       t1 = dirac_trace(e).simplify_indexed();
+       t2 = dirac_trace(e.simplify_indexed());
+       result += check_equal((t1 - t2).expand(), 0);
+
+       e = dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(rho) * dirac_gamma(sig) * dirac_gamma(mu.toggle_variance()) * dirac_gamma(lam);
+       t1 = dirac_trace(e).simplify_indexed();
+       t2 = dirac_trace(e.simplify_indexed());
+       result += check_equal((t1 - t2).expand(), 0);
+
+       e = dirac_gamma(sig) * dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(rho) * dirac_gamma(nu.toggle_variance()) * dirac_gamma(mu.toggle_variance());
+       t1 = dirac_trace(e).simplify_indexed();
+       t2 = dirac_trace(e.simplify_indexed());
+       result += check_equal((t1 - t2).expand(), 0);
+
+       e = dirac_gamma(mu) * dirac_gamma(nu) * dirac_gamma(rho) * dirac_gamma(mu.toggle_variance()) * dirac_gamma(sig) * dirac_gamma(nu.toggle_variance());
+       t1 = dirac_trace(e).simplify_indexed();
+       t2 = dirac_trace(e.simplify_indexed());
+       result += check_equal((t1 - t2).expand(), 0);
+
+       return result;
+}
+
 unsigned exam_clifford(void)
 {
        unsigned result = 0;
@@ -181,6 +220,7 @@ unsigned exam_clifford(void)
        result += clifford_check1();  cout << '.' << flush;
        result += clifford_check2();  cout << '.' << flush;
        result += clifford_check3();  cout << '.' << flush;
+       result += clifford_check4();  cout << '.' << flush;
        
        if (!result) {
                cout << " passed " << endl;