23 #ifndef GINAC_CLIFFORD_H 24 #define GINAC_CLIFFORD_H 46 clifford(
const ex & b,
const ex & mu,
const ex & metr,
unsigned char rl = 0,
int comm_sign = -1);
68 virtual ex get_metric(
const ex & i,
const ex & j,
bool symmetrised =
false)
const;
73 ex op(
size_t i)
const override;
211 ex
clifford_unit(
const ex & mu,
const ex & metr,
unsigned char rl = 0);
218 ex
dirac_gamma(
const ex & mu,
unsigned char rl = 0);
243 ex
dirac_slash(
const ex & e,
const ex & dim,
unsigned char rl = 0);
253 ex
dirac_trace(
const ex & e,
const std::set<unsigned char> & rls,
const ex & trONE = 4);
263 ex
dirac_trace(
const ex & e,
const lst & rll,
const ex & trONE = 4);
274 ex
dirac_trace(
const ex & e,
unsigned char rl = 0,
const ex & trONE = 4);
326 ex
lst_to_clifford(
const ex & v,
const ex & mu,
const ex & metr,
unsigned char rl = 0);
355 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);
369 #endif // ndef GINAC_CLIFFORD_H This class represents the Dirac gammaL object which behaves like 1/2 (1+gamma5).
ex clifford_star(const ex &e)
Reversion of the Clifford algebra, reverse the order of all clifford units in ncmul.
void do_print_latex(const print_latex &c, unsigned level) const
size_t nops(const ex &thisex)
bool is_clifford_tinfo(const return_type_t &ti)
Check whether a given return_type_t object (as returned by return_type_tinfo() is that of a clifford ...
Interface to GiNaC's indexed expressions.
Interface to GiNaC's symbolic objects.
void do_print(const print_context &c, unsigned level) const
void do_print_latex(const print_latex &c, unsigned level) const
This class holds an object representing an element of the Clifford algebra (the Dirac gamma matrices)...
ex dirac_trace(const ex &e, const std::set< unsigned char > &rls, const ex &trONE)
Calculate dirac traces over the specified set of representation labels.
void read_archive(const archive_node &n, lst &sym_lst) override
Load (deserialize) the object from an archive node.
ex conjugate() const override
ex eval_ncmul(const exvector &v) const override
Perform automatic simplification on noncommutative product of clifford objects.
ex dirac_gamma5(unsigned char rl)
Create a Dirac gamma5 object.
void do_print(const print_context &c, unsigned level) const
ex clifford_star_bar(const ex &e, bool do_bar, unsigned options)
An auxillary function performing clifford_star() and clifford_bar().
ex dirac_gammaL(unsigned char rl)
Create a Dirac gammaL object.
unsigned return_type() const override
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
bool same_metric(const ex &other) const
This class holds one of GiNaC's predefined special tensors such as the delta and the metric tensors...
This class represents the Clifford algebra generators (units).
ex dirac_gamma(const ex &mu, unsigned char rl)
Create a Dirac gamma object.
void do_print_latex(const print_latex &c, unsigned level) const
ex metric
Metric of the space, all constructors make it an indexed object.
void do_print(const print_context &c, unsigned level) const
This class represents the Dirac gammaL object which behaves like 1/2 (1-gamma5).
Interface to GiNaC's indices.
container< std::list > lst
void archive(archive_node &n) const override
Save (serialize) the object into archive node.
void do_print_dflt(const print_dflt &c, unsigned level) const
Context for default (ginsh-parsable) output.
void do_print(const print_context &c, unsigned level) const
Interface to GiNaC's special tensors.
Context for latex-parsable output.
ex subs(const exmap &m, unsigned options=0) const override
Substitute a set of objects by arbitrary expressions.
ex remove_dirac_ONE(const ex &e, unsigned char rl, unsigned options)
Replaces dirac_ONE's (with a representation_label no less than rl) in e with 1.
This class holds an indexed expression.
ex dirac_gammaR(unsigned char rl)
Create a Dirac gammaR object.
int commutator_sign
It is the sign in the definition e~i e~j +/- e~j e~i = B(i, j) + B(j, i)
void do_print_latex(const print_latex &c, unsigned level) const
ex conjugate() const override
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)
Calculations of Moebius transformations (conformal map) defined by a 2x2 Clifford matrix (a b\c d) in...
void do_print_latex(const print_latex &c, unsigned level) const
ex & let_op(size_t i) override
Return modifiable operand/member at position i.
To distinguish between different kinds of non-commutative objects.
std::type_info const * tinfo
to distinguish between non-commutative objects of different type.
ex canonicalize_clifford(const ex &e_)
Bring all products of clifford objects in an expression into a canonical order.
std::vector< ex > exvector
std::map< ex, ex, ex_is_less > exmap
ex conjugate() const override
void do_print_latex(const print_latex &c, unsigned level) const
clifford(const ex &b, unsigned char rl=0)
Construct object without any indices.
void do_print(const print_context &c, unsigned level) const
This class represents the Dirac gamma Lorentz vector.
ex dirac_slash(const ex &e, const ex &dim, unsigned char rl)
Create a term of the form e_mu * gamma~mu with a unique index mu.
This class represents the Clifford algebra unity element.
Base class for print_contexts.
ex thiscontainer(const exvector &v) const override
void do_print_latex(const print_latex &c, unsigned level) const
int get_commutator_sign() const
size_t nops() const override
Number of operands/members.
ex clifford_bar(const ex &e)
Main anti-automorphism of the Clifford algebra: makes reversion and changes signs of all clifford uni...
int clifford_max_label(const ex &e, bool ignore_ONE)
Returns the maximal representation label of a clifford object if e contains at least one...
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
Lightweight wrapper for GiNaC's symbolic objects.
unsigned precedence() const override
Return relative operator precedence (for parenthezing output).
ex lst_to_clifford(const ex &v, const ex &mu, const ex &metr, unsigned char rl)
List or vector conversion into the Clifford vector.
bool match_same_type(const basic &other) const override
Returns true if the attributes of two objects are similar enough for a match.
ex op(size_t i) const override
Return operand/member at position i.
ex dirac_ONE(unsigned char rl)
Create a Clifford unity object.
void do_print_tree(const print_tree &c, unsigned level) const
unsigned char get_representation_label() const
This class represents the Dirac gamma5 object which anticommutates with all other gammas...
Wrapper template for making GiNaC classes out of STL containers.
#define GINAC_DECLARE_REGISTERED_CLASS(classname, supername)
Macro for inclusion in the declaration of each registered class.
ex clifford_prime(const ex &e)
Automorphism of the Clifford algebra, simply changes signs of all clifford units. ...
bool contract_with(exvector::iterator self, exvector::iterator other, exvector &v) const override
Contraction of a gamma matrix with something else.
unsigned char representation_label
Representation label to distinguish independent spin lines.
GINAC_DECLARE_UNARCHIVER(add)
bool contract_with(exvector::iterator self, exvector::iterator other, exvector &v) const override
Contraction of a Clifford unit with something else.
function G(const T1 &x, const T2 &y)
lst clifford_to_lst(const ex &e, const ex &c, bool algebraic)
An inverse function to lst_to_clifford().
void do_print(const print_context &c, unsigned level) const
Context for tree-like output for debugging.
ex clifford_unit(const ex &mu, const ex &metr, unsigned char rl)
Create a Clifford unit object.
ex clifford_inverse(const ex &e)
Calculation of the inverse in the Clifford algebra.
return_type_t return_type_tinfo() const override
ex clifford_norm(const ex &e)
Calculation of the norm in the Clifford algebra.