Test for term patterns added.
authorballarin
Tue, 25 Nov 2008 18:06:49 +0100
changeset 28886 9cb1297b6f13
parent 28885 6f6bf52e75bb
child 28887 6f28fa3bc430
Test for term patterns added.
src/FOL/ex/NewLocaleTest.thy
--- a/src/FOL/ex/NewLocaleTest.thy	Tue Nov 25 18:06:21 2008 +0100
+++ b/src/FOL/ex/NewLocaleTest.thy	Tue Nov 25 18:06:49 2008 +0100
@@ -140,4 +140,27 @@
 end
 print_locale! rgrp
 
+
+text {* Patterns *}
+
+lemma (in rgrp)
+  assumes "y ** x = z ** x" (is ?a)
+  shows "y = z" (is ?t)
+proof -
+  txt {* Weird proof involving patterns from context element and conclusion. *}
+  {
+    assume ?a
+    then have "y ** (x ** inv(x)) = z ** (x ** inv(x))"
+      by (simp add: assoc [symmetric])
+    then have ?t by (simp add: rone rinv)
+  }
+  note x = this
+  show ?t by (rule x [OF `?a`])
+qed
+
+lemma
+  assumes "P <-> P" (is "?p <-> _")
+  shows "?p <-> ?p"
+  .
+
 end