{
  "artifactId": "artifact.library.mathlib.cantor-theorem.v001",
  "candidateOnly": false,
  "category": "Logic and set theory",
  "claimBoundary": "This target indexes Mathlib's diagonal theorem that no function from a type to its power set is surjective. It does not separately state the cardinal inequality or claim a new proof.",
  "collectionSlug": "landmark-theorems-in-mathlib",
  "exactFormalStatement": "theorem Function.cantor_surjective {α : Type*} (f : α → Set α) : ¬Function.Surjective f",
  "family": "Diagonal arguments",
  "id": "library.mathlib.cantor-theorem.v001",
  "links": {
    "collection": "/collections/landmark-theorems-in-mathlib/",
    "collectionData": "/data/collections/mathlib-landmarks.json",
    "entry": "/library-theorems/cantor-theorem/",
    "entryData": "/data/library-theorems/cantor-theorem.json",
    "evidence": "/proofs/artifact.library.mathlib.cantor-theorem.v001.html",
    "evidenceData": "/data/proofs/artifact.library.mathlib.cantor-theorem.v001.evidence.json",
    "source": "/sources/upstream/cantor-theorem/"
  },
  "landmark": {
    "completeFormalType": "theorem Function.cantor_surjective {α : Type*} (f : α → Set α) : ¬Function.Surjective f",
    "concepts": [
      "power set",
      "surjectivity",
      "diagonal argument",
      "fixed point",
      "complementation"
    ],
    "plainLanguage": "Given any attempted list of all subsets of a type, form the subset that reverses membership at each element's own listed position. That diagonal subset cannot appear anywhere in the list.",
    "poster": {
      "alt": "An ivory logic poster shows a green domain, cobalt subset folio, gold diagonal witness, the exact non-surjectivity statement, fixed-point bridge, and complement obstruction.",
      "byteSize": 2967998,
      "caption": "No mapping from a type reaches every subset of that same type.",
      "description": "The poster makes the hypothetical enumeration, the diagonal subset, and the complement fixed-point contradiction explicit while keeping the formal endpoint at non-surjectivity onto Set α.",
      "derivatives": [
        {
          "byteSize": 131566,
          "height": 960,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/cantor-theorem/theorem-poster-v2-640.webp",
          "sha256": "sha256:30982f6b47ebe74c346ed35237f65525efd5d4b0bf4fd14468337f9fc3f18baa",
          "width": 640
        },
        {
          "byteSize": 320932,
          "height": 1536,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/cantor-theorem/theorem-poster-v2-1024.webp",
          "sha256": "sha256:45defb51019d5cb8d5f7593652a20450722ce59e0444862df85d9550da1f3a74",
          "width": 1024
        }
      ],
      "generatedAt": "2026-07-22T04:35:06Z",
      "height": 1536,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/cantor-theorem/theorem-poster-v2.png",
      "sha256": "sha256:768bf762b93fcf6c8e7122a885bb296318540b3b768a68e4de4e09c7680a64ab",
      "title": "Cantor's Theorem at a glance",
      "width": 1024,
      "kind": "theorem_poster",
      "transcript": "LOGIC · DIAGONAL ARGUMENT\nCANTOR'S THEOREM\nNo function reaches every subset of its own domain\nf : α → Set α is never onto\nTHE DIAGONAL SUBSET ESCAPES EVERY ENUMERATION\nHOW THE CHECKED ROUTE MOVES\n1 · If f were onto, every endofunction would have a fixed point\n2 · Complementation has no fixed point\nEXACT SCOPE\nNo function α → Set α is onto. No separate cardinal inequality is stated."
    },
    "visual": {
      "alt": "A green source constellation maps into layered cobalt subsets while one recurring gold diagonal subset escapes through a single restrained red contradiction fracture.",
      "byteSize": 2807896,
      "caption": "The diagonal subset reverses membership at each proposed preimage, so no enumeration reaches every subset.",
      "description": "A single mapping tapestry connects source elements to candidate subsets. The gold diagonal construction follows those assignments and reverses each self-membership decision, making its own subset unavailable as an image of the function.",
      "derivatives": [
        {
          "byteSize": 62758,
          "height": 427,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/cantor-theorem/theorem-schematic-v1-640.webp",
          "sha256": "sha256:15998c5fcac5393faadfd8a4afa8097bf1c93d5e75e281c5d9c134210b8cda0d",
          "width": 640
        },
        {
          "byteSize": 177856,
          "height": 800,
          "mediaType": "image/webp",
          "publicPath": "/assets/library-theorems/cantor-theorem/theorem-schematic-v1-1200.webp",
          "sha256": "sha256:29f9266d8f1ca3f5adc83c3c604bb118e5ab76d3c5d95e6b90dde4f4fc01e68f",
          "width": 1200
        }
      ],
      "generatedAt": "2026-07-21T23:50:51Z",
      "height": 1024,
      "mediaType": "image/png",
      "modelRequested": "gpt-image-2",
      "publicPath": "/assets/library-theorems/cantor-theorem/theorem-schematic-v1.png",
      "sha256": "sha256:de3fb2eee42f5cfd8385c9041c5f1b81db3b199ad313eb43245cc84b30a6a2bc",
      "title": "Cantor's Theorem schematic",
      "width": 1536
    },
    "walkthrough": {
      "introduction": "Mathlib proves that no function from a type to its power set is surjective by first showing that a hypothetical surjective family would force every endofunction to have a fixed point, then applying that bridge to complementation, which has no fixed point.",
      "pages": [
        {
          "alt": "An engraved green source constellation maps into a cobalt folio while one recurring gold diagonal thread selects a candidate fixed point.",
          "byteSize": 3461434,
          "caption": "Evaluating a surjective family on its own index constructs an element fixed by any chosen endofunction.",
          "description": "The checked helper exists_fixed_point_of_surjective assumes that a family f : α → α → β is surjective. For an endofunction g : β → β, surjectivity selects an index for the diagonal function a ↦ g (f a a); evaluating at that index produces a fixed point of g.",
          "derivatives": [
            {
              "byteSize": 62682,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-01-v1-640.webp",
              "sha256": "sha256:4076c1efb40b3e1592ca75939b63c705ccdaff91c62b894032a2763492ad317b",
              "width": 640
            },
            {
              "byteSize": 240462,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-01-v1-1200.webp",
              "sha256": "sha256:9fd1ca4c6342290424b5a2f5057edb2bdf281aacca7522019dfdbd5637d58f2f",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-21T23:28:42Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-01-v1.png",
          "sha256": "sha256:ecfbee430dde4d16105e70358ebdf2b431ba7ece792367781c4a933c02c92cc8",
          "title": "A surjection would force every endofunction to have a fixed point",
          "width": 1536,
          "equation": "Surjective f → ∀ g : β → β, ∃ x, g x = x",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 1
        },
        {
          "alt": "The same green constellation, cobalt folio, and gold diagonal thread culminate in an ivory-to-charcoal complement reversal marked by one restrained red fracture.",
          "byteSize": 2985393,
          "caption": "Applying the fixed-point bridge to set complementation would make a subset equal to its own complement, an impossibility.",
          "description": "Function.cantor_surjective feeds the hypothetical surjection f : α → Set α and complementation into the helper. The resulting equality would identify a set with its complement, so not_iff_self closes the contradiction and rejects surjectivity.",
          "derivatives": [
            {
              "byteSize": 49708,
              "height": 427,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-02-v1-640.webp",
              "sha256": "sha256:5b900fc13591498eafc963a1e1e5c5de48eebb111873ca8d8dad91446896678f",
              "width": 640
            },
            {
              "byteSize": 171412,
              "height": 800,
              "mediaType": "image/webp",
              "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-02-v1-1200.webp",
              "sha256": "sha256:f52c1ec57d642060c54006d01da7ffd7f00612b4089179e84fcd00fe22705c31",
              "width": 1200
            }
          ],
          "generatedAt": "2026-07-22T01:02:31Z",
          "height": 1024,
          "mediaType": "image/png",
          "modelRequested": "gpt-image-2",
          "publicPath": "/assets/library-theorems/cantor-theorem/proof-walkthrough-02-v1.png",
          "sha256": "sha256:1f0f7b167245f28e289bde50a27d1169a266efb9448a2b658f1f4cf5a1b26519",
          "title": "Complementation reverses membership at the diagonal",
          "width": 1536,
          "equation": "∀ (f : α → Set α), ¬ Function.Surjective f",
          "kind": "proof_walkthrough_page",
          "sequenceIndex": 2
        }
      ],
      "title": "Cantor's diagonal contradiction"
    },
    "whyLandmark": "Cantor's diagonal argument transformed the study of infinity and became a reusable template across logic, computability, and mathematics. The selected Mathlib theorem captures the exact non-surjectivity statement."
  },
  "nonClaims": [
    "Proof Atlas did not originate Cantor's Theorem or Mathlib's declaration.",
    "The selected declaration is non-surjectivity onto Set α, not a separately stated cardinal inequality or an assertion that no functions exist.",
    "The generated explanation and visuals are not proof evidence."
  ],
  "publicExportEligible": true,
  "relationship": "upstream_direct",
  "schemaVersion": "library-theorem-entry-data.v1",
  "statementId": "statement.library.mathlib.cantor-theorem.v001",
  "statusAxes": {
    "acceptedAtlasResult": "Not recorded for the preferred artifact",
    "locallyReproduced": "Exact upstream declaration replayed",
    "reviewedPage": "2 of 3 presentation reviews recorded",
    "upstreamIndexed": "Pinned source bytes verified locally"
  },
  "summary": "No function from a type to its power set is surjective.",
  "targetId": "target.library.mathlib.cantor-theorem.v001",
  "title": "Cantor's Theorem",
  "upstreamOrigin": {
    "declarationName": "Function.cantor_surjective",
    "immutableSourceUrl": "https://github.com/leanprover-community/mathlib4/blob/5e932f97dd25535344f80f9dd8da3aab83df0fe6/Mathlib/Logic/Function/Basic.lean#L258",
    "packageName": "mathlib",
    "repositoryUrl": "https://github.com/leanprover-community/mathlib4",
    "sourceArtifactHash": "sha256:5dffbb69147f9bf2cfc8de6083b7eab88d0b297762052e5e81d19a77f346dc97",
    "sourceByteLength": 49259,
    "sourceCommit": "5e932f97dd25535344f80f9dd8da3aab83df0fe6",
    "sourceFile": "Mathlib/Logic/Function/Basic.lean",
    "sourceLine": 258,
    "verificationKind": "git_worktree"
  },
  "publicPresentationReview": {
    "status": "reviewed"
  }
}
