Open-source software · v1.0
FAIR
Fast Automatic Integral Reduction
A self-contained C++/FLINT reducer for the integration-by-parts identities of multi-loop Feynman integrals. Transcribed from the Maple source code of A.I.R. (arXiv:hep-ph/0404258) with Claude Code.
I(seed) = Σⱼ cj(d, s, t, …) · I(masterj)
Pipeline
You describe a topology once. fairgen derives the IBP templates,
scaleless sectors and a rank-ordered seed list; fair finds the
masters and reduces every target, melting frozen handles into closed rational functions.
What's in the box
Everything needed to take a topology from specification to reduced integrals — and nothing you have to license.
No CAS dependency
All arithmetic is FLINT (fmpz_mpoly_q). build.sh bundles
libflint/gmp/mpfr into ./lib and rpaths them, so the
binaries are portable as a unit.
Physics runcards
Declare loops, legs, on-shell conditions and invariants; fair-run derives every
scalar product. You never hand-compute a dot product.
Freezing reduction + melt
Coefficients stay as handles through elimination; a single end-of-run melt normalizes
only at the leaves — fast, with incremental --save/--resume.
Four output formats
Maple (the default), Mathematica, FORM and sympy — the same reduction
data, each in native notation and ready to read/Get/#include/import.
Output of huge reductions
gzip (~4.4×), per-target split, coefficient interning, and a load-on-demand FORM TableBase for output too large for a CAS to parse.
Cutkosky cuts & reverse unitarity
Flag a propagator | cut to pin it as a delta function, so phase-space
(real-radiation) integrals reduce by IBP exactly like virtual ones —
reverse unitarity.
Quick start
From a fresh build to reduced integrals in your CAS — the shipped two-mass-easy box.
1 · build & self-check
# C++17 + FLINT 3.1+ (GMP, MPFR) ./build.sh ./test/run_tests.sh # → ALL TESTS PASSED # run a physics runcard ./fair-run examples/box2me.run -o out/ --format mathematica
2 · the runcard (pure physics)
name Box2me loops k1 legs p1 p2 p3 p4 onshell p2 p4 invariant s = (p1+p2)^2 invariant t = (p2+p3)^2 prop k1 prop k1+p1+p2+p3 maxtensor [2, +1] # rank 0..2, seed +1
3 · read the result in Mathematica
(* out/manifest.txt → masters (5) · 32 targets melted · not closed: 0 *) Get["out/masters.m"] (* MASTERS *) Get["out/reductions.m"] (* red = { target -> Σ cᵢ masterᵢ, … } *) expr2 = expr /. red; (* rewrite onto masters *)
Download & cite
If FAIR is useful in your work, please cite the A.I.R. paper it implements:
Included Examples
A selection of the example topologies shipped with FAIR, from one to three loops.
| Topology | Loops | Masters |
|---|---|---|
| box2metwo-mass-easy box | 1 | 5 |
| pentagonone off-shell leg | 1 | 13 |
| pboxplanar double box | 2 | 12 |
| tetra3non-planar vacuum | 3 | — |
| ladder3MINCER propagator | 3 | 10 |
| dy_realNLO real emission · p₁p₂→V+parton (cut) | 1 | 1 |
| higgs_rrNNLO double-real · gg→H+2 partons | 2 | 4 |
| higgs_n3loN³LO triple-real · gg→H+3 partons | 3 | 22 |
dy_real, higgs_rr and higgs_n3lo are
reverse-unitarity phase-space topologies —
the produced boson and the radiated partons enter as cut lines. dy_real is the
one-loop NLO real-emission family (one master, the two-body phase space); higgs_rr is the NNLO
double-real family (Higgs + two partons); higgs_n3lo is a genuine three-loop N³LO
triple-real family (gg → H + three cut partons), which FAIR reduces to 22 master integrals with
every target closed.