acb_theta.hCharacteristics, derivatives and precision
This guide explains the conventions shared by all functions of acb_theta. The definitions follow [Mum1983] and [Igu1972]; the algorithms are in Theta functions.
Theta functions with characteristics#
For (a symmetric complex matrix with positive definite imaginary part ), and , viewed as column vectors,
The functions are the theta functions of level 2. Shifting by half-periods permutes them up to explicit exponential factors:
The characteristic is even if is even and odd otherwise. , so the odd theta functions vanish at ; there are even and odd characteristics.
For , in the notation of acb_modular, , , and .
Numbering of characteristics#
A characteristic is stored as the ulong whose binary expansion, most significant bit first, is ; vectors of theta values are ordered by this number. For , is number , and the even characteristics are those with numbers 0, 1, 2, 3, 4, 6, 8, 9, 12, 15. When or is handled alone (vectors of values , say), it is numbered on bits in the same way. acb_theta_char_set_slong_vec converts a vector of bits to this number and acb_theta_char_bit extracts a bit.
Derivatives#
Only derivatives with respect to are computed: those with respect to follow from the heat equation . A derivation tuple of nonnegative integers corresponds to the normalised derivative
which is the coefficient of in the Taylor expansion of , as in acb_modular_theta_jet. The derivatives up to total order ord, of which there are (acb_theta_jet_nb), are ordered by total order and then reverse-lexicographically; for : . acb_theta_jet_tuples lists them and acb_theta_jet_index finds the position of a tuple. The functions acb_theta_jet_mul, acb_theta_jet_compose, acb_theta_jet_exp_pi_i and acb_theta_jet_exp_qf compute with such vectors for arbitrary functions.
The symplectic group#
is the group of integer matrices with , . It acts on by
and the theta functions transform as
where , and are given by acb_theta_char_table, and , an 8th root of unity that depends on the branch of the square root, by acb_siegel_kappa [Igu1972], [Mum1983]. Every is equivalent to a reduced matrix, for which the theta series converge fast and uniformly; see Reduction.
Precision#
The magnitude of is, barring cancellation, about
where and is the distance from to the shifted lattice for the norm : the largest term of the series is the one with closest to . The module therefore works with the normalised function
which is not holomorphic but is bounded on for fixed , and satisfies the same duplication formulas. A precision argument prec means that is computed with an absolute error of about , so the outputs of acb_theta_jet and acb_theta_all have absolute errors of about (for the reduced arguments). This avoids unbounded work when is far from zero. Some internal functions (with a distances argument or a shifted_prec flag) also take the factor into account and compute with absolute error about , a shifted absolute precision; the squared distances are computed by acb_theta_eld_distances.
All outputs are certified enclosures. If the imaginary part of is not certainly positive definite at the working precision, the outputs have infinite radius.
Testing and profiling programs#
The test programs in src/acb_theta/test check, among others, that the transformation formula and the duplication formulas hold on random input, that acb_siegel_reduce produces matrices accepted by acb_siegel_is_reduced, and that the quasi-linear algorithm agrees with summation. The programs in src/acb_theta/profile are used for tuning:
p-sum g prec all_a all_b tilde skewtimesacb_theta_sum(distances, contexts, summation) on random input whose last row and column of are multiplied byskew;p-ql_setup g nb_steps all skewchecks thatacb_theta_ql_setupstays cheap and succeeds as the precision and number of steps grow;p-ql_exact g pmin pmax cst s expcompares, for precisions frompmintopmax, the pattern suggested byacb_theta_ql_nb_stepswith neighbouring patterns inacb_theta_ql_exact, on matrices whose lastsrows and columns are scaled by ;p-ql_jet_fd g prec ord allcomparesacb_theta_ql_jet_fdwithacb_theta_sum_jet, which decides the cutoffs ofacb_theta_ql_jet.
References#
- [Mum1983] D. Mumford, Tata Lectures on Theta I, Birkhäuser, 1983. https://doi.org/10.1007/978-1-4899-2843-6
- [Igu1972] J.-I. Igusa. Theta functions, Springer, 1972. https://doi.org/10.1007/978-3-642-65315-5
The FLINT team, “Characteristics, derivatives and precision (acb_theta.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/acb_theta/conventions.html (generated 2026-11-02).
@misc{flint-doc-acb-theta-conventions,
author = {{The FLINT team}},
title = {{Characteristics, derivatives and precision (acb\_theta.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/acb_theta/conventions.html},
note = {Generated 2026-11-02}
}