Class Numbers of Imaginary Quadratic Orders in the Polynomial Hierarchy
Version 1 / Nov 04, 2026 / CC BY 4.0
Abstract
For with , let be the number of classes of primitive positive definite binary quadratic forms of discriminant . We prove that is computable in deterministic polynomial time with an oracle for a language in the second level of the polynomial hierarchy. The proof uses only reduction theory of binary quadratic forms, Lagrange's theorem and Hermite normal forms; it does not assume the generalized Riemann hypothesis, does not take a generating set of the class group as input, and uses no randomness. A oracle finds a generating set of forms, and an NP oracle then determines the lattice of relations, whose index is . Consequently, if , class numbers of imaginary quadratic fields are computable in polynomial time. As an application, the number of representations of by the ternary form in Tunnell's congruent number criterion equals for square-free and vanishes for square-free ; hence lies in on even square-free , and an exact counting reduction from to would collapse the polynomial hierarchy to .
Provenance statement
Tools used
- Anthropic
- Claude OpusVersion 5.5
References
- Henri Cohen. A Course in Computational Algebraic Number Theory. Springer-Verlag, vol. 138. 1993DOI
- James L. Hafner; Kevin S. McCurley. A rigorous subexponential algorithm for computation of class groups. Journal of the American Mathematical Society, vol. 2, no. 4, pp. 837–850. 1989DOI
- Eric Bach. Explicit bounds for primality testing and related problems. Mathematics of Computation, vol. 55, no. 191, pp. 355–380. 1990DOI
- John Watrous. Quantum algorithms for solvable groups. Proceedings of the Thirty-Third Annual ACM Symposium on Theory of Computing, pp. 60–67. 2001DOI
- László Babai; Endre Szemerédi. On the complexity of matrix group problems I. 25th Annual Symposium on Foundations of Computer Science, pp. 229–240. 1984DOI
- László Babai. Bounded round interactive proofs in finite groups. SIAM Journal on Discrete Mathematics, vol. 5, no. 1, pp. 88–111. 1992DOI
- Jerrold Bruce Tunnell. A classical Diophantine problem and modular forms of weight . Inventiones Mathematicae, vol. 72, no. 2, pp. 323–334. 1983DOI
- Seinosuke Toda. PP is as hard as the polynomial-time hierarchy. SIAM Journal on Computing, vol. 20, no. 5, pp. 865–877. 1991DOI
- Leslie Gabriel Valiant. The complexity of computing the permanent. Theoretical Computer Science, vol. 8, no. 2, pp. 189–201. 1979DOI
- Leslie Gabriel Valiant. The complexity of enumeration and reliability problems. SIAM Journal on Computing, vol. 8, no. 3, pp. 410–421. 1979DOI
Show all 15 referencesShow fewer references
- Sanjeev Arora; Boaz Barak. Computational Complexity: A Modern Approach. Cambridge University Press. 2009DOI
- Kathrin Bringmann; Ben Kane. Class numbers and representations by ternary quadratic forms with congruence conditions. Mathematics of Computation, vol. 91, no. 333, pp. 295–329. 2022DOI
- Ravindran Kannan; Achim Bachem. Polynomial algorithms for computing the Smith and Hermite normal forms of an integer matrix. SIAM Journal on Computing, vol. 8, no. 4, pp. 499–507. 1979DOI
- Peter W. Shor. Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Journal on Computing, vol. 26, no. 5, pp. 1484–1509. 1997DOI
- William B. Hart; Gonzalo Tornaría; Mark Watkins. Congruent number theta coefficients to . Algorithmic Number Theory (ANTS-IX), vol. 6197, pp. 186–200. 2010DOI
Version history
- v1 · 6 pagesSubmitted by Frank VegaInitial depositCurrentNov 04, 2026