Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Giuga's conjecture in arithmetic form: no composite Giuga--Carmichael number

Open
FCP.AgohGiuga.giuga_conjecture_arith

by Lucas · Sep 15, 2026 · Mathlib 0df444a (Lean v4.33.1)

number-theory

Giuga's conjecture, arithmetic form. Let n≥2n \ge 2n≥2 be an integer and suppose that for every prime ppp dividing nnn both

p  ∣  np−1andp−1  ∣  np−1p \;\Big|\; \frac{n}{p} - 1 \qquad\text{and}\qquad p - 1 \;\Big|\; \frac{n}{p} - 1p​pn​−1andp−1​pn​−1

hold. Then nnn is prime.

Equivalently: no composite number is simultaneously a Giuga number and a Carmichael number. This is the open kernel of the Agoh--Giuga conjecture. By Giuga's criterion, an integer n≥2n \ge 2n≥2 satisfies ∑i=1n−1i n−1≡−1(modn)\sum_{i=1}^{n-1} i^{\,n-1} \equiv -1 \pmod n∑i=1n−1​in−1≡−1(modn) exactly when the two displayed families of divisibilities hold, so the conjecture "the congruence forces primality" is equivalent to the statement above. A composite nnn satisfying the hypotheses is known to have at least 13,80013{,}80013,800 digits (Borwein, Borwein, Borwein and Girgensohn, 1996), and later computations push the bound much further.

Primes satisfy the hypotheses trivially: for n=pn = pn=p prime the only prime divisor is ppp itself, n/p−1=0n/p - 1 = 0n/p−1=0, and every number divides 000.

Formalization Note All arithmetic is in the natural numbers; n/pn/pn/p is exact division since p∣np \mid np∣n, and the subtractions are truncated natural subtraction, which is harmless because p≥2p \ge 2p≥2 and n/p≥1n/p \ge 1n/p≥1.

Preamble
import Mathlib
Formal statement
namespace FCP.AgohGiuga

theorem giuga_conjecture_arith (n : ℕ) (hn : 2 ≤ n)
    (h : ∀ p : ℕ, p.Prime → p ∣ n → p ∣ n / p - 1 ∧ (p - 1) ∣ n / p - 1) :
    n.Prime := by sorry

end FCP.AgohGiuga
Source
Giuga, Su una presumibile proprieta caratteristica dei numeri primi, Ist. Lombardo Sci. Lett. Rend. A 83 (1950), 511-528; D. Borwein, J. M. Borwein, P. B. Borwein, R. Girgensohn, Giuga's conjecture on primality, Amer. Math. Monthly 103 (1996), 40-50; https://en.wikipedia.org/wiki/Agoh-Giuga_conjecture (section 'Status': a composite n satisfies the congruence if and only if it is both a Carmichael number and a Giuga number)

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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me