aboutsummaryrefslogtreecommitdiffhomepage
path: root/etc/isar/Sendback.thy
diff options
context:
space:
mode:
authorGravatar David Aspinall <da@inf.ed.ac.uk>2007-08-14 14:12:40 +0000
committerGravatar David Aspinall <da@inf.ed.ac.uk>2007-08-14 14:12:40 +0000
commitfecff511bb9fd00267ad9d0d547a64e012480908 (patch)
tree97a4f13ce94699f19241d79e34a7b5c2397ec9b8 /etc/isar/Sendback.thy
parent92bf338edd846931e952507b369179c0f67a75ed (diff)
Add support for sending back literal commands reusing PBP markup mechanisms.
Diffstat (limited to 'etc/isar/Sendback.thy')
-rw-r--r--etc/isar/Sendback.thy19
1 files changed, 19 insertions, 0 deletions
diff --git a/etc/isar/Sendback.thy b/etc/isar/Sendback.thy
new file mode 100644
index 00000000..f14ae72c
--- /dev/null
+++ b/etc/isar/Sendback.thy
@@ -0,0 +1,19 @@
+(* Demonstrate the use of literal command markup *)
+
+theory Sendback imports Main begin
+
+ML {* val pgasciiN = "PGASCII";
+fun special oct =
+ if print_mode_active pgasciiN then chr 1 ^ chr (ord (oct_char oct) - 167)
+ else oct_char oct;
+fun sendback cmd = writeln ("Try this: \n " ^ (special "375") ^ cmd ^ "\n\n")
+*}
+
+theorem and_comms: "A & B --> B & A"
+proof
+ ML {* sendback "assume \"A & B\"" *}
+ ML {* sendback "then; show \"B & A\"" *}
+ ML {* sendback "proof; assume B and A; then" *}
+ ML {* sendback "show ?thesis; ..; qed" *}
+ ML {* sendback "qed" *}
+qed