[GiNaC-list] Bug or feature? WAS:Question (Generic Clifford Algebra)

Javier Ros Ganuza jros at unavarra.es
Tue Jun 21 21:15:38 CEST 2005


I think the following expressions are mathematically equivalent:

 cout << (indexed(matrix(3,1, lst(a1,b1,c1)), mu.toggle_variance
())+indexed(matrix(3,1, lst(a2,b2,c2)), mu.toggle_variance
())).simplify_indexed()*basis1 << endl;

 cout << ((indexed(matrix(3,1, lst(a1,b1,c1)), mu.toggle_variance
())+indexed(matrix(3,1, lst(a2,b2,c2)), mu.toggle_variance
()))*basis1).simplify_indexed() << endl;

 cout << (indexed(matrix(3,1, lst(a1,b1,c1)), mu.toggle_variance
())*basis1+indexed(matrix(3,1, lst(a2,b2,c2)), mu.toggle_variance
())*basis1).simplify_indexed() << endl;

Where

varidx mu(symbol("mu", "\\mu"), 3);
ex basis1 = clifford_unit(mu, diag_matrix(lst(1, 1, 1)),1);
 

But output is different

> [[a2+a1],[b1+b2],[c2+c1]].mu*e~mu
> [[a2],[b2],[c2]].mu*e~mu+[[a1],[b1],[c1]].mu*e~mu
> [[a2],[b2],[c2]].mu*e~mu+[[a1],[b1],[c1]].mu*e~mu

Is this intended behaviour?

Thanks again

Javier Ros





More information about the GiNaC-list mailing list