Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The scalar and string one-loop partition functions Zscalar(τ)Z_{\rm scalar}(\tau)Zscalar​(τ) and F(τ)=(Im⁡τ)−12∣η(τ)∣−48F(\tau)=(\operatorname{Im}\tau)^{-12}|\eta(\tau)|^{-48}F(τ)=(Imτ)−12∣η(τ)∣−48

Definition
TongString_partition_functions

by LG · Sep 25, 2026 · Mathlib 0df444a (Lean v4.33.1)

modular-formspartition-functionstring-theory

For τ\tauτ in the upper half-plane let η\etaη be the Dedekind eta function.

  1. The (oscillator plus zero-mode) partition function of a single free scalar field on the torus, with constant factors dropped as in eq. (6.20), is
Zscalar(τ)=1Im⁡τ  1∣η(τ)∣2.Z_{\text{scalar}}(\tau)=\frac{1}{\sqrt{\operatorname{Im}\tau}}\;\frac{1}{|\eta(\tau)|^{2}}.Zscalar​(τ)=Imτ​1​∣η(τ)∣21​.
  1. The integrand of the bosonic string partition function, Zstring=∫d2τ(Im⁡τ)2F(τ)Z_{\text{string}}=\int\frac{d^2\tau}{(\operatorname{Im}\tau)^2}F(\tau)Zstring​=∫(Imτ)2d2τ​F(τ), is
F(τ)=(1Im⁡τ  1η(τ) η(τ)‾)24=1(Im⁡τ)12 ∣η(τ)∣48.F(\tau)=\left(\frac{1}{\sqrt{\operatorname{Im}\tau}}\;\frac{1}{\eta(\tau)\,\overline{\eta(\tau)}}\right)^{24}=\frac{1}{(\operatorname{Im}\tau)^{12}\,|\eta(\tau)|^{48}}.F(τ)=(Imτ​1​η(τ)η(τ)​1​)24=(Imτ)12∣η(τ)∣481​.

Formalization Note Both are real-valued. The factors 1/α′1/\sqrt{\alpha'}1/α′​ and the other constant prefactors that Tong explicitly neglects are omitted. Real division by 000 returns 000 in Lean, which is irrelevant on the upper half-plane where Im⁡τ>0\operatorname{Im}\tau>0Imτ>0 and η(τ)≠0\eta(\tau)\ne0η(τ)=0.

Definition code
import Mathlib
import Definitions.Def_TongString_dedekind_eta

namespace TongString

/-- The free-scalar partition function (6.20), up to constant factors:
`Z_scalar(τ) = 1 / (√(Im τ) |η(τ)|²)`. -/
noncomputable def scalarPartitionFunction (τ : ℂ) : ℝ :=
  1 / Real.sqrt τ.im * (1 / ‖dedekindEta τ‖) ^ 2

/-- The integrand of the bosonic string partition function (after (6.21)), up to constant
factors: `(1/√(Im τ) · 1/(η η̄))^24 = (Im τ)^(-12) |η(τ)|^(-48)`. -/
noncomputable def stringPartitionIntegrand (τ : ℂ) : ℝ :=
  (1 / τ.im) ^ 12 * (1 / ‖dedekindEta τ‖) ^ 48

end TongString
Source
D. Tong, *String Theory*, University of Cambridge Part III Mathematical Tripos lecture notes (January 2009), http://www.damtp.cam.ac.uk/user/tong/string.html, Section 6.4.2, p. 150 eq. (6.20) and p. 151 (string partition function written in terms of η)
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic), non-blind: same agent that drafted the statement

Non-blind read-back. This read-back was written by the same agent that drafted the Lean statement, with full knowledge of the source text and of the intended meaning. It is not independent testimony and must not be treated as a blind audit; a reviewer should compare the Lean code against the source directly.

The declaration defines two real-valued functions of a complex number τ\tauτ, in terms of the imported function η\etaη (defined by η(τ)=e2πiτ/24∏m≥1(1−e2πimτ)\eta(\tau)=e^{2\pi i\tau/24}\prod_{m\ge1}(1-e^{2\pi i m\tau})η(τ)=e2πiτ/24∏m≥1​(1−e2πimτ) as an unconditional infinite product).

  1. Zscalar(τ)=1Im⁡τ⋅(1∣η(τ)∣)2Z_{\text{scalar}}(\tau)=\dfrac{1}{\sqrt{\operatorname{Im}\tau}}\cdot\Big(\dfrac{1}{|\eta(\tau)|}\Big)^{2}Zscalar​(τ)=Imτ​1​⋅(∣η(τ)∣1​)2, where ⋅\sqrt{\cdot}⋅​ is the real square root (which returns 000 on negative inputs) and ∣⋅∣|\cdot|∣⋅∣ is the complex modulus.
  2. F(τ)=(1Im⁡τ)12⋅(1∣η(τ)∣)48F(\tau)=\Big(\dfrac{1}{\operatorname{Im}\tau}\Big)^{12}\cdot\Big(\dfrac{1}{|\eta(\tau)|}\Big)^{48}F(τ)=(Imτ1​)12⋅(∣η(τ)∣1​)48.

Real division by 000 yields 000, so both functions are 000 wherever Im⁡τ≤0\operatorname{Im}\tau\le0Imτ≤0 (for FFF: wherever Im⁡τ=0\operatorname{Im}\tau=0Imτ=0) or η(τ)=0\eta(\tau)=0η(τ)=0. No restriction to the upper half-plane is built into the definitions.

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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me