14 using namespace GiNaC;
45 GINAC_DECLARE_PRINT_CONTEXT(
FormFormat, print_dflt)
64 static _init FormFormat_init;
72 GINAC_DECLARE_PRINT_CONTEXT(
FCFormat, print_dflt)
74 FCFormat(ostream &os,
unsigned opt=0);
96 static _init FCFormat_init;
107 static GiNaC::registered_class_info reg_info;
116 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
120 void accept(GiNaC::visitor & v)
const override;
121 const GiNaC::registered_class_info &
get_class_info()
const override;
135 void print(
const print_context &c,
unsigned level = 0)
const;
136 void archive(archive_node & n)
const override;
138 static bool has(
const ex &e);
139 static bool hasc(
const ex &e);
140 static bool hasv(
const ex &e);
141 static lst
all(
const ex &e);
142 ex
derivative(
const symbol & s)
const override;
152 static GiNaC::registered_class_info reg_info;
160 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
164 void accept(GiNaC::visitor & v)
const override;
165 const GiNaC::registered_class_info &
get_class_info()
const override;
177 void print(
const print_context &c,
unsigned level = 0)
const;
178 void archive(archive_node & n)
const override;
180 static bool has(
const ex &e);
181 static lst
all(
const ex &e);
182 ex
derivative(
const symbol & s)
const override;
192 static GiNaC::registered_class_info reg_info;
200 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
204 void accept(GiNaC::visitor & v)
const override;
205 const GiNaC::registered_class_info &
get_class_info()
const override;
213 SUNT(ex
a, ex i, ex j);
215 size_t nops()
const override;
216 ex
op(
size_t i)
const override;
217 ex&
let_op(
size_t i)
override;
220 void print(
const print_dflt &c,
unsigned level = 0)
const;
221 void archive(archive_node & n)
const override;
223 static bool has(
const ex &e);
224 static lst
all(
const ex &e);
225 ex
derivative(
const symbol & s)
const override;
236 static GiNaC::registered_class_info reg_info;
244 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
248 void accept(GiNaC::visitor & v)
const override;
249 const GiNaC::registered_class_info &
get_class_info()
const override;
257 SUNF(ex i, ex j, ex k);
259 size_t nops()
const override;
260 ex
op(
size_t i)
const override;
261 ex&
let_op(
size_t i)
override;
262 ex
eval()
const override;
263 void print(
const print_dflt &c,
unsigned level = 0)
const;
266 void archive(archive_node & n)
const override;
268 static bool has(
const ex &e);
269 static lst
all(
const ex &e);
270 ex
derivative(
const symbol & s)
const override;
281 static GiNaC::registered_class_info reg_info;
289 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
293 void accept(GiNaC::visitor & v)
const override;
294 const GiNaC::registered_class_info &
get_class_info()
const override;
302 SUNF4(ex i, ex j, ex k, ex l);
304 size_t nops()
const override;
305 ex
op(
size_t i)
const override;
306 ex&
let_op(
size_t i)
override;
307 ex
eval()
const override;
308 void print(
const print_dflt &c,
unsigned level = 0)
const;
311 void archive(archive_node & n)
const override;
313 static bool has(
const ex &e);
314 static lst
all(
const ex &e);
315 ex
derivative(
const symbol & s)
const override;
325 static GiNaC::registered_class_info reg_info;
333 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
337 void accept(GiNaC::visitor & v)
const override;
338 const GiNaC::registered_class_info &
get_class_info()
const override;
350 size_t nops()
const override;
351 ex
op(
size_t i)
const override;
352 ex&
let_op(
size_t i)
override;
353 ex
eval()
const override;
354 void print(
const print_dflt &c,
unsigned level = 0)
const;
357 void archive(archive_node & n)
const override;
359 static bool has(
const ex &e);
360 static lst
all(
const ex &e);
361 ex
derivative(
const symbol & s)
const override;
367 ex
SP(
const ex &
a,
bool use_map=
false);
368 ex
SP(
const ex &
a,
const ex &b,
bool use_map=
false);
369 ex
sp(
const ex &
a,
const ex & b);
371 ex&
letSP(
const ex &p1,
const ex &p2);
372 ex&
letSP(
const ex &p);
373 void clearSP(
const ex &p1,
const ex &p2);
376 ex
SP2sp(
const ex & exin);
386 class Eps :
public basic {
389 static GiNaC::registered_class_info reg_info;
397 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
401 void accept(GiNaC::visitor & v)
const override;
402 const GiNaC::registered_class_info &
get_class_info()
const override;
416 Eps(vector<Vector>
vs, vector<Index> is);
417 Eps(
const exvector & pis0);
418 size_t nops()
const override;
419 ex
op(
size_t i)
const override;
420 ex &
let_op(
size_t i)
override;
421 ex
eval()
const override;
422 void print(
const print_dflt &c,
unsigned level = 0)
const;
425 void archive(archive_node & n)
const override;
427 static bool has(
const ex &e);
428 static lst
all(
const ex &e);
429 ex
derivative(
const symbol & s)
const override;
432 ex
LC(ex pi1, ex pi2, ex pi3, ex pi4);
440 static GiNaC::registered_class_info reg_info;
448 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
452 void accept(GiNaC::visitor & v)
const override;
453 const GiNaC::registered_class_info &
get_class_info()
const override;
465 DGamma(
int int_1567,
unsigned _rl=0);
467 void print(
const print_dflt &c,
unsigned level = 0)
const;
471 unsigned return_type()
const override {
return return_types::noncommutative; }
474 size_t nops()
const override;
475 ex
op(
size_t i)
const override;
476 ex&
let_op(
size_t i)
override;
477 ex
eval()
const override;
478 void archive(archive_node & n)
const override;
480 static bool has(
const ex &e);
481 static lst
all(
const ex &e);
482 static ex
sigma(
const ex &
mu,
const ex & nu);
483 static ex
G5Eps(
int i=0,
int rl=0);
484 ex
derivative(
const symbol & s)
const override;
495 static GiNaC::registered_class_info reg_info;
503 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
507 void accept(GiNaC::visitor & v)
const override;
508 const GiNaC::registered_class_info &
get_class_info()
const override;
516 AsGamma(
const exvector & _pis,
int _rl=0);
521 AsGamma(
const lst & _pis,
int _rl=0);
522 static ex
from(
const lst & pis_lst,
unsigned rl=0);
526 void print(
const print_dflt &c,
unsigned level = 0)
const;
530 unsigned return_type()
const override {
return return_types::noncommutative; }
533 size_t nops()
const override;
534 ex
op(
size_t i)
const override;
535 ex&
let_op(
size_t i)
override;
536 ex
eval()
const override;
537 void archive(archive_node & n)
const override;
539 static bool has(
const ex &e);
540 static lst
all(
const ex &e);
541 ex
derivative(
const symbol & s)
const override;
556 DECLARE_FUNCTION_3P(GMat)
557 DECLARE_FUNCTION_1P(TR)
558 DECLARE_FUNCTION_1P(TTR)
559 DECLARE_FUNCTION_1P(HF)
563 ex
GAS(
const ex &expr,
unsigned rl=0);
567 ex
form(
const ex &expr,
int verb=0);
568 ex
UnContract(
const ex expr,
const lst &loop_ps,
const lst &ext_ps=lst{});
570 ex
TIR(
const ex &expr_in,
const lst &loop_ps,
const lst &ext_ps);
574 ex
GMatShift(
const ex & expr,
const ex & g,
bool to_right=
true);
577 ex
Apart(
const matrix & mat);
578 ex
Apart(
const ex &expr_in,
const lst &vars, exmap sgnmap={});
579 ex
Apart(
const ex &expr_in,
const lst &loops,
const lst & extmoms, exmap sgnmap={});
582 ex
F2ex(
const ex & expr_in);
584 void ApartIBP(exvector &io_vec,
int IBPmethod,
const lst & loops,
const lst & exts,
585 const lst & cut_props=lst{}, std::function<lst(
const IBP &,
const ex &)> uf=
LoopUF);
586 inline void ApartIBP(
int IBPmethod, exvector &io_vec,
const lst & loops,
const lst & exts,
587 const lst & cut_props=lst{}, std::function<lst(
const IBP &,
const ex &)> uf=
LoopUF) {
588 return ApartIBP(io_vec, IBPmethod, loops, exts, cut_props, uf);
590 exmap
ApartRules(
const exvector &airs,
bool irc=
true);
608 std::function<ex(
const ex &,
const ex &)>
cv =
nullptr;
619 class ApartIR1_SERIAL {
public:
static unsigned serial; };
620 template<
typename T1>
621 inline GiNaC::function ApartIR(
const T1 & p1) {
622 return GiNaC::function(ApartIR1_SERIAL::serial, ex(p1));
625 class ApartIR2_SERIAL {
public:
static unsigned serial; };
626 template<
typename T1,
typename T2>
627 inline GiNaC::function ApartIR(
const T1 & p1,
const T2 & p2) {
628 return GiNaC::function(ApartIR2_SERIAL::serial, ex(p1), ex(p2));
633 ex
ToCF(
const ex & e);
636 ex
DoColor(
const ex & e,
const ex & pref=1,
int method=0);
637 ex
A0(
const ex m2,
int n=1,
const ex
d=4-2*
ep);
virtual void visit(const AsGamma &)=0
class for AntiSymmetric Gamma object
bool match_same_type(const basic &other) const override
static lst all(const ex &e)
void archive(archive_node &n) const override
AsGamma * duplicate() const override
int compare_same_type(const GiNaC::basic &other) const override
ex mul_right(const ex &pi) const
ex conjugate() const override
const char * class_name() const override
static ex from(const exvector &pis_vec, unsigned rl=0)
ex op(size_t i) const override
void read_archive(const archive_node &n) override
ex derivative(const symbol &s) const override
const GiNaC::registered_class_info & get_class_info() const override
void form_print(const FormFormat &c, unsigned level=0) const
return_type_t return_type_tinfo() const override
void accept(GiNaC::visitor &v) const override
static ex from(const lst &pis_lst, unsigned rl=0)
void fc_print(const FCFormat &c, unsigned level=0) const
size_t nops() const override
static GiNaC::registered_class_info & get_class_info_static()
friend B & dynallocate(Args &&... args)
ex mul_left(const ex &pi) const
unsigned return_type() const override
void print(const print_dflt &c, unsigned level=0) const
bool is_equal_same_type(const basic &other) const override
ex & let_op(size_t i) override
static bool has(const ex &e)
virtual void visit(const DGamma &)=0
class for Dirac Gamma object
unsigned return_type() const override
static lst all(const ex &e)
bool match_same_type(const basic &other) const override
return_type_t return_type_tinfo() const override
ex derivative(const symbol &s) const override
void archive(archive_node &n) const override
void form_print(const FormFormat &c, unsigned level=0) const
void accept(GiNaC::visitor &v) const override
ex conjugate() const override
static GiNaC::registered_class_info & get_class_info_static()
void read_archive(const archive_node &n) override
static ex sigma(const ex &mu, const ex &nu)
size_t nops() const override
ex op(size_t i) const override
int compare_same_type(const GiNaC::basic &other) const override
void print(const print_dflt &c, unsigned level=0) const
static ex G5Eps(int i=0, int rl=0)
static bool has(const ex &e)
void fc_print(const FCFormat &c, unsigned level=0) const
friend B & dynallocate(Args &&... args)
const GiNaC::registered_class_info & get_class_info() const override
bool is_equal_same_type(const basic &other) const override
DGamma * duplicate() const override
ex & let_op(size_t i) override
const char * class_name() const override
virtual void visit(const Eps &)=0
class for Levi-Civita object https://onlinelibrary.wiley.com/doi/pdf/10.1002/9783527630097....
const char * class_name() const override
int compare_same_type(const GiNaC::basic &other) const override
static bool has(const ex &e)
void fc_print(const FCFormat &c, unsigned level=0) const
bool is_equal_same_type(const basic &other) const override
ex op(size_t i) const override
void form_print(const FormFormat &c, unsigned level=0) const
Eps in FORM format https://onlinelibrary.wiley.com/doi/pdf/10.1002/9783527630097.app3 to make Tr(g5,...
Eps * duplicate() const override
ex derivative(const symbol &s) const override
void accept(GiNaC::visitor &v) const override
void print(const print_dflt &c, unsigned level=0) const
ex & let_op(size_t i) override
void archive(archive_node &n) const override
static lst all(const ex &e)
size_t nops() const override
static GiNaC::registered_class_info & get_class_info_static()
friend B & dynallocate(Args &&... args)
void read_archive(const archive_node &n) override
const GiNaC::registered_class_info & get_class_info() const override
IBP base class for IBP reduction.
virtual void visit(const Index &)=0
int compare_same_type(const GiNaC::basic &other) const override
const char * class_name() const override
static bool hasv(const ex &e)
void archive(archive_node &n) const override
bool is_equal_same_type(const basic &other) const override
static GiNaC::registered_class_info & get_class_info_static()
void print(const print_context &c, unsigned level=0) const
void read_archive(const archive_node &n) override
static bool hasc(const ex &e)
ex derivative(const symbol &s) const override
const GiNaC::registered_class_info & get_class_info() const override
Pair operator()(const Index &i)
static GiNaC::exmap Dimension
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
void accept(GiNaC::visitor &v) const override
Index * duplicate() const override
static bool has(const ex &e)
virtual void visit(const Pair &)=0
void read_archive(const archive_node &n) override
int compare_same_type(const GiNaC::basic &other) const override
const GiNaC::registered_class_info & get_class_info() const override
ex & let_op(size_t i) override
static GiNaC::registered_class_info & get_class_info_static()
ex op(size_t i) const override
void archive(archive_node &n) const override
size_t nops() const override
static lst all(const ex &e)
void accept(GiNaC::visitor &v) const override
ex derivative(const symbol &s) const override
bool is_equal_same_type(const basic &other) const override
void form_print(const FormFormat &c, unsigned level=0) const
FormFormat print function.
void print(const print_dflt &c, unsigned level=0) const
default print function
friend B & dynallocate(Args &&... args)
const char * class_name() const override
void fc_print(const FCFormat &c, unsigned level=0) const
FCFormat print function.
Pair * duplicate() const override
static bool has(const ex &e)
virtual void visit(const SUNF4 &)=0
void archive(archive_node &n) const override
save to archvie
static GiNaC::registered_class_info & get_class_info_static()
void form_print(const FormFormat &c, unsigned level=0) const
print the Form Format
void accept(GiNaC::visitor &v) const override
const GiNaC::registered_class_info & get_class_info() const override
size_t nops() const override
void fc_print(const FCFormat &c, unsigned level=0) const
void print(const print_dflt &c, unsigned level=0) const
normal priint
ex op(size_t i) const override
ex & let_op(size_t i) override
static lst all(const ex &e)
SUNF4 * duplicate() const override
ex eval() const override
automatical evaluation of SUNF4
ex derivative(const symbol &s) const override
set derivative of SUNF4 to 0
static bool has(const ex &e)
bool is_equal_same_type(const basic &other) const override
friend B & dynallocate(Args &&... args)
const char * class_name() const override
void read_archive(const archive_node &n) override
read from archive
int compare_same_type(const GiNaC::basic &other) const override
virtual void visit(const SUNF &)=0
void archive(archive_node &n) const override
void print(const print_dflt &c, unsigned level=0) const
static bool has(const ex &e)
const char * class_name() const override
int compare_same_type(const GiNaC::basic &other) const override
ex derivative(const symbol &s) const override
set derivative of SUNF to 0
static lst all(const ex &e)
bool is_equal_same_type(const basic &other) const override
void form_print(const FormFormat &c, unsigned level=0) const
static GiNaC::registered_class_info & get_class_info_static()
ex & let_op(size_t i) override
SUNF * duplicate() const override
const GiNaC::registered_class_info & get_class_info() const override
void read_archive(const archive_node &n) override
size_t nops() const override
void accept(GiNaC::visitor &v) const override
friend B & dynallocate(Args &&... args)
void fc_print(const FCFormat &c, unsigned level=0) const
ex op(size_t i) const override
virtual void visit(const SUNT &)=0
static GiNaC::registered_class_info & get_class_info_static()
bool is_equal_same_type(const basic &other) const override
ex & let_op(size_t i) override
void archive(archive_node &n) const override
size_t nops() const override
void form_print(const FormFormat &c, unsigned level=0) const
ex op(size_t i) const override
const GiNaC::registered_class_info & get_class_info() const override
void fc_print(const FCFormat &c, unsigned level=0) const
static bool has(const ex &e)
void print(const print_dflt &c, unsigned level=0) const
static lst all(const ex &e)
int compare_same_type(const GiNaC::basic &other) const override
void read_archive(const archive_node &n) override
SUNT * duplicate() const override
const char * class_name() const override
void accept(GiNaC::visitor &v) const override
friend B & dynallocate(Args &&... args)
ex derivative(const symbol &s) const override
ex conjugate() const override
class extended to GiNaC symbol class, represent a positive symbol
virtual void visit(const Vector &)=0
Vector * duplicate() const override
static lst all(const ex &e)
bool is_equal_same_type(const basic &other) const override
static bool has(const ex &e)
Pair operator()(const Vector &p)
const char * class_name() const override
ex derivative(const symbol &s) const override
void print(const print_context &c, unsigned level=0) const
static GiNaC::registered_class_info & get_class_info_static()
int compare_same_type(const GiNaC::basic &other) const override
friend B & dynallocate(Args &&... args)
void read_archive(const archive_node &n) override
void accept(GiNaC::visitor &v) const override
void archive(archive_node &n) const override
const GiNaC::registered_class_info & get_class_info() const override
ex SP2sp(const ex &exin)
convert SP(a,b) to sp(a,b)
ex DoColor(const ex &expr, const ex &pref, int method)
ex sp(const ex &a, const ex &b)
translated the vector dot a.b to a*b, useful in SecDec
exmap sp_map()
the SP_map with SP(a,b) replaced to sp(a,b)
ex AsGamma_mul_right(const ex &expr, const ex &pi_in)
const int form_expand_none
ex AsGamma_mul_left(const ex &expr, const ex &pi_in)
ex GMatShift(const ex &expr, const ex &g, bool to_right)
ex ApartIR2F(const ex &expr_in)
convert ApartIR to F(ps, ns), ns is like FIRE convention
ex ApartIRC(const ex &expr_in)
complete the ApartIR elements
ex AsGamma_to(const ex &expr)
void ApartIBP(exvector &air_vec, AIOption aio)
perform IBP reduction on the Aparted input
ex GMatSimplify(const ex &expr)
ex GAS(const ex &expr, unsigned rl)
function similar to GAD/GSD in FeynClac
ex GMatExpand(const ex &expr_in)
lst LoopUF(const IBP &ibp, const ex &idx)
UF function.
ex ApartIR2ex(const ex &expr_in)
convert ApartIR to ex
ex Contract(const ex &ei)
ex F2ex(const ex &expr_in)
convert F(ps, ns) to normal ex, ns is like FIRE convention
const int form_trace_each_all
void clearSP()
delete all assignment in SP_map
const int form_expand_all
ex & letSP(const ex &p1, const ex &p2)
return the reference of p1.p2
ex A0(const ex m2, int n, ex d)
scalar integral A0, devided by (2pi)^(4-2ep)
ex charge_conjugate(const ex &expr)
make the charge conjugate operaton, M -> C^{-1} . M^T . C w.r.t. a GMat object
exmap ApartRules(const exvector &airs, bool irc)
const int form_trace_each_each
lst vec2lst(const exvector &ev)
convert exvector to lst
const int form_trace_auto
ex Apart(const matrix &mat)
Apart on matrix.
ex ncmul_expand(const ex &expr)
ex UnContract(const ex expr, const lst &loop_ps, const lst &ext_ps=lst{})
ex LC(ex pi1, ex pi2, ex pi3, ex pi4)
function similar to LCD in FeynCalc
ex form(const ex &iexpr, int verb)
evalulate expr in form program, see also the form_trace_mode and form_expand_mode
ex GMatContract(const ex &expr_in)
make contract on matrix, i.e., GMat(a,i1,i2)*GMat(b,i2,i3) -> GMat(a*b,i1,i3)
ex TIR(const ex &expr_in, const lst &loop_ps, const lst &ext_ps)
Tensor Index Reduction, note that we only handle numerator.
ex SP(const ex &a, bool use_map=false)
std::function< lst(const IBP &, const ex &)> UF
std::function< ex(const ex &, const ex &)> cv