cantors_diagonalization

Community

Prove uncountability with Cantor's diagonal.

Authorbneb
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Cantor's diagonalization proves that a set has strictly greater cardinality than its power set by constructing a diagonal element that differs from every element of any proposed enumeration, thereby establishing non-enumerability. The technique also generalizes to computability arguments (e.g., no Turing machine can decide the Halting problem) and other diagonal arguments in mathematics and logic. In Lean 4 / mathlib4, Cantor.not_surjective provides the abstract result; the method typically explicitly defines a diagonal function such as d : ℕ → Bool that inverts f(n)(n) at each step.

Core Features & Use Cases

  • Formal diagonal construction to refute surjectivity in Lean 4 / mathlib4 proofs.
  • Application to uncountability results, Cantor's theorem, and computability arguments (e.g., Halting problem undecidability).
  • Lean 4 templates including a concrete diagonal function d(n) = not f(n)(n) used to exhibit a counterexample.

Quick Start

Provide a surjection f : ℕ → S and request the diagonal element that differs from every f(n) at position n.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cantors_diagonalization
Download link: https://github.com/bneb/perqed/archive/main.zip#cantors-diagonalization

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.