From c1e78ae6da1836cb5ca9f2f2967a97b1a37f99b2 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 10 Feb 2005 02:59:58 +0000 Subject: [PATCH] * clifford_moebius_map: honor representation label (Vladimir Kisil). --- doc/tutorial/ginac.texi | 19 +++++++++++++++---- ginac/clifford.cpp | 8 ++++---- ginac/clifford.h | 10 ++++++---- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/doc/tutorial/ginac.texi b/doc/tutorial/ginac.texi index 347c20db..d2fa84eb 100644 --- a/doc/tutorial/ginac.texi +++ b/doc/tutorial/ginac.texi @@ -3176,8 +3176,9 @@ $2^n$ @end tex dimensional algebra with generators @samp{e~k} satisfying the identities -@samp{e~i e~j + e~j e~i = B(i, j)} for some symmetric matrix (@code{metric}) -@math{B(i, j)}. Such generators are created by the function +@samp{e~i e~j + e~j e~i = B(i, j)} for some matrix (@code{metric}) +@math{B(i, j)}, which may be non-symmetric. Such generators are created +by the function @example ex clifford_unit(const ex & mu, const ex & metr, unsigned char rl = 0); @@ -3192,6 +3193,15 @@ Clifford algebras (which will commute with each other). Note that the call @code{dirac_gamma(mu)}. The method @code{clifford::get_metric()} returns a metric defining this Clifford number. +If the matrix @math{B(i, j)} is in fact symmetric you may prefer to create +the Clifford algebra units with a call like that + +@example + ex e = clifford_unit(mu, indexed(B, sy_symm(), i, j)); +@end example + +since this may yield some further automatic simplifications. + Individual generators of a Clifford algebra can be accessed in several ways. For example @@ -3333,12 +3343,13 @@ The last provided function is @cindex @code{clifford_moebius_map()} @example ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, - const ex & d, const ex & v, const ex & G); + const ex & d, const ex & v, const ex & G, unsigned char rl = 0); + ex clifford_moebius_map(const ex & M, const ex & v, const ex & G, unsigned char rl = 0); @end example It takes a list or vector @code{v} and makes the Moebius (conformal or linear-fractional) transformation @samp{v -> -(av+b)/(cv+d)} defined by the matrix @samp{[[a, b], [c, d]]}. The last +(av+b)/(cv+d)} defined by the matrix @samp{M = [[a, b], [c, d]]}. The parameter @code{G} defines the metric of the surrounding (pseudo-)Euclidean space. The returned value of this function is a list of components of the resulting vector. diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index f0f7bd11..66a490da 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -1160,7 +1160,7 @@ lst clifford_to_lst (const ex & e, const ex & c, bool algebraic) } -ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, const ex & d, const ex & v, const ex & G) +ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, const ex & d, const ex & v, const ex & G, unsigned char rl) { ex x, D; if (is_a(G)) @@ -1175,17 +1175,17 @@ ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, const ex & d, if (! is_a(v) && ! is_a(v)) throw(std::invalid_argument("parameter v should be either vector or list")); - x = lst_to_clifford(v, mu, G); + x = lst_to_clifford(v, mu, G, rl); ex e = simplify_indexed(canonicalize_clifford((a * x + b) * clifford_inverse(c * x + d))); ex cu = clifford_unit(mu, G); return clifford_to_lst(e, cu, false); } -ex clifford_moebius_map(const ex & M, const ex & v, const ex & G) +ex clifford_moebius_map(const ex & M, const ex & v, const ex & G, unsigned char rl) { if (is_a(M)) return clifford_moebius_map(ex_to(M)(0,0), ex_to(M)(0,1), - ex_to(M)(1,0), ex_to(M)(1,1), v, G); + ex_to(M)(1,0), ex_to(M)(1,1), v, G, rl); else throw(std::invalid_argument("parameter M should be a matrix")); } diff --git a/ginac/clifford.h b/ginac/clifford.h index 17c70e1b..50f2998b 100644 --- a/ginac/clifford.h +++ b/ginac/clifford.h @@ -315,16 +315,18 @@ lst clifford_to_lst(const ex & e, const ex & c, bool algebraic=true); * @param c (2,1) entry of the defining matrix * @param d (2,2) entry of the defining matrix * @param v Vector to be transformed - * @param G Metric of the surrounding space */ -ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, const ex & d, const ex & v, const ex & G); + * @param G Metric of the surrounding space + * @param rl Representation label */ +ex clifford_moebius_map(const ex & a, const ex & b, const ex & c, const ex & d, const ex & v, const ex & G, unsigned char rl = 0); /** The second form of Moebius transformations defined by a 2x2 Clifford matrix M * This function takes the transformation matrix M as a single entity. * * @param M the defining matrix * @param v Vector to be transformed - * @param G Metric of the surrounding space */ -ex clifford_moebius_map(const ex & M, const ex & v, const ex & G); + * @param G Metric of the surrounding space + * @param rl Representation label */ +ex clifford_moebius_map(const ex & M, const ex & v, const ex & G, unsigned char rl = 0); } // namespace GiNaC -- 2.44.0