# HG changeset patch
# User wenzelm
# Date 1591621797 -7200
# Node ID e5df9c8d9d4b2a59e13210df2550e5ef4517a1aa
# Parent 7b34a932eeb6aef1b354d1001135b495e0dccd52
clarified sessions: "Notable Examples in Isabelle/Pure";
diff -r 7b34a932eeb6 -r e5df9c8d9d4b NEWS
--- a/NEWS Sat Jun 06 10:58:13 2020 +0200
+++ b/NEWS Mon Jun 08 15:09:57 2020 +0200
@@ -18,6 +18,9 @@
*** Pure ***
+* Session Pure-Examples contains notable examples for Isabelle/Pure
+(former entries of HOL-Isar_Examples).
+
* Definitions in locales produce rule which can be added as congruence
rule to protect foundational terms during simplification.
diff -r 7b34a932eeb6 -r e5df9c8d9d4b lib/html/library_index_content.template
--- a/lib/html/library_index_content.template Sat Jun 06 10:58:13 2020 +0200
+++ b/lib/html/library_index_content.template Mon Jun 08 15:09:57 2020 +0200
@@ -46,7 +46,7 @@
Cube (The Lambda Cube)
- The Pure logical framework
+ The Pure logical framework
Sources of Documentation
diff -r 7b34a932eeb6 -r e5df9c8d9d4b src/Doc/Isar_Ref/Framework.thy
--- a/src/Doc/Isar_Ref/Framework.thy Sat Jun 06 10:58:13 2020 +0200
+++ b/src/Doc/Isar_Ref/Framework.thy Mon Jun 08 15:09:57 2020 +0200
@@ -93,7 +93,7 @@
\<^dir>\~~/src/HOL/Isar_Examples\. Some examples demonstrate how to start a fresh
object-logic from Isabelle/Pure, and use Isar proofs from the very start,
despite the lack of advanced proof tools at such an early stage (e.g.\ see
- \<^file>\~~/src/HOL/Isar_Examples/Higher_Order_Logic.thy\). Isabelle/FOL @{cite
+ \<^file>\~~/src/Pure/Examples/Higher_Order_Logic.thy\). Isabelle/FOL @{cite
"isabelle-logics"} and Isabelle/ZF @{cite "isabelle-ZF"} also work, but are
much less developed.
diff -r 7b34a932eeb6 -r e5df9c8d9d4b src/HOL/Isar_Examples/First_Order_Logic.thy
--- a/src/HOL/Isar_Examples/First_Order_Logic.thy Sat Jun 06 10:58:13 2020 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-(* Title: HOL/Isar_Examples/First_Order_Logic.thy
- Author: Makarius
-*)
-
-section \A simple formulation of First-Order Logic\
-
-text \
- The subsequent theory development illustrates single-sorted intuitionistic
- first-order logic with equality, formulated within the Pure framework.
-\
-
-theory First_Order_Logic
- imports Pure
-begin
-
-subsection \Abstract syntax\
-
-typedecl i
-typedecl o
-
-judgment Trueprop :: "o \ prop" ("_" 5)
-
-
-subsection \Propositional logic\
-
-axiomatization false :: o ("\")
- where falseE [elim]: "\ \ A"
-
-
-axiomatization imp :: "o \ o \ o" (infixr "\" 25)
- where impI [intro]: "(A \ B) \ A \ B"
- and mp [dest]: "A \ B \ A \ B"
-
-
-axiomatization conj :: "o \ o \ o" (infixr "\" 35)
- where conjI [intro]: "A \ B \ A \ B"
- and conjD1: "A \ B \ A"
- and conjD2: "A \ B \ B"
-
-theorem conjE [elim]:
- assumes "A \ B"
- obtains A and B
-proof
- from \A \ B\ show A
- by (rule conjD1)
- from \A \ B\ show B
- by (rule conjD2)
-qed
-
-
-axiomatization disj :: "o \ o \ o" (infixr "\" 30)
- where disjE [elim]: "A \ B \ (A \ C) \ (B \ C) \ C"
- and disjI1 [intro]: "A \ A \ B"
- and disjI2 [intro]: "B \ A \ B"
-
-
-definition true :: o ("\")
- where "\ \ \ \ \"
-
-theorem trueI [intro]: \
- unfolding true_def ..
-
-
-definition not :: "o \ o" ("\ _" [40] 40)
- where "\ A \ A \ \"
-
-theorem notI [intro]: "(A \ \) \ \ A"
- unfolding not_def ..
-
-theorem notE [elim]: "\ A \ A \ B"
- unfolding not_def
-proof -
- assume "A \ \" and A
- then have \ ..
- then show B ..
-qed
-
-
-definition iff :: "o \ o \ o" (infixr "\" 25)
- where "A \ B \ (A \ B) \ (B \ A)"
-
-theorem iffI [intro]:
- assumes "A \ B"
- and "B \ A"
- shows "A \ B"
- unfolding iff_def
-proof
- from \A \ B\ show "A \ B" ..
- from \B \ A\ show "B \ A" ..
-qed
-
-theorem iff1 [elim]:
- assumes "A \ B" and A
- shows B
-proof -
- from \A \ B\ have "(A \ B) \ (B \ A)"
- unfolding iff_def .
- then have "A \ B" ..
- from this and \A\ show B ..
-qed
-
-theorem iff2 [elim]:
- assumes "A \ B" and B
- shows A
-proof -
- from \A \ B\ have "(A \ B) \ (B \ A)"
- unfolding iff_def .
- then have "B \ A" ..
- from this and \B\ show A ..
-qed
-
-
-subsection \Equality\
-
-axiomatization equal :: "i \ i \ o" (infixl "=" 50)
- where refl [intro]: "x = x"
- and subst: "x = y \ P x \ P y"
-
-theorem trans [trans]: "x = y \ y = z \ x = z"
- by (rule subst)
-
-theorem sym [sym]: "x = y \ y = x"
-proof -
- assume "x = y"
- from this and refl show "y = x"
- by (rule subst)
-qed
-
-
-subsection \Quantifiers\
-
-axiomatization All :: "(i \ o) \ o" (binder "\" 10)
- where allI [intro]: "(\x. P x) \ \x. P x"
- and allD [dest]: "\x. P x \ P a"
-
-axiomatization Ex :: "(i \ o) \ o" (binder "\" 10)
- where exI [intro]: "P a \ \x. P x"
- and exE [elim]: "\x. P x \ (\x. P x \ C) \ C"
-
-
-lemma "(\x. P (f x)) \ (\y. P y)"
-proof
- assume "\x. P (f x)"
- then obtain x where "P (f x)" ..
- then show "\y. P y" ..
-qed
-
-lemma "(\x. \y. R x y) \ (\y. \x. R x y)"
-proof
- assume "\x. \y. R x y"
- then obtain x where "\y. R x y" ..
- show "\y. \x. R x y"
- proof
- fix y
- from \\y. R x y\ have "R x y" ..
- then show "\x. R x y" ..
- qed
-qed
-
-end
diff -r 7b34a932eeb6 -r e5df9c8d9d4b src/HOL/Isar_Examples/Higher_Order_Logic.thy
--- a/src/HOL/Isar_Examples/Higher_Order_Logic.thy Sat Jun 06 10:58:13 2020 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,520 +0,0 @@
-(* Title: HOL/Isar_Examples/Higher_Order_Logic.thy
- Author: Makarius
-*)
-
-section \Foundations of HOL\
-
-theory Higher_Order_Logic
- imports Pure
-begin
-
-text \
- The following theory development illustrates the foundations of Higher-Order
- Logic. The ``HOL'' logic that is given here resembles @{cite
- "Gordon:1985:HOL"} and its predecessor @{cite "church40"}, but the order of
- axiomatizations and defined connectives has be adapted to modern
- presentations of \\\-calculus and Constructive Type Theory. Thus it fits
- nicely to the underlying Natural Deduction framework of Isabelle/Pure and
- Isabelle/Isar.
-\
-
-
-section \HOL syntax within Pure\
-
-class type
-default_sort type
-
-typedecl o
-instance o :: type ..
-instance "fun" :: (type, type) type ..
-
-judgment Trueprop :: "o \ prop" ("_" 5)
-
-
-section \Minimal logic (axiomatization)\
-
-axiomatization imp :: "o \ o \ o" (infixr "\" 25)
- where impI [intro]: "(A \ B) \ A \ B"
- and impE [dest, trans]: "A \ B \ A \ B"
-
-axiomatization All :: "('a \ o) \ o" (binder "\" 10)
- where allI [intro]: "(\x. P x) \ \x. P x"
- and allE [dest]: "\x. P x \ P a"
-
-lemma atomize_imp [atomize]: "(A \ B) \ Trueprop (A \ B)"
- by standard (fact impI, fact impE)
-
-lemma atomize_all [atomize]: "(\x. P x) \ Trueprop (\x. P x)"
- by standard (fact allI, fact allE)
-
-
-subsubsection \Derived connectives\
-
-definition False :: o
- where "False \ \A. A"
-
-lemma FalseE [elim]:
- assumes "False"
- shows A
-proof -
- from \False\ have "\A. A" by (simp only: False_def)
- then show A ..
-qed
-
-
-definition True :: o
- where "True \ False \ False"
-
-lemma TrueI [intro]: True
- unfolding True_def ..
-
-
-definition not :: "o \ o" ("\ _" [40] 40)
- where "not \ \A. A \ False"
-
-lemma notI [intro]:
- assumes "A \ False"
- shows "\ A"
- using assms unfolding not_def ..
-
-lemma notE [elim]:
- assumes "\ A" and A
- shows B
-proof -
- from \\ A\ have "A \ False" by (simp only: not_def)
- from this and \A\ have "False" ..
- then show B ..
-qed
-
-lemma notE': "A \ \ A \ B"
- by (rule notE)
-
-lemmas contradiction = notE notE' \ \proof by contradiction in any order\
-
-
-definition conj :: "o \ o \ o" (infixr "\" 35)
- where "A \ B \ \C. (A \ B \ C) \ C"
-
-lemma conjI [intro]:
- assumes A and B
- shows "A \ B"
- unfolding conj_def
-proof
- fix C
- show "(A \ B \ C) \ C"
- proof
- assume "A \ B \ C"
- also note \A\
- also note \B\
- finally show C .
- qed
-qed
-
-lemma conjE [elim]:
- assumes "A \ B"
- obtains A and B
-proof
- from \A \ B\