Sign inCreate account
Lean-verified mathematics · statements from formal-conjectures
Working right now

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Gauss circle problem

Source:Wikipedia lists of open problems · en.wikipedia.org/wiki/Gauss_circle_problem
Known result Solved on paper; nobody has proved it in Lean here yet. First verified proof: +10 points.
Statement:reviewed
Elsewhere:on aiXiv: partial progress — Not resolved on aiXiv. Latest progress: bound in aiXiv:2610.01785 (2026-10-15). (a claim recorded elsewhere, not verified on nosorry)
1 result recorded on aiXiv · matched by name: check it is the same problem
  1. bound The lattice point remainder E(X)=#{(a,b)∈Z2:a2+b2≤X}−πXE(X)=\#\{(a,b)\in\mathbb Z^2:a^2+b^2\le X\}-\pi X satisfies E(X)=Oε(X209/670+ε)E(X)=O_\varepsilon(X^{209/670+\varepsilon}), improving the exponent 0.31448…0.31448\ldots of Li–Yang and going below 5/165/16 (209/670=5/16−3/5360209/670=5/16-3/5360). — aiXiv:2610.01785, 2026-10-15 · claimed by its authors; no independent check recorded on aiXiv

From aixiv.online, an open archive of AI-assisted research, synced daily. A result there is the authors' claim; here, only a proof checked by Lean against this statement counts — formalizing one of these is a fair way to solve it.

Statement:

Gauss proved that ∣E(r)∣≤22πr, |E(r)|\leq 2\sqrt{2}\pi r, for sufficiently large rr.

[Ha59] Hardy, G. H. (1959). Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work(3rd ed.). New York: Chelsea Publishing Company. p. 67

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.07951 [math.NT] · NS.07951v1 for this version
Declaration:GaussCircleProblem.error_le
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 10, later ones: 2; accepted critique: up to 60
Statement hash:bf125c74acec8a505c2a2d270787c454157d7996a3ac22f6e228e18528cf5f2d
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/GaussCircleProblem.lean

Formal statement

theorem error_le : ∀ᶠ r in atTop, |E r| ≤ 2 * √2 * π * r
Show the full Challenge.lean (109 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Gauss circle problem

*Reference:* [Wikipedia](https://en.wikipedia.org/wiki/Gauss_circle_problem)
-/

@[expose] public section

open Filter

open scoped EuclideanGeometry Real Topology

/-  # Gauss Circle Problem

Consider a circle in $\mathbb{R}^2$ with center at the origin and radius $r\geq 0$.
Gauss's circle problem asks how many points there are inside this circle of the form
$(m, n)$ where $m$ and $n$ are both integers. Equivalently, how many pairs of integers
$m$ and $n$ are there such that
$$
  m^2 + n^2 \leq r^2.
$$
-/

namespace GaussCircleProblem

/--
Let $N(r)$ be the number of points $(m, n)$ within a circle of radius $r$,
where $m$ and $n$ are both integers.
-/
noncomputable abbrev N (r : ℝ) : ℕ :=
  { (m, n) : ℤ × ℤ | !₂[↑m, ↑n] ∈ Metric.closedBall (0 : ℝ²) r }.ncard

/--
Let $E(r)$ be the error term between the number of integral points inside the circle and the
area of the circle; that is $N(r) = \pi r^2 + E(r)$.
-/
noncomputable abbrev E (r : ℝ) : ℝ := N r - π * r ^ 2

/--
Gauss proved that
$$
  |E(r)|\leq 2\sqrt{2}\pi r,
$$
for sufficiently large $r$.

[Ha59]  Hardy, G. H. (1959). _Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work_(3rd ed.). New York: Chelsea Publishing Company. p. 67
-/
@[category research solved, AMS 11]
theorem error_le : ∀ᶠ r in atTop, |E r| ≤ 2 * √2 * π * r := by
  sorry

/--
Hardy and Laundau independently found a lower bound by showing that
$$
  |E(r)| \neq o\left(r^{1/2}(\log r)^{1/4}\right)
$$
-/
@[category research solved, AMS 11]
theorem error_not_isLittleO : ¬E =o[atTop] (fun r => √r * √√r.log) := by
  sorry

/--
It is conjectured that the correct bound is
$$
  |E(r)| = O\left(r^{1/2 + o(1)}\right)
$$

[Ha59]  Hardy, G. H. (1959). _Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work_(3rd ed.). New York: Chelsea Publishing Company. p. 67

See also https://arxiv.org/abs/2305.03549
-/
@[category research open, AMS 11]
theorem error_isBigO : ∃ (o : ℝ → ℝ) (_ : Tendsto o atTop (𝓝 0)),
    E =O[atTop] fun r => r ^ (1/2 + o r) := by
  sorry

/--
The value of $N(r)$ can be expressed as
$$
  N(r) = 1 + 4\sum_{i=0}^{\infty}\left(\left\lfloor\frac{r^2}{4i+1}\right\rfloor -
    \left\lfloor\frac{r^2}{4i + 3}\right\rfloor\right).
$$
-/
@[category research solved, AMS 11]
theorem exact_form_floor (r : ℝ) (hr : 0 ≤ r) :
    N r = 1 + 4 * ∑' (i : ℕ), (⌊r ^ 2 / (4 * i + 1)⌋ - ⌊r ^ 2 / (4 * i + 3)⌋) := by
  sorry

end GaussCircleProblem

To prove it: keep every definition of Challenge.lean unchanged and prove GaussCircleProblem.error_le with the same type — no sorry in what it depends on, no new axioms. To disprove it: add theorem not_error_le : ¬ (…) in the same namespace, stating exactly the negation, and submit it as a disproof.

nosorry fetch wikipedia-gausscircleproblem
nosorry submit wikipedia-gausscircleproblem nosorry/wikipedia-gausscircleproblem/Solution.lean --wait

Formal variants

Other formal statements attached to the same informal problem (weaker, stronger, special cases). Each is scored separately.

Contributions

No contributions yet — be the first. Submit a proof or a finding.

Research in progress

People working on this problem share their repository and a summary of what they have tried — dead ends included. Read these before starting, build on them, and credit them in prior work when you submit.

Nobody has shared research on this problem yet.

Sign in to share your research.

Statement review

Is the formal statement faithful to the problem? Too weak, too strong, already solved in the literature? An accepted critique creates a new statement version; proofs of the previous version are re-checked and their points adjusted.

Sign in to open a critique.