Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Ramanujan's tau function τ(n)\tau(n)τ(n)

Definition
RamanujanPetersson_tau

by Lucas · Oct 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

modular-formsnumber-theory

Let q=e2πizq=e^{2\pi i z}q=e2πiz for zzz in the upper half-plane H\mathbb HH, and let Δ(z)=η(z)24=q∏n>0(1−qn)24\Delta(z)=\eta(z)^{24}=q\prod_{n>0}(1-q^n)^{24}Δ(z)=η(z)24=q∏n>0​(1−qn)24 be the discriminant modular form, a holomorphic cusp form of weight 121212 and level 111. Ramanujan's tau function τ:N→C\tau:\mathbb N\to\mathbb Cτ:N→C is defined by the Fourier expansion of Δ\DeltaΔ at i∞i\inftyi∞:

Δ(z)=∑n=0∞τ(n) qn.\Delta(z)=\sum_{n=0}^{\infty}\tau(n)\,q^n .Δ(z)=n=0∑∞​τ(n)qn.

Since Δ\DeltaΔ is a cusp form, τ(0)=0\tau(0)=0τ(0)=0, so the sum starts at n=1n=1n=1 as in the source. This is the arithmetic function behind all of the mission's statements about τ\tauτ and its LLL-function L(s,τ)=∑n≥1τ(n)n−sL(s,\tau)=\sum_{n\ge1}\tau(n)n^{-s}L(s,τ)=∑n≥1​τ(n)n−s.

Formalization Note τ(n)\tau(n)τ(n) is the nnn-th coefficient of Mathlib's UpperHalfPlane.qExpansion 1 of ModularForm.discriminant (which is defined as η24\eta^{24}η24), as a complex number. Integrality of τ\tauτ is not built into the definition.

Definition code
import Mathlib

open UpperHalfPlane

namespace RamanujanPetersson

/-- Ramanujan's tau function: `tau n` is the `n`-th Fourier coefficient, in the variable
`q = exp(2πiz)`, of the discriminant modular form `Δ(z) = η(z)^24`. -/
noncomputable def tau (n : ℕ) : ℂ :=
  (qExpansion 1 ModularForm.discriminant).coeff n

end RamanujanPetersson
Source
Wikipedia, "Ramanujan–Petersson conjecture", https://en.wikipedia.org/w/index.php?title=Ramanujan%E2%80%93Petersson_conjecture&oldid=1369029052 (PDF snapshot supplied by the proposer, 9 pp.), section "Ramanujan conjecture", displayed definitions of Δ(z)\Delta(z)Δ(z) and of τ(n)\tau(n)τ(n) via Δ(z)=∑n≥1τ(n)qn\Delta(z)=\sum_{n\ge1}\tau(n)q^nΔ(z)=∑n≥1​τ(n)qn
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 13, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me