[GiNaC-devel] Another clifford patch

Vladimir Kisil kisilv at maths.leeds.ac.uk
Tue Jul 12 12:10:26 CEST 2005


		Dear All,

		Here is another patch for Clifford part of GiNaC which contains
  mainly four components:

  1. Some housekeeping alteration of code.

  2. Previously GiNaC method is_equal() did not take in account
  representation labels, i.e. a call 

    dirac_gamma(mu).is_equal(dirac_gamma(mu, 1))

  returned true. This leads to miscalculations since for example 

  (dirac_gamma(mu) *(dirac_gamma(mu, 1)).to_rational(L)

  returned something like pow(symbol7, 2) instead  of symbol7*symbol8.

  I fixed it through an "inclusion" of representation_label as op(2) for
  dirac_gammas. A fake alteration of let_op(2) is also made. This may
  not look somewhat trick but I cannot find a better solutions. 

  By the way, does the same problem affects color.cpp?

  3. Since metric member variable of the clifford class can contains
  symbolic entries I add susb() methods which can access metric as well.

  4. I add a new member variable commutator sign to clifford class. It
  is used in the transformations for two clifford instances X and Y as follows:

  X*Y = commutator_sign*Y*X + 2*metric(X, Y)

  commutator_sign is an int type and for Clifford algebras is equal to -1.

  Such an addition with only two lines altered in
  canonicalize_clifford() allows  to derive from clifford class
  subclasses for Lie algebras (commutator_sign = 1, an demo example is
  attached)  and general algebras defined through commutation identities
  (e.g. q-deformed algebras can be defined for commutator_sign =0 and a
  proper construction of the metric). 

  The bubble-sorting realisation of canonicalize_clifford() was
  initially good for simply anticommuting Dirac gammas. However since
  the clifford class was very generalised it becomes rather inefficient
  for high powers of elements and a proper modification is in the
  "to-do" list.

  Will it be worth to develop the included Lie algebra subclass into the
  proper part of GiNaC?

  Such an addition do break a binary compatibility however this only
  happens for low level constructors which was recommended to avoid in
  the user programs. 

  Best wishes,
  Vladimir
-- 
Vladimir V. Kisil     email: kisilv at maths.leeds.ac.uk
--                      www: http://maths.leeds.ac.uk/~kisilv/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ginac-clifford.diff
Type: text/x-c
Size: 9319 bytes
Desc: A patch for Clifford
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20050712/43dfdebf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lie-alg-demo.cpp
Type: text/x-c
Size: 9289 bytes
Desc: A demo of Lie algebra reaisation in GiNaC
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20050712/43dfdebf/attachment-0001.bin>


More information about the GiNaC-devel mailing list