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