src/HOL/Library/List_Prefix.thy
changeset 19086 1b3780be6cc2
parent 18730 843da46f89ac
child 21305 d41eddfd2b66
equal deleted inserted replaced
19085:a1a251b297dd 19086:1b3780be6cc2
   153   by (auto simp add: prefix_def)
   153   by (auto simp add: prefix_def)
   154 
   154 
   155 
   155 
   156 subsection {* Parallel lists *}
   156 subsection {* Parallel lists *}
   157 
   157 
   158 constdefs
   158 definition
   159   parallel :: "'a list => 'a list => bool"    (infixl "\<parallel>" 50)
   159   parallel :: "'a list => 'a list => bool"    (infixl "\<parallel>" 50)
   160   "xs \<parallel> ys == \<not> xs \<le> ys \<and> \<not> ys \<le> xs"
   160   "(xs \<parallel> ys) = (\<not> xs \<le> ys \<and> \<not> ys \<le> xs)"
   161 
   161 
   162 lemma parallelI [intro]: "\<not> xs \<le> ys ==> \<not> ys \<le> xs ==> xs \<parallel> ys"
   162 lemma parallelI [intro]: "\<not> xs \<le> ys ==> \<not> ys \<le> xs ==> xs \<parallel> ys"
   163   unfolding parallel_def by blast
   163   unfolding parallel_def by blast
   164 
   164 
   165 lemma parallelE [elim]:
   165 lemma parallelE [elim]:
   213 qed
   213 qed
   214 
   214 
   215 
   215 
   216 subsection {* Postfix order on lists *}
   216 subsection {* Postfix order on lists *}
   217 
   217 
   218 constdefs
   218 definition
   219   postfix :: "'a list => 'a list => bool"  ("(_/ >>= _)" [51, 50] 50)
   219   postfix :: "'a list => 'a list => bool"  ("(_/ >>= _)" [51, 50] 50)
   220   "xs >>= ys == \<exists>zs. xs = zs @ ys"
   220   "(xs >>= ys) = (\<exists>zs. xs = zs @ ys)"
   221 
   221 
   222 lemma postfix_refl [simp, intro!]: "xs >>= xs"
   222 lemma postfix_refl [simp, intro!]: "xs >>= xs"
   223   by (auto simp add: postfix_def)
   223   by (auto simp add: postfix_def)
   224 lemma postfix_trans: "\<lbrakk>xs >>= ys; ys >>= zs\<rbrakk> \<Longrightarrow> xs >>= zs"
   224 lemma postfix_trans: "\<lbrakk>xs >>= ys; ys >>= zs\<rbrakk> \<Longrightarrow> xs >>= zs"
   225   by (auto simp add: postfix_def)
   225   by (auto simp add: postfix_def)