]> www.ginac.de Git - ginac.git/commitdiff
added check for contraction of epsilon with symmetric tensor
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 27 Mar 2001 18:17:06 +0000 (18:17 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 27 Mar 2001 18:17:06 +0000 (18:17 +0000)
check/exam_indexed.cpp

index 21e75405e80f92a06646f9abb68f05a612c1850f..2426430c8e4450e27a9614983046827f87e8489c 100644 (file)
@@ -109,8 +109,9 @@ static unsigned epsilon_check(void)
 
        unsigned result = 0;
 
 
        unsigned result = 0;
 
-       symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma");
-       varidx mu(s_mu, 4), nu(s_nu, 4), rho(s_rho, 4), sigma(s_sigma, 4);
+       symbol s_mu("mu"), s_nu("nu"), s_rho("rho"), s_sigma("sigma"), s_tau("tau");
+       symbol d("d");
+       varidx mu(s_mu, 4), nu(s_nu, 4), rho(s_rho, 4), sigma(s_sigma, 4), tau(s_tau, 4);
 
        // antisymmetry
        result += check_equal(lorentz_eps(mu, nu, rho, sigma) + lorentz_eps(sigma, rho, mu, nu), 0);
 
        // antisymmetry
        result += check_equal(lorentz_eps(mu, nu, rho, sigma) + lorentz_eps(sigma, rho, mu, nu), 0);
@@ -120,6 +121,12 @@ static unsigned epsilon_check(void)
        result += check_equal(lorentz_eps(mu, nu, mu.toggle_variance(), nu.toggle_variance()), 0);
        result += check_equal_simplify(lorentz_g(mu.toggle_variance(), nu.toggle_variance()) * lorentz_eps(mu, nu, rho, sigma), 0);
 
        result += check_equal(lorentz_eps(mu, nu, mu.toggle_variance(), nu.toggle_variance()), 0);
        result += check_equal_simplify(lorentz_g(mu.toggle_variance(), nu.toggle_variance()) * lorentz_eps(mu, nu, rho, sigma), 0);
 
+       // contraction with symmetric tensor is zero
+       result += check_equal_simplify(lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, mu.toggle_variance(), nu.toggle_variance()), 0);
+       result += check_equal_simplify(lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, nu.toggle_variance(), sigma.toggle_variance(), rho.toggle_variance()), 0);
+       ex e = lorentz_eps(mu, nu, rho, sigma) * indexed(d, indexed::symmetric, mu.toggle_variance(), tau);
+       result += check_equal_simplify(e, e);
+
        return result;
 }
 
        return result;
 }