Skip to content

add(Incompleteness): First incompleteness theorem from the halting problem#836

Merged
SnO2WMaN merged 2 commits into
masterfrom
halting-incompleteness
Jul 4, 2026
Merged

add(Incompleteness): First incompleteness theorem from the halting problem#836
SnO2WMaN merged 2 commits into
masterfrom
halting-incompleteness

Conversation

@SnO2WMaN

@SnO2WMaN SnO2WMaN commented Jul 4, 2026

Copy link
Copy Markdown
Member

Derives Gödel's first incompleteness theorem from the undecidability of the halting problem, completing the work started (and abandoned) in #508.

Changes

Foundation/FirstOrder/Incompleteness/Halting.lean:

  • REPred.iff_decoded_pred / ComputablePred.iff_decoded_pred: for a Primcodable type α, r.e.-ness / computability of a predicate A : α → Prop is equivalent to that of the corresponding -predicate obtained via decode. Pure mathlib computability lemmas (composition with decode/encode).
  • incomplete_of_REPred_not_ComputablePred: Primcodable generalization of the existing incomplete_of_REPred_not_ComputablePred_Nat. Needed because the halting predicate lives over Nat.Partrec.Code, not .
  • incomplete_of_halting_problem: the halting problem is r.e. but not recursive (ComputablePred.halting_problem_re / ComputablePred.halting_problem), hence incompleteness.

The core diagonalization lemma incomplete_of_REPred_not_ComputablePred_Nat already exists on master.

Verification

  • lake build Foundation.FirstOrder.Incompleteness.Halting succeeds (forced rebuild), no errors/warnings/sorry.
  • incomplete_of_halting_problem depends only on propext, Classical.choice, Quot.sound (no sorryAx, no custom axioms).

Supersedes #508.

🤖 Generated with Claude Code

SnO2WMaN and others added 2 commits July 4, 2026 10:55
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SnO2WMaN SnO2WMaN merged commit 71b57f2 into master Jul 4, 2026
4 checks passed
@SnO2WMaN SnO2WMaN deleted the halting-incompleteness branch July 4, 2026 02:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant