Hello, I am tring to substitute Y_{imn}t_{nj} by Y_{jmn}t_{ni} where Y is a symmetric indexed object. My code for this is like indexed(Y,sy_symm(),i_,m_,n_)*indexed(t,n_,j_) ==indexed(Y,sy_symm(),j_,n_,m_)*indexed(t,n_,i_) where i_,j_,m_ and n_ are wildcards. But the code doesn't work. Attached is the code. How should I do? Thanks #include <iostream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol Y("Y"),t("t"); symbol i_sym("i"),j_sym("j"),m_sym("m"),n_sym("n"); idx i(i_sym,3),j(j_sym,3),m(m_sym,3),n(n_sym,3); wildcard i_(0),j_(1),m_(2),n_(3); ex e1 = indexed(Y,sy_symm(),i,m,n)*indexed(t,n,j); e1 = e1.subs(indexed(Y,sy_symm(),idx(i_,3),idx(m_,3),idx(n_,3)) *indexed(t,idx(n_,3),idx(j_,3)) ==indexed(Y,sy_symm(),idx(j_,3),idx(n_,3),idx(m_,3)) *indexed(t,idx(n_,3),idx(i_,3)), subs_options::subs_algebraic); cout << e1 << endl; return 0; }