Thanks again, Vladimir. On Sun, 2005-06-19 at 01:10 +0100, Vladimir V Kisil wrote:
Dear Javier,
At the moment Clifford algebras in GiNaC are suppossed to be independent unless they are defined throught the same metric and representation label (in this case they are exactly coinsiding). Thus if you take a product of e~i*E~j (for a Clifford units e_j and E_j from different definitions) it could not be simplified to anything shorter. If one need some relations between elements of the basis e~i and E~j, I see two possibilities:
OK, but if I'm not wrong, at the example, the units for vector1 and vector2, are defined throught the same metric and representation label (default=0 I suposse, nevertheless I made some trials especifiying diferent labels; 0 or 1) and no simplification is made. I was hopping simplifications of the kind 2*[[a1],[b1],[c1]].rho*e~rho+e~rho*[[a2],[b2],[c2]].rho->[[2*a1+a2], [2*b1+b2],[2*c1+c2]].rho*e~rho 2*[[a1],[b1],[c1]].rho*ONE*[[a2],[b2],[c2]].rho*e~rho~rho->2*a1*a2+2*b1*b2+2*c1*c2 [[0],[1],[0]].rho*e~rho+e~rho*[[1],[0],[0]].rho -> [[1],[1], [0]].rho*e~rho because all the vectors share the same metric. Untill now, I've only realized that ex M = diag_matrix(lst(1, -1, 0, s)); ex e = clifford_unit(nu, M, 1); ex vector1=lst_to_clifford(lst(1, 2, 3, 4), nu, M, 1); ex vector2=lst_to_clifford(lst(4, 2, 3, 4), nu, M, 1); is different of ex vector1=lst_to_clifford(lst(1, 2, 3, 4), nu, e, 1); ex vector2=lst_to_clifford(lst(4, 2, 3, 4), nu, e, 1); This one compiles, but gives error in ex list = clifford_to_lst(vector1+vector2, e); The first one produces ex list = clifford_to_lst(vector1+vector2, e); cout << list << endl; {5,4,6,8} So, it seems some simplifications are being trigered, nevertheless cout << simplify_indexed(vector1+vector2,1) << endl; or cout << vector1+vector2 << endl; give [[1],[2],[3],[4]].nu*e~nu+[[4],[2],[3],[4]].nu*e~nu Obvious simplifications being not trigered. cout << exapand_dummy_sum(vector1+vector2) << endl; or cout << expand_dummy_sum(vector1+vector2) << endl; do not compile on my GiNaC-1.3.1-1 GiNaC-devel-1.3.1-1 Fedora C3 system. Is there somemething specific to do in order to get the simplifications done. The rest of your mail is very interesting, but I think I should cope with reduction of expresions in order to go to the next step. If I can't simplify the Clifford class is not going to do what I'm need. Am I missing some documentation?, is there some working example in order to play around it?. Thanks a lot Javier Ros
1. Some additional procedures which can reduce different basis to the common ground. For example you can define something like (very schematic, sorry):
matrix transf_matrix(3, 3) = [some elements here];
basis1 = clifford_unit(mu, metric); vector1 = lst_to_clifford(lst(a1, b1, c1), rho, e);
ex basis2 = indexed(transf_matrix, nu, mu.toggle_variance())*e; vector2 = indexed(matrix(3,1, lst(a2,b2,c2)), nu.toggle_variance())*basis2; ...
[Sometimes the function exapand_dummy_sum() can be of use here]
2. Implementation of different Clifford units, which are linear combination of each other, in the core GiNaC procedures. This will need some more thinking about a careful design and should be probably moved to ginac-dev mailing list.
I will be glad to assit you in the future development.
Best wishes, Vladimir Quoting Javier Ros Ganuza <jros@unavarra.es>:
Following Vladimir's :) instructions...
I implemented it, but I've found a problem with the output, probably due to my lack of knowledge :(.
For reference the listing is
--- //c++ clifford.cc -o clifford -lcln -lginac
#include <iostream> using namespace std;
#include <ginac/ginac.h> using namespace GiNaC;
int main() {
varidx nu(symbol("nu", "\\nu"), 3), mu(symbol("mu", "\\mu"), 3), xi (symbol("xi", "\\xi"), 3), rho(symbol("rho", "\\rho"),3);
ex basis1 = clifford_unit(mu, diag_matrix(lst(1, 1, 1))); ex basis2 = clifford_unit(nu, diag_matrix(lst(1, 1, 1)));
symbol a1("a1"),a2("a2"),b1("b1"),b2("b2"),c1("c1"),c2("c2");
ex vector1 = lst_to_clifford(lst(a1,b1,c1), rho, basis1); ex vector2 = lst_to_clifford(lst(a2,b2,c2), rho, basis1);
cout << 2*vector1+vector2 << endl;
cout << 2*vector1*vector2 << endl;
cout << lst_to_clifford(lst(1, 0, 0), rho, basis1) + lst_to_clifford(lst (0, 1, 0), rho, basis1) << endl;
return 0; }
---
And the output
$ ./clifford 2*[[a1],[b1],[c1]].rho*e~rho+e~rho*[[a2],[b2],[c2]].rho 2*[[a1],[b1],[c1]].rho*ONE*[[a2],[b2],[c2]].rho*e~rho~rho [[0],[1],[0]].rho*e~rho+e~rho*[[1],[0],[0]].rho
As it can be see the elements, [[a1],[b1],[c1]].rho, seem indivisible. There are not trivial groupings being made, like,
[[0],[1],[0]].rho*e~rho+e~rho*[[1],[0],[0]].rho -> [[1],[1], [0]].rho*e~rho
I tried to simplify_indexed but the result keeps the same.
Also at the tutorial, when dealing with generic clifford algebras, refered Ginac output for elements of a Clifford Algebra are reflected as
v~0 e.0 + v~1 e.1 + ... + v~n e.n
so exhibiting that they are some how divisible.
Also covariant and contravariant indexes are interchanged in comparison with the tutorial.
Any clues???.
Thanks for your help
Javier Ros
_______________________________________________ GiNaC-list mailing list GiNaC-list@ginac.de http://thep.physik.uni-mainz.de/mailman/listinfo/ginac-list
-- Vladimir V. Kisil email: kisilv@maths.leeds.ac.uk