Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Finite-Field Reconstruction of Rational Functions

    The rational coefficient of a loop integral can be much simpler than the algebra used to obtain it. Can we recover that coefficient without carrying a symbolic expression through every elimination step? We will solve the bubble IBP system using integers modulo several primes, reconstruct its dependence on dimension and momentum, and verify the result exactly. An intentionally insufficient first prime will show why a plausible reconstruction is not yet an answer.

    Preparation: Automated IBP reduction, elementary linear algebra, and modular arithmetic. No background in numerical integration is needed for the reconstruction itself.

    A rational calculation as an evaluation procedure

    Use the massive Euclidean bubble of the preceding article, with the same measure and master normalization:

    B22=cBB11+cTT2,x=Q2m2,F(D,x)=m4cB.B_{22}=c_B B_{11}+c_T T_2,\qquad x=\frac{Q^2}{m^2},\qquad F(D,x)=m^4c_B.

    The dimensionless target is

    F(D,x)=−(D−3)[4+(6−D)x]x(x+4)2.(1)F(D,x)=-\frac{(D-3)[4+(6-D)x]}{x(x+4)^2}. \tag{1}

    We know this expression from the small derivation, which makes it a useful benchmark. The reconstruction code is not given Eq. (1): its evaluation procedure generates the seven IBP rows at m2=1m^2=1, reduces them in the requested field, and returns the coefficient of B11B_{11} in the B22B_{22} row. It never evaluates a master integral.

    For a prime pp, the field Fp\mathbb F_p consists of residue classes modulo pp. Addition and multiplication are followed by reduction modulo pp; division by a nonzero bb means multiplication by b−1b^{-1}, computed by the Euclidean algorithm. Thus a rational number maps as

    ab⟼a b−1(modp),p∤b.\frac ab\longmapsto a\,b^{-1}\pmod p,\qquad p\nmid b.

    Every operation of Gaussian elimination is available, provided a suitable nonzero pivot exists. A zero pivot is handled by exchanging rows; absence of the required independent pivots rejects that evaluation. This is exact arithmetic, without a small-pivot tolerance. The black-box formulation and rational map are described by Peraro, §§2.1 and 3.1.

    For example, F(4,2)=−1/9F(4,2)=-1/9 maps to 5656 in F101\mathbb F_{101}, because 9⋅45=1(mod101)9\cdot45=1\pmod{101}. The number 5656 is not a floating-point approximation to −1/9-1/9; it is an exact image that has discarded information about numerator and denominator size.

    Reconstruct the numerator and detect the denominator

    We choose an explicitly bounded ansatz:

    N(D,x)=∑i=02∑j=01nijDixj,R(x)=∑j=0rdjxj,0≤r≤3.(2)N(D,x)=\sum_{i=0}^{2}\sum_{j=0}^{1}n_{ij}D^ix^j,\qquad R(x)=\sum_{j=0}^{r}d_jx^j,\qquad 0\le r\le3. \tag{2}

    The assumption that the denominator is independent of DD, and these small degree bounds, are motivated by the preceding elimination. They are inputs to this teaching implementation. It is not an unrestricted discovery algorithm for an arbitrary rational function.

    At an admissible sample (Ds,xs)(D_s,x_s), obtain fsf_s from the modular IBP solver. Then impose

    ∑i=02∑j=01nijDsixsj−fs∑j=0rdjxsj=0.(3)\sum_{i=0}^{2}\sum_{j=0}^{1}n_{ij}D_s^ix_s^j -f_s\sum_{j=0}^{r}d_jx_s^j=0. \tag{3}

    This is linear in the unknown coefficients even though F=N/RF=N/R is a rational function of its arguments. Keep it homogeneous initially. Setting d0=1d_0=1 would be fatal here: the true denominator has no constant term. The overall normalization is fixed only after finding a nonzero null vector with a nonzero denominator.

    Use the deterministic grid

    D∈{2,4,5,6,7},x∈{1,2,…,8}.D\in\{2,4,5,6,7\},\qquad x\in\{1,2,\ldots,8\}.

    There are 40 evaluations for each prime, reused for all four denominator-degree trials. The numerator always has six candidate monomials, including coefficients that may turn out to vanish. The resulting ranks are identical for p=101,103,107p=101,103,107:

    Trial rrUnknown coefficientsRankNullity
    0770
    1880
    2990
    31091

    A full-rank homogeneous system has only the zero vector, which cannot define a rational function. At r=3r=3 there is one candidate up to scale. Its first nonzero denominator coefficient is d1d_1; divide the entire vector by d1d_1. The normalized result will be

    R(x)=x+x22+x316,(4)R(x)=x+\frac{x^2}{2}+\frac{x^3}{16}, \tag{4} N(D,x)=34−D4+(98−9D16+D216)x.(5)N(D,x)=\frac34-\frac D4+ \left(\frac98-\frac{9D}{16}+\frac{D^2}{16}\right)x. \tag{5}

    At this stage each coefficient is still a residue, so fractions in Eqs. (4)–(5) are the result we must recover. Over F101\mathbb F_{101} the numerator coefficients in order (1,x,D,Dx,D2,D2x)(1,x,D,Dx,D^2,D^2x) are

    (26,39,25,31,0,19),(26,39,25,31,0,19),

    and the denominator coefficients in order (1,x,x2,x3)(1,x,x^2,x^3) are (0,1,51,19)(0,1,51,19). Common normalization matters: multiplying numerator and denominator by different arbitrary constants in different fields would make coefficientwise combination meaningless. Peraro discusses this ambiguity in §2.2.

    The dense linear-system method is intentionally modest. The number of candidate monomials grows rapidly with variables and degree. Peraro's §3.1, Eqs. (3.3)–(3.4) explains this approach and its scaling limitation before developing more efficient interpolation methods.

    Combine primes, then recover fractions

    Suppose a coefficient is aa modulo MM and bb modulo a new coprime prime pp. A convenient Chinese-remainder update is

    a′=a+M[(b−a)M−1 mod p](modMp).(6)a'=a+M\big[(b-a)M^{-1}\bmod p\big]\pmod{Mp}. \tag{6}

    The added term preserves the residue modulo MM and adjusts it to bb modulo pp. This operation combines coefficient data; it does not approximate them.

    To recover a fraction from a residue a(modM)a\pmod M, seek coprime integers n,dn,d with d>0d>0 satisfying

    n≡ad(modM).(7)n\equiv ad\pmod M. \tag{7}

    The extended Euclidean algorithm generates candidates while reducing remainders. Our implementation accepts only candidates with

    ∣n∣,d≤BM,BM=⌊M−12⌋,gcd⁡(d,M)=1.|n|,d\le B_M,\qquad B_M=\left\lfloor\sqrt{\frac{M-1}{2}}\right\rfloor, \qquad \gcd(d,M)=1.

    Why does a height bound help? If two reduced fractions satisfying ∣n∣≤A|n|\le A, d≤Bd\le B have the same residue, then MM divides n1d2−n2d1n_1d_2-n_2d_1. Its absolute value is at most 2AB2AB. If 2AB<M2AB<M, that integer must vanish, so the fractions agree. This proves uniqueness within the stated bounds. It does not prove that an unknown true coefficient lies inside them. The Euclidean and Chinese-remainder constructions are detailed in Peraro, Appendices A.1–A.2.

    The coefficient d3d_3 gives a concrete warning. Its residues at primes 101,103,107101,103,107 are 19,58,8719,58,87. With only M=101M=101, the true value 1/161/16 is outside the balanced denominator bound BM=7B_M=7. Yet −6/5-6/5 is inside it and has the same residue! The retained reconstruction does not suppress this false candidate:

    Combined modulus MMBound BMB_MCandidate for d3d_3Other unresolved coefficients
    1017−6/5-6/51
    101⋅103=10403101\cdot103=10403721/161/160
    101⋅103⋅107=1113121101\cdot103\cdot107=11131217461/161/160

    After the first two fields, every coefficient in Eqs. (4)–(5) is recovered. The third field is retained as an additional fixed reconstruction stage. The wrong first-field candidate for d3d_3 also fails when tested in the unused field F109\mathbb F_{109}.

    Bad points, bad primes and bad slices

    The underlying dimensionless IBP elimination block has determinant

    −8x(x+4)2.(8)-8x(x+4)^2. \tag{8}

    This gives three distinct issues to handle:

    • A bad point: x=0x=0 or x=−4(modp)x=-4\pmod p makes the selected elimination singular. In F101\mathbb F_{101}, the second value is 9797, a perfectly ordinary-looking positive integer. Reject that evaluation rather than divide by zero. Such a modular point is not a claim that positive Euclidean momentum x=97x=97 is physically singular.
    • A bad prime: characteristic two destroys this elimination block. It also cannot represent the denominators 2,4,8,162,4,8,16 in our final normalization. The driver explicitly rejects p=2p=2.
    • An uninformative slice: at D=3D=3, F(3,x)=0F(3,x)=0 for every admissible xx. The IBP system itself still has the required pivots for odd characteristic and generic xx. Nevertheless, using only this slice to interpolate all ten coefficients gives rank two and nullity eight. It cannot determine the generic function.

    Zeros of a particular pivot can be avoidable through a row exchange; singularity of the whole chosen elimination block is a stronger failure. Likewise, a vanishing numerator coefficient at a special dimension or prime need not describe the generic monomial support. The small solver checks its actual pivot columns, and the interpolation checks rank and normalization separately.

    What has been verified?

    The production driver finite_reconstruction.py imports the same pure bubble_ibp.py used by the preceding article. Its selected output is finite-field-results.json, in examples/computational-qft/symbolic-computation/. Python integers provide exact arithmetic, including arbitrary-size products; this example makes no machine-integer speed claim.

    After reconstruction it performs three checks of increasing specificity:

    1. In each unused field p=109,127p=109,127, compare with the IBP solver at all 12 pairs formed from D∈{8,9,12,17}D\in\{8,9,12,17\} and x∈{9,12,19}x\in\{9,12,19\}. All 24 comparisons agree exactly.
    2. Compare over the rational numbers at three unused points:
    DDxxReconstructed F(D,x)F(D,x)
    13/513/57/37/33222/631753222/63175
    17/617/611/511/58225/3805568225/380556
    7/27/219/719/7−7399/167884-7399/167884
    1. Substitute the reconstructed coefficient, together with the other eliminated rows, into the original symbolic IBP system. All fourteen coefficient residuals vanish identically, and numerator and denominator have no common polynomial factor. Combined with the nonzero generic determinant, this certifies the reconstructed coefficient for this system.

    Finite samples alone would not establish an identity without degree and height assumptions. Here exact substitution supplies a stronger final check after the modular computation; it does not prove completeness of the infinite IBP family. The independent parameter-integral checks in the preceding article test the connection between the generated equations and the actual integrals. They are reused, not replaced by another modular comparison.

    Reconstruction also does not compute the transcendental masters. For example, at D=3D=3,

    B11=2πQarctan⁡Q2m.B_{11}=\frac{2\sqrt\pi}{Q}\arctan\frac{Q}{2m}.

    Knowing a rational coefficient cannot produce this arctangent or choose its analytic continuation. Nor does exact reconstruction cure cancellation when separately large terms in cBB11+cTT2c_BB_{11}+c_TT_2 nearly cancel. The retained small-xx test in automated IBP reduction demonstrates that distinction numerically.

    Summary

    Modular evaluations replace intermediate symbolic expressions by exact field elements. A bounded homogeneous interpolation detects the denominator, a common normalization makes results comparable across primes, and Chinese remaindering plus rational reconstruction recovers the coefficients. Bad evaluations are rejected explicitly. Unused checks and exact substitution then distinguish a verified rational reduction from an attractive guess.

    Exercises

    1. Verify the p=101p=101 image of F(4,2)F(4,2). Then combine the residues 19(mod101)19\pmod{101} and 58(mod103)58\pmod{103} for d3d_3, and show why the combined result distinguishes 1/161/16 from −6/5-6/5.
    Solution

    Equation (1) gives F(4,2)=−8/72=−1/9F(4,2)=-8/72=-1/9. Since 9⋅45=405=1(mod101)9\cdot45=405=1\pmod{101}, its image is −45=56(mod101)-45=56\pmod{101}.

    For the coefficient, 101=−2(mod103)101=-2\pmod{103}, whose inverse is 5151. Equation (6) gives

    a′=19+101[(58−19)51 mod 103]=19+101⋅32=3251.a'=19+101\big[(58-19)51\bmod103\big] =19+101\cdot32=3251.

    Indeed 16⋅3251=52016=5⋅10403+116\cdot3251=52016=5\cdot10403+1, so 32513251 is the image of 1/161/16. In contrast,

    −6−5⋅3251=−16261-6-5\cdot3251=-16261

    is not divisible by 1040310403. Thus −6/5-6/5 no longer matches. Both fractions share the first residue because −6−5⋅19=−101-6-5\cdot19=-101. Information from an additional field has resolved an ambiguity that exact arithmetic in the first field could not resolve.

    1. Why is agreement on a finite sample grid insufficient without degree restrictions? Construct a rational function different from FF that agrees at every training point above. Explain what the final symbolic-system check adds.
    Solution

    For any nonzero rational cc, define

    F~(D,x)=F(D,x)+c(D−2)(D−4)(D−5)(D−6)(D−7).\widetilde F(D,x)=F(D,x)+c(D-2)(D-4)(D-5)(D-6)(D-7).

    Every training point has one of the five displayed dimension values, so the added term vanishes on the entire grid. Away from those slices it is generally nonzero. After putting the expression over the same denominator, its numerator exceeds the bounds in Eq. (2), which is precisely why the declared ansatz matters.

    Using only D=3D=3 would be even less informative: every function (D−3)G(D,x)(D-3)G(D,x) vanishes there, irrespective of its dependence away from that slice. A low-degree or zero result on one slice does not determine the generic function.

    Finally, the generated elimination matrix is invertible at generic xx. Substituting a candidate that satisfies all its rows identically therefore establishes equality to its unique coefficient function, beyond a finite collection of evaluation points. It establishes that finite-system identity; validating the family definitions and regulated IBP relations is still a separate scientific task.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.