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