bugs in indexed object
Dear all ginac lovers, I have found simplify_indexed() is not working as expected. I have compiled and run the following c++ program using ginac 1.87 (mingw64 compiler, windows 10 os), #include <ginac/ginac.h> using namespace GiNaC; using namespace std; int main() { symbol A("A"), B("B"), C("C"), i_sym("i"),j_sym("j"); varidx i(i_sym, 3); varidx ic(i_sym, 3,true); varidx j(j_sym, 3); varidx jc(j_sym, 3,true); ex e = indexed(A, {i,i}) * indexed(B, {ic,ic})-indexed(A, {j,j}) * indexed(B, {jc,jc}); cout << (e).simplify_indexed() << endl; return 0; } the above program shows the following result: A.i.i*B~symbol16.symbol16-A.i.i*B~symbol17.symbol17 But I think the result should be zero. Please tell me what is the problem here? Best regards, Mithun Bairagi
On Sun, 14 Apr 2024 08:01:15 +0000, "Dr. Mithun Bairagi" <bairagirasulpur@gmail.com> said: MB> the above program shows the following result: MB> A.i.i*B~symbol16.symbol16-A.i.i*B~symbol17.symbol17
MB> But I think the result should be zero. You can get 0 by cout << expand_dummy_sum(e) << endl; Please see GiNaC tutorial for details on expand_dummy_sum() function. -- Vladimir V. Kisil http://http://v-v-kisil.rf.gd Book: Geometry of Mobius Maps https://doi.org/10.1142/p835 Soft: Geometry of cycles http://moebinv.sourceforge.net/ Jupyter notebooks: https://github.com/vvkisil?tab=repositories
participants (2)
-
Dr. Mithun Bairagi
-
Vladimir V. Kisil