src/Doc/Demo_LIPIcs/Document.thy
author paulson <lp15@cam.ac.uk>
Sun, 26 Feb 2023 21:17:39 +0000
changeset 77388 dec831b200eb
parent 76987 4c275405faae
permissions -rw-r--r--
Simplified some proofs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
76395
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     1
theory Document
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     2
  imports Main
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     3
begin
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     4
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     5
section \<open>Some section\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     6
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     7
subsection \<open>Some subsection\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     8
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
     9
subsection \<open>Some subsubsection\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    10
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    11
subsubsection \<open>Some subsubsubsection\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    12
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    13
paragraph \<open>A paragraph.\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    14
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    15
text \<open>Informal bla bla.\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    16
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    17
definition "foo = True"  \<comment> \<open>side remark on \<^const>\<open>foo\<close>\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    18
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    19
definition "bar = False"  \<comment> \<open>side remark on \<^const>\<open>bar\<close>\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    20
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    21
lemma foo unfolding foo_def ..
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    22
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    23
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    24
paragraph \<open>Another paragraph.\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    25
76987
4c275405faae isabelle update -u cite;
wenzelm
parents: 76395
diff changeset
    26
text \<open>See also \<^cite>\<open>\<open>\S3\<close> in "isabelle-system"\<close>.\<close>
76395
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    27
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    28
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    29
section \<open>Formal proof of Cantor's theorem\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    30
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    31
text_raw \<open>\isakeeptag{proof}\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    32
text \<open>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    33
  Cantor's Theorem states that there is no surjection from
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    34
  a set to its powerset.  The proof works by diagonalization.  E.g.\ see
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    35
  \<^item> \<^url>\<open>http://mathworld.wolfram.com/CantorDiagonalMethod.html\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    36
  \<^item> \<^url>\<open>https://en.wikipedia.org/wiki/Cantor's_diagonal_argument\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    37
\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    38
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    39
theorem Cantor: "\<nexists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    40
proof
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    41
  assume "\<exists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    42
  then obtain f :: "'a \<Rightarrow> 'a set" where *: "\<forall>A. \<exists>x. A = f x" ..
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    43
  let ?D = "{x. x \<notin> f x}"
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    44
  from * obtain a where "?D = f a" by blast
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    45
  moreover have "a \<in> ?D \<longleftrightarrow> a \<notin> f a" by blast
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    46
  ultimately show False by blast
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    47
qed
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    48
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    49
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    50
subsection \<open>Lorem ipsum dolor\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    51
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    52
text \<open>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    53
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec id ipsum
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    54
  sapien. Vivamus malesuada enim nibh, a tristique nisi sodales ac. Praesent
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    55
  ut sem consectetur, interdum tellus ac, sodales nulla. Quisque vel diam at
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    56
  risus tempus tempor eget a tortor. Suspendisse potenti. Nulla erat lacus,
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    57
  dignissim sed volutpat nec, feugiat non leo. Nunc blandit et justo sed
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    58
  venenatis. Donec scelerisque placerat magna, et congue nulla convallis vel.
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    59
  Cras tristique dolor consequat dolor tristique rutrum. Suspendisse ultrices
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    60
  sem nibh, et suscipit felis ultricies at. Aliquam venenatis est vel nulla
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    61
  efficitur ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    62
\<close>
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    63
fac28b6c37e8 support for Dagstuhl LIPIcs style with demo document;
wenzelm
parents:
diff changeset
    64
end