Skip to content

feat: formal statements of Robin's and Lagarias' inequalities equivalent to RH#37585

Draft
cascone26 wants to merge 1 commit intoleanprover-community:masterfrom
cascone26:robin-inequality
Draft

feat: formal statements of Robin's and Lagarias' inequalities equivalent to RH#37585
cascone26 wants to merge 1 commit intoleanprover-community:masterfrom
cascone26:robin-inequality

Conversation

@cascone26
Copy link
Copy Markdown

Summary

This PR adds Mathlib/NumberTheory/LSeries/RobinInequality.lean, which contains formal Lean 4 statements of two classical equivalences of the Riemann Hypothesis:

Robin's theorem (1984): RH ↔ σ₁(n) < e^γ · n · ln(ln(n)) for all n > 5040

Lagarias' theorem (2002): RH ↔ σ₁(n) ≤ H_n + exp(H_n) · ln(H_n) for all n ≥ 1

New declarations

  • robinBound (n : ℕ) : ℝ — the Robin bound e^γ · n · ln(ln(n))
  • lagariasBound (n : ℕ) : ℝ — the Lagarias bound H_n + exp(H_n) · ln(H_n)
  • robin_iff_RH : RiemannHypothesis ↔ ∀ n > 5040, σ₁(n) < robinBound n
  • lagarias_iff_RH : RiemannHypothesis ↔ ∀ n ≥ 1, σ₁(n) ≤ lagariasBound n

Status

The statements are complete and use existing Mathlib primitives:

  • ArithmeticFunction.sigma for σ₁
  • Real.eulerMascheroniConstant for γ
  • harmonic for H_n (with ℚ → ℝ coercion)
  • RiemannHypothesis from Mathlib.NumberTheory.LSeries.RiemannZeta

The proofs are currently sorry. The Robin direction (RH → inequality) requires analytic number theory following Robin's original 1984 paper. The converse uses Gronwall's theorem on superior highly composite numbers. Both are substantial Mathlib projects in their own right.

This PR establishes the formal statements as a foundation for future proof work. These equivalences are not currently formalized anywhere in Mathlib.

References

  • G. Robin, Grandes valeurs de la fonction somme des diviseurs et hypothèse de Riemann, J. Math. Pures Appl. 63 (1984), 187–213.
  • J. Lagarias, An elementary problem equivalent to the Riemann hypothesis, Amer. Math. Monthly 109 (2002), 534–543.

Note on sorry

I'm aware Mathlib does not merge sorry-laden PRs in general. I'm submitting this as a draft to:

  1. Get feedback on whether the statement formulation is idiomatic
  2. Establish that these statements don't already exist in Mathlib under a different name
  3. Invite collaboration on completing the proofs

…ent to RH

Adds `Mathlib.NumberTheory.LSeries.RobinInequality` with:
- `robinBound`: the Robin bound e^γ · n · ln(ln(n))
- `lagariasBound`: the Lagarias bound H_n + exp(H_n) · ln(H_n)
- `robin_iff_RH`: Robin's inequality ↔ RiemannHypothesis (statement; proof sorry)
- `lagarias_iff_RH`: Lagarias' inequality ↔ RiemannHypothesis (statement; proof sorry)

The proofs reference Robin (1984) and Lagarias (2002). The formal statements
are new to Mathlib. Proofs are left as `sorry` and marked as future work.
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

PR summary 6ef8cc2731

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.NumberTheory.LSeries.RobinInequality (new file) 2719

Declarations diff

+ RH_of_lagarias_inequality
+ RH_of_robin_inequality
+ lagariasBound
+ lagarias_iff_RH
+ lagarias_inequality_of_RH
+ robinBound
+ robin_iff_RH
+ robin_inequality_of_RH

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@github-actions github-actions bot added the t-number-theory Number theory (also use t-algebra or t-analysis to specialize) label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant