# HG changeset patch # User wenzelm # Date 1451748756 -3600 # Node ID 5651de00bca9504758adb8d3441948868638b974 # Parent 9bb80149dad9590766c5af578f58ceff907afe40 tuned; diff -r 9bb80149dad9 -r 5651de00bca9 src/HOL/Isar_Examples/Cantor.thy --- a/src/HOL/Isar_Examples/Cantor.thy Sat Jan 02 16:15:28 2016 +0100 +++ b/src/HOL/Isar_Examples/Cantor.thy Sat Jan 02 16:32:36 2016 +0100 @@ -17,7 +17,7 @@ \<^item> @{url "https://en.wikipedia.org/wiki/Cantor's_diagonal_argument"} \ -theorem Cantor: "\ (\f :: 'a \ 'a set. \A :: 'a set. \x :: 'a. A = f x)" +theorem Cantor: "\ (\f :: 'a \ 'a set. \A. \x. A = f x)" proof assume "\f :: 'a \ 'a set. \A. \x. A = f x" then obtain f :: "'a \ 'a set" where *: "\A. \x. A = f x" .. @@ -63,14 +63,14 @@ with * show A .. qed -theorem Cantor': "\ (\f :: 'a \ 'a \ bool. \A :: 'a \ bool. \x :: 'a. A = f x)" +theorem Cantor': "\ (\f :: 'a \ 'a \ bool. \A. \x. A = f x)" proof - assume "\f :: 'a \ 'a \ bool. \A :: 'a \ bool. \x. A = f x" + assume "\f :: 'a \ 'a \ bool. \A. \x. A = f x" then obtain f :: "'a \ 'a \ bool" where *: "\A. \x. A = f x" .. let ?D = "\x. \ f x x" from * have "\x. ?D = f x" .. then obtain a where "?D = f a" .. - then have "?D a \ f a a" using refl by (rule subst) + then have "?D a \ f a a" by (rule arg_cong) then show False by (rule iff_contradiction) qed diff -r 9bb80149dad9 -r 5651de00bca9 src/HOL/Isar_Examples/Higher_Order_Logic.thy --- a/src/HOL/Isar_Examples/Higher_Order_Logic.thy Sat Jan 02 16:15:28 2016 +0100 +++ b/src/HOL/Isar_Examples/Higher_Order_Logic.thy Sat Jan 02 16:32:36 2016 +0100 @@ -274,7 +274,7 @@ with * show A .. qed -theorem Cantor: "\ (\f :: 'a \ 'a \ o. \A :: 'a \ o. \x :: 'a. A = f x)" +theorem Cantor: "\ (\f :: 'a \ 'a \ o. \A. \x. A = f x)" proof assume "\f :: 'a \ 'a \ o. \A. \x. A = f x" then obtain f :: "'a \ 'a \ o" where *: "\A. \x. A = f x" ..