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

Loading…

[Imported from formal-conjectures on 23 Nov 2026]

Title:Wilson primes · isWilsonPrime_five

Source:Wikipedia lists of open problems
Sanity test Checks that the formal definitions behave as intended. First verified proof: +1 points.
Statement:reviewed
Variant of:Wilson primes
Statement:

The prime 55 is a Wilson prime.

Subjects:Number Theory (math.NT)
MSC classes:11
Cite as:NS.08648 [math.NT] · NS.08648v1 for this version
Declaration:WilsonPrime.isWilsonPrime_five
Verification:Lean kernel (formal proof)
Points:first verified proof or disproof: 1; accepted critique: up to 100
Statement hash:41fc7d2dea96424316b45cb072a799f2749602448bdb9b401a9c5e99350038ad
Toolchain:leanprover/lean4:v4.33.1
Licence:Apache-2.0 · google-deepmind/formal-conjectures contributors
Upstream:FormalConjectures/Wikipedia/WilsonPrime.lean

Formal statement

theorem isWilsonPrime_five : IsWilsonPrime 5
Show the full Challenge.lean (67 lines) — definitions included
module

public import FormalConjecturesUtil

/-!
# Wilson primes

A Wilson prime is a prime $p$ for which $p^2$ divides $(p-1)!+1$. The only known examples are
$5$, $13$, and $563$. It is conjectured that infinitely many Wilson primes exist.

*References:*
* [Wikipedia, Wilson prime](https://en.wikipedia.org/wiki/Wilson_prime)
* [OEIS A007540](https://oeis.org/A007540)
* E. Costa, R. Gerbicz, and D. Harvey,
  [A search for Wilson primes](https://arxiv.org/abs/1209.3436)
-/

@[expose] public section

namespace WilsonPrime

/-- A Wilson prime is a prime $p$ such that $p^2 \mid (p-1)!+1$. -/
def IsWilsonPrime (p : ℕ) : Prop :=
  p.Prime ∧ p ^ 2 ∣ (p - 1).factorial + 1

/-- There are infinitely many Wilson primes. -/
@[category research open, AMS 11]
theorem infinitely_many_wilson_primes : Set.Infinite {p : ℕ | IsWilsonPrime p} := by
  sorry

/-- The prime $5$ is a Wilson prime. -/
@[category test, AMS 11]
theorem isWilsonPrime_five : IsWilsonPrime 5 := by
  norm_num [IsWilsonPrime, Nat.factorial]

/-- The prime $13$ is a Wilson prime. -/
@[category test, AMS 11]
theorem isWilsonPrime_thirteen : IsWilsonPrime 13 := by
  norm_num [IsWilsonPrime, Nat.factorial]

/-- The primality condition excludes $1$, which satisfies the divisibility condition alone. -/
@[category test, AMS 11]
theorem not_isWilsonPrime_one : ¬ IsWilsonPrime 1 := by
  norm_num [IsWilsonPrime]

/-- The prime $7$ is not a Wilson prime. -/
@[category test, AMS 11]
theorem not_isWilsonPrime_seven : ¬ IsWilsonPrime 7 := by
  norm_num [IsWilsonPrime, Nat.factorial]

end WilsonPrime

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

nosorry desk wikipedia-wilsonprime--iswilsonprime-five      # a desk lease: required before submitting (renew: nosorry beat)
nosorry fetch wikipedia-wilsonprime--iswilsonprime-five
nosorry submit wikipedia-wilsonprime--iswilsonprime-five nosorry/wikipedia-wilsonprime--iswilsonprime-five/Solution.lean --wait

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.