2323#include " properties/SelfNonCommuting.hh"
2424#include " properties/NonCommuting.hh"
2525
26- #define DEBUG 1
26+ // #define DEBUG 1
2727
2828using namespace cadabra ;
2929
@@ -1010,6 +1010,9 @@ void meld::symmetrize_as_product(ProjectedTerm& projterm, const std::vector<symm
10101010 symmetrizers[i].independent &&
10111011 std::all_of (symmetrizers[i].indices .begin (), symmetrizers[i].indices .end (),
10121012 [seed](size_t i) { return seed[i] < 0 ; });
1013+ #ifdef DEBUG
1014+ std::cerr << " meld::symmetrize_as_product: symmetriser " << i << " independent " << independent << std::endl;
1015+ #endif
10131016 if (independent) {
10141017 Adjform indices;
10151018 for (const auto & index : symmetrizers[i].indices )
@@ -1034,7 +1037,7 @@ void meld::symmetrize_as_product(ProjectedTerm& projterm, const std::vector<symm
10341037
10351038 // Shared-dummy optimization: see if the symmetrizer at the front has cancellations (a la
10361039 // logic in symmetrize_as_product) taking into account dummy positions. We can only do this
1037- // with the front of the symmetriers as after this the dummies will be mixed up. We rewrite
1040+ // with the front of the symmetrisers as after this the dummies will be mixed up. We rewrite
10381041 // the symmetrizers replacing index positions with their dummy equivalents if this points to
10391042 // a lower slot and then look for cancellations.
10401043
@@ -1078,7 +1081,13 @@ void meld::symmetrize_as_product(ProjectedTerm& projterm, const std::vector<symm
10781081 // One is symmetric and the other antisymmetric: if they overlap by more than one index
10791082 // then the whole projection is identically zero
10801083 if (inter.size () > 1 ) {
1081- return ;
1084+ #ifdef DEBUG
1085+ for (const auto & aa: inter)
1086+ std::cerr << aa << std::endl;
1087+ std::cerr << " meld::symmetrize_as_product: overlapping symmetric/anti-symmetric symmetriser" << std::endl;
1088+ #endif
1089+ // FIXME: the logic here is incorrect.
1090+ // return;
10821091 }
10831092 }
10841093 }
0 commit comments