{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nCantor's argument is elegant and remarkably simple. The complete proof is presented below, with detailed explanations to follow.\n\nBy definition of cardinality, we have $\\operatorname{card}(X) \u003c \\operatorname{card}(Y)$ for any two sets $X$ and $Y$ if and only if there is an [[injective function|09NWETVTNY]] but no bijective function from $X$ to $Y$. It suffices to show that there is no surjection from $X$ to $Y$. This is the heart of Cantor's theorem: there is no surjective function from any set $A$ to its power set. To establish this, it is enough to show that no function $f$ (that maps elements in $A$ to subsets of $A$) can reach every possible subset, i.e., we just need to demonstrate the existence of a subset of $A$ that is not equal to $f(x)$ for any $x \\in A$. Recalling that each $f(x)$ is a subset of $A$, such a subset is given by the following construction, sometimes called the [[Cantor diagonal set|0XCH8QVDCQ]] of $f$:\n\n$$B=\\{x\\in A \\mid x\\not\\in f(x)\\}.$$\n\nThis means, by definition, that for all $x\\in A$, $x\\in B$ if and only if $x\\notin f(x)$. For all $x$ the sets $B$ and $f(x)$ cannot be equal because $B$ was constructed from elements of $A$ whose images under $f$ did not include themselves. For all $x\\in A$ either $x\\in f(x)$ or $x\\notin f(x)$. If $x\\in f(x)$ then $f(x)$ cannot equal $B$ because $x\\in f(x)$ by assumption and $x\\notin B$ by definition. If $x\\notin f(x)$ then $f(x)$ cannot equal $B$ because $x\\notin f(x)$ by assumption and $x\\in B$ by the definition of $B$.\n\nEquivalently, and slightly more formally, we have just proved that the existence of $\\xi \\in A$ such that $f(\\xi )=B$ implies the following contradiction:\n\n$$\\begin{aligned} \\xi\\in B \u0026\\iff \\xi\\notin f(\\xi) \u0026\u0026 \\text{(by definition of }B\\text{)}; \\\\ \\xi \\in B \u0026\\iff \\xi \\in f(\\xi) \u0026\u0026 \\text{(by assumption that }f(\\xi)=B\\text{)}. \\\\ \\end{aligned}$$\n\nTherefore, by [[reductio ad absurdum|0J0XBKG64S]], the assumption must be false. Thus there is no $\\xi \\in A$ such that $f(\\xi )=B$ ; in other words, $B$ is not in the image of $f$ and $f$ does not map onto every element of the power set of $A$, i.e., $f$ is not surjective.\n\nFinally, to complete the proof, we need to exhibit an injective function from $A$ to its power set. Finding such a function is trivial: just map $x$ to the singleton set $\\{x\\}$. The argument is now complete, and we have established the strict inequality for any set $A$ that $\\operatorname{card}(A) \u003c \\operatorname{card}(\\mathcal{P}(A))$.\n\nAnother way to think of the proof is that $B$, empty or non-empty, is always in the power set of $A$. For $f$ to be [[onto|01RVCMSN5N]], some element of $A$ must map to $B$. But that leads to a contradiction: no element of $B$ can map to $B$ because that would contradict the criterion of membership in $B$, thus the element mapping to $B$ must not be an element of $B$ meaning that it satisfies the criterion for membership in $B$, another contradiction. So the assumption that an element of $A$ maps to $B$ must be false; and $f$ cannot be onto.\n\nBecause of the double occurrence of $x$ in the expression \"$x\\in f(x)$\", this is a [[diagonal argument|0XCH8QVDCQ]]. For a countable (or finite) set, the argument of the proof given above can be illustrated by constructing a table in which\n\n1. each row is labelled by a unique $x$ from $A=\\{x_1 ,x_2 , \\ldots \\}$, in this order. $A$ is assumed to admit a [[linear order|0316AYH1SC]] so that such table can be constructed.\n1. each column of the table is labelled by a unique $y$ from the [[power set|00E0YZCERH]] of $A$; the columns are ordered by the argument to $f$, i.e. the column labels are $f(x_1),f(x_2)$, ..., in this order.\n1. the intersection of each row $x$ and column $y$ records a true/false bit whether $x\\in y$.\n\nGiven the order chosen for the row and column labels, the main diagonal $D$ of this table thus records whether $x\\in f(x)$ for each $x\\in A$. One such table will be the following:\n\n$$\\begin{array}{cccccc} \u0026 f(x_1) \u0026 f(x_2) \u0026 f(x_3) \u0026 f(x_4) \u0026 \\cdots \\\\ \\hline x_1 \u0026 {\\color{red} T} \u0026 T \u0026 F \u0026 T \u0026 \\cdots \\\\ x_2 \u0026 T \u0026 {\\color{red} F} \u0026 F \u0026 F \u0026 \\cdots \\\\ x_3 \u0026 F \u0026 F \u0026 {\\color{red} T} \u0026 T \u0026 \\cdots \\\\ x_4 \u0026 F \u0026 T \u0026 T \u0026 {\\color{red} T} \u0026 \\cdots \\\\ \\vdots \u0026 \\vdots \u0026 \\vdots \u0026 \\vdots \u0026 \\vdots \u0026 \\ddots \\end{array}$$\n\nThe set $B$ constructed in the previous paragraphs coincides with the row labels for the subset of entries on this main diagonal $D$ (which in above example, coloured red) where the table records that $x\\in f(x)$ is false. Each row records the values of the indicator function of the set corresponding to the column. The indicator function of $B$ coincides with the logically negated (swap \"true\" and \"false\") entries of the main diagonal. Thus the indicator function of $B$ does not agree with any column in at least one entry. Consequently, no column represents $B$.\n\nDespite the simplicity of the above proof, it is rather difficult for an automated theorem prover to produce it. The main difficulty lies in an automated discovery of the Cantor diagonal set. Lawrence Paulson noted in 1992 that Otter could not do it, whereas Isabelle could, albeit with a certain amount of direction in terms of tactics that might perhaps be considered cheating.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "03E10"
    ],
    "name": "Proof of Cantor's theorem",
    "proves": "0WTEMGYV2C",
    "sources": [
      {
        "locator": "Cantor's theorem, section Proof",
        "mention": "wikipedia://en/341442#J939",
        "note": "adopted",
        "sections": [
          "Proof"
        ],
        "wikipedia": "en:341442@r1356713544"
      }
    ],
    "tag": "2WPGB3N4A7"
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/2WPGB3N4A7/",
  "links": [
    {
      "field": "proves",
      "target": "0WTEMGYV2C"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/2WPGB3N4A7.md",
  "msc": [
    "03E10"
  ],
  "name": "Proof of Cantor's theorem",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2WP/2WPGB3N4A7.md",
  "status": null,
  "tag": "2WPGB3N4A7",
  "uri": "m2://2WPGB3N4A7",
  "url": "https://math2.tamnd.com/wiki/proof-of-cantors-theorem/",
  "writing": {
    "tag": "2WPGB3N4A7",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge uses out",
        "note": "each node that the argument needs",
        "have": 0,
        "want": 1
      }
    ]
  }
}
