new theorem
authorpaulson
Thu, 19 Feb 2004 10:40:28 +0100
changeset 14395 cc96cc06abf9
parent 14394 51b24127eef2
child 14396 011a2a49d303
new theorem
src/HOL/List.thy
--- a/src/HOL/List.thy	Thu Feb 19 10:37:15 2004 +0100
+++ b/src/HOL/List.thy	Thu Feb 19 10:40:28 2004 +0100
@@ -1132,6 +1132,10 @@
   "length a = length b \<Longrightarrow> (\<And>n. n < length a \<Longrightarrow> P (a!n) (b!n)) \<Longrightarrow> list_all2 P a b"
   by (simp add: list_all2_conv_all_nth)
 
+lemma list_all2I:
+  "\<forall>x \<in> set (zip a b). split P x \<Longrightarrow> length a = length b \<Longrightarrow> list_all2 P a b"
+  by (simp add: list_all2_def)
+
 lemma list_all2_nthD:
   "\<lbrakk> list_all2 P xs ys; p < size xs \<rbrakk> \<Longrightarrow> P (xs!p) (ys!p)"
   by (simp add: list_all2_conv_all_nth)