--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/Hoare/List_Examples.ML Wed Nov 22 18:48:56 1995 +0100
@@ -0,0 +1,29 @@
+goal thy
+"{x=X} \
+\ y := []; \
+\ WHILE x ~= [] \
+\ DO { rev(x)@y = rev(X)} \
+\ y := hd x # y; x := tl x \
+\ END \
+\{y=rev(X)}";
+by(hoare_tac 1);
+by(asm_full_simp_tac (!simpset addsimps [neq_Nil_conv]) 1);
+by(safe_tac HOL_cs);
+by(Asm_full_simp_tac 1);
+by(Asm_full_simp_tac 1);
+qed "imperative_reverse";
+
+goal thy
+"{x=X & y = Y} \
+\ x := rev(x); \
+\ WHILE x ~= [] \
+\ DO { rev(x)@y = X@Y} \
+\ y := hd x # y; x := tl x \
+\ END \
+\{y = X@Y}";
+by(hoare_tac 1);
+by(asm_full_simp_tac (!simpset addsimps [neq_Nil_conv]) 1);
+by(safe_tac HOL_cs);
+by(Asm_full_simp_tac 1);
+by(Asm_full_simp_tac 1);
+qed "imperative_append";
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/HOL/Hoare/List_Examples.thy Wed Nov 22 18:48:56 1995 +0100
@@ -0,0 +1,1 @@
+List_Examples = Hoare + List
--- a/src/HOL/Hoare/ROOT.ML Tue Nov 21 17:59:45 1995 +0100
+++ b/src/HOL/Hoare/ROOT.ML Wed Nov 22 18:48:56 1995 +0100
@@ -7,3 +7,4 @@
HOL_build_completed; (*Make examples fail if HOL did*)
use_thy "Examples";
+use_thy "List_Examples";