FeynFacet

FeynFacetOne Feynman-diagram calculation, many facets

FeynFacet derives perturbative results in quantum field theory from Feynman diagrams. Every calculation follows one chain of steps: diagrams, spin and color algebra, integration-by-parts reduction, master integrals, renormalization, and the factorization or matching that the observable requires. A new observable reuses the chain and changes only what it needs. The chain is written as executable Mathematica notebooks that a physicist can read cell by cell, with three independent implementations of the spin and color algebra.

The calculations released here give the NLO partonic hard functions for single-inclusive hadron and jet production in proton–proton and lepton–proton collisions, for unpolarized and longitudinally polarized beams, the double-transverse spin asymmetry $A_{TT}$ in proton–proton collisions, NLO TMDPDF matching coefficients and soft functions, and two new results: the NLO transverse spin transfer in lepton–quark scattering, which enters transverse-spin measurements at the Electron-Ion Collider, and the NLO transverse spin transfer in proton–proton collisions. Every published result is rederived, not copied, and compared with the literature: identically where the published coefficients are analytic expressions, otherwise with the reference codes at many points to their numerical precision.

Born diagram of ℓ q → ℓ q: one-photon exchange.
Born diagram of ℓ q → ℓ q: one-photon exchange.
One-loop QCD vertex correction to ℓ q → ℓ q (the external-leg self energies are scaleless and vanish).
One-loop QCD vertex correction to ℓ q → ℓ q (the external-leg self energies are scaleless and vanish).
Real emission ℓ q → ℓ q g: gluon radiated from the incoming quark.
Real emission ℓ q → ℓ q g: gluon radiated from the incoming quark.
ℓ g → q + X (observed quark): photon-gluon fusion, diagram 1 of 2.
ℓ g → q + X (observed quark): photon-gluon fusion, diagram 1 of 2.
Born diagram 4 of 4 of g g → g g (channel class 15, g g -> g).
Born diagram 4 of 4 of g g → g g (channel class 15, g g -> g).
Real emission g g → g g g (channel class 15): diagram 13 of 25.
Real emission g g → g g g (channel class 15): diagram 13 of 25.
Gluon TMD PDF: the beam function I_gg at NLO (real emission).
Gluon TMD PDF: the beam function I_gg at NLO (real emission).
Soft function S_q at NLO: a real gluon between the Wilson lines along n and n̄.
Soft function S_q at NLO: a real gluon between the Wilson lines along n and n̄.

Getting started

An AI coding agent installs and checks the tools for you; you do not need to set them up one by one.

  1. Install Mathematica and clone the repository.
  2. Start the agent in the repository folder, with permission to run Mathematica and the external tools without approving each command: Codex with codex --approve-for-me (or “Approve for me” under /permissions at the start of a session); Claude Code in auto mode (Shift+Tab, or claude --permission-mode auto). The tools write to their user and temporary directories, which a restrictive sandbox blocks.
  3. Paste the setup prompt below. The agent installs FeynCalc, FeynArts, FORM, Tracer, Kira, Fermat and SubTropica and runs the toolchain check until it reports READY.
Set up FeynFacet on this machine. Install the tools it needs, following
docs/INSTALL.md (docs/INSTALL-macOS.md on a Mac; on Apple silicon, build
Kira with tools/install_kira.py as described there), and run
python3 feynfacet.py check --all-routes until it reports READY.
Ask me before anything that needs an administrator password.

The installation notes are what the agent follows. Mathematica and its license stay with you, and the agent asks before anything that needs your administrator password; on a Mac this includes Homebrew and Apple's Command Line Tools for Xcode. On Apple silicon the agent builds a patched Kira, since the Kira 3.1 release build can silently return wrong reductions there (details); this one-time build takes a few minutes.

Then reproduce a calculation (Reproduce) or let the agent compute a new process (Example).

The standard

A result is shown here only when it meets all four requirements:

  1. Three algebra routes. The squared matrix elements are computed independently with FeynCalc, FORM and Tracer. For proton–proton collisions the three squares must agree before any integration (in exact rational arithmetic at two random rational points of all variables, every scalar integral given its own value); the integration and assembly act on each route's squares, and the finite coefficients are compared across routes. For the lepton–proton and TMD calculations the finite coefficients of the three routes agree symbolically.
  2. Published benchmarks and crossing. For known results, the finite coefficients agree with the published coefficients or the reference codes: identically where analytic expressions are available, otherwise to the precision of the reference at many points. The new transverse spin transfer in proton–proton collisions is tied to the published double-transverse result by a generalized crossing symmetry found in this calculation (verified symbolically at Born level and at exact test points at NLO).
  3. Every step visible. Diagram generation (FeynArts), traces, reverse unitarity, Kira reduction, master integrals (SubTropica), threshold expansion, renormalization and factorization are cells of the notebooks; every check is a visible Require that stops the calculation if it fails (pole cancellation, Born tables, scale dependence, and gauge invariance where it is tested).
  4. Usable without the tools. The final coefficients are plain expressions in Coefficients/, with a stand-alone evaluator that checks itself against 50-digit reference values.

The results

ResultProcessStatusCompared with
Transverse spin transfer in lepton–quark scattering$\ell\, q^{\uparrow} \to q^{\uparrow} + X$ at NLO; resolved-photon Born channelsnewnew
Transverse spin transfer in proton–proton collisions$a^{\uparrow} b \to c^{\uparrow} + X$ at NLO, seven channel classesnewrelated to the double-transverse result by a generalized crossing symmetry found in this calculation
Proton–proton collisions: the 16 channel classes$a\,b \to c + X$, spin average and double-longitudinal helicity differenceknown, rederivedAversa, Chiappetta, Greco, Guillet (1989); Jäger, Schäfer, Stratmann, Vogelsang (2003)
Double-transverse proton–proton collisions$a^{\uparrow} b^{\uparrow} \to c + X$ ($A_{TT}$), five channel classesknown, rederivedMukherjee, Stratmann, Vogelsang (2005), their Fortran code
Lepton–quark scattering$\ell\, q \to q + X$, unpolarized and double-longitudinalknown, rederivedHinderer, Schlegel, Vogelsang (2015, 2017)
Lepton–quark and lepton–gluon, other tagged parton$\ell\, q \to g + X$ and $\ell\, g \to q + X$known, rederivedHinderer, Schlegel, Vogelsang (2015, 2017)
TMD beam functions and soft functionquark and gluon TMD PDFs at NLO, exponential rapidity regulatorknown, rederivedLuo, Yang, Zhu, Zhu (2021)
Born tableall $2\to2$ partonic channels in $D$ dimensions, unpolarized and helicity differenceknown, rederivedEllis, Stirling, Webber (Table 7.1); helicity and crossing relations

How it was made

The calculations were carried out by AI agents working with physicists: the agents wrote and ran the process programs and used physics checks to locate and correct inconsistencies; the physicists specified the problems and reviewed the results. The paper describes the workflow (arXiv); these pages present the calculation itself.