# Multivariate Ramanujan series for the D=2 sunset This backend reaches the first graph-to-series milestone for a **massive, unit-power, two-loop sunset in D=2**. It generates exact Schwinger bracket matrices and Gamma families from the graph, resolves coalescing poles analytically, selects a justified convergence region, and sums the finite multivariate series at arbitrary precision. Evaluation performs no quadrature, QMC, numerical regulator extrapolation, or fallback to the sector backend. The symbolic compiler is reusable for other graphs. Numerical family selection, pole resolution, and convergence proofs are currently specific to this sunset. ## Use it The base package dependencies suffice; SciPy is needed only for optional comparisons with the {doc}`multiloop` numerical backend. ```python import mpmath as mp from ramanujan_qft import ScalarEdge, ScalarGraph, compile_sunset_rmt graph = ScalarGraph([ScalarEdge(0, 1, 1) for _ in range(3)], external_momenta={0: [10], 1: [-10]}) series = compile_sunset_rmt(graph) result = series.evaluate(dps=30) print(series.chart) print(mp.nstr(result.value, 25)) print(result.converged) ``` ```text momentum 0.6290167075906141495908273 True ``` The invariant is $p_E^2=100$, not 10. The normalization is the positive Euclidean integral $$ I=\int\frac{d^2k\,d^2\ell}{\pi^2} \frac{1}{(k^2+m_1^2)(\ell^2+m_2^2)((p-k-\ell)^2+m_3^2)}. $$ `integrate_graph_rmt(graph, dps=30)` is the compile-and-evaluate convenience function. It and `series.evaluate` return `RMTSeriesResult`, whose value is an mpmath number. `truncation_bound`, `error_estimate`, `terms`, `shells`, `working_dps`, `chart`, and `convergence_ratio` expose the summation diagnostics. A dominant mass also permits zero momentum: ```python from ramanujan_qft import integrate_graph_rmt vacuum = ScalarGraph([ScalarEdge(0, 1, m2) for m2 in (1, 4, 100)]) value = integrate_graph_rmt(vacuum, dps=30) print(value.chart) print(mp.nstr(value.value, 25)) ``` ```text mass 0.185949303854726222708126 ``` ## Exact graph-to-bracket compilation For any supported `ScalarGraph`, `schwinger_brackets` obtains $U$ and $K=F-U\sum_i m_i^2\alpha_i$ from the graph. It expands the mass exponentials, $\exp(-K/U)$, and the remaining power of $U$. Each monomial contributes an exact integer exponent column. The integration weights and the power of $U$ provide the bracket offsets. A basis is solved by exact linear algebra and converted into a formal Gamma-function summand. For the nonzero-momentum sunset, use indices $(k,r_1,r_2,r_3,a,b,c)$ for the momentum exponential, the three mass exponentials, and the three monomials of $U$. The brackets are $$ \begin{pmatrix} 1&1&0&0&1&1&0\\ 1&0&1&0&1&0&1\\ 1&0&0&1&0&1&1\\ 1&0&0&0&1&1&1 \end{pmatrix} \begin{pmatrix}k\\r_1\\r_2\\r_3\\a\\b\\c\end{pmatrix} +\begin{pmatrix}\nu_1\\\nu_2\\\nu_3\\D/2\end{pmatrix}=0. $$ This matrix is constructed from the polynomials; it is not stored as a hard-coded matrix. In a square bound-index basis $B$, with free indices $n_f$, the compiler solves $n_b=-B^{-1}(c+A_f n_f)$ and applies the Gamma/bracket rule with determinant factor $1/|\det B|$. Free factorial indicators, monomial coefficients, $1/\Gamma(D/2+k)$, and $1/\prod_i\Gamma(\nu_i)$ are retained. No dependent rows are silently discarded, and determinant tests use no floating-point threshold. A nonsingular basis is **not** a convergence proof. ```python from ramanujan_qft import schwinger_brackets import sympy as sp eta = sp.Symbol("eta", real=True) brackets = schwinger_brackets(graph, propagator_shifts=(eta, eta, eta)) assert brackets.matrix.shape == (4, 7) basis = brackets.solve((0, 4, 5, 6)) assert abs(basis.determinant) == 1 # Inspect basis.values and basis.term for the exact solved indices and Gamma term. assert len(series.gamma_terms) == 8 ``` `eta` shifts the propagator powers solely to expose the removable pole collisions. It is not a dimensional regulator or an epsilon-expansion feature. The compiled object retains `bracket_system`, `families`, `gamma_terms`, `summation_indices`, `regulator`, and the finite `coefficient_expression`. The evaluator checks that the generated scale constraint matches the sunset Mellin kernel before using the optimized coefficient formula below. The bracket rule follows the generalized RMT framework of [González, Moll and Schmidt](https://arxiv.org/abs/1103.0588). Only candidate algebra is produced for arbitrary topologies; the current numerical compiler recognizes the sunset by connectivity, not polynomial degree. ## Proven series regions Write $Q=\sqrt{p_E^2}$ and use positive masses $m_i=\sqrt{m_i^2}$. | Chart | Required strict inequality | Squared expansion ratios | |---|---|---| | `momentum` | $Q>m_1+m_2+m_3$ | $z_i=m_i^2/Q^2$ | | `mass` | $M>m_a+m_b+Q$, with $M$ the largest mass | $(z_a,z_b,w)=(m_a^2/M^2,m_b^2/M^2,Q^2/M^2)$ | `chart="auto"` selects a covered region; an explicit chart may also be requested. These are sufficient domains, not a claim of maximal convergence. The equal-mass vacuum, the intervening region, and the boundaries are refused with `RMTDomainError`, even when the integral itself is finite. For example, the known vacuum value $4\operatorname{Cl}_2(\pi/3)/\sqrt3$ is an independent benchmark for the existing numerical backend, **not a value supplied by these RMT charts**. The separate {doc}`sunset_taylor` API now covers equal-mass vacuum and finite Euclidean momenta by a differential-equation Taylor series. An RMT call never silently switches to this method. Unequal-mass gaps remain open. Domain decisions use rational lower and upper enclosures of sums of square roots, constructed using integer square roots. A positive gap is required; there is no floating-point tolerance that turns a boundary into an interior point. Inconclusive enclosures are refused. Very small exact gaps also increase the required working precision. The momentum expansion is the coalesced form of a Lauricella $F_C^{(3)}$ representation. The general sunset series and these convergence conditions are discussed by [Ananthanarayan, Friot and Ghosh](https://arxiv.org/abs/1911.10096). Here is a separate outline connecting the generated brackets to that expansion. For general powers, set $A=\sum_i\nu_i$ and $Z=\sum_i z_i$. In a common initial Mellin-Barnes strip the Schwinger integral gives $$ \frac{(Q^2)^{2-A}}{\prod_i\Gamma(\nu_i)} \int_{\cal C}\frac{d^3z}{(2\pi i)^3} \frac{\Gamma(A+Z-2)}{\Gamma(3-A-Z)} \prod_i\Gamma(-z_i)\Gamma(1-\nu_i-z_i) \left(\frac{m_i^2}{Q^2}\right)^{z_i}. $$ The two right-pole choices for each mass generate eight families, exactly the choices between a mass index and the complementary $U$ index in the bracket matrix. The standard Lauricella contour closure applies when $\sum_i m_i/Q<1$. Analytic continuation in the powers then permits $\nu_i\to1$ inside this region. One of the eight regulated families vanishes identically: the all-$U$-index family contains $1/\Gamma(-N)=0$ for $N=n_1+n_2+n_3\ge0$, independently of dimension and propagator powers. The sum of the remaining regulated families has a finite limit at $D=2$, $\nu_i=1$. The resulting series has the absolute majorant given below. For the mass chart, there are four small-mass pole families. It can also be justified by the coordinate-space identity $I=4\int_0^\infty rJ_0(Qr)\prod_iK_0(m_i r)\,dr$: expand the two lighter $K_0$ factors and $J_0$, retaining $K_0(Mr)$. The absolute expanded integrand is bounded at infinity by a polynomial/logarithmic factor times $e^{-(M-m_a-m_b-Q)r}$; it is integrable at zero. Thus termwise integration is justified in the stated strict domain. ## Pole collisions and finite coefficients Let $N=n_1+n_2+n_3$, $H_n=\sum_{j=1}^n1/j$ and $H_n^{(2)}=\sum_{j=1}^n1/j^2$, with both zero at $n=0$. Define $$ W_n=\frac{\Gamma(N+1)^2}{\prod_i\Gamma(n_i+1)^2}. $$ In the momentum chart, $b_i=H_{n_i}-H_N-\tfrac12\log z_i$ and $$ I=\frac4{Q^2}\sum_{n_1,n_2,n_3\ge0}(-1)^N W_n\prod_i z_i^{n_i} \left(\sum_{i