| 76443 |      1 | theory Document
 | 
|  |      2 |   imports Main
 | 
|  |      3 | begin
 | 
|  |      4 | 
 | 
|  |      5 | section \<open>Some section\<close>
 | 
|  |      6 | 
 | 
|  |      7 | subsection \<open>Some subsection\<close>
 | 
|  |      8 | 
 | 
|  |      9 | subsection \<open>Some subsubsection\<close>
 | 
|  |     10 | 
 | 
|  |     11 | subsubsection \<open>Some subsubsubsection\<close>
 | 
|  |     12 | 
 | 
|  |     13 | paragraph \<open>A paragraph.\<close>
 | 
|  |     14 | 
 | 
|  |     15 | text \<open>Informal bla bla.\<close>
 | 
|  |     16 | 
 | 
|  |     17 | definition "foo = True"  \<comment> \<open>side remark on \<^const>\<open>foo\<close>\<close>
 | 
|  |     18 | 
 | 
|  |     19 | definition "bar = False"  \<comment> \<open>side remark on \<^const>\<open>bar\<close>\<close>
 | 
|  |     20 | 
 | 
|  |     21 | lemma foo unfolding foo_def ..
 | 
|  |     22 | 
 | 
|  |     23 | 
 | 
|  |     24 | paragraph \<open>Another paragraph.\<close>
 | 
|  |     25 | 
 | 
| 76987 |     26 | text \<open>See also \<^cite>\<open>\<open>\S3\<close> in "isabelle-system"\<close>.\<close>
 | 
| 76443 |     27 | 
 | 
|  |     28 | 
 | 
|  |     29 | section \<open>Formal proof of Cantor's theorem\<close>
 | 
|  |     30 | 
 | 
|  |     31 | text_raw \<open>\isakeeptag{proof}\<close>
 | 
|  |     32 | text \<open>
 | 
|  |     33 |   Cantor's Theorem states that there is no surjection from
 | 
|  |     34 |   a set to its powerset.  The proof works by diagonalization.  E.g.\ see
 | 
|  |     35 |   \<^item> \<^url>\<open>http://mathworld.wolfram.com/CantorDiagonalMethod.html\<close>
 | 
|  |     36 |   \<^item> \<^url>\<open>https://en.wikipedia.org/wiki/Cantor%27s%5fdiagonal%5fargument\<close>
 | 
|  |     37 | \<close>
 | 
|  |     38 | 
 | 
|  |     39 | theorem Cantor: "\<nexists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
 | 
|  |     40 | proof
 | 
|  |     41 |   assume "\<exists>f :: 'a \<Rightarrow> 'a set. \<forall>A. \<exists>x. A = f x"
 | 
|  |     42 |   then obtain f :: "'a \<Rightarrow> 'a set" where *: "\<forall>A. \<exists>x. A = f x" ..
 | 
|  |     43 |   let ?D = "{x. x \<notin> f x}"
 | 
|  |     44 |   from * obtain a where "?D = f a" by blast
 | 
|  |     45 |   moreover have "a \<in> ?D \<longleftrightarrow> a \<notin> f a" by blast
 | 
|  |     46 |   ultimately show False by blast
 | 
|  |     47 | qed
 | 
|  |     48 | 
 | 
|  |     49 | 
 | 
|  |     50 | subsection \<open>Lorem ipsum dolor\<close>
 | 
|  |     51 | 
 | 
|  |     52 | text \<open>
 | 
|  |     53 |   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec id ipsum
 | 
|  |     54 |   sapien. Vivamus malesuada enim nibh, a tristique nisi sodales ac. Praesent
 | 
|  |     55 |   ut sem consectetur, interdum tellus ac, sodales nulla. Quisque vel diam at
 | 
|  |     56 |   risus tempus tempor eget a tortor. Suspendisse potenti. Nulla erat lacus,
 | 
|  |     57 |   dignissim sed volutpat nec, feugiat non leo. Nunc blandit et justo sed
 | 
|  |     58 |   venenatis. Donec scelerisque placerat magna, et congue nulla convallis vel.
 | 
|  |     59 |   Cras tristique dolor consequat dolor tristique rutrum. Suspendisse ultrices
 | 
|  |     60 |   sem nibh, et suscipit felis ultricies at. Aliquam venenatis est vel nulla
 | 
|  |     61 |   efficitur ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 | 
|  |     62 | \<close>
 | 
|  |     63 | 
 | 
| 79505 |     64 | 
 | 
|  |     65 | text_raw \<open>\begin{credits}\<close>
 | 
|  |     66 | 
 | 
|  |     67 | subsubsection \<open>\ackname\<close>
 | 
|  |     68 | text \<open>
 | 
|  |     69 |   Isabelle/Scala was of great help to assemble the \<^verbatim>\<open>llncs\<close> system component;
 | 
|  |     70 |   see also \<^file>\<open>~~/src/Pure/Admin/component_llncs.scala\<close> and
 | 
|  |     71 |   \<^path>\<open>$ISABELLE_LLNCS_HOME\<close>.
 | 
|  |     72 | \<close>
 | 
|  |     73 | 
 | 
|  |     74 | subsubsection \<open>\discintname\<close>
 | 
|  |     75 | text \<open>
 | 
|  |     76 |   I have a long-standing interest in the wealth and prosperity of the Isabelle
 | 
|  |     77 |   open-source project. \<close>
 | 
|  |     78 | 
 | 
|  |     79 | text_raw \<open>\end{credits}\<close>
 | 
|  |     80 | 
 | 
| 76443 |     81 | end
 |