14 using namespace GiNaC;
45 GINAC_DECLARE_PRINT_CONTEXT(
FormFormat, print_dflt)
48 static void power_print(
const power & p,
const FormFormat & c,
unsigned level=0);
50 template<
class T>
const FormFormat & operator << (
const T & v)
const {
54 const FormFormat & operator << (
const basic & v)
const;
55 const FormFormat & operator << (
const ex & v)
const;
56 const FormFormat & operator << (
const lst & v)
const;
57 const FormFormat & operator<<(std::ostream& (*v)(std::ostream&))
const;
64 static _init FormFormat_init;
72 GINAC_DECLARE_PRINT_CONTEXT(
FCFormat, print_dflt)
74 FCFormat(ostream &os,
unsigned opt=0);
75 static void ncmul_print(
const ncmul & p,
const FCFormat & c,
unsigned level=0);
77 template<
class T>
const FCFormat & operator << (
const T & v)
const {
81 const FCFormat & operator << (
const basic & v)
const;
82 const FCFormat & operator << (
const ex & v)
const;
83 const FCFormat & operator << (
const lst & v)
const;
84 const FCFormat & operator<<(std::ostream& (*v)(std::ostream&))
const;
86 const FCFormat & operator << (
const matrix & v)
const;
87 const FCFormat & operator << (
const exvector & v)
const;
88 const FCFormat & operator << (
const exmap & v)
const;
89 const FCFormat & operator << (
const exset & v)
const;
96 static _init FCFormat_init;
107 static GiNaC::registered_class_info reg_info;
110 static GiNaC::registered_class_info &get_class_info_static();
116 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
119 Index * duplicate()
const override;
120 void accept(GiNaC::visitor & v)
const override;
121 const GiNaC::registered_class_info &get_class_info()
const override;
122 GiNaC::registered_class_info &get_class_info()
override;
123 const char *class_name()
const override;
125 int compare_same_type(
const GiNaC::basic & other)
const override;
130 Index(
const string &s,
const Type type=Type::VD);
135 void print(
const print_context &c,
unsigned level = 0)
const;
136 void archive(archive_node & n)
const override;
137 void read_archive(
const archive_node& n)
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;
143 bool is_equal_same_type(
const basic & other)
const override;
152 static GiNaC::registered_class_info reg_info;
154 static GiNaC::registered_class_info &get_class_info_static();
160 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
163 Vector * duplicate()
const override;
164 void accept(GiNaC::visitor & v)
const override;
165 const GiNaC::registered_class_info &get_class_info()
const override;
166 GiNaC::registered_class_info &get_class_info()
override;
167 const char *class_name()
const override;
169 int compare_same_type(
const GiNaC::basic & other)
const override;
177 void print(
const print_context &c,
unsigned level = 0)
const;
178 void archive(archive_node & n)
const override;
179 void read_archive(
const archive_node& n)
override;
180 static bool has(
const ex &e);
181 static lst
all(
const ex &e);
182 ex derivative(
const symbol & s)
const override;
183 bool is_equal_same_type(
const basic & other)
const override;
192 static GiNaC::registered_class_info reg_info;
194 static GiNaC::registered_class_info &get_class_info_static();
200 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
203 SUNT * duplicate()
const override;
204 void accept(GiNaC::visitor & v)
const override;
205 const GiNaC::registered_class_info &get_class_info()
const override;
206 GiNaC::registered_class_info &get_class_info()
override;
207 const char *class_name()
const override;
209 int compare_same_type(
const GiNaC::basic & other)
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;
218 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
219 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
220 void print(
const print_dflt &c,
unsigned level = 0)
const;
221 void archive(archive_node & n)
const override;
222 void read_archive(
const archive_node& n)
override;
223 static bool has(
const ex &e);
224 static lst
all(
const ex &e);
225 ex derivative(
const symbol & s)
const override;
226 ex conjugate()
const override;
227 bool is_equal_same_type(
const basic & other)
const override;
236 static GiNaC::registered_class_info reg_info;
238 static GiNaC::registered_class_info &get_class_info_static();
244 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
247 SUNF * duplicate()
const override;
248 void accept(GiNaC::visitor & v)
const override;
249 const GiNaC::registered_class_info &get_class_info()
const override;
250 GiNaC::registered_class_info &get_class_info()
override;
251 const char *class_name()
const override;
253 int compare_same_type(
const GiNaC::basic & other)
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;
264 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
265 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
266 void archive(archive_node & n)
const override;
267 void read_archive(
const archive_node& n)
override;
268 static bool has(
const ex &e);
269 static lst
all(
const ex &e);
270 ex derivative(
const symbol & s)
const override;
271 bool is_equal_same_type(
const basic & other)
const override;
281 static GiNaC::registered_class_info reg_info;
283 static GiNaC::registered_class_info &get_class_info_static();
289 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
292 SUNF4 * duplicate()
const override;
293 void accept(GiNaC::visitor & v)
const override;
294 const GiNaC::registered_class_info &get_class_info()
const override;
295 GiNaC::registered_class_info &get_class_info()
override;
296 const char *class_name()
const override;
298 int compare_same_type(
const GiNaC::basic & other)
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;
309 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
310 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
311 void archive(archive_node & n)
const override;
312 void read_archive(
const archive_node& n)
override;
313 static bool has(
const ex &e);
314 static lst
all(
const ex &e);
315 ex derivative(
const symbol & s)
const override;
316 bool is_equal_same_type(
const basic & other)
const override;
325 static GiNaC::registered_class_info reg_info;
327 static GiNaC::registered_class_info &get_class_info_static();
333 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
336 Pair * duplicate()
const override;
337 void accept(GiNaC::visitor & v)
const override;
338 const GiNaC::registered_class_info &get_class_info()
const override;
339 GiNaC::registered_class_info &get_class_info()
override;
340 const char *class_name()
const override;
342 int compare_same_type(
const GiNaC::basic & other)
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;
355 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
356 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
357 void archive(archive_node & n)
const override;
358 void read_archive(
const archive_node& n)
override;
359 static bool has(
const ex &e);
360 static lst
all(
const ex &e);
361 ex derivative(
const symbol & s)
const override;
362 bool is_equal_same_type(
const basic & other)
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;
391 static GiNaC::registered_class_info &get_class_info_static();
397 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
400 Eps * duplicate()
const override;
401 void accept(GiNaC::visitor & v)
const override;
402 const GiNaC::registered_class_info &get_class_info()
const override;
403 GiNaC::registered_class_info &get_class_info()
override;
404 const char *class_name()
const override;
406 int compare_same_type(
const GiNaC::basic & other)
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;
423 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
424 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
425 void archive(archive_node & n)
const override;
426 void read_archive(
const archive_node& n)
override;
427 static bool has(
const ex &e);
428 static lst
all(
const ex &e);
429 ex derivative(
const symbol & s)
const override;
430 bool is_equal_same_type(
const basic & other)
const override;
432 ex
LC(ex pi1, ex pi2, ex pi3, ex pi4);
440 static GiNaC::registered_class_info reg_info;
442 static GiNaC::registered_class_info &get_class_info_static();
448 template<
class B,
typename... Args>
friend B &
dynallocate(Args &&... args);
451 DGamma * duplicate()
const override;
452 void accept(GiNaC::visitor & v)
const override;
453 const GiNaC::registered_class_info &get_class_info()
const override;
454 GiNaC::registered_class_info &get_class_info()
override;
455 const char *class_name()
const override;
457 int compare_same_type(
const GiNaC::basic & other)
const override;
465 DGamma(
int int_1567,
unsigned _rl=0);
467 void print(
const print_dflt &c,
unsigned level = 0)
const;
468 void form_print(
const FormFormat &c,
unsigned level = 0)
const;
469 void fc_print(
const FCFormat &c,
unsigned level = 0)
const;
470 return_type_t return_type_tinfo()
const override;
471 unsigned return_type()
const override {
return return_types::noncommutative; }
472 bool match_same_type(
const basic & other)
const override;
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;
479 void read_archive(
const archive_node& n)
override;
480 static bool has(
const ex &e);
481 static lst
all(
const ex &e);
482 ex derivative(
const symbol & s)
const override;
483 ex conjugate()
const override;
484 bool is_equal_same_type(
const basic & other)
const override;
490 DECLARE_FUNCTION_3P(Matrix)
491 DECLARE_FUNCTION_1P(TR)
492 DECLARE_FUNCTION_1P(TTR)
493 DECLARE_FUNCTION_1P(HF)
497 ex
GAS(
const ex &expr,
unsigned rl=0);
501 ex
form(
const ex &expr,
int verb=0);
502 ex
UnContract(
const ex expr,
const lst &loop_ps,
const lst &ext_ps=lst{});
503 ex
TIR(
const ex &expr_in,
const lst &loop_ps,
const lst &ext_ps);
505 ex
Apart(
const matrix & mat);
506 ex
Apart(
const ex &expr_in,
const lst &vars, exmap sgnmap={});
507 ex
Apart(
const ex &expr_in,
const lst &loops,
const lst & extmoms, exmap sgnmap={});
510 ex
F2ex(
const ex & expr_in);
512 void ApartIBP(exvector &io_vec,
int IBPmethod,
const lst & loops,
const lst & exts,
513 const lst & cut_props=lst{}, std::function<lst(
const IBP &,
const ex &)> uf=
LoopUF);
514 inline void ApartIBP(
int IBPmethod, exvector &io_vec,
const lst & loops,
const lst & exts,
515 const lst & cut_props=lst{}, std::function<lst(
const IBP &,
const ex &)> uf=
LoopUF) {
516 return ApartIBP(io_vec, IBPmethod, loops, exts, cut_props, uf);
518 exmap
ApartRules(
const exvector &airs,
bool irc=
true);
522 bool ap_rules =
true;
531 bool CutFirst =
true;
536 std::function<ex(
const ex &,
const ex &)> cv =
nullptr;
547 class ApartIR1_SERIAL {
public:
static unsigned serial; };
548 template<
typename T1>
549 inline GiNaC::function ApartIR(
const T1 & p1) {
550 return GiNaC::function(ApartIR1_SERIAL::serial, ex(p1));
553 class ApartIR2_SERIAL {
public:
static unsigned serial; };
554 template<
typename T1,
typename T2>
555 inline GiNaC::function ApartIR(
const T1 & p1,
const T2 & p2) {
556 return GiNaC::function(ApartIR2_SERIAL::serial, ex(p1), ex(p2));
561 ex
ToCF(
const ex & e);
564 ex
DoColor(
const ex & e,
const ex & pref=1,
int method=0);
565 ex
A0(
const ex m2,
int n=1,
const ex
d=4-2*
ep);
virtual void visit(const DGamma &)=0
class for Dirac Gamma object
unsigned return_type() const override
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
static bool has(const ex &e)
virtual void visit(const Eps &)=0
class for Levi-Civita object https://onlinelibrary.wiley.com/doi/pdf/10.1002/9783527630097....
static bool has(const ex &e)
friend B & dynallocate(Args &&... args)
static lst all(const ex &e)
IBP base class for IBP reduction.
virtual void visit(const Index &)=0
friend B & dynallocate(Args &&... args)
static GiNaC::exmap Dimension
static lst all(const ex &e)
static bool has(const ex &e)
virtual void visit(const Pair &)=0
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
static bool has(const ex &e)
virtual void visit(const SUNF4 &)=0
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
static bool has(const ex &e)
virtual void visit(const SUNF &)=0
static bool has(const ex &e)
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
virtual void visit(const SUNT &)=0
static bool has(const ex &e)
static lst all(const ex &e)
friend B & dynallocate(Args &&... args)
class extended to GiNaC symbol class, represent a positive symbol
virtual void visit(const Vector &)=0
static lst all(const ex &e)
static bool has(const ex &e)
friend B & dynallocate(Args &&... args)
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)
void let_op(ex &ex_in, int index1, int index2, const ex item)
update index1-th.index2-th of expression with item
ex MatrixContract(const ex &expr_in)
make contract on matrix, i.e., Matrix(a,i1,i2)*Matrix(b,i2,i3) -> Matrix(a*b,i1,i3)
const int form_expand_none
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
void ApartIBP(exvector &air_vec, AIOption aio)
perform IBP reduction on the Aparted input
ex GAS(const ex &expr, unsigned rl)
function similar to GAD/GSD in FeynClac
lst LoopUF(const IBP &ibp, const ex &idx)
UF function.
ex ApartIR2ex(const ex &expr_in)
convert ApartIR to ex
lst UF(const ex &props, const ex &ns, const ex &loops, const ex &tloops, const ex &lsubs, const ex &tsubs)
UF function, from FIRE.m.
ex F2ex(const ex &expr_in)
convert F(ps, ns) to normal ex, ns is like FIRE convention
const int form_trace_each_all
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 Matrix object
exmap ApartRules(const exvector &airs, bool irc)
const int form_trace_each_each
const int form_trace_auto
ex Apart(const matrix &mat)
Apart on matrix.
void clearSP(const ex &p1, const ex &p2)
delete the assignment of p1.p2
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 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)