Added a few lemmas.
authornipkow
Thu, 24 Jul 1997 15:25:29 +0200
changeset 3574 5995ab73d790
parent 3573 7544c866315c
child 3575 4e9beacb5339
Added a few lemmas.
src/HOL/List.ML
--- a/src/HOL/List.ML	Thu Jul 24 11:20:12 1997 +0200
+++ b/src/HOL/List.ML	Thu Jul 24 15:25:29 1997 +0200
@@ -10,7 +10,8 @@
 by (induct_tac "xs" 1);
 by (ALLGOALS Asm_simp_tac);
 qed_spec_mp "not_Cons_self";
-Addsimps [not_Cons_self];
+bind_thm("not_Cons_self2",not_Cons_self RS not_sym);
+Addsimps [not_Cons_self,not_Cons_self2];
 
 goal thy "(xs ~= []) = (? y ys. xs = y#ys)";
 by (induct_tac "xs" 1);
@@ -95,6 +96,18 @@
 qed "Nil_is_append_conv";
 AddIffs [Nil_is_append_conv];
 
+goal thy "(xs @ ys = xs) = (ys=[])";
+by (induct_tac "xs" 1);
+by (ALLGOALS Asm_simp_tac);
+qed "append_self_conv";
+
+goal thy "(xs = xs @ ys) = (ys=[])";
+by (induct_tac "xs" 1);
+by (ALLGOALS Asm_simp_tac);
+by (Blast_tac 1);
+qed "self_append_conv";
+AddIffs [append_self_conv,self_append_conv];
+
 goal thy "(xs @ ys = xs @ zs) = (ys=zs)";
 by (induct_tac "xs" 1);
 by (ALLGOALS Asm_simp_tac);