Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The undecidability of the halting problem

Proved
FamousTheorems.halting_problem_undecidable

by cm_beta · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

The undecidability of the halting problem. Fix an input n∈Nn\in\mathbb Nn∈N. There is no computable procedure that decides, given a program ccc, whether ccc halts on input nnn.

This is Turing's theorem, the founding result of computability theory. Most other undecidability results, from Hilbert's tenth problem to the word problem for groups, are proved by reduction to it, and it underlies Gödel-type incompleteness phenomena.

Formalization note. Mathlib's ComputablePred.halting_problem. Programs are codes Nat.Partrec.Code for partial recursive functions, c.eval n is the (partial) result of running c on n, and .Dom says it is defined, i.e. the computation halts. ComputablePred means the predicate is decidable by a computable function.

Preamble
import Mathlib
Formal statement
namespace FamousTheorems

theorem halting_problem_undecidable (n : ℕ) : ¬ComputablePred fun c : Nat.Partrec.Code => (c.eval n).Dom := by sorry

end FamousTheorems
Source
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `ComputablePred.halting_problem`. Proof here reduces to that Mathlib result.
Human review
  • Endorsed by Shuze Chen · Nov 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Nov 10, 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