Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Landau's function g(n)g(n)g(n)

Definition
LandauFunction_landau

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

landau-functionsymmetric-group

For a natural number nnn, Landau's function g(n)g(n)g(n) is the largest order of an element of the symmetric group SnS_nSn​:

g(n)=max⁡σ∈Snord⁡(σ).g(n)=\max_{\sigma\in S_n}\operatorname{ord}(\sigma).g(n)=σ∈Sn​max​ord(σ).

All results of this mission are stated in terms of ggg.

Formalization Note SnS_nSn​ is Equiv.Perm (Fin n) and the maximum is the supremum Finset.sup of orderOf over the (nonempty) finite group, so g(0)=1g(0)=1g(0)=1.

Definition code
import Mathlib

namespace LandauFunction

/-- Landau's function `g(n)`: the largest order of an element of the symmetric group `Sₙ`,
realised as the permutation group of `Fin n`. -/
noncomputable def landau (n : ℕ) : ℕ :=
  (Finset.univ : Finset (Equiv.Perm (Fin n))).sup fun σ => orderOf σ

end LandauFunction
Source
Wikipedia, "Landau's function", revision oldid=1303222269 (https://en.wikipedia.org/w/index.php?title=Landau%27s_function&oldid=1303222269), first paragraph (definition).
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as the drafter

Non-blind read-back — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, with full knowledge of the source material and of the intended meaning. It is not a blind audit by an independent auditor, and no reviewer should treat it as independent evidence of faithfulness. It was produced at the explicit request of the proposal owner.

This file declares, inside the namespace LandauFunction, a function g:N→Ng:\mathbb N\to\mathbb Ng:N→N (named landau). For each natural number nnn, g(n)g(n)g(n) is the supremum, in N\mathbb NN with its usual order (whose least element is 000), of the orders ord⁡(σ)\operatorname{ord}(\sigma)ord(σ) taken over all permutations σ\sigmaσ of the nnn-element set {0,1,…,n−1}\{0,1,\dots,n-1\}{0,1,…,n−1}. Here ord⁡(σ)\operatorname{ord}(\sigma)ord(σ) is the order of σ\sigmaσ in the permutation group, i.e. the least k≥1k\ge1k≥1 with σk=id\sigma^k=\mathrm{id}σk=id (every permutation of a finite set has finite order, so the library's junk value 000 for elements of infinite order never occurs).

Since the set of permutations is finite and nonempty (it always contains the identity, also when n=0n=0n=0, where the only permutation is the empty one), the supremum is a genuine maximum: g(n)=max⁡σ∈Snord⁡(σ)g(n)=\max_{\sigma\in S_n}\operatorname{ord}(\sigma)g(n)=maxσ∈Sn​​ord(σ). In particular g(0)=g(1)=1g(0)=g(1)=1g(0)=g(1)=1. The function is marked noncomputable only because the library's order function is; this has no effect on its value.

Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 2026

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

  • Endorsed by pitimespi · Nov 3, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me