+ result += check_equal_simplify_term(e, 2 * indexed(A_symm, sy_symm(), nu_TOGGLE, mu) *clifford_unit(nu, A)-A.trace()*clifford_unit(mu, A), mu);
+
+ e = clifford_unit(nu, A) * clifford_unit(nu_TOGGLE, A)
+ * clifford_unit(mu, A) * clifford_unit(mu_TOGGLE, A);
+ result += check_equal_simplify(e, pow(A.trace(), 2) * dirac_ONE());
+
+ e = clifford_unit(mu, A) * clifford_unit(nu, A)
+ * clifford_unit(nu_TOGGLE, A) * clifford_unit(mu_TOGGLE, A);
+ result += check_equal_simplify(e, pow(A.trace(), 2) * dirac_ONE());
+
+ e = clifford_unit(mu, A) * clifford_unit(nu, A)
+ * clifford_unit(mu_TOGGLE, A) * clifford_unit(nu_TOGGLE, A);
+
+ result += check_equal_simplify_term2(e, 2*indexed(A_symm, sy_symm(), nu_TOGGLE, mu_TOGGLE) * clifford_unit(mu, A) * clifford_unit(nu, A) - pow(A.trace(), 2)*dirac_ONE());
+
+ e = clifford_unit(mu_TOGGLE, A) * clifford_unit(nu, A)
+ * clifford_unit(mu, A) * clifford_unit(nu_TOGGLE, A);
+
+ result += check_equal_simplify_term2(e, 2*indexed(A_symm, nu, mu) * clifford_unit(mu_TOGGLE, A) * clifford_unit(nu_TOGGLE, A) - pow(A.trace(), 2)*dirac_ONE());
+
+ e = clifford_unit(nu_TOGGLE, A) * clifford_unit(rho_TOGGLE, A)
+ * clifford_unit(mu, A) * clifford_unit(rho, A) * clifford_unit(nu, A);
+ e = e.simplify_indexed().collect(clifford_unit(mu, A));
+
+ result += check_equal_simplify_term(e, 4* indexed(A_symm, sy_symm(), nu_TOGGLE, rho)*indexed(A_symm, sy_symm(), rho_TOGGLE, mu) *clifford_unit(nu, A)
+ - 2*A.trace() * (clifford_unit(rho, A) * indexed(A_symm, sy_symm(), rho_TOGGLE, mu)
+ + clifford_unit(nu, A) * indexed(A_symm, sy_symm(), nu_TOGGLE, mu)) + pow(A.trace(),2)* clifford_unit(mu, A), mu);
+
+ e = clifford_unit(nu_TOGGLE, A) * clifford_unit(rho, A)
+ * clifford_unit(mu, A) * clifford_unit(rho_TOGGLE, A) * clifford_unit(nu, A);
+ e = e.simplify_indexed().collect(clifford_unit(mu, A));
+
+ result += check_equal_simplify_term(e, 4* indexed(A_symm, sy_symm(), nu_TOGGLE, rho)*indexed(A_symm, sy_symm(), rho_TOGGLE, mu) *clifford_unit(nu, A)
+ - 2*A.trace() * (clifford_unit(rho, A) * indexed(A_symm, sy_symm(), rho_TOGGLE, mu)
+ + clifford_unit(nu, A) * indexed(A_symm, sy_symm(), nu_TOGGLE, mu)) + pow(A.trace(),2)* clifford_unit(mu, A), mu);
+
+ e = clifford_unit(mu, A) * clifford_unit(nu, A) + clifford_unit(nu, A) * clifford_unit(mu, A);
+ result += check_equal(canonicalize_clifford(e), 2*dirac_ONE()*indexed(A_symm, sy_symm(), mu, nu));
+
+ e = (clifford_unit(mu, A) * clifford_unit(nu, A) * clifford_unit(lam, A)
+ + clifford_unit(nu, A) * clifford_unit(lam, A) * clifford_unit(mu, A)
+ + clifford_unit(lam, A) * clifford_unit(mu, A) * clifford_unit(nu, A)
+ - clifford_unit(nu, A) * clifford_unit(mu, A) * clifford_unit(lam, A)
+ - clifford_unit(lam, A) * clifford_unit(nu, A) * clifford_unit(mu, A)
+ - clifford_unit(mu, A) * clifford_unit(lam, A) * clifford_unit(nu, A)) / 6
+ + indexed(A_symm, sy_symm(), mu, nu) * clifford_unit(lam, A)
+ - indexed(A_symm, sy_symm(), mu, lam) * clifford_unit(nu, A)
+ + indexed(A_symm, sy_symm(), nu, lam) * clifford_unit(mu, A)
+ - clifford_unit(mu, A) * clifford_unit(nu, A) * clifford_unit(lam, A);
+ result += check_equal(canonicalize_clifford(e), 0);
+
+/* lst_to_clifford() and clifford_inverse() check*/
+ realsymbol s("s"), t("t"), x("x"), y("y"), z("z");
+
+ ex c = clifford_unit(nu, A, 1);
+ e = lst_to_clifford(lst(t, x, y, z), mu, A, 1) * lst_to_clifford(lst(1, 2, 3, 4), c);
+ e1 = clifford_inverse(e);
+ result += check_equal_simplify_term2((e*e1).simplify_indexed(), dirac_ONE(1));
+
+/* lst_to_clifford() and clifford_to_lst() check for vectors*/
+ e = lst(t, x, y, z);
+ result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, false), e);
+ result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, true), e);
+
+/* lst_to_clifford() and clifford_to_lst() check for pseudovectors*/
+ e = lst(s, t, x, y, z);
+ result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, false), e);
+ result += check_equal_lst(clifford_to_lst(lst_to_clifford(e, c), c, true), e);
+
+/* Moebius map (both forms) checks for symmetric metrics only */
+ matrix M1(2, 2), M2(2, 2);
+ c = clifford_unit(nu, A);
+
+ e = clifford_moebius_map(0, dirac_ONE(),
+ dirac_ONE(), 0, lst(t, x, y, z), A);
+/* this is just the inversion*/
+ M1 = 0, dirac_ONE(),
+ dirac_ONE(), 0;
+ e1 = clifford_moebius_map(M1, lst(t, x, y, z), A);
+/* the inversion again*/
+ result += check_equal_lst(e, e1);
+
+ e1 = clifford_to_lst(clifford_inverse(lst_to_clifford(lst(t, x, y, z), mu, A)), c);
+ result += check_equal_lst(e, e1);
+
+ e = clifford_moebius_map(dirac_ONE(), lst_to_clifford(lst(1, 2, 3, 4), nu, A),
+ 0, dirac_ONE(), lst(t, x, y, z), A);
+/*this is just a shift*/
+ M2 = dirac_ONE(), lst_to_clifford(lst(1, 2, 3, 4), c),
+ 0, dirac_ONE();
+ e1 = clifford_moebius_map(M2, lst(t, x, y, z), c);
+/* the same shift*/
+ result += check_equal_lst(e, e1);
+
+ result += check_equal(e, lst(t+1, x+2, y+3, z+4));
+
+/* Check the group law for Moebius maps */
+ e = clifford_moebius_map(M1, ex_to<lst>(e1), c);
+/*composition of M1 and M2*/
+ e1 = clifford_moebius_map(M1.mul(M2), lst(t, x, y, z), c);
+/* the product M1*M2*/
+ result += check_equal_lst(e, e1);
+ return result;
+}