[GiNaC-list] Are Clifford units of different bases equal?
Vladimir Kisil
kisilv at maths.leeds.ac.uk
Tue May 8 21:30:06 CEST 2007
Dear Javier,
I am using 1.4 branch of GiNaC on my computer and your example
compiles but do not run on it throwing the exception:
> terminate called after throwing an instance of 'std::invalid_argument'
> what(): clifford_unit(): metric for Clifford unit must be of type
> tensor, matrix or an expression with two free indices
> Aborted
The reason of this (and misunderstanding which you expressed) is your
calls:
> ex vector1 = lst_to_clifford(lst(a1,b1,c1), mu, basis1),
> vector2 = lst_to_clifford(lst(a1,b1,c1), nu, basis2);
Here how GiNaC tutorial describes *two* versions of lst_to_clifford:
> ex lst_to_clifford(const ex & v, const ex & mu, const ex & metr,
> unsigned char rl = 0);
> ex lst_to_clifford(const ex & v, const ex & e);
>
> which converts a list or vector `v = (v~0, v~1, ..., v~n)' into the
> Clifford number `v~0 e.0 + v~1 e.1 + ... + v~n e.n' with `e.k' directly
> supplied in the second form of the procedure. In the first form the
> Clifford unit `e.k' is generated by the call of `clifford_unit(mu,
> metr, rl)'.
In other words if the code which you provide is runnable on your
(presumably old) version of GiNaC it calls the first version. Then a
*new* clifford_units is created for both vector1 and vector1. Both new
clifford_units have the same metric which they obtain from basis1 and
basis2, and both they the same representation labels 0 (the default
value). The values of representation labels in basis1 and basis2 are
not consulted in this form of the call.
If you replace your calls to:
> ex vector1 = lst_to_clifford(lst(a1,b1,c1), basis1),
> vector2 = lst_to_clifford(lst(a1,b1,c1), basis2);
then both metrics and representation labels are inherited from basis1
and basis2 and output of your example will be:
> [[a1],[b1],[c1]].nu*e~nu+2*e~mu*[[a1],[b1],[c1]].mu
> [[a1],[b1],[c1]].nu*e~nu+2*[[a1],[b1],[c1]].nu*e~nu
> e~0*a1+2*e~2*c1+2*e~0*a1+2*b1*e~1+b1*e~1+e~2*c1
> e~0*a1+2*e~2*c1+2*e~0*a1+2*b1*e~1+b1*e~1+e~2*c1
as you seems initially expected.
Best wishes,
Vladimir
--
Vladimir V. Kisil email: kisilv at maths.leeds.ac.uk
-- www: http://maths.leeds.ac.uk/~kisilv/
More information about the GiNaC-list
mailing list