## My computational number theory code

### Numerical computation of Petersson inner products

Here is some Sage code that goes along with my preprint Numerical computation of Petersson inner products
and *q*-expansions.

- FourierCoeffApproxTwist.sage
- This is the main routine for computing the expansion of an eigenform at
a given cusp, by linearly interpolating twists of the underlying
newform.
- FourierCoeffApprox.sage - This is
an alternative routine that computes the expansion of any cusp form by
linearly interpolating the
*q*-expansion itself.
- NewformLocalData.sage - An auxiliary
file needed by most of the others, to compute minimal twists of newforms
(by brute force, since that's sufficient for what I've done)
- Petersson3.sage - Numerically computes a
Petersson inner product of the form <f(z)g(z),h(z)>, using a
formula of Nelson and the routine in FourierCoeffApproxTwist.sage
- Petersson2_Self.sage - Computes the
self-Petersson inner product <f,f> of a newform f by the same
method as above.
- AdjointLValue.sage - A program for
computing the adjoint L-value
*L*(ad f,1) for a newform
*f*, in some cases. (This is done by generating the correct
Dirichlet series and then feeding it into Dokchitser's built-in
*L*-function algorithms in Sage).
- AdjointVsPetersson.sage - A
program for testing the theoretical formula due to Shimura and Hida
relating the Petersson inner product <f,f> to the L-value
*L*(ad f,1), by computing both numerically via Petersson2_Self.sage
and AdjointLValue.sage.
- TripleProductLValue.sage - A
program for computing triple product L-values
*L*(f×g×h,m-1) for appropriate newforms
*f,g,h*, in some cases. (This is done by generating the correct
Dirichlet series and then feeding it into Dokchitser's built-in
*L*-function algorithms in Sage).
- IchinoFormulaTest.sage - A
program for testing an explicit version of Ichino's formula (worked out
in my paper Anticyclotomic
*p*-adic *L*-functions and Ichino's formula) by using
TripleProductLValue.sage to compute *L*(f×g×h,m-1) and Petersson3.sage to
compute <f(z)g(z),h(z)>.

Note: in these programs I haven't yet implemented anything to automatically
identify local supercuspidal components (and the corresponding L-factors and
Ichino integrals) for a modular form; for now those cases need to be handled
manually.